Search is not available for this dataset
query
stringlengths
7
355k
document
stringlengths
9
341k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Cross product of 2dimension vector.
function crossProduct2d(x1, y1, x2, y2) { return x1 * y2 - x2 * y1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "cross(vector) {\n return this.x * vector.y - this.y * vector.x;\n }", "function vectorCross(a, b) {\n\treturn a[1] * b[0] - a[0] * b[1];\n}", "function crossProduct(v1, v2) {\n\tv1 = normalize(v1);\n\tv2 = normalize(v2);\n\t//since there is no third value for our cross product\n\t//the first two values are always zero \n\t//and our resultant vector either points in \n\t//or out of the screen\n\treturn [0, 0, v1[0] * v2[1] - v1[1]*v2[0]];\n}", "cross(b) // Use only on 3x1 Vecs. Example: \"Vec.of( 1,0,0 ).cross( Vec.of( 0,1,0 ) )\" returns the Vec [ 0,0,1 ]. \r\n {\r\n return Vec.of(this[1] * b[2] - this[2] * b[1], this[2] * b[0] - this[0] * b[2], this[0] * b[1] - this[1] * b[0]);\r\n }", "function vector_cross(v1, v2) {\n let v_cross = [];\n v_cross[0] = v1[1]*v2[2] - v1[2]*v2[1];\n v_cross[1] = v1[2]*v2[0] - v1[0]*v2[2];\n v_cross[2] = v1[0]*v2[1] - v1[1]*v2[0];\n return v_cross;\n}", "function vector_cross(v1, v2) {\n var v_cross = [];\n v_cross[0] = v1[1]*v2[2] - v1[2]*v2[1];\n v_cross[1] = v1[2]*v2[0] - v1[0]*v2[2];\n v_cross[2] = v1[0]*v2[1] - v1[1]*v2[0];\n return v_cross;\n}", "crossProduct(v1, v2) {\n return (v1[0] * v2[1] - v1[1] * v2[0]);\n }", "function crossProduct(v1, v2) {\n return v1.x * v2.y - v2.x * v1.y;\n }", "function crossProduct(v1, v2)\n{\n return v1.x * v2.y - v1.y * v2.x;\n}", "function cross(v0, v1) {\n return [v0[1] * v1[2] - v0[2] * v1[1], v0[2] * v1[0] - v0[0] * v1[2], v0[0] * v1[1] - v0[1] * v1[0]];\n}", "static cross(v1, v2)\n\t{\n\t\t//TODO: done\n\t\treturn new Vector(\n\t\t\tv1.y*v2.z - v1.z*v2.y,\n\t\t\tv1.z*v2.x - v1.x*v2.z,\n\t\t\tv1.x*v2.y - v1.y*v2.x\n\t\t);\n\t}", "function crossProduct(vec1, vec2) {\n let sum = 0;\n for (let i = 0; i < vec1.length; i++) {\n sum += vec1[i] * vec2[i];\n }\n return sum;\n}", "function cross( v1, v2 )\n {\n return [ v1[1] * v2[2] - v1[2] * v2[1], v1[2] * v2[0] - v1[0] * v2[2], v1[0] * v2[1] - v1[1] * v2[0] ];\n }", "crossProduct(point) {\n let result = new Vector3();\n result.setXYZ(this.y * point.z - this.z * point.y, this.z * point.x - this.x * point.z, this.x * point.y - this.y * point.x);\n return result;\n }", "static cross(v1, v2) {\n try {\n if (!(v1 instanceof Vector) || !(v2 instanceof Vector))\n throw \"Vector.cross: non-vector parameter\";\n else\n return(new Vector((v1.y*v2.z - v1.z*v2.y), (v1.z*v2.x - v1.x*v2.z), (v1.x*v2.y - v1.y*v2.x)));\n } // end try\n \n catch(e) {\n console.log(e);\n return(NaN);\n }\n }", "function crossProduct(x0, y0, x1, y1, x2, y2) {\n\treturn (x1 - x0) * (y2 - y0) - (y1 - y0) * (x2 - x0);\n}", "function cross(a, b){\n return [a[1]*b[2] - a[2]*b[1], a[2]*b[0] - a[0]*b[2], a[0]*b[1] - a[1]*b[0]];\n}", "function cross( v1, v2 ) {\n return (v1.x * v2.y) - (v1.y * v2.x);\n}", "function crossProduct(A, B, C) {\n var ab = vec3.create();\n var ac = vec3.create();\n var crs = vec3.create();\n vec3.subtract(ab, B, A);\n vec3.subtract(ac, C, A);\n vec3.cross(crs, ab, ac);\n return crs;\n}", "function cross(a, b, c) {\n\t return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]);\n\t }", "function cross(a, b, c) {\n\t return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]);\n\t }", "cross(vec3) {\n return Vector3.pool.create().crossBy(this, vec3);\n }", "function cross(a, b){\n if(validateDimensions(a,b))\n return; // Dimensions do not agree\n\n return math.matrix([[a._data[1]*b._data[2]-a._data[2]*b._data[1]],\n [a._data[2]*b._data[0]-a._data[0]*b._data[2]],\n [a._data[0]*b._data[1]-a._data[2]*b._data[0]]]);\n}", "function cross(a, b, c) {\n return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]);\n }", "function crossProduct2d(x1, y1, x2, y2) {\n\t return x1 * y2 - x2 * y1;\n\t }", "function vector_product(a, b) {\n return a.x * b.y - a.y * b.x;\n}", "function crossProduct(p1, p2, p3){\n return (p2.x - p1.x)*(p3.y - p1.y) - (p2.y - p1.y)*(p3.x - p1.x); \n}", "function crossProduct(p1, p2, p3) {\n return (p2.x - p1.x)*(p3.y - p1.y) - (p2.y - p1.y)*(p3.x - p1.x)\n}", "function crossProductNorm(v1, v2) {\n return (v1.x * v2.y - v2.x * v1.y) / (norm(v1) * norm(v2));\n }", "function cross(A, B) {\n if (A.shape.length !== 1 || B.shape.length !== 1) {\n throw new Error('A or B is not 1D');\n }\n if (A.length < 3 || B.length < 3) {\n throw new Error('A or B is less than 3 in length');\n }\n var a1 = A.getN(0);\n var a2 = A.getN(1);\n var a3 = A.getN(2);\n var b1 = B.getN(0);\n var b2 = B.getN(1);\n var b3 = B.getN(2);\n return new ndarray_1.NDArray([\n a2 * b3 - a3 * b2,\n a3 * b1 - a1 * b3,\n a1 * b2 - a2 * b1\n ]);\n}", "function cross(x, y, out) {\n\t var Zx = x[1] * y[2] - x[2] * y[1];\n\t var Zy = x[2] * y[0] - x[0] * y[2];\n\t var Zz = x[0] * y[1] - x[1] * y[0];\n\t out[0] = Zx;\n\t out[1] = Zy;\n\t out[2] = Zz;\n\t}", "function cross(a, b) {\n var ax = a.x,\n ay = a.y,\n az = a.z;\n var bx = b.x,\n by = b.y,\n bz = b.z;\n a.x = ay * bz - az * by;\n a.y = az * bx - ax * bz;\n a.z = ax * by - ay * bx;\n}", "static scalarProduct(v1,v2){\n\t\tif(v1.constructor === Vector && v2.constructor === Vector){\n\t\t\treturn (v1.x*v2.x + v1.y*v2.y);\n\t\t}else{\n\t\t\tthrow {error:-1,message: \"v1 or v2 is not a Vector.\"};\n\t\t}\n\t}", "function crossProduct(pointA, pointB, pointC) {\n\tvar AB = AC = {};\n\tAB.x = pointB.x - pointA.x;\n\tAB.y = pointB.y - pointA.y;\n\tAC.x = pointC.x - pointA.x;\n\tAC.y = pointC.y - pointA.y;\n\treturn AB.x * AC.y - AB.y * AC.x;\n}", "function multiplyVect(vector, scalar) {\n return [ scalar * vector[0],\n scalar * vector[1],\n scalar * vector[2]\n ];\n}", "function cross(o, a, b) {\n\t return (a[0] - o[0]) * (b[1] - o[1]) - (a[1] - o[1]) * (b[0] - o[0]);\n\t}", "function dotVect(a, b) {\n return [ a[0] * b[0]+\n a[1] * b[1]+\n a[2] * b[2] \n ]; \n}", "static crossProductV3(xyza, xyzb) {\n//--------------\nreturn this.setCrossProductV3(this.copyOfV3(xyza), xyzb);\n}", "cross(p1, p2) {\n if (p1 != null && p2 != null) {\n const a = Point.create(p1);\n const b = Point.create(p2);\n return (b.x - this.x) * (a.y - this.y) - (b.y - this.y) * (a.x - this.x);\n }\n return NaN;\n }", "function co_var (v) {\n\treturn new Vec(\n\t\taxis[0].dot(v), // we 'project' on x\n\t\taxis[1].dot(v), // we 'project' on y\n\t);\n}", "function d3f_cross2d(a, b, c) {\n return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]);\n}", "function cross(setA, setB){\n\n cross_product = []\n for(i=0; i<setA.length; i++){\n for(j=0; j<setB.length; j++) {\n cross_product = cross_product.concat([[i, j]])\n }\n }\n return cross_product\n}", "crossTarget( v, target) {\n let crossX = this.y * v.z - v.y * this.z;\n let crossY = this.z * v.x - v.z * this.x;\n let crossZ = this.x * v.y - v.x * this.y;\n\n target.x = crossX;\n target.y = crossY;\n target.z = crossZ;\n\n return target;\n }", "crossTarget(v, target) {\n let crossX = this.y * v.z - v.y * this.z;\n let crossY = this.z * v.x - v.z * this.x;\n let crossZ = this.x * v.y - v.x * this.y;\n\n target.x = crossX;\n target.y = crossY;\n target.z = crossZ;\n\n return target;\n }", "function _vecInContext(v, m) {\n\t return [\n\t v[0] * m[0] + v[1] * m[4] + v[2] * m[8],\n\t v[0] * m[1] + v[1] * m[5] + v[2] * m[9],\n\t v[0] * m[2] + v[1] * m[6] + v[2] * m[10]\n\t ];\n\t }", "function _vecInContext(v, m) {\n return [\n v[0] * m[0] + v[1] * m[4] + v[2] * m[8],\n v[0] * m[1] + v[1] * m[5] + v[2] * m[9],\n v[0] * m[2] + v[1] * m[6] + v[2] * m[10]\n ];\n }", "static sq(v) {\n\t\treturn new vector(v.x*v.x, v.y*v.y)\n\t}", "function Vx(v,x){\r\n\tvar j=0;\r\n\tvar w = new Array();\r\n\tfor(j=0;j<v.length;j++){\r\n\t\tw[j] = v[j]*x;\r\n\t}\r\n\treturn w;\r\n}", "function cross(a, b) {\n return {\n x: 0,\n y: 0,\n z: a.x * b.y - b.x * a.y\n }\n}", "function multVector (vec1, multiplier) {\n return [vec1[X] * multiplier, vec1[Y] * multiplier];\n}", "function vector(P1, P2) {\n var x1 = P1[0];\n var y1 = P1[1];\n var x2 = P2[0];\n var y2 = P2[1];\n var v = [x2-x1, y2-y1];\n return v;\n}", "setCrossProduct(e3v) {\nE3Vec.setCrossProductV3(this.xyz, e3v.xyz);\nreturn this;\n}", "prod_esc(vec){ return (vec.x*this.x + vec.y*this.y + vec.z*this.z);}", "dot ( v ) {\n\t\treturn this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\n\t}", "function turnSide(v1, v2, v3){\r\n\treturn vectorProduct({x: v3.x - v1.x,\r\n\t\t\t\t\t\t\t\t\t\t\t\ty: v3.y - v1.y},\r\n\t\t\t\t\t\t\t\t\t\t\t {x: v2.x - v1.x,\r\n\t\t\t\t\t\t\t\t\t\t\t\ty: v2.y - v1.y});\r\n}", "function mat_vector(m, v) {\n\tvar m11 = m[0], m12 = m[1], m13 = m[2], m21 = m[3], m22 = m[4], m23 = m[5];\n\tvar v11 = v[0], v21 = v[1];\n\treturn [m11*v11 + m12*v21 + m13,\n\t\t\tm21*v11 + m22*v21 + m23];\n}", "function innerProduct(v1, v2) {\n return v1.x * v2.x + v1.y * v2.y;\n }", "function cosVectorVector(a, b) {\n function scp(a, b) {\n return a.x * b.x + a.y * b.y + a.z * b.z;\n }\n function norm(v) {\n return Math.sqrt(scp(v, v));\n }\n return scp(a, b) / (norm(a) * norm(b));\n}", "function inner_product(first_vector , second_vector){\n // Returns the inner product of two vectors\n let sum = 0;\n for (let i=0; i<2; i++) {\n sum += first_vector[i] * second_vector[i];\n }\n return sum;\n}", "function dot(vector1, vector2) {\n var result = 0;\n for (var i = 0; i < 3; i++) {\n result += vector1[i] * vector2[i];\n }\n return result;\n}", "multiply(number) {\r\n return new Vector(...new Array(this.getDimensions()).fill(undefined).map((e, i) => this.values[i] * number));\r\n }", "function crossProductZ( pointA, pointB, pointC)\r\n\t\t\t{\r\n\t\t\t\tvar bX = pointB.x;\r\n\t\t\t\tvar bY = pointB.y;\r\n\t\t\t\treturn ((pointC.x - bX) * (pointA.y - bY)) - ((pointC.y - bY) * (pointA.x - bX));\r\n\t\t\t}", "function crossProductZ( pointA, pointB, pointC)\r\n\t\t\t{\r\n\t\t\t\tvar bX = pointB.x;\r\n\t\t\t\tvar bY = pointB.y;\r\n\t\t\t\treturn ((pointC.x - bX) * (pointA.y - bY)) - ((pointC.y - bY) * (pointA.x - bX));\r\n\t\t\t}", "function contra_var (v) {\n\treturn new Vec(\n\t\tv.x / axis[0].x, // how many x do we use for v.x ie. v^1.x * e1 => v.x\n\t\tv.y / axis[1].y // how many y do we use for v.y\n\t);\n}", "static setCrossProductV3(xyz, xyzb) {\nvar xa, xb, ya, yb, za, zb;\n//----------\n[xa, ya, za] = xyz;\n[xb, yb, zb] = xyzb;\nreturn this.setV3_xyz(xyz, ya * zb - za * yb, za * xb - xa * zb, xa * yb - ya * xb);\n}", "function multiply_point(M,V){\n var result = new Array(4);\n //Go through M \n for (var i=0; i < 4; i++){\n var vec1 = M.slice(0+i*4,4+i*4);\n\n result[i]= dot(vec1,V);\n }\n return result;\n\n}", "function vector() {\n return new Vector([].slice.call(arguments));\n }", "function dotProduct(vector1, vector2) { \n\treturn vector1[0]*vector2[0] + vector1[1]*vector2[1];\n}", "function matrix_vector( M, v){\n\t\t\n\t\tb = [0.0, 0.0, 0.0];\n\t\tfor(i=0; i<3; i++){\n\t\t\tfor(j=0; j<3; j++){\n\t\t\t\tb[i] = b[i] + M[i][j] * v[j];\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn b;\n\t}", "static multiplyScalar(v, s) {\n\t\treturn new vector(v.x*s, v.y*s);\n\t}", "function crossProductZ( pointA, pointB, pointC)\n\t\t\t{\n\t\t\t\tvar bX = pointB.x;\n\t\t\t\tvar bY = pointB.y;\n\t\t\t\treturn ((pointC.x - bX) * (pointA.y - bY)) - ((pointC.y - bY) * (pointA.x - bX));\n\t\t\t}", "static unitCrossProductV3(xyza, xyzb) {\n//------------------\nreturn this.setUnitCrossProductV3(this.copyOfV3(xyza), xyzb);\n}", "function rotateCartesian(vector, axis, angle) {\n\t var angleRads = angle * radians,\n\t vectorOut = vector.slice(),\n\t ax1 = (axis === 0) ? 1 : 0,\n\t ax2 = (axis === 2) ? 1 : 2,\n\t cosa = Math.cos(angleRads),\n\t sina = Math.sin(angleRads);\n\t\n\t vectorOut[ax1] = vector[ax1] * cosa - vector[ax2] * sina;\n\t vectorOut[ax2] = vector[ax2] * cosa + vector[ax1] * sina;\n\t\n\t return vectorOut;\n\t}", "function rotateCartesian(vector, axis, angle) {\n\t var angleRads = angle * radians,\n\t vectorOut = vector.slice(),\n\t ax1 = (axis === 0) ? 1 : 0,\n\t ax2 = (axis === 2) ? 1 : 2,\n\t cosa = Math.cos(angleRads),\n\t sina = Math.sin(angleRads);\n\t\n\t vectorOut[ax1] = vector[ax1] * cosa - vector[ax2] * sina;\n\t vectorOut[ax2] = vector[ax2] * cosa + vector[ax1] * sina;\n\t\n\t return vectorOut;\n\t}", "function rotateCartesian(vector, axis, angle) {\n var angleRads = angle * radians,\n vectorOut = vector.slice(),\n ax1 = (axis === 0) ? 1 : 0,\n ax2 = (axis === 2) ? 1 : 2,\n cosa = Math.cos(angleRads),\n sina = Math.sin(angleRads);\n\n vectorOut[ax1] = vector[ax1] * cosa - vector[ax2] * sina;\n vectorOut[ax2] = vector[ax2] * cosa + vector[ax1] * sina;\n\n return vectorOut;\n}", "function getCross ( cart1, cart2 ) {\n return {\n 'x': cart1.y*cart2.z - cart2.y*cart1.z,\n 'y': -cart1.x*cart2.z + cart2.x*cart1.z,\n 'z': cart1.x*cart2.y - cart2.x*cart1.y\n }\t\t\n}", "function vector_vector( v, w){\n\t\t\n\t\tb = 0;\n\t\tfor(i=0; i<3; i++){\t\t\n\t\t\tb = b + v[i] * w[i];\n\t\t}\n\t\t\n\t\treturn b;\n\t}", "function dotProduct(...vectors) {\n if (!vectors.length) {\n return null;\n }\n\n const acc = new Array(vectors[0].length).fill(1);\n\n for (let i = 0; i < vectors.length; i++) {\n for (let k = 0; k < vectors[i].length; k++) {\n acc[k] *= vectors[i][k];\n }\n }\n\n const sum = acc.reduce((prev, curr) => prev + curr, 0);\n if (isNaN(sum)) {\n return null;\n }\n return sum;\n}", "static multiply(scalarC, vectorX, n) {\n\t\tvar result = new Array(n);\n\t\tfor (var i = 0; i < n; i++) {\n\t\t\tresult[i] = scalarC * vectorX[i];\n\t\t}\n\t\treturn result;\n\t}", "function crossProductZ(pointA, pointB, pointC) {\n var bX = pointB.x;\n var bY = pointB.y;\n return (pointC.x - bX) * (pointA.y - bY) - (pointC.y - bY) * (pointA.x - bX);\n }", "function cartesianProduct(arr1, arr2) {\n let result = [];\n for (let i = 0; i < arr1.length; i++) {\n let partial = 0;\n for (let j = 0; j < arr1[0].length; j++) {\n partial += arr1[i][j] * arr2[j]\n }\n result.push(partial)\n }\n return result\n}", "setUnitCrossProduct(e3v) {\n//---------------\nE3Vec.setUnitCrossProductV3(this.xyz, e3v.xyz);\nreturn this;\n}", "multMatrixVector(m, v) {\n\t if (!(m instanceof p5.Matrix) || !(v instanceof p5.Vector)) {\n\t print('multMatrixVector : Invalid arguments');\n\t return;\n\t }\n\n\t var _dest = createVector();\n\t var mat = m.mat4;\n\n\t\t// Multiply in column major order.\n\t\t_dest.x = mat[0] * v.x + mat[4] * v.y + mat[8] * v.z + mat[12];\n\t\t_dest.y = mat[1] * v.x + mat[5] * v.y + mat[9] * v.z + mat[13];\n\t\t_dest.z = mat[2] * v.x + mat[6] * v.y + mat[10] * v.z + mat[14]; \n\t\tvar w = mat[3] * v.x + mat[7] * v.y + mat[11] * v.z + mat[15];\n\n\t\tif (Math.abs(w) > Number.EPSILON) {\n\t\t _dest.mult(1.0 / w);\n\t\t}\n\n\t\treturn _dest;\n\t}", "static getDotProduct(vector0, vector1) {\n return (vector1.x * vector0.x + vector1.y * vector0.y);\n }", "dot(b) // Example: \"Vec.of( 1,2,3 ).dot( Vec.of( 1,2,3 ) )\" returns 15. \r\n {\r\n if (this.length == 3) return this[0] * b[0] + this[1] * b[1] + this[2] * b[2]; // Optimized to do the arithmatic manually for array lengths less than 4.\r\n if (this.length == 4) return this[0] * b[0] + this[1] * b[1] + this[2] * b[2] + this[3] * b[3];\r\n if (this.length > 4) return this.reduce((acc, x, i) => {\r\n return acc + x * b[i];\r\n }, 0);\r\n return this[0] * b[0] + this[1] * b[1]; // Assume length 2 otherwise.\r\n }", "function dot2d(u, v)\r\n{\r\n return u[0]*v[0] + u[1]*v[1];\r\n}", "function multiply(m, v)\r\n{\r\n var vv=vec4(\r\n m[0][0]*v[0] + m[0][1]*v[1] + m[0][2]*v[2]+ m[0][3]*v[3],\r\n m[1][0]*v[0] + m[1][1]*v[1] + m[1][2]*v[2]+ m[1][3]*v[3],\r\n m[2][0]*v[0] + m[2][1]*v[1] + m[2][2]*v[2]+ m[2][3]*v[3],\r\n m[3][0]*v[0] + m[3][1]*v[1] + m[3][2]*v[2]+ m[3][3]*v[3]);\r\n return vv;\r\n}", "function scalar(u,v){\r\n\t\tvar i =0;\r\n\t\tvar res =0;\r\n\t\tfor(i=0;i<u.length;i++)\r\n\t\t\tres += u[i]*v[i];\r\n\t\treturn res;\r\n\t}", "function mult4(mat, vec) {\n var result = [];\n for ( var i = 0; i < vec.length; ++i ) {\n var innerSum = 0;\n for (var j = 0; j < mat[i].length; ++j) {\n innerSum += vec[i] * mat[i][j];\n }\n result.push(innerSum);\n }\n return result;\n}", "function crossProductZ(pointA, pointB, pointC) {\n var bX = pointB.x;\n var bY = pointB.y;\n return ((pointC.x - bX) * (pointA.y - bY)) -\n ((pointC.y - bY) * (pointA.x - bX));\n }", "function scalarProduct([a, b], [c, d]) {return a*c + b*d;}", "multiply(multiplier) {\n return new Vector(this.x * multiplier, this.y * multiplier);\n }", "static _vectorDotProduct(pt1, pt2)\n {\n return (pt1.x * pt2.x) + (pt1.y * pt2.y);\n }", "function arbitraryPerpendicularVector(vec){\n var res = vec.clone().cross(CONST.e1);\n if(res.equals(CONST.zerovec) == false){\n return res;\n }\n return vec.clone().cross(CONST.e2);\n}", "function dotProduct(a, b) {\n\t\t \treturn (a.x * b.x) + (a.y * b.y) + (a.z + b.z);\n\t\t }", "function xformMatrix(m, v) {\n var out = [0, 0, 0, 0];\n var i, j;\n\n for(i = 0; i < 4; ++i) {\n for(j = 0; j < 4; ++j) {\n out[j] += m[4 * i + j] * v[i];\n }\n }\n\n return out;\n}", "function cartesian() {\n var r = [], arg = arguments, max = arg.length-1;\n function helper(arr, i) {\n for (var j=0, l=arg[i].length; j<l; j++) {\n var a = arr.slice(0); // clone arr\n a.push(arg[i][j]);\n if (i==max)\n r.push(a);\n else\n helper(a, i+1);\n }\n }\n helper([], 0);\n return r;\n }", "static inv(v) {\n\t\treturn new vector(1/v.x, 1/v.y);\n\t}" ]
[ "0.8105056", "0.7969165", "0.7792815", "0.7764431", "0.7728677", "0.7721227", "0.7489951", "0.7410925", "0.7403788", "0.73464704", "0.73050904", "0.7237468", "0.71610963", "0.7078378", "0.6941377", "0.692329", "0.6843428", "0.6795426", "0.6772333", "0.669017", "0.669017", "0.66892374", "0.66580975", "0.6492307", "0.6488621", "0.6393831", "0.63555074", "0.6284081", "0.627695", "0.62052155", "0.6202023", "0.6161146", "0.61516607", "0.6135215", "0.6110985", "0.60646385", "0.5990292", "0.59435326", "0.5923249", "0.58230203", "0.57968915", "0.5793024", "0.5792502", "0.57265073", "0.5710536", "0.5710165", "0.5681064", "0.5668199", "0.5662045", "0.5643863", "0.5616989", "0.56056845", "0.55711544", "0.55605465", "0.55553573", "0.55299187", "0.55163395", "0.55049384", "0.5486236", "0.5485927", "0.5475031", "0.54677606", "0.54677606", "0.5461629", "0.54517305", "0.54339486", "0.54311043", "0.54245645", "0.5401958", "0.5386776", "0.5383026", "0.53771794", "0.5361303", "0.5361303", "0.53213286", "0.5312744", "0.5306963", "0.5299193", "0.5297688", "0.52938914", "0.5280681", "0.5280548", "0.5271778", "0.52574855", "0.5248938", "0.523505", "0.52332175", "0.52306247", "0.52000856", "0.5195333", "0.51939994", "0.51810044", "0.5176654", "0.51700354", "0.5169327", "0.5165385", "0.515718", "0.51510763" ]
0.6476975
27
globals __VUE_SSR_CONTEXT__ IMPORTANT: Do NOT use ES2015 features in this file (except for modules). This module is a runtime utility for cleaner component module output and will be included in the final webpack user bundle.
function normalizeComponent ( scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, /* server only */ shadowMode /* vue-cli only */ ) { // Vue.extend constructor export interop var options = typeof scriptExports === 'function' ? scriptExports.options : scriptExports // render functions if (render) { options.render = render options.staticRenderFns = staticRenderFns options._compiled = true } // functional template if (functionalTemplate) { options.functional = true } // scopedId if (scopeId) { options._scopeId = 'data-v-' + scopeId } var hook if (moduleIdentifier) { // server build hook = function (context) { // 2.3 injection context = context || // cached call (this.$vnode && this.$vnode.ssrContext) || // stateful (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional // 2.2 with runInNewContext: true if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { context = __VUE_SSR_CONTEXT__ } // inject component styles if (injectStyles) { injectStyles.call(this, context) } // register component module identifier for async chunk inferrence if (context && context._registeredComponents) { context._registeredComponents.add(moduleIdentifier) } } // used by ssr in case component is cached and beforeCreate // never gets called options._ssrRegister = hook } else if (injectStyles) { hook = shadowMode ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) } : injectStyles } if (hook) { if (options.functional) { // for template-only hot-reload because in that case the render fn doesn't // go through the normalizer options._injectStyles = hook // register for functioal component in vue file var originalRender = options.render options.render = function renderWithStyleInjection (h, context) { hook.call(context) return originalRender(h, context) } } else { // inject component registration as beforeCreate hook var existing = options.beforeCreate options.beforeCreate = existing ? [].concat(existing, hook) : [hook] } } return { exports: scriptExports, options: options } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Es(t,e,n,i,r,o,a,s){var u=(\"function\"===typeof n?n.options:n)||{};return u.__file=\"source.vue\",u.render||(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0,r&&(u.functional=!0)),u._scopeId=i,u}", "extend(config, ctx) {\n // if (process.server && process.browser) {\n if (ctx.isDev && ctx.isClient) {\n config.devtool = \"source-map\";\n // if (isDev && process.isClient) {\n config.plugins.push(\n new StylelintPlugin({\n files: [\"**/*.vue\", \"**/*.scss\"],\n })\n ),\n config.module.rules.push({\n enforce: \"pre\",\n test: /\\.(js|vue)$/,\n loader: \"eslint-loader\",\n exclude: /(node_modules)/,\n options: {\n formatter: require(\"eslint-friendly-formatter\"),\n },\n });\n if (ctx.isDev) {\n config.mode = \"development\";\n }\n }\n for (const rule of config.module.rules) {\n if (rule.use) {\n for (const use of rule.use) {\n if (use.loader === \"sass-loader\") {\n use.options = use.options || {};\n use.options.includePaths = [\n \"node_modules/foundation-sites/scss\",\n \"node_modules/motion-ui/src\",\n ];\n }\n }\n }\n }\n // vue-svg-inline-loader\n const vueRule = config.module.rules.find((rule) =>\n rule.test.test(\".vue\")\n );\n vueRule.use = [\n {\n loader: vueRule.loader,\n options: vueRule.options,\n },\n {\n loader: \"vue-svg-inline-loader\",\n },\n ];\n delete vueRule.loader;\n delete vueRule.options;\n }", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}" ]
[ "0.5848589", "0.5729015", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493", "0.5725493" ]
0.0
-1
let currentDir = "auto";
function hasDocument() { return typeof document !== "undefined"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "cwd () {\n return cwd;\n }", "function exampleDir(str) {\n return str;\n}", "cwd () {\n return process.cwd();\n }", "function Dir() {\r\n}", "getCurrentDirectory(fileName, insertedPath) {\r\n var currentDir = path.parse(fileName).dir || '/';\r\n var workspacePath = vs.workspace.rootPath;\r\n // based on the project root\r\n if (insertedPath.startsWith('/') && workspacePath) {\r\n currentDir = vs.workspace.rootPath;\r\n }\r\n return path.resolve(currentDir);\r\n }", "gameDir() { }", "function currentDir() {\n var s = WScript.scriptFullName\n s = s.substring(0, s.lastIndexOf(\"\\\\\") + 1)\n return s\n}", "get dir(){\r\n\t\treturn path2lst(this.path).slice(0, -1).join('/') }", "javaDir() { }", "baseDir() {\n return __dirname;\n }", "setGameDir(dir) { }", "static _getSpaceRoot(){\n return process.cwd(); //path.dirname(module.parent.paths[0])\n }", "get dirname() {\n return typeof this.path === 'string' ? path__default[\"default\"].dirname(this.path) : undefined\n }", "buildStart(opt) {\n // console.log(opt);\n console.log(process.cwd());\n }", "getCWD() {\n let cwd = this.state.cursor().get( 'cwd' )\n\n return cwd || null\n }", "function getDir() {\n return path.resolve(__dirname)\n}", "getRootPath()\n {\n return process.cwd();\n }", "get path () {\n return __dirname\n }", "get _dir() {\n return this.ltr ? \"ltr\" : undefined;\n }", "function getActiveDirectory() {\n var dir = path.dirname(getActiveFile());\n\n if(!dir || dir === '.') {\n dir = '~';\n }\n return dir + path.sep;\n }", "static Directory(val) {\n return val;\n }", "function fakeCWD() {\n return cwd() + fake;\n }", "setJavaDir(dir) { }", "get dir () {\n return this._dir;\n }", "function _getDirString() {\n var dirPath;\n if (_logDir) {\n // user defined\n dirPath = _logDir;\n } else if (File($.fileName).exists) {\n // same directory as script\n dirPath = File($.fileName).path + \"/logs/\";\n } else {\n // account for un-saved or temp scripts\n dirPath = Folder.desktop + \"/ExtendScript_Log_UnsavedScripts/\";\n }\n return dirPath; \n }", "function currentTarget(repo){\n return path.resolve(homepath,repo).replace('C:','').replace('D:','').split('\\\\').join('/')\n}", "function default_robot(){\n return value_of_path(default_robot_name())\n}", "function get_current_code_path(){\n\tvar id = $(\"#file_name_nav\").find(\"span.selected\").attr(\"id\");\n\tid = id.replace(\"t_\", \"\");\n\treturn full_path($(\"#\"+id));\n}", "static setRoot()\n {\n Explorer.currentDir = \"\";\n Explorer.set();\n }", "get value() { return this.dir; }", "get value() { return this.dir; }", "get value() { return this.dir; }", "goroot() {\n this.changefolder(\"/\");\n }", "function initGlobalDir(){setGlobalDir(LTR);}", "function initGlobalDir() {\n setGlobalDir(LTR);\n}", "function initGlobalDir() {\n setGlobalDir(LTR);\n}", "function initGlobalDir() {\n setGlobalDir(LTR);\n}", "function initGlobalDir() {\n setGlobalDir(LTR);\n}", "function initGlobalDir() {\n setGlobalDir(LTR);\n}", "function initGlobalDir() {\n setGlobalDir(LTR);\n}", "function initGlobalDir() {\n setGlobalDir(LTR);\n}", "function initGlobalDir() {\n setGlobalDir(LTR);\n}", "function initGlobalDir() {\n setGlobalDir(LTR);\n}", "function setGlobalDir(dir){globalDir=dir;}", "function getDefaultPath() {\n return \"python3\";\n}", "get dirname() {\n return typeof this.path === 'string' ? path$1.dirname(this.path) : undefined\n }", "getProjectRoots() {\n return [__dirname];\n }", "static getWorkingDir (opts) {\n const workingDir = options.getRelevantOption(opts, \"workingDir\") || process.cwd();\n\n return workingDir + path.sep;\n }", "function setAutoDir() {\r\n if (foundDest) {\r\n let curr = pathArray.pop();\r\n let next = pathArray[pathArray.length - 1];\r\n if (next.i === curr.i - 1 || (curr.i === 0 && next.i === rows - 1)) up();\r\n if (next.j === curr.j - 1 || (curr.j === 0 && next.j === cols - 1)) left();\r\n if (next.i === curr.i + 1 || (curr.i === rows - 1 && next.i === 0)) down();\r\n if (next.j === curr.j + 1 || (curr.j === cols - 1 && next.j === 0)) right();\r\n }\r\n}", "function getCurrentStudioPath(changelist) {\n if (typeof changelist === \"undefined\") {\n changelist = getCurrentChangelist();\n }\n if (isLinux()) {\n return {\n path: '',\n folder: ''\n };\n }\n if (currentStudioPath !== null) {\n if (isMac()) {\n return {\n path: path.dirname(path.dirname(path.dirname(currentStudioPath))),\n folder: path.dirname(path.dirname(currentStudioPath))\n };\n } else {\n return {\n path: currentStudioPath,\n folder: path.dirname(currentStudioPath)\n };\n }\n } else {\n var found = null;\n if (isMac()) {\n var wakApps = findFiles(path.join(config.BUILD_TEST_DIR, changelist.toString()), /^wakanda.*(studio|server)$/i);\n wakApps.forEach(function(wakApp) {\n if (/studio/i.test(wakApp)) {\n found = wakApp;\n }\n });\n } else if (isWindows()) {\n var wakApps = findFiles(path.join(config.BUILD_TEST_DIR, changelist.toString()), /^wakanda.*\\.exe$/i);\n wakApps.forEach(function(wakApp) {\n if (/studio/i.test(wakApp)) {\n found = wakApp;\n }\n });\n }\n if (found !== null) {\n if (isMac()) {\n return {\n path: path.dirname(path.dirname(path.dirname(found))),\n folder: path.dirname(path.dirname(found))\n };\n } else {\n return {\n path: found,\n folder: path.dirname(found)\n };\n }\n }\n return {\n path: config.WAKANDA_STUDIO_PATH,\n folder: config.WAKANDA_STUDIO_FOLDER\n };\n }\n}", "get isDirectory() {\r\n return true\r\n }", "function dirDown(currDir) {\n newDir = path.join(currDir, \"..\")\n try {\n absolutePath = path.resolve(newDir);\n correctedPath = path.normalize(absolutePath);\n if(correctedPath === undefined)\n {\n return 1;\n }\n dir = fs.readdirSync(correctedPath);\n FileSystem.currentDirectory = correctedPath;\n console.log(correctedPath)\n return dir;\n\n } catch(err) {\n return 1;\n }\n}", "function getCurrentPathName() {\n pathName = window.location.pathname;\n return pathName;\n }", "function get() {\n return cd;\n}", "function initGlobalDir() {\n\t setGlobalDir(LTR);\n\t}", "get dirname() {\n return typeof this.path === 'string' ? path.dirname(this.path) : undefined\n }", "function baseDir () {\n return _path.join(__dirname, '/../.data/')\n}", "function FilePath() {\n\n}", "get value() {\n return this.dir;\n }", "projectPath() {\n return atom.project.getPaths()[0];\n }", "get dir() {\n throw new Error(\"Addon tried to access addon.self.dir\");\n }", "function baseDirectory() {\n try {\n baseDir = path.normalize(path.resolve('/'));\n dir = fs.readdirSync(baseDir);\n FileSystem.currentDirectory = path.normalize(path.resolve('/'))\n return dir;\n } catch (err) {\n return 1;\n }\n}", "function getNewFilePath() {\n //choose a name\n var fileName = getCurrentDateTime() + \".txt\";\n \n if (!folderLocation) {\n folderLocation = os.tmpdir();\n folderLocation = path.join(folderLocation, 'vslogcat');\n }\n\n var filePath = path.join(folderLocation, fileName);\n console.log(\"File path is \" + filePath);\n return filePath;\n\n}", "function getGlobalDir(){if(!globalDir){this.initGlobalDir();}!globalDir?true?invariant(false,'Global direction not set.'):invariant(false):void 0;return globalDir;}", "get value() {\n return this.dir;\n }", "isActive() {\n return (this.$store.state.selectedDirectory === this.drive.root);\n }", "ondir() {}", "get(){\n const gambar = this.getDataValue('gambar');\n return uploadDir+gambar;\n }", "function MakeDirectory() {\r\n}", "constructor(dir, mainFileName) {\n this.dir = DIR + \"/\" + dir;\n this.file = mainFileName;\n }", "getPath (opts) {\n return BaseFS.getWorkingDir(opts) + this.getFolderName() + path.sep;\n }", "get dir() {\n return this._dir ? this._dir.value : 'ltr';\n }", "get pathname()\t{ return \"\" + this.path + this.file}", "set dirname(dirname) {\n assertPath(this.basename, 'dirname');\n this.path = path__default[\"default\"].join(dirname || '', this.basename);\n }", "_setPathLocation() {\n // TODO need better way to differentiate between macOS and Windows FILES_PATHs\n let dlabsLocation = shell.which('dlabs-cli')?.stdout?.trim();\n\n /* istanbul ignore if */\n if (dlabsLocation[0] === '/') {\n dlabsLocation = dlabsLocation.replace(/(\\/\\w+){1}$/, '');\n return `${dlabsLocation}/lib/node_modules/dlabs-cli`;\n } else if (dlabsLocation.includes('C:')) {\n dlabsLocation = dlabsLocation.replace(/\\\\DLABS-CLI.CMD/, '').replace(/\\\\\\\\/g, '\\\\');\n return `${dlabsLocation.toLowerCase()}\\\\node_modules\\\\dlabs-cli`;\n } else {\n this._consoleOutput('error', this.LOG_MESSAGES.noPathDetected);\n }\n }", "function GetCurentFileName()\n{\n var pagePathName = window.location.pathname;\n var lastPathSegment = pagePathName.substr(pagePathName.lastIndexOf('/') + 1);\n lastPathSegment = lastPathSegment.substr(0, lastPathSegment.lastIndexOf('.'));\n if (lastPathSegment == \"\") lastPathSegment = \"index\";\n return lastPathSegment;\n}", "function gotDir(d){\n console.log(\"got dir\");\n alert(\"d-\"+JSON.stringify(d));\n DATADIR = d;\n var reader = DATADIR.createReader();\n reader.readEntries(function(d){\n// gotFiles(d);\n appReady(d);\n },onError);\n}", "getMatlabPrefDir () {\n return atom.config.get('atom-matlab-editor.prefDirPath')\n }", "function getCwd(log) {\n let cwd;\n try {\n cwd = process.cwd();\n } catch (ex) {\n log.trace(ex, 'error getting cwd: fallback back to %s', lastCwd);\n return lastCwd;\n }\n lastCwd = cwd;\n return cwd;\n}", "function displayCwd(done){\n // get the current working directory from the process\n let output = process.cwd();\n done(output);\n}", "updateDir() {\n let url = decodeURIComponent(this.$location.url());\n console.debug(\"url: \" + url);\n let dir = url.slice(BASE_URL.length, url.length);\n if (dir === '/') {\n dir = '';\n }\n if (dir !== this.dir) {\n this.dir = dir;\n this.updateCrumbs();\n }\n }", "function dirDev(done) {\n directory = '_tmp/';\n done();\n}", "initializeBuildsDir(config) {\n return inquirer\n .prompt([\n {\n type: 'input',\n name: 'buildsDir',\n message: 'buildsDir',\n default: 'dist/'\n }\n ])\n .then(({ buildsDir }) => {\n config.buildsDir = buildsDir;\n return config;\n });\n }", "static dirname(path) {\n return Path.join(path, '..');\n }", "static storage_path() { return '.'; }", "function tilda(cwd) {\n if (cwd.substring(0, 1) === '~') {\n cwd = (process.env.HOME || process.env.HOMEPATH || process.env.HOMEDIR || process.cwd()) + cwd.substr(1);\n }\n return path.resolve(cwd);\n}", "function getDir(str) {\n return str.match(/^(?:.*[\\/\\\\])?/)[0];\n }", "getFilePath() {\n let filePath = callsites()[2].getFileName(); // [0] and [1] return global fractal.config.js.\n return filePath.replace('.js', '.yml');\n }", "function initContext () {\n var cwd = process.cwd(),\n context = \"none\";\n if (hasDir(cwd, \"CVS\")) context = \"cvs\";\n else if (hasDir(cwd, \".svn\")) context = \"svn\";\n else if (hasInSelfOrParent(cwd, \".git\")) context = \"git\";\n else if (hasInSelfOrParent(cwd, \".hg\")) context = \"hg\";\n return context;\n}", "function here(d) {\n\tif (!d){ return __dirname; }\n\treturn path.resolve(__dirname, d);\n}", "cddown(subdir,dir) {\n //this.dirs.push(dir);\n this.lastpath = this.path;\n this.path += '/' + subdir;\n this.resources = [];\n }", "function defaultPath() {\n var dirname = parsedPath.dirname;\n var name = parsedPath.name;\n\n if (name === 'template' || name === 'index') {\n name = '';\n }\n return _path.posix.join('/', dirname, name, '/');\n }", "function defaultPath() {\n var dirname = parsedPath.dirname;\n var name = parsedPath.name;\n\n if (name === 'template' || name === 'index') {\n name = '';\n }\n return _path.posix.join('/', dirname, name, '/');\n }", "resolveActiveRootDirectory() {\r\n const projectPaths = atom.project.getPaths();\r\n let activeTextEditor = atom.workspace.getActiveTextEditor();\r\n let activeProject = null;\r\n\r\n if (_.isEmpty(projectPaths) || _.isEmpty(activeTextEditor))\r\n return null;\r\n\r\n activeTextEditor = activeTextEditor.buffer.file.path;\r\n\r\n projectPaths.forEach(p => {\r\n if (activeTextEditor.startsWith(p))\r\n activeProject = p;\r\n });\r\n\r\n return activeProject;\r\n }", "getTestPath(argv) {\n let testPath = undefined;\n if (argv.length >= 3 && fs.existsSync(argv[2])) {\n const isDirectory = fs.lstatSync(argv[2]).isDirectory();\n testPath = isDirectory ? argv[2] : path.dirname(argv[2]);\n }\n return testPath;\n }", "_getHomeDir(){\r\n\t\tlet isOldWindows = process.platform === 'win32';\r\n\t\treturn process.env[isOldWindows ? 'USERPROFILE' : 'HOME'];\r\n\t}", "function fi_readDirectory(req){\n\t/* if directory not defined */\n\tvar id=req.user._id;\n\tvar homedir=path.normalize( __dirname + '../../../Repository/'+id+\"/Data\");\n\tvar currentdir=path.normalize( homedir+\"/\"+req.body.directory);\n\t\n\tvar homeSplit=homedir.split(\"/\");\n\tvar currentSplit=currentdir.split(\"/\");\n\t\t\n\t//test deep of currentdir and homedir\n\tif(homeSplit.length>currentSplit.length){currentdir=homedir}\n\tconsole.log(\"currentdir CheckLength\"+currentdir);\n\t\n\t//test same deep but different parent directory\n\t//console.log(\"currentSplit \"+currentSplit[currentSplit.length-1]);\n\t//if((homeSplit.length=currentSplit.length)&&(currentSplit[currentSplit.length-2]!=req.body.id)){currentdir=homedir}\n\t//console.log(\"lastdir \"+currentdir);\n\t\t\n\treturn currentdir;\n}", "function getCurrentFileOrDefault() {\n var pFile = LaunchBar.executeAppleScript('if application \"TaskPaper\" is running then',\n 'tell application id (id of application \"TaskPaper\")',\n ' set a to file of the front document',\n ' return POSIX path of a',\n 'end tell',\n 'else',\n ' return \"\"',\n 'end if').trim();\n if (pFile == \"\") {\n if(File.exists(LaunchBar.homeDirectory + \"/.tpProjectFile\"))\n pFile = File.readText(LaunchBar.homeDirectory + \"/.tpProjectFile\");\n } else {\n //\n // Save the path to the ~/.tpProjectFile location.\n //\n File.writeText(pFile, LaunchBar.homeDirectory + \"/.tpProjectFile\");\n }\n\n //\n // Return the project file location.\n //\n return (pFile);\n}", "function MakeDirectories() {\r\n}", "function dirUp(currDir, whatDir) {\n newDir = path.join(currDir, whatDir)\n try {\n absolutePath = path.resolve(newDir);\n correctedPath = path.normalize(absolutePath);\n console.log(currDir + \" and \" + whatDir)\n dir = fs.readdirSync(correctedPath);\n FileSystem.currentDirectory = correctedPath;\n return dir;\n\n } catch(err) {\n return 1;\n }\n}", "static dir(path) {\n const n = path.lastIndexOf(\"/\");\n return path.substring(0, n + 1);\n }" ]
[ "0.6831368", "0.67260396", "0.67150533", "0.6701903", "0.65333325", "0.64703685", "0.64260054", "0.6382812", "0.63281953", "0.62673515", "0.62585634", "0.6241655", "0.6218426", "0.61647767", "0.61473507", "0.6116313", "0.6057289", "0.6008112", "0.598121", "0.5951867", "0.5949455", "0.59245026", "0.5898794", "0.5897222", "0.5890883", "0.5889848", "0.5887442", "0.58775425", "0.5870725", "0.58169466", "0.58169466", "0.58169466", "0.57965446", "0.5759382", "0.5758623", "0.5758623", "0.5758623", "0.5758623", "0.5758623", "0.5758623", "0.5758623", "0.5758623", "0.5758623", "0.57492137", "0.57397234", "0.5680373", "0.56674755", "0.5659084", "0.5654351", "0.5636577", "0.5630441", "0.5628697", "0.5619423", "0.5607445", "0.56042045", "0.5599078", "0.5597776", "0.5577079", "0.5572636", "0.55726236", "0.55673623", "0.55460554", "0.55371845", "0.55138415", "0.54854035", "0.5462955", "0.5453634", "0.54449075", "0.54446495", "0.54400975", "0.54249823", "0.5420942", "0.539377", "0.53793836", "0.53760827", "0.5373806", "0.53697133", "0.5360441", "0.5360363", "0.536025", "0.53447616", "0.5342905", "0.5332672", "0.5329908", "0.5329613", "0.5325872", "0.5320264", "0.5315964", "0.5315847", "0.53045243", "0.53042203", "0.5299433", "0.5299433", "0.5291434", "0.5286897", "0.52852035", "0.5283281", "0.52826244", "0.52820444", "0.5271528", "0.52681065" ]
0.0
-1
Adapted from convertsourcemap (MIT)
function toComment(sourceMap) { // eslint-disable-next-line no-undef var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))); var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64; return '/*# ' + data + ' */'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function extractSourceMap(fs, logger, file) {\n var inline = convert_source_map_1.commentRegex.test(file.text);\n var external = convert_source_map_1.mapFileCommentRegex.exec(file.text);\n if (inline) {\n var inlineSourceMap = convert_source_map_1.fromSource(file.text);\n return {\n source: convert_source_map_1.removeComments(file.text).replace(/\\n\\n$/, '\\n'),\n map: inlineSourceMap,\n isInline: true,\n };\n }\n else if (external) {\n var externalSourceMap = null;\n try {\n var fileName = external[1] || external[2];\n var filePath = file_system_1.resolve(file_system_1.dirname(file_system_1.absoluteFromSourceFile(file)), fileName);\n var mappingFile = fs.readFile(filePath);\n externalSourceMap = convert_source_map_1.fromJSON(mappingFile);\n }\n catch (e) {\n if (e.code === 'ENOENT') {\n logger.warn(\"The external map file specified in the source code comment \\\"\" + e.path + \"\\\" was not found on the file system.\");\n var mapPath = file_system_1.absoluteFrom(file.fileName + '.map');\n if (file_system_1.basename(e.path) !== file_system_1.basename(mapPath) && fs.exists(mapPath) &&\n fs.stat(mapPath).isFile()) {\n logger.warn(\"Guessing the map file name from the source file name: \\\"\" + file_system_1.basename(mapPath) + \"\\\"\");\n try {\n externalSourceMap = convert_source_map_1.fromObject(JSON.parse(fs.readFile(mapPath)));\n }\n catch (e) {\n logger.error(e);\n }\n }\n }\n }\n return {\n source: convert_source_map_1.removeMapFileComments(file.text).replace(/\\n\\n$/, '\\n'),\n map: externalSourceMap,\n isInline: false,\n };\n }\n else {\n return { source: file.text, map: null, isInline: false };\n }\n }", "function computeSourceMap(\n code,\n filePath,\n {compiledFilename},\n) {\n let mappings = \"AAAA\";\n for (let i = 0; i < code.length; i++) {\n if (code.charCodeAt(i) === charCodes.lineFeed) {\n mappings += \";AACA\";\n }\n }\n return {\n version: 3,\n file: compiledFilename || \"\",\n sources: [filePath],\n mappings,\n names: [],\n };\n}", "_generateSourceMap(baseDir, code, units){\n const sections = [];\n for (let unit of Array.from(units)) {\n const unitDir = path.dirname(unit.fpath);\n if (unit.sm) {\n // TODO: should support http, https, etc...\n var i, s, sm, sp;\n const url = path.resolve(unitDir, unit.sm.url);\n try {\n sm = JSON.parse(fs.readFileSync(url));\n } catch (e) {\n log(`Skipped invalid source map file ${path.relative(baseDir,url)}`);\n continue;\n }\n\n // if sm itself consists of concatenated sections, merge them\n if (sm.sections) {\n const iterable = sm.sections || [];\n for (i = 0; i < iterable.length; i++) {\n const sec = iterable[i];\n sec.offset.line += unit.smline;\n for (i = 0; i < sec.map.sources.length; i++) {\n s = sec.map.sources[i];\n sp = path.resolve(unitDir, s);\n sec.map.sources[i] = path.relative(baseDir, sp);\n }\n }\n sections.push(...Array.from(sm.sections || []));\n } else {\n // concatenate sources into sections, with path resolved\n for (i = 0; i < sm.sources.length; i++) {\n s = sm.sources[i];\n sp = path.resolve(unitDir, s);\n sm.sources[i] = path.relative(baseDir, sp);\n }\n sections.push({\n offset: {line : unit.smline, column : 0},\n map : sm\n });\n }\n } else { // js file has no matching source map file, generate it\n var line;\n const { SourceMapGenerator } = sourceMap;\n const srcfile = path.relative(baseDir, unit.fpath);\n const map = new SourceMapGenerator({file:srcfile});\n const lc = fuse._lc(unit.src);\n if (lc > 0) {\n for (line = 1, end = lc, asc = 1 <= end; asc ? line <= end : line >= end; asc ? line++ : line--) { // 1 to 1 mapping for each line\n var asc, end;\n map.addMapping({\n source: srcfile,\n original : {line, column:0},\n generated : {line, column:0}\n });\n }\n }\n sections.push({\n offset: {line: unit.smline, column: 0},\n map: map.toJSON()\n });\n }\n }\n return sections.length === 0 ? null : {\n version : 3,\n file : '',\n sections\n };\n }", "function SourceMap(){\n this.lines = [];\n }", "_parseMappings(aStr, aSourceRoot) {\n const generatedMappings = (this.__generatedMappingsUnsorted = [])\n const originalMappings = (this.__originalMappingsUnsorted = [])\n for (let i = 0; i < this._sections.length; i++) {\n const section = this._sections[i]\n\n const sectionMappings = []\n section.consumer.eachMapping((m) => sectionMappings.push(m))\n\n for (let j = 0; j < sectionMappings.length; j++) {\n const mapping = sectionMappings[j]\n\n // TODO: test if null is correct here. The original code used\n // `source`, which would actually have gotten used as null because\n // var's get hoisted.\n // See: https://github.com/mozilla/source-map/issues/333\n let source = util.computeSourceURL(\n section.consumer.sourceRoot,\n null,\n this._sourceMapURL\n )\n this._sources.add(source)\n source = this._sources.indexOf(source)\n\n let name = null\n if (mapping.name) {\n this._names.add(mapping.name)\n name = this._names.indexOf(mapping.name)\n }\n\n // The mappings coming from the consumer for the section have\n // generated positions relative to the start of the section, so we\n // need to offset them to be relative to the start of the concatenated\n // generated file.\n const adjustedMapping = {\n source,\n generatedLine:\n mapping.generatedLine + (section.generatedOffset.generatedLine - 1),\n generatedColumn:\n mapping.generatedColumn +\n (section.generatedOffset.generatedLine === mapping.generatedLine\n ? section.generatedOffset.generatedColumn - 1\n : 0),\n originalLine: mapping.originalLine,\n originalColumn: mapping.originalColumn,\n name,\n }\n\n generatedMappings.push(adjustedMapping)\n if (typeof adjustedMapping.originalLine === 'number') {\n originalMappings.push(adjustedMapping)\n }\n }\n }\n }", "function w(e,t){if(!he)\n// with no source maps, generated is either an\n// array or a string. if an array, flatten it.\n// if a string, just return it\n// with no source maps, generated is either an\n// array or a string. if an array, flatten it.\n// if a string, just return it\nreturn Q(e)?y(e):e;if(null==t){if(e instanceof $)return e;t={}}return null==t.loc?new $(null,null,he,e,t.name||null):new $(t.loc.start.line,t.loc.start.column,he===!0?t.loc.source||null:he,e,t.name||null)}", "function updateSourceMap(sourceMapText, fileName) {\n var sourceMap = JSON.parse(sourceMapText);\n sourceMap.file = fileName;\n sourceMap.sources = [fileName];\n delete sourceMap.sourceRoot;\n return JSON.stringify(sourceMap);\n}", "function renderSourceAndMap(sourceFile, input, output) {\n var outputPath = file_system_1.absoluteFromSourceFile(sourceFile);\n var outputMapPath = file_system_1.absoluteFrom(outputPath + \".map\");\n var relativeSourcePath = file_system_1.basename(outputPath);\n var relativeMapPath = relativeSourcePath + \".map\";\n var outputMap = output.generateMap({\n source: outputPath,\n includeContent: true,\n });\n // we must set this after generation as magic string does \"manipulation\" on the path\n outputMap.file = relativeSourcePath;\n var mergedMap = mergeSourceMaps(input.map && input.map.toObject(), JSON.parse(outputMap.toString()));\n var result = [];\n if (input.isInline) {\n result.push({ path: outputPath, contents: output.toString() + \"\\n\" + mergedMap.toComment() });\n }\n else {\n result.push({\n path: outputPath,\n contents: output.toString() + \"\\n\" + convert_source_map_1.generateMapFileComment(relativeMapPath)\n });\n result.push({ path: outputMapPath, contents: mergedMap.toJSON() });\n }\n return result;\n }", "findSourceMapUrl(contents) {\n const lines = contents.split('\\n');\n for (let l = lines.length - 1; l >= Math.max(lines.length - 10, 0); l--) {\n const line = lines[l].trim();\n const matches = EagerSourceMapTransformer.SOURCE_MAPPING_MATCHER.exec(line);\n if (matches && matches.length === 2) {\n return matches[1].trim();\n }\n }\n return null;\n }", "function SourceMap(input) {\n if (!(this instanceof SourceMap)) {\n return new SourceMap(input);\n }\n this.file = [];\n this.mappings = [];\n this.filemap = {};\n if (input && typeof input == 'object') {\n if (input instanceof SourceMap) {\n return input;\n } else {\n this.append(input);\n }\n }\n}", "function w(e,t){if(!ht)// with no source maps, generated is either an\n// array or a string. if an array, flatten it.\n// if a string, just return it\n// with no source maps, generated is either an\n// array or a string. if an array, flatten it.\n// if a string, just return it\nreturn Q(e)?y(e):e;if(null==t){if(e instanceof $)return e;t={}}return null==t.loc?new $(null,null,ht,e,t.name||null):new $(t.loc.start.line,t.loc.start.column,ht===!0?t.loc.source||null:ht,e,t.name||null)}", "function toComment(sourceMap) {\n\tvar base64 = new Buffer(JSON.stringify(sourceMap)).toString('base64');\n\tvar data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n\treturn '/*# ' + data + ' */';\n}", "function toComment(sourceMap) {\n\tvar base64 = new Buffer(JSON.stringify(sourceMap)).toString('base64');\n\tvar data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n\treturn '/*# ' + data + ' */';\n}", "function toComment(sourceMap) {\n\tvar base64 = new Buffer(JSON.stringify(sourceMap)).toString('base64');\n\tvar data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n\treturn '/*# ' + data + ' */';\n}", "function $i__NM$$css$$_$$loader$lib$css$$_$$base__toComment(sourceMap) {\n\t// eslint-disable-next-line no-undef\n\tvar base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n\tvar data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n\treturn '/*# ' + data + ' */';\n}", "function SourceMapGenerator(aArgs){if(!aArgs){aArgs={};}this._file=util.getArg(aArgs,'file',null);this._sourceRoot=util.getArg(aArgs,'sourceRoot',null);this._skipValidation=util.getArg(aArgs,'skipValidation',false);this._sources=new ArraySet();this._names=new ArraySet();this._mappings=new MappingList();this._sourcesContents=null;}", "function computeSourceMap(\n {code: generatedCode, mappings: rawMappings},\n filePath,\n options,\n source,\n tokens,\n) {\n const sourceColumns = computeSourceColumns(source, tokens);\n const map = new (0, _genmapping.GenMapping)({file: options.compiledFilename});\n let tokenIndex = 0;\n // currentMapping is the output source index for the current input token being\n // considered.\n let currentMapping = rawMappings[0];\n while (currentMapping === undefined && tokenIndex < rawMappings.length - 1) {\n tokenIndex++;\n currentMapping = rawMappings[tokenIndex];\n }\n let line = 0;\n let lineStart = 0;\n if (currentMapping !== lineStart) {\n _genmapping.maybeAddSegment.call(void 0, map, line, 0, filePath, line, 0);\n }\n for (let i = 0; i < generatedCode.length; i++) {\n if (i === currentMapping) {\n const genColumn = currentMapping - lineStart;\n const sourceColumn = sourceColumns[tokenIndex];\n _genmapping.maybeAddSegment.call(void 0, map, line, genColumn, filePath, line, sourceColumn);\n while (\n (currentMapping === i || currentMapping === undefined) &&\n tokenIndex < rawMappings.length - 1\n ) {\n tokenIndex++;\n currentMapping = rawMappings[tokenIndex];\n }\n }\n if (generatedCode.charCodeAt(i) === _charcodes.charCodes.lineFeed) {\n line++;\n lineStart = i + 1;\n if (currentMapping !== lineStart) {\n _genmapping.maybeAddSegment.call(void 0, map, line, 0, filePath, line, 0);\n }\n }\n }\n const {sourceRoot, sourcesContent, ...sourceMap} = _genmapping.toEncodedMap.call(void 0, map);\n return sourceMap ;\n}", "function relocateSourceMapSources({ artefacts, entryPoint }) {\n return __awaiter(this, void 0, void 0, function* () {\n yield json_1.modifyJsonFiles(`${artefacts.stageDir}/+(bundles|esm2015|esm5)/**/*.js.map`, (sourceMap) => {\n sourceMap.sources = sourceMap.sources\n .map((path) => {\n let trimmedPath = path;\n // Trim leading '../' path separators\n while (trimmedPath.startsWith('../')) {\n trimmedPath = trimmedPath.substring(3);\n }\n return `ng://${entryPoint.moduleId}/${trimmedPath}`;\n });\n return sourceMap;\n });\n });\n}", "function getSourceMap(outFile, sourceMap) {\n let resolvedSourceMap = sourceMap;\n\n // dynamic source map; run the given iterator function\n if (typeof sourceMap === 'function') {\n resolvedSourceMap = sourceMap(outFile);\n }\n\n // source map is a boolean; use the output file\n if (sourceMap === true) {\n resolvedSourceMap = outFile;\n }\n\n // source map is a directory; append the output's basename\n if (!isFile(resolvedSourceMap)) {\n resolvedSourceMap = path.join(\n resolvedSourceMap,\n path.basename(outFile)\n );\n }\n\n // resolve and ensure '.map' extension\n return path.resolve(resolvedSourceMap.replace(/(\\.map)?$/, '.map'));\n}", "function createJsIdentitySourcemap(sourceUrl, sourceContent, lineOffset, firstLineCharOffset) {\n const generator = new source_map_1.SourceMapGenerator();\n const tokens = espree.tokenize(sourceContent, { loc: true, ecmaVersion: 2017, sourceType: 'module' });\n tokens.forEach(token => {\n if (!token.loc) {\n return null;\n }\n let mapping = {\n original: {\n line: token.loc.start.line + lineOffset,\n column: token.loc.start.column +\n (token.loc.start.line === 1 ? firstLineCharOffset : 0)\n },\n generated: token.loc.start,\n source: sourceUrl\n };\n if (token.type === 'Identifier') {\n mapping.name = token.value;\n }\n generator.addMapping(mapping);\n });\n return generator.toJSON();\n}", "function SourceMap(options) {\n options = defaults(options, {\n file : null,\n root : null,\n orig : null,\n\n orig_line_diff : 0,\n dest_line_diff : 0,\n });\n var generator = new MOZ_SourceMap.SourceMapGenerator({\n file : options.file,\n sourceRoot : options.root\n });\n var orig_map = options.orig && new MOZ_SourceMap.SourceMapConsumer(options.orig);\n function add(source, gen_line, gen_col, orig_line, orig_col, name) {\n if (orig_map) {\n var info = orig_map.originalPositionFor({\n line: orig_line,\n column: orig_col\n });\n if (info.source === null) {\n return;\n }\n source = info.source;\n orig_line = info.line;\n orig_col = info.column;\n name = info.name;\n }\n generator.addMapping({\n generated : { line: gen_line + options.dest_line_diff, column: gen_col },\n original : { line: orig_line + options.orig_line_diff, column: orig_col },\n source : source,\n name : name\n });\n };\n return {\n add : add,\n get : function() { return generator },\n toString : function() { return generator.toString() }\n };\n}", "function SourceMap(options) {\n options = defaults(options, {\n file : null,\n root : null,\n orig : null,\n\n orig_line_diff : 0,\n dest_line_diff : 0,\n });\n var generator = new MOZ_SourceMap.SourceMapGenerator({\n file : options.file,\n sourceRoot : options.root\n });\n var orig_map = options.orig && new MOZ_SourceMap.SourceMapConsumer(options.orig);\n function add(source, gen_line, gen_col, orig_line, orig_col, name) {\n if (orig_map) {\n var info = orig_map.originalPositionFor({\n line: orig_line,\n column: orig_col\n });\n if (info.source === null) {\n return;\n }\n source = info.source;\n orig_line = info.line;\n orig_col = info.column;\n name = info.name;\n }\n generator.addMapping({\n generated : { line: gen_line + options.dest_line_diff, column: gen_col },\n original : { line: orig_line + options.orig_line_diff, column: orig_col },\n source : source,\n name : name\n });\n };\n return {\n add : add,\n get : function() { return generator },\n toString : function() { return generator.toString() }\n };\n}", "function updateSourcemapLocations(document, ast) {\n // We need to serialize and reparse the dom for updated location information\n const documentContents = parse5.serialize(ast);\n ast = astUtils.parse(documentContents, { locationInfo: true });\n const reparsedDoc = new polymer_analyzer_1.ParsedHtmlDocument({\n url: document.url,\n contents: documentContents,\n ast: ast,\n isInline: document.isInline,\n locationOffset: undefined,\n astNode: null\n });\n const inlineScripts = dom5.queryAll(ast, matchers.inlineJavascript);\n inlineScripts.forEach(script => {\n let content = dom5.getTextContent(script);\n const sourceMapUrlParts = content.match(sourceMappingUrlExpr);\n if (!sourceMapUrlParts) {\n return;\n }\n const sourceMapContentParts = sourceMapUrlParts[1].match(inlineSourceMapExpr);\n if (!sourceMapContentParts) {\n return;\n }\n const sourceRange = reparsedDoc.sourceRangeForStartTag(script);\n const sourceMap = base64StringToRawSourceMap(sourceMapContentParts[2]);\n const updatedMap = offsetSourceMap(sourceMap, sourceRange.end.line, sourceRange.end.column);\n const base64Map = rawSourceMapToBase64String(updatedMap);\n content = content.replace(sourceMappingUrlExpr, `${inlineSourcemapPrefix}${base64Map}\\n`);\n dom5.setTextContent(script, content);\n });\n return ast;\n}", "function toComment(sourceMap) {\n var base64 = new Buffer(JSON.stringify(sourceMap)).toString('base64');\n var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n return '/*# ' + data + ' */';\n}", "function toComment(sourceMap) {\n var base64 = new Buffer(JSON.stringify(sourceMap)).toString('base64');\n var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n return '/*# ' + data + ' */';\n}", "function toComment(sourceMap) {\n var base64 = new Buffer(JSON.stringify(sourceMap)).toString('base64');\n var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n return '/*# ' + data + ' */';\n}", "function toComment(sourceMap) {\n var base64 = new Buffer(JSON.stringify(sourceMap)).toString('base64');\n var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n return '/*# ' + data + ' */';\n}", "function toComment(sourceMap) {\n var base64 = new Buffer(JSON.stringify(sourceMap)).toString('base64');\n var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n return '/*# ' + data + ' */';\n}", "function toComment(sourceMap) {\n var base64 = new Buffer(JSON.stringify(sourceMap)).toString('base64');\n var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n return '/*# ' + data + ' */';\n}", "function toComment(sourceMap) {\n var base64 = new Buffer(JSON.stringify(sourceMap)).toString('base64');\n var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n return '/*# ' + data + ' */';\n}", "function toComment(sourceMap) {\n var base64 = new Buffer(JSON.stringify(sourceMap)).toString('base64');\n var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n return '/*# ' + data + ' */';\n}", "function toComment(sourceMap) {\n var base64 = new Buffer(JSON.stringify(sourceMap)).toString('base64');\n var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n return '/*# ' + data + ' */';\n}", "function toComment(sourceMap) {\n var base64 = new Buffer(JSON.stringify(sourceMap)).toString('base64');\n var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n return '/*# ' + data + ' */';\n}", "function toComment(sourceMap) {\n var base64 = new Buffer(JSON.stringify(sourceMap)).toString('base64');\n var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n return '/*# ' + data + ' */';\n}", "function toComment(sourceMap) {\n var base64 = new Buffer(JSON.stringify(sourceMap)).toString('base64');\n var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n return '/*# ' + data + ' */';\n}", "function toComment(sourceMap) {\n var base64 = new Buffer(JSON.stringify(sourceMap)).toString('base64');\n var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n return '/*# ' + data + ' */';\n}", "function toComment(sourceMap) {\n var base64 = new Buffer(JSON.stringify(sourceMap)).toString('base64');\n var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n return '/*# ' + data + ' */';\n}", "function toComment(sourceMap) {\n var base64 = new Buffer(JSON.stringify(sourceMap)).toString('base64');\n var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n return '/*# ' + data + ' */';\n}", "function toComment(sourceMap) {\n var base64 = new Buffer(JSON.stringify(sourceMap)).toString('base64');\n var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n return '/*# ' + data + ' */';\n}", "function toComment(sourceMap) {\n var base64 = new Buffer(JSON.stringify(sourceMap)).toString('base64');\n var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n return '/*# ' + data + ' */';\n}", "function toComment(sourceMap) {\n var base64 = new Buffer(JSON.stringify(sourceMap)).toString('base64');\n var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n return '/*# ' + data + ' */';\n}", "function toComment(sourceMap) {\n var base64 = new Buffer(JSON.stringify(sourceMap)).toString('base64');\n var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n return '/*# ' + data + ' */';\n}", "function toComment(sourceMap) {\n var base64 = new Buffer(JSON.stringify(sourceMap)).toString('base64');\n var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n return '/*# ' + data + ' */';\n}", "function toComment(sourceMap) {\n var base64 = new Buffer(JSON.stringify(sourceMap)).toString('base64');\n var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n return '/*# ' + data + ' */';\n}", "function remapping(input, loader, options) {\n const opts = typeof options === 'object' ? options : { excludeContent: !!options, decodedMappings: false };\n const tree = buildSourceMapTree(input, loader);\n return new SourceMap(traceMappings(tree), opts);\n}", "dumpSource(filename) {\n const config = this.getConfigFor(filename);\n const resolved = config.resolve();\n const sources = resolved.transformFilename(filename);\n return sources.reduce((result, source) => {\n result.push(`Source ${source.filename}@${source.line}:${source.column} (offset: ${source.offset})`);\n if (source.transformedBy) {\n result.push(\"Transformed by:\");\n result = result.concat(source.transformedBy.reverse().map((name) => ` - ${name}`));\n }\n if (source.hooks && Object.keys(source.hooks).length > 0) {\n result.push(\"Hooks\");\n for (const [key, present] of Object.entries(source.hooks)) {\n if (present) {\n result.push(` - ${key}`);\n }\n }\n }\n result.push(\"---\");\n result = result.concat(source.data.split(\"\\n\"));\n result.push(\"---\");\n return result;\n }, []);\n }", "function simpleShimSourceMap(sourceMap) {\n if (sourceMap === undefined) {\n return undefined; //undefined case\n }\n else if (typeof sourceMap === \"object\") {\n return sourceMap.pc_pos_map_compressed; //Vyper object case\n }\n else {\n try {\n return JSON.parse(sourceMap).pc_pos_map_compressed; //Vyper JSON case\n }\n catch (_) {\n return sourceMap; //Solidity case\n }\n }\n}" ]
[ "0.6965976", "0.6937916", "0.67651826", "0.6441334", "0.63273764", "0.6297531", "0.6254359", "0.6210628", "0.61928856", "0.61809653", "0.6173767", "0.61589617", "0.61589617", "0.61589617", "0.6155463", "0.6095343", "0.6039304", "0.5988538", "0.5979952", "0.5978704", "0.59784055", "0.59784055", "0.59615546", "0.5940059", "0.5940059", "0.5940059", "0.5940059", "0.5940059", "0.5940059", "0.5940059", "0.5940059", "0.5940059", "0.5940059", "0.5940059", "0.5940059", "0.5940059", "0.5940059", "0.5940059", "0.5940059", "0.5940059", "0.5940059", "0.5940059", "0.5940059", "0.5940059", "0.5932735", "0.59265137", "0.58920646" ]
0.0
-1
globals __VUE_SSR_CONTEXT__ IMPORTANT: Do NOT use ES2015 features in this file (except for modules). This module is a runtime utility for cleaner component module output and will be included in the final webpack user bundle.
function normalizeComponent ( scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, /* server only */ shadowMode /* vue-cli only */ ) { // Vue.extend constructor export interop var options = typeof scriptExports === 'function' ? scriptExports.options : scriptExports // render functions if (render) { options.render = render options.staticRenderFns = staticRenderFns options._compiled = true } // functional template if (functionalTemplate) { options.functional = true } // scopedId if (scopeId) { options._scopeId = 'data-v-' + scopeId } var hook if (moduleIdentifier) { // server build hook = function (context) { // 2.3 injection context = context || // cached call (this.$vnode && this.$vnode.ssrContext) || // stateful (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional // 2.2 with runInNewContext: true if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { context = __VUE_SSR_CONTEXT__ } // inject component styles if (injectStyles) { injectStyles.call(this, context) } // register component module identifier for async chunk inferrence if (context && context._registeredComponents) { context._registeredComponents.add(moduleIdentifier) } } // used by ssr in case component is cached and beforeCreate // never gets called options._ssrRegister = hook } else if (injectStyles) { hook = shadowMode ? function () { injectStyles.call( this, (options.functional ? this.parent : this).$root.$options.shadowRoot ) } : injectStyles } if (hook) { if (options.functional) { // for template-only hot-reload because in that case the render fn doesn't // go through the normalizer options._injectStyles = hook // register for functional component in vue file var originalRender = options.render options.render = function renderWithStyleInjection (h, context) { hook.call(context) return originalRender(h, context) } } else { // inject component registration as beforeCreate hook var existing = options.beforeCreate options.beforeCreate = existing ? [].concat(existing, hook) : [hook] } } return { exports: scriptExports, options: options } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Es(t,e,n,i,r,o,a,s){var u=(\"function\"===typeof n?n.options:n)||{};return u.__file=\"source.vue\",u.render||(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0,r&&(u.functional=!0)),u._scopeId=i,u}", "extend(config, ctx) {\n // if (process.server && process.browser) {\n if (ctx.isDev && ctx.isClient) {\n config.devtool = \"source-map\";\n // if (isDev && process.isClient) {\n config.plugins.push(\n new StylelintPlugin({\n files: [\"**/*.vue\", \"**/*.scss\"],\n })\n ),\n config.module.rules.push({\n enforce: \"pre\",\n test: /\\.(js|vue)$/,\n loader: \"eslint-loader\",\n exclude: /(node_modules)/,\n options: {\n formatter: require(\"eslint-friendly-formatter\"),\n },\n });\n if (ctx.isDev) {\n config.mode = \"development\";\n }\n }\n for (const rule of config.module.rules) {\n if (rule.use) {\n for (const use of rule.use) {\n if (use.loader === \"sass-loader\") {\n use.options = use.options || {};\n use.options.includePaths = [\n \"node_modules/foundation-sites/scss\",\n \"node_modules/motion-ui/src\",\n ];\n }\n }\n }\n }\n // vue-svg-inline-loader\n const vueRule = config.module.rules.find((rule) =>\n rule.test.test(\".vue\")\n );\n vueRule.use = [\n {\n loader: vueRule.loader,\n options: vueRule.options,\n },\n {\n loader: \"vue-svg-inline-loader\",\n },\n ];\n delete vueRule.loader;\n delete vueRule.options;\n }", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}" ]
[ "0.58472276", "0.5728634", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396" ]
0.0
-1
CONCATENATED MODULE: ./node_modules/vuestyleloader/lib/listToStyles.js Translates the list format produced by cssloader into something easier to manipulate.
function listToStyles (parentId, list) { var styles = [] var newStyles = {} for (var i = 0; i < list.length; i++) { var item = list[i] var id = item[0] var css = item[1] var media = item[2] var sourceMap = item[3] var part = { id: parentId + ':' + i, css: css, media: media, sourceMap: sourceMap } if (!newStyles[id]) { styles.push(newStyles[id] = { id: id, parts: [part] }) } else { newStyles[id].parts.push(part) } } return styles }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function listToStyles (parentId, list) {\n var styles = []\n var newStyles = {}\n for (var i = 0; i < list.length; i++) {\n var item = list[i]\n var id = item[0]\n var css = item[1]\n var media = item[2]\n var sourceMap = item[3]\n var part = {\n id: parentId + ':' + i,\n css: css,\n media: media,\n sourceMap: sourceMap\n }\n if (!newStyles[id]) {\n styles.push(newStyles[id] = { id: id, parts: [part] })\n } else {\n newStyles[id].parts.push(part)\n }\n }\n return styles\n }" ]
[ "0.6931754" ]
0.0
-1
Compact an item in the layout.
function compactItem(compareWith /*: Layout*/ , l /*: LayoutItem*/ , verticalCompact /*: boolean*/ ) /*: LayoutItem*/ { if (verticalCompact) { // Move the element up as far as it can go without colliding. while (l.y > 0 && !getFirstCollision(compareWith, l)) { l.y--; } } // Move it down, and keep moving it down if it's colliding. var collides; while (collides = getFirstCollision(compareWith, l)) { l.y = collides.y + collides.h; } return l; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function compactItem(compareWith\n/*: Layout*/\n, l\n/*: LayoutItem*/\n, compactType\n/*: CompactType*/\n, cols\n/*: number*/\n, fullLayout\n/*: Layout*/\n)\n/*: LayoutItem*/\n{\n var compactV = compactType === \"vertical\";\n var compactH = compactType === \"horizontal\";\n\n if (compactV) {\n // Bottom 'y' possible is the bottom of the layout.\n // This allows you to do nice stuff like specify {y: Infinity}\n // This is here because the layout must be sorted in order to get the correct bottom `y`.\n l.y = Math.min(bottom(compareWith), l.y); // Move the element up as far as it can go without colliding.\n\n while (l.y > 0 && !getFirstCollision(compareWith, l)) {\n l.y--;\n }\n } else if (compactH) {\n l.y = Math.min(bottom(compareWith), l.y); // Move the element left as far as it can go without colliding.\n\n while (l.x > 0 && !getFirstCollision(compareWith, l)) {\n l.x--;\n }\n } // Move it down, and keep moving it down if it's colliding.\n\n\n var collides;\n\n while (collides = getFirstCollision(compareWith, l)) {\n if (compactH) {\n resolveCompactionCollision(fullLayout, l, collides.x + collides.w, \"x\");\n } else {\n resolveCompactionCollision(fullLayout, l, collides.y + collides.h, \"y\");\n } // Since we can't grow without bounds horizontally, if we've overflown, let's move it down and try again.\n\n\n if (compactH && l.x + l.w > cols) {\n l.x = cols - l.w;\n l.y++;\n }\n }\n\n return l;\n}", "function compactItem(compareWith, l, verticalCompact) {\n if (verticalCompact) {\n // Bottom 'y' possible is the bottom of the layout.\n // This allows you to do nice stuff like specify {y: Infinity}\n // This is here because the layout must be sorted in order to get the correct bottom `y`.\n l.y = Math.min(bottom(compareWith), l.y);\n\n // Move the element up as far as it can go without colliding.\n while (l.y > 0 && !getFirstCollision(compareWith, l)) {\n l.y--;\n }\n }\n\n // Move it down, and keep moving it down if it's colliding.\n var collides = void 0;\n while (collides = getFirstCollision(compareWith, l)) {\n l.y = collides.y + collides.h;\n }\n return l;\n}", "function compactItem(compareWith, l, compactType, cols, fullLayout) {\n var compactV = compactType === \"vertical\";\n var compactH = compactType === \"horizontal\";\n if (compactV) {\n // Bottom 'y' possible is the bottom of the layout.\n // This allows you to do nice stuff like specify {y: Infinity}\n // This is here because the layout must be sorted in order to get the correct bottom `y`.\n l.y = Math.min(bottom(compareWith), l.y);\n // Move the element up as far as it can go without colliding.\n while (l.y > 0 && !getFirstCollision(compareWith, l)) {\n l.y--;\n }\n } else if (compactH) {\n l.y = Math.min(bottom(compareWith), l.y);\n // Move the element left as far as it can go without colliding.\n while (l.x > 0 && !getFirstCollision(compareWith, l)) {\n l.x--;\n }\n }\n\n // Move it down, and keep moving it down if it's colliding.\n var collides = void 0;\n while (collides = getFirstCollision(compareWith, l)) {\n if (compactH) {\n resolveCompactionCollision(fullLayout, l, collides.x + collides.w, \"x\");\n } else {\n resolveCompactionCollision(fullLayout, l, collides.y + collides.h, \"y\");\n }\n // Since we can't grow without bounds horizontally, if we've overflown, let's move it down and try again.\n if (compactH && l.x + l.w > cols) {\n l.x = cols - l.w;\n l.y++;\n }\n }\n return l;\n}", "function compactItem(compareWith, l, compactType, cols) {\n var compactV = compactType === 'vertical';\n var compactH = compactType === 'horizontal';\n if (compactV) {\n // Bottom 'y' possible is the bottom of the layout.\n // This allows you to do nice stuff like specify {y: Infinity}\n // This is here because the layout must be sorted in order to get the correct bottom `y`.\n l.y = Math.min(bottom(compareWith), l.y);\n // Move the element up as far as it can go without colliding.\n while (l.y > 0 && !getFirstCollision(compareWith, l)) {\n l.y--;\n }\n } else if (compactH) {\n l.y = Math.min(bottom(compareWith), l.y);\n // Move the element left as far as it can go without colliding.\n while (l.x > 0 && !getFirstCollision(compareWith, l)) {\n l.x--;\n }\n }\n\n // Move it down, and keep moving it down if it's colliding.\n var collides = void 0;\n while (collides = getFirstCollision(compareWith, l)) {\n if (compactH) {\n l.x = collides.x + collides.w;\n } else {\n l.y = collides.y + collides.h;\n }\n // Since we can't grow without bounds horizontally, if we've overflown, let's move it down and try again.\n if (compactH && l.x + l.w > cols) {\n l.x = cols - l.w;\n l.y++;\n }\n }\n return l;\n}", "collapseItem(item){if(this._isExpanded(item)){this.splice(\"expandedItems\",this._getItemIndexInArray(item,this.expandedItems),1)}}", "function checkInCompactHbox(layout) {\r\n var ct = layout.owner;\r\n if (typeof ct.initialConfig.width !== \"number\") {\r\n var parentCt = ct.ownerCt;\r\n if (parentCt && parentCt._inCompactHbox) {\r\n ct._inCompactHbox = true; // mess with component's autoWidth can upset overflow handling.\r\n delete ct.flex;\r\n }\r\n }\r\n var inCompactHbox = ct._inCompactHbox;\r\n var items = ct.items.items;\r\n for (var i = 0, len = items.length; i < len; i++) {\r\n var child = items[i];\r\n if (typeof child.initialConfig.width !== \"number\") {\r\n if (child.isXType(_columnHBoxXtype) || (inCompactHbox && (child.isXType(_columnBoxXtype) || child.isXType(_columnVBoxXtype)))) {\r\n child._inCompactHbox = true;\r\n if (inCompactHbox) {\r\n delete child.flex;\r\n }\r\n }\r\n }\r\n }\r\n }", "function compactLayout(layout: MosaicNode): MosaicNode {\n if (typeof layout === \"string\") {\n return layout;\n }\n\n const prunedChildren = [layout.first, layout.second].filter(Boolean).map(compactLayout);\n return prunedChildren.length < 2\n ? prunedChildren[0]\n : {\n ...layout,\n first: prunedChildren[0],\n second: prunedChildren[1],\n };\n}", "function collapseItem(item) {\n\t \n\t // If we are loading once then lets save view when we collapse it incase it's changed\n\t if (_options.loadOnce)\n item._detailContent = $(\"#innerDeatilView_\" + item.id).html();\n\t\t\n item._collapsed = true;\n for (var idx = 1; idx <= item._sizePadding; idx++) {\n _dataView.deleteItem(item.id + \".\" + idx);\n }\n item._sizePadding = 0;\n _dataView.updateItem(item.id, item);\n\n // Remove the item from the expandedRows\n _expandedRows = _expandedRows.filter(function (r) {\n return r.id !== item.id;\n });\n }", "function compactMode(menuItem){\n\t\treturn Sfx.getComputedStyle(menuItem.parentNode, \"float\") == \"none\";\n\t}", "__onLayout(e, key) {\n const {\n height,\n } = e.nativeEvent.layout;\n const {\n onItemPlaced,\n } = this.props;\n this.requestAnimationFrame(() => {\n const {\n items,\n } = this.state;\n const heights = this.__getColumnHeights(\n this.props,\n this.state,\n );\n const item = this.props.items\n .filter((item) => item.key === key)[0];\n const parentKeys = this.props.items\n .map(({ key }) => key);\n const minHeight = Math.min(...heights);\n const column = heights.indexOf(minHeight);\n this.setState(\n {\n // XXX: Here, alongside updating the item position,\n // we also clean out any keys which are no longer\n // referenced by the parent.\n items: Object.entries({\n ...items,\n [key]: {\n height,\n column,\n },\n })\n .filter((entry) => {\n return parentKeys.indexOf(entry[0]) >= 0;\n })\n .reduce(\n (obj, entry) => {\n return ({\n ...obj,\n [entry[0]]: entry[1],\n });\n },\n {},\n ),\n },\n () => {\n return onItemPlaced(\n item,\n );\n },\n );\n });\n }", "collapseExpandedItem() {\n if (this.expandedItem !== null) {\n this.expandedItem.expanded = false;\n this.expandedItem = null;\n }\n }", "compact() {\n let compactedSize = 0;\n let {\n table,\n table: {\n length\n },\n heap\n } = this;\n\n for (let i = 0; i < length; i += 3\n /* ENTRY_SIZE */\n ) {\n let offset = table[i];\n let info = table[i + 1\n /* INFO_OFFSET */\n ]; // @ts-ignore (this whole function is currently unused)\n\n let size = info & Size.SIZE_MASK;\n let state = info & 3\n /* STATE_MASK */\n >> 30;\n\n if (state === 2\n /* Purged */\n ) {\n continue;\n } else if (state === 1\n /* Freed */\n ) {\n // transition to \"already freed\" aka \"purged\"\n // a good improvement would be to reuse\n // these slots\n table[i + 1\n /* INFO_OFFSET */\n ] = changeState(info, 2\n /* Purged */\n );\n compactedSize += size;\n } else if (state === 0\n /* Allocated */\n ) {\n for (let j = offset; j <= i + size; j++) {\n heap[j - compactedSize] = heap[j];\n }\n\n table[i] = offset - compactedSize;\n } else if (state === 3\n /* Pointer */\n ) {\n table[i] = offset - compactedSize;\n }\n }\n\n this.offset = this.offset - compactedSize;\n }", "compact() {\n let compactedSize = 0;\n let {\n table,\n table: {\n length\n },\n heap\n } = this;\n\n for (let i = 0; i < length; i += 3\n /* ENTRY_SIZE */\n ) {\n let offset = table[i];\n let info = table[i + 1\n /* INFO_OFFSET */\n ]; // @ts-ignore (this whole function is currently unused)\n\n let size = info & Size.SIZE_MASK;\n let state = info & 3\n /* STATE_MASK */\n >> 30;\n\n if (state === 2\n /* Purged */\n ) {\n continue;\n } else if (state === 1\n /* Freed */\n ) {\n // transition to \"already freed\" aka \"purged\"\n // a good improvement would be to reuse\n // these slots\n table[i + 1\n /* INFO_OFFSET */\n ] = changeState(info, 2\n /* Purged */\n );\n compactedSize += size;\n } else if (state === 0\n /* Allocated */\n ) {\n for (let j = offset; j <= i + size; j++) {\n heap[j - compactedSize] = heap[j];\n }\n\n table[i] = offset - compactedSize;\n } else if (state === 3\n /* Pointer */\n ) {\n table[i] = offset - compactedSize;\n }\n }\n\n this.offset = this.offset - compactedSize;\n }", "compact() {\n let compactedSize = 0;\n let {\n table,\n table: {\n length\n },\n heap\n } = this;\n\n for (let i = 0; i < length; i += 3\n /* ENTRY_SIZE */\n ) {\n let offset = table[i];\n let info = table[i + 1\n /* INFO_OFFSET */\n ]; // @ts-ignore (this whole function is currently unused)\n\n let size = info & Size.SIZE_MASK;\n let state = info & 3\n /* STATE_MASK */\n >> 30;\n\n if (state === 2\n /* Purged */\n ) {\n continue;\n } else if (state === 1\n /* Freed */\n ) {\n // transition to \"already freed\" aka \"purged\"\n // a good improvement would be to reuse\n // these slots\n table[i + 1\n /* INFO_OFFSET */\n ] = changeState(info, 2\n /* Purged */\n );\n compactedSize += size;\n } else if (state === 0\n /* Allocated */\n ) {\n for (let j = offset; j <= i + size; j++) {\n heap[j - compactedSize] = heap[j];\n }\n\n table[i] = offset - compactedSize;\n } else if (state === 3\n /* Pointer */\n ) {\n table[i] = offset - compactedSize;\n }\n }\n\n this.offset = this.offset - compactedSize;\n }", "compact() {\n let compactedSize = 0;\n let {\n handleTable,\n handleState,\n heap\n } = this;\n\n for (let i = 0; i < length; i++) {\n let offset = handleTable[i];\n let size = handleTable[i + 1] - offset;\n let state = handleState[i];\n\n if (state === 2\n /* Purged */\n ) {\n continue;\n } else if (state === 1\n /* Freed */\n ) {\n // transition to \"already freed\" aka \"purged\"\n // a good improvement would be to reuse\n // these slots\n handleState[i] = 2\n /* Purged */\n ;\n compactedSize += size;\n } else if (state === 0\n /* Allocated */\n ) {\n for (let j = offset; j <= i + size; j++) {\n heap[j - compactedSize] = heap[j];\n }\n\n handleTable[i] = offset - compactedSize;\n } else if (state === 3\n /* Pointer */\n ) {\n handleTable[i] = offset - compactedSize;\n }\n }\n\n this.offset = this.offset - compactedSize;\n }", "collapse(index, programmaticUse) {\n const that = this;\n\n index = that._validateItemsIndex(index, 'collapse');\n\n if (isNaN(index)) {\n return;\n }\n\n const isExpanded = that._items[index].expanded;\n\n if ((!isExpanded) || (that._expandModeIs(['single', 'singleFitHeight']) && that.expandedIndexes.indexOf(index) > -1)) {\n return;\n }\n\n that._collapseItem(index, programmaticUse);\n }", "_collapseItem(index, programmaticUse) {\n const that = this;\n let item = that._items[index];\n\n if (!item.expanded) {\n return;\n }\n\n if (that.expandMode === 'none' && programmaticUse) {\n return;\n }\n\n item.expanded = false;\n that.$.fireEvent('collapsing', {\n 'index': index,\n 'label': item.label,\n 'content': item.content.innerHTML\n });\n\n if (that.expandedIndexes.indexOf(index) > -1) {\n let positionInExpandedIndexes = that.expandedIndexes.indexOf(index),\n currentIndexes = that.expandedIndexes.slice();\n\n currentIndexes.splice(positionInExpandedIndexes, 1);\n that.expandedIndexes = currentIndexes;\n }\n\n item.$.accordionItemContent.style.height = '';\n that._handleAnimationsDuration(item, index, 'collapsed');\n }", "function resetHiddenItemSize() {\n TweenLite.to(_element, 0, {scale: 1});\n }", "function resolveCompactionCollision(layout, item, moveToCoord, axis) {\n var sizeProp = heightWidth[axis];\n item[axis] += 1;\n var itemIndex = layout.indexOf(item);\n\n // Go through each item we collide with.\n for (var _i4 = itemIndex + 1; _i4 < layout.length; _i4++) {\n var otherItem = layout[_i4];\n // Ignore static items\n if (otherItem.static) continue;\n\n // Optimization: we can break early if we know we're past this el\n // We can do this b/c it's a sorted layout\n if (otherItem.y > item.y + item.h) break;\n\n if (collides(item, otherItem)) {\n resolveCompactionCollision(layout, otherItem, moveToCoord + item[sizeProp], axis);\n }\n }\n\n item[axis] = moveToCoord;\n}", "collapse(item, far) {\n const that = this;\n\n if (typeof item === 'number') {\n item = that._items[item];\n }\n\n if (!item) {\n return;\n }\n\n const closestSplitter = (that.enableShadowDOM ? item.getRootNode().host : item).closest('jqx-splitter');\n\n if (item instanceof JQX.SplitterItem && closestSplitter === that) {\n item.collapse(far);\n return;\n }\n\n if (typeof item !== 'number' || !that._items[item]) {\n that.error(that.localize('invalidIndex', { elementType: that.nodeName.toLowerCase(), method: 'collapse' }));\n return;\n }\n\n item.collapse(far);\n }", "remove() {\n this._item = null;\n this.render();\n }", "function compact(tree, commonmark) {\n var modifier = modify(iterator);\n\n visit(tree, visitor);\n\n return tree;\n\n function visitor(node) {\n if (node.children) {\n modifier(node);\n }\n }\n\n function iterator(child, index, parent) {\n var siblings = parent.children;\n var prev = index && siblings[index - 1];\n\n if (\n prev &&\n child.type === prev.type &&\n mergeable(prev, commonmark) &&\n mergeable(child, commonmark)\n ) {\n if (child.value) {\n prev.value += child.value;\n }\n\n if (child.children) {\n prev.children = prev.children.concat(child.children);\n }\n\n siblings.splice(index, 1);\n\n if (prev.position && child.position) {\n prev.position.end = child.position.end;\n }\n\n return index;\n }\n }\n}", "async shrink() {\n this._stopAnimation(this._icon, 'grow');\n }", "function clean_item()\n{\n // clean widget area before any add-action\n RMPApplication.debug (\"begin Item cleaned\");\n c_debug(debug.init, \"=> clean_item\");\n id_details_item.setVisible(true);\n id_details_item.open();\n RMPApplication.set(\"my_item\", \"{}\");\n RMPApplication.set(\"action\", \"add\");\n RMPApplication.debug(\"end \" + itemName + \" Widget Area cleaned\");\n}", "function shrink(id) {\n var node = document.getElementById(id);\n var nodes = node.children;\n var titleStyle = nodes[0].style.display;\n var listStyle = nodes[1].style.display;\n\n nodes[0].style.display = \"block\";\n nodes[1].style.display = \"none\";\n}", "deleteItem() {\n this.view.removeFromParentWithTransition(\"remove\", 400);\n if (this.item != null) {\n this.itemDao.deleteById(this.item.getId());\n }\n }", "function expandItem(event) {\n\t\t\tvar targetElement = event,\n\t\t\t\ttargetElement$ = $(targetElement),\n\t\t\t\tnewHeight = (targetElement && targetElement.data(\"fullheight\")) ? targetElement.data(\"fullheight\") : \"\";\n\n\t\t\ttargetElement$.height(newHeight).removeAttr(\"style\");\n\t\t\ttargetElement$.parents(\".normalPostEntryItem\").first().find(\".postExpandClass\").remove();\n\t\t}", "function shrinkLayoutContent_DDK2(iPane, iSection) {\n\t\tvar selector,\n\t\t\t$pane,\n\t\t\t$content,\n\t\t\tp = asPane[iPane],\n\t\t\tsec = iSection? (typeof iSection === \"string\"? iSection : asSection[iSection]) : \"middle\"\n\t\t;\n\n\t\tif (DDK.accordion[p] !== undefined && DDK.accordion[p][sec] !== undefined) {\n\t\t\tselector = \"#layout_\" + (sec === \"middle\"? \"\" : sec + \"_\") + p + \"_accordion > .ui-accordion-content-active\";\n\t\t} else if (DDK.tabs[p] !== undefined && DDK.tabs[p][sec] !== undefined) {\n\t\t\tselector = \"#layout_\" + (sec === \"middle\"? \"\" : sec + \"_\") + \"content_\" + p + \" > .ui-tabs-panel:visible\";\n\t\t} else {\n\t\t\tselector = \"#layout_\" + (sec === \"middle\"? \"\" : sec + \"_\") + \"content_\" + p;\n\t\t}\n\n\t\t$pane = $(selector);\n\t\t$content = $pane.children(\"div.ps-content-row:visible, div.ps-content-block:visible\").not(\".ps-content-fixed\");\n\n\t\t$content\n\t\t\t.addClass(\"ddk-restrict-overflow\")\n\t\t\t.width(layoutContentMinwidth);\n\n\t\t$content.each(function() {\n\t\t\tvar $this = $(this);\n\t\t\tif ($this.hasClass(\"ps-content-block\")) {\n\t\t\t\t$this.height(layoutContentMinheight);\n\t\t\t}\n\t\t});\n\t}", "function closeCart() {\n document.getElementById(\"myItem\").style.width = \"0%\";\n}", "clean() {\r\n this.items.forEach((item) => {\r\n if (item.div.classList.contains(\"pivot\")) {\r\n item.div.classList.remove(\"pivot\");\r\n }\r\n });\r\n }", "get canCompact()\n\t{\n\t\treturn true;\n\t}", "function PackItemOverlay() {}", "function resolveCompactionCollision(layout\n/*: Layout*/\n, item\n/*: LayoutItem*/\n, moveToCoord\n/*: number*/\n, axis\n/*: \"x\" | \"y\"*/\n) {\n var sizeProp = heightWidth[axis];\n item[axis] += 1;\n var itemIndex = layout.map(function (layoutItem) {\n return layoutItem.i;\n }).indexOf(item.i); // Go through each item we collide with.\n\n for (var i = itemIndex + 1; i < layout.length; i++) {\n var otherItem = layout[i]; // Ignore static items\n\n if (otherItem.static) continue; // Optimization: we can break early if we know we're past this el\n // We can do this b/c it's a sorted layout\n\n if (otherItem.y > item.y + item.h) break;\n\n if (collides(item, otherItem)) {\n resolveCompactionCollision(layout, otherItem, moveToCoord + item[sizeProp], axis);\n }\n }\n\n item[axis] = moveToCoord;\n}", "expandListItem(index){\n var buttons = document.getElementsByClassName(\"collapsible\");\n var coll = document.getElementsByClassName(\"content\");\n if (coll[index].style.display === \"block\") {\n coll[index].style.display = \"none\";\n buttons[index].innerHTML = \"&#8744\";\n } else {\n coll[index].style.display = \"block\";\n buttons[index].innerHTML = \"&#8743\";\n }\n }", "function reaveal() {\n itemFive.style.display = \"block\";\n}", "_hideItems() {\n for (let [y, item] of this._items) {\n if (typeof y === 'number') {\n this._items.delete(y);\n this._items.set(Symbol(), item);\n\n item.remove();\n item.wrapper.classList.remove('selected');\n }\n }\n }", "showExpanded() {\n const { item } = this.props;\n if (this.props.expanded) {\n console.log(\"inside ShowExpanded\");\n return (\n <CardSection>\n <Text style={styles.cardStyle}>{item.description}</Text>\n </CardSection>\n );\n }\n }", "function clearBox(item) {\r\n item.style.backgroundColor = '';\r\n}", "function closeAdded () {\n document.getElementById(\"addeditem1\").style.width = \"0\";\n document.getElementById(\"addeditem1\").style.height = \"0\";\n}", "remove(item) {\n const that = this;\n\n if (typeof (item) === 'number') {\n item = that._items[item];\n }\n else if (typeof item === 'string') {\n item = document.getElementById(item);\n }\n\n if (!(item instanceof JQX.TabsWindow)) {\n that.error(that.localize('invalidIndex', { elementType: that.nodeName.toLowerCase(), method: 'remove' }));\n return;\n }\n\n if (item.closest('jqx-docking-layout') !== that) {\n that.error(that.localize('invalidNodeRemove', { elementType: that.nodeName.toLowerCase(), method: 'remove' }));\n return;\n }\n\n that.removeChild(item);\n }", "function decreaseItem(itemnumber)\n\t\t{\n\t\t\titems[itemnumber][1]--;\n\t\t\titemQuantityLabels[itemnumber].text = items[itemnumber][1];\n\t\t\tif (items[itemnumber][1] <= 0){\n\t\t\t\titemNameLabels[itemnumber].opacity = 0;\n\t\t\t\titemQuantityLabels[itemnumber].opacity = 0;\n\t\t\t}\n\t\t}", "remove(index) {\n const that = this;\n let item;\n\n if (index instanceof HTMLElement) {\n if (!(index instanceof JQX.AccordionItem)) {\n that.error(that.localize('accordionItemRequired', { method: 'remove' }));\n }\n else if (!that.contains(index)) {\n that.error(that.localize('referenceNodeNotChild', { argument: 'node' }));\n }\n\n item = index;\n index = item.index;\n }\n else {\n index = that._validateItemsIndex(index, 'remove');\n\n if (isNaN(index)) {\n return;\n }\n\n item = that._items[index];\n }\n\n if (item) {\n item.parentNode.removeChild(item);\n that._storeItems();\n\n if (that._expandModeIs(['singleFitHeight'])) {\n that._preventAnimation = true;\n }\n\n if (that._expandModeIs(['single', 'singleFitHeight']) && index === that.expandedIndexes[0] && that._items.length > 0) {\n that._expandItem(0);\n that._selectedItem = that._items[0];\n that._selectedItemIndex = 0;\n that._itemIsFocussed = true;\n }\n\n that.expandedIndexes = that._getExpandedIndexes();\n that._updateExpanedContentHeight();\n that._updateInlineHeight();\n that._storeItemsCoordinates();\n\n that._updateItemsIndexProperty();\n }\n }", "minimize() {\n const that = this;\n\n if (that._minimized) {\n return;\n }\n\n that.$view.addClass('jqx-visibility-hidden');\n\n if (that.enableShadowDOM) {\n that.$.view.removeAttribute('id');\n\n const templateElements = that.$.view.querySelectorAll('[jqx-id]');\n\n for (let i = 0; i < templateElements.length; i++) {\n templateElements[i].removeAttribute('id');\n }\n }\n\n if (that._edgeMacFF) {\n that.$view.addClass('not-in-view');\n }\n\n that.$hamburgerIcon.removeClass('jqx-hidden');\n\n setTimeout(function () {\n if (that.dropDownAppendTo !== null) {\n that._appendMinimizedContainerToExternalElement(that.$.view);\n }\n\n that.$view.addClass('jqx-list-menu-view-minimized');\n\n that.$.mainContainer.scrollTop = 0;\n that._checkOverflow();\n }, 0);\n\n that._minimized = true;\n that.setAttribute('minimized', '');\n }", "function requestLayout() {\n clearContainer();\n items.forEach((item) => layout(item));\n }", "componentDidUpdate () {\n this.fixSectionItemMeasure()\n }", "compact() {\n return this._push(CLEAR, this.entries());\n }", "expandItem(item){if(!this._isExpanded(item)){this.push(\"expandedItems\",item)}}", "function toggleItemVis(item) {\n\n var itemId = item.id.split('-').pop();\n \n if ($('table#quoteQty-' + itemId + ' tbody.extra').is(':visible')) {\n collapseItem(item);\n }\n else {\n expandItem(item);\n }\n}", "_keepItemProportionsOnResize() {\n const that = this;\n let splitterBarsSize = 0,\n currentItemsSize = 0,\n resizableItems = [];\n\n that.bars.map(bar => splitterBarsSize += bar[that._measurements.size]);\n\n for (let i = 0; i < that._items.length; i++) {\n if (that._items[i].collapsed) {\n continue;\n }\n\n resizableItems.push(that._items[i]);\n currentItemsSize += that._items[i]._sizeBeforeCollapse || that._items[i][that._measurements.size];\n }\n\n if (that._splitterSize) {\n currentItemsSize = that._splitterSize;\n }\n\n const splitterSizeAfterResize = that[that._measurements.size];\n\n for (let i = 0; i < resizableItems.length; i++) {\n if (resizableItems[i].style[that._measurements.dimension].indexOf('%') > -1) {\n continue;\n }\n\n resizableItems[i].style[that._measurements.dimension] = (resizableItems[i]._sizeBeforeCollapse =\n (resizableItems[i]._sizeBeforeCollapse || resizableItems[i][that._measurements.size]) / currentItemsSize * splitterSizeAfterResize) + 'px';\n }\n }", "function eraseOne (attraction) {\n\t\t\tattraction.eraseMarker().eraseItineraryItem();\n\t\t}", "function fitItem(item, props, diff) {\r\r // Cache current values:\r var oldWidth = item.width; // alert(oldWidth);\r var oldHeight = item.height; // alert(oldHeight);\r\r // Wide or tall?\r if (item.width > item.height) {\r\r // alert('wide');\r item.width = props.width - diff.deltaX;\r\r // Scale height using ratio from width:\r var ratioW = item.width / oldWidth;\r item.height = oldHeight * ratioW;\r\r } else {\r\r // alert('tall');\r item.height = props.height - diff.deltaY;\r\r // Scale width using ratio from height:\r var ratioH = item.height / oldHeight;\r item.width = oldWidth * ratioH;\r\r }\r\r // Center:\r item.top = 0 - ((props.height / 2) - (item.height / 2));\r item.left = (props.width / 2) - (item.width / 2);\r\r // Deselect:\r item.selected = false;\r\r}", "function unfoldAllItems() {\n if (displayMode != 'expanded') {\n error(\"unfoldAllItems: can only unfold in expanded mode\");\n return;\n }\n \n foreachItem(function($item) {\n unfoldItem({interactive: true, batch: true, animated: false}, $item);\n });\n\n updateContentPaneButtons();\n}", "function compact(){\n\tvar things = [1,0,2,'',false,\"tom\"];\n\tconsole.log(_.compact(things));\n}", "popItem() {\n let item = this._items.pop();\n this.graphicNode.removeArg(item);\n if(this._items.length >= 1) {\n let last_comma_idx = this.graphicNode.holes.length - 2;\n this.graphicNode.holes.splice(last_comma_idx, 1);\n }\n return item;\n }", "function foldAllItems() {\n foreachItem(function($item) {\n foldItem({interactive: true, batch: true, animated: false}, $item);\n });\n\n updateContentPaneButtons();\n}", "remove(item){\n container.removeChild(item);\n }", "function compact(array) {\n return array.filter((a) => {\n return a;\n });\n}", "handleClick() {\n AppActions.clearItem(this.props.item.description);\n }", "beforeUpdate() {\n this.items.children[this.index].style.transform = `scale(1)`\n }", "_applyItemView(value, old) {\n if (value) {\n this.getStateManager().setState(\"itemView\", value);\n } else {\n this.getStateManager().removeState(\"itemView\");\n }\n }", "function expand_compact_rac() {\n if($('#rac-view').is(\":visible\")) {\n \n $('.compact').each(function( i ) {\n $(this).fadeToggle(200 + i*100);\n });\n \n if($('button[name=expand]').attr(\"name\") === \"expand\") {\n $('button[name=expand]').text(\"Compact RAC\");\n $('button[name=expand]').attr(\"name\", \"compact\");\n } else if($('button[name=compact]').attr(\"name\") === \"compact\") {\n $('button[name=compact]').text(\"Expand RAC\");\n $('button[name=compact]').attr(\"name\", \"expand\");\n }\n }\n}", "render() {\n // Get the items from state\n const {items}=this.state;\n const packedItems = items.filter(row=>row.packed===true);\n const unpackeditems= items.filter(row=>row.packed===false);\n return (\n <div className=\"Application\">\n <NewItem onSubmit={this.addItem}/>\n <CountDown />\n <Items title=\"Unpacked Items\" items={unpackeditems} onCheck={this.onCheck} removepackaedItems={this.removepackaedItems}/>\n <Items title=\"Packed Items\" items={packedItems} onCheck={this.onCheck} removepackaedItems={this.removepackaedItems}/>\n <button className=\"button full-width\" onClick={this.allUnmarked}>Mark All As Unpacked</button>\n {/*<WrappedComponent />*/}\n </div>\n );\n }", "function layout(item) {\n let groupContainer = requireContainer();\n\n let style = styles.get(item.decoration.style);\n if (!style) {\n (0,_utils__WEBPACK_IMPORTED_MODULE_1__.logErrorMessage)(`Unknown decoration style: ${item.decoration.style}`);\n return;\n }\n\n let itemContainer = document.createElement(\"div\");\n itemContainer.setAttribute(\"id\", item.id);\n itemContainer.setAttribute(\"data-style\", item.decoration.style);\n itemContainer.style.setProperty(\"pointer-events\", \"none\");\n\n let viewportWidth = window.innerWidth;\n let columnCount = parseInt(\n getComputedStyle(document.documentElement).getPropertyValue(\n \"column-count\"\n )\n );\n let pageWidth = viewportWidth / (columnCount || 1);\n let scrollingElement = document.scrollingElement;\n let xOffset = scrollingElement.scrollLeft;\n let yOffset = scrollingElement.scrollTop;\n\n function positionElement(element, rect, boundingRect) {\n element.style.position = \"absolute\";\n\n if (style.width === \"wrap\") {\n element.style.width = `${rect.width}px`;\n element.style.height = `${rect.height}px`;\n element.style.left = `${rect.left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n } else if (style.width === \"viewport\") {\n element.style.width = `${viewportWidth}px`;\n element.style.height = `${rect.height}px`;\n let left = Math.floor(rect.left / viewportWidth) * viewportWidth;\n element.style.left = `${left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n } else if (style.width === \"bounds\") {\n element.style.width = `${boundingRect.width}px`;\n element.style.height = `${rect.height}px`;\n element.style.left = `${boundingRect.left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n } else if (style.width === \"page\") {\n element.style.width = `${pageWidth}px`;\n element.style.height = `${rect.height}px`;\n let left = Math.floor(rect.left / pageWidth) * pageWidth;\n element.style.left = `${left + xOffset}px`;\n element.style.top = `${rect.top + yOffset}px`;\n }\n }\n\n let boundingRect = item.range.getBoundingClientRect();\n\n let elementTemplate;\n try {\n let template = document.createElement(\"template\");\n template.innerHTML = item.decoration.element.trim();\n elementTemplate = template.content.firstElementChild;\n } catch (error) {\n (0,_utils__WEBPACK_IMPORTED_MODULE_1__.logErrorMessage)(\n `Invalid decoration element \"${item.decoration.element}\": ${error.message}`\n );\n return;\n }\n\n if (style.layout === \"boxes\") {\n let doNotMergeHorizontallyAlignedRects = true;\n let clientRects = (0,_rect__WEBPACK_IMPORTED_MODULE_0__.getClientRectsNoOverlap)(\n item.range,\n doNotMergeHorizontallyAlignedRects\n );\n\n clientRects = clientRects.sort((r1, r2) => {\n if (r1.top < r2.top) {\n return -1;\n } else if (r1.top > r2.top) {\n return 1;\n } else {\n return 0;\n }\n });\n\n for (let clientRect of clientRects) {\n const line = elementTemplate.cloneNode(true);\n line.style.setProperty(\"pointer-events\", \"none\");\n positionElement(line, clientRect, boundingRect);\n itemContainer.append(line);\n }\n } else if (style.layout === \"bounds\") {\n const bounds = elementTemplate.cloneNode(true);\n bounds.style.setProperty(\"pointer-events\", \"none\");\n positionElement(bounds, boundingRect, boundingRect);\n\n itemContainer.append(bounds);\n }\n\n groupContainer.append(itemContainer);\n item.container = itemContainer;\n item.clickableElements = Array.from(\n itemContainer.querySelectorAll(\"[data-activable='1']\")\n );\n if (item.clickableElements.length === 0) {\n item.clickableElements = Array.from(itemContainer.children);\n }\n }", "decreaseItem(decrease = this.options.decrease) {\n this.setIndexesByDirection(false)\n Array.from(this.expander.children).forEach((ctx, i) => {\n if (i > (this.options.show - 1) && i > this.lastIndex && i <= (this.lastIndex + decrease)) {\n new Animate(ctx, i, this.lastIndex, {\n delay: this.options.animationDuration, align: 'end', reverse: true, event: function () {\n ctx.classList.add('hidden')\n }\n }).animate()\n }\n })\n }", "function buildCompactText( options ){\n var $result = $();\n options.title = options.title || (options.label ? options.label.text : null);\n $result = $result.add(\n $._bsCreateIcon(\n {icon: options.label ? options.label.icon : 'fas fa_'},\n null,\n options.title,\n 'part-of-compact-text fa-fw text-center flex-grow-0 align-self-center'\n )\n );\n\n var $content = $('<div/>')\n ._bsAddHtml( options )\n .addClass('flex-grow-1');\n\n if (options.title)\n $content.i18n(options.title, 'title');\n\n return $result.add( $content );\n }", "constructor(layout, game, location, properties, underlay) {\n let that = this;\n\n this.location = location;\n\n this.properties = properties;\n this.state = {};\n this._itemInstances = {};\n\n let div = layout;\n\n let itemLayout;\n let updateItemPositions;\n let removeItem;\n if (properties.layout === \"stack\") {\n let itemsLayout = div.packed().overlay();\n itemsLayout.$.addClass(\"stack\");\n itemLayout = function () {\n return itemsLayout.overlay().packed();\n };\n updateItemPositions = function () {\n let widthToDivide = 0.3; // 30%\n let children = [];\n let randomFound = null;\n for (const key in that._itemInstances) {\n let i = that._itemInstances[key];\n if (\n i.item.properties.hidden === undefined &&\n i.item.properties.invisible === undefined\n ) {\n children.push(i);\n }\n if (i.item.properties.random !== undefined) {\n randomFound = i;\n }\n }\n if (randomFound !== null) {\n let filtered = [];\n for (const i of children) {\n if (i.infinite || i === randomFound) {\n filtered.push(i);\n }\n }\n children = filtered;\n }\n let n = children.length;\n if (n === 0) {\n return;\n }\n if (n === 1) {\n children[0].$.parent().css({\n left: 0,\n top: 0,\n });\n return;\n }\n for (const key in children) {\n let angle = Math.PI / 2 + ((Math.PI * 2.0) / n) * key;\n children[key].$.parent().css({\n left: Math.round(Math.cos(angle) * 100 * widthToDivide) + \"%\",\n top: Math.round(Math.sin(angle) * 100 * widthToDivide) + \"%\",\n });\n }\n };\n removeItem = function (i) {\n i.$.parent().remove(); //TODO Upgrade Layout class to handle remove/addClass/removeClass/attr on set()\n updateItemPositions();\n };\n } else {\n let cellLayout;\n if (properties.layout === \"vertical\") {\n cellLayout = div.vertical();\n } else {\n cellLayout = div.horizontal();\n }\n itemLayout = function () {\n return cellLayout.add();\n };\n updateItemPositions = function () {\n let stackableItems = [];\n for (const key in that._itemInstances) {\n if (that._itemInstances[key].item.properties.stackable !== undefined) {\n stackableItems.push(that._itemInstances[key]);\n }\n }\n for (const key in stackableItems) {\n if (key < stackableItems.length - 1) {\n stackableItems[key].$.addClass(\"stacking\");\n } else {\n stackableItems[key].$.removeClass(\"stacking\");\n }\n }\n };\n removeItem = function (i) {\n i.$.remove();\n updateItemPositions();\n };\n }\n\n div.$.addClass(\"spot\")\n .attr(\"data-location\", location)\n .attr(\"data-id\", \"spot:\" + location);\n for (const key in properties) {\n if (key !== \"layout\") {\n div.$.addClass(\"property-\" + key);\n }\n }\n\n let overlayDiv = layout.underlay();\n overlayDiv.$.addClass(\"overlay\");\n\n if (underlay !== undefined) {\n let underlayDiv = layout.underlay();\n underlayDiv.set(underlay);\n underlayDiv.$.addClass(\"underlay\");\n }\n\n this.$ = div.$;\n\n let updateRandom = function () {\n let randomFound = null;\n let total = 0;\n for (const key in that._itemInstances) {\n let i = that._itemInstances[key];\n if (i.item.properties.random !== undefined && !i.infinite) {\n randomFound = i;\n } else if (i.item.properties.hidden === undefined && !i.infinite) {\n total += i.count;\n }\n }\n div.$.removeClass(\"random\");\n if (randomFound !== null) {\n div.$.addClass(\"random\");\n randomFound.setState(\"auto_flag\", \"\" + total);\n }\n };\n /**\n * destroys the infos in the given instance\n * @param instance\n */\n let destroy = function (instance) {\n if (instance.faceIcon !== null) {\n instance.faceIcon.destroy();\n game.friendFaces.remove(instance.faceIcon);\n }\n\n instance.spot = null;\n //%% instance.$.addClass(\"destroyed\"); // In case it is cached somewhere\n game.dragAndDropManager.unconfigureItemInstance(instance);\n removeItem(instance);\n };\n /**\n * update the spot Overlays\n */\n let updateOverlays = function () {\n let overlayFound = new Multimap.Array();\n for (const key in that._itemInstances) {\n let i = that._itemInstances[key];\n if (i.item.properties.overlay !== undefined) {\n let consideredKind;\n let generalKinds = GeneralReference.getGeneralKinds(i.item.kind);\n if (generalKinds.length === 0) {\n consideredKind = i.item.kind;\n } else {\n consideredKind = generalKinds[generalKinds.length - 1].kind;\n }\n overlayFound.get(consideredKind).add(i);\n i.$.removeClass(\"overlayed\");\n }\n }\n overlayDiv.$.empty();\n overlayFound.each(function (overlayFoundPerKind, k) {\n // console.log(\"Found overlay [\" + k + \"] \" + overlayFoundPerKind[0].item.kind + \" (\" + overlayFoundPerKind[0].count + \")\");\n if (overlayFoundPerKind.length === 1) {\n let onlyOverlayFoundPerKind = overlayFoundPerKind[0];\n if (\n (properties.overlayable !== undefined &&\n onlyOverlayFoundPerKind.count === 1) ||\n (onlyOverlayFoundPerKind.item.properties.invisible !== undefined &&\n onlyOverlayFoundPerKind.infinite)\n ) {\n onlyOverlayFoundPerKind.item.createInstance(\n overlayDiv.overlay(),\n false,\n onlyOverlayFoundPerKind.liveId\n );\n onlyOverlayFoundPerKind.$.addClass(\"overlayed\");\n }\n }\n });\n };\n /**\n * update the spots modifiers\n */\n let updateModifiers = function () {\n let modifierFound = new Multimap.Array();\n for (const key in that._itemInstances) {\n let i = that._itemInstances[key];\n if (i.infinite) {\n return;\n }\n if (i.count !== 1) {\n return;\n }\n for (const key in i.item.modifiers) {\n modifierFound.get(key).add(i.item.modifiers[key]);\n }\n }\n that.state = {};\n modifierFound.each(function (a, k) {\n let s = null;\n for (const v of a) {\n s = v;\n }\n that.state[k] = s; // Let's keep only the last one\n });\n DomUtils.eachClass(div.$, function (c) {\n if (c.startsWith(\"state-\")) {\n div.$.removeClass(c);\n }\n });\n for (const key in that.state) {\n div.$.addClass(\"state-\" + key + \"-\" + that.state[key]);\n }\n };\n\n this._destroyItem = function (kind, count) {\n // console.log(\"Destroying \" + kind + \" from \" + location + \" (\" + count + \")\");\n if (kind === undefined) {\n for (const i of that._itemInstances) {\n destroy(i)\n }\n that._itemInstances = {};\n updateOverlays();\n updateRandom();\n updateModifiers();\n } else {\n let existingItemInstance = that._itemInstances[kind];\n if (existingItemInstance === undefined) {\n return;\n }\n if (count === undefined) {\n delete that._itemInstances[kind];\n destroy(existingItemInstance);\n } else {\n if (!existingItemInstance.infinite) {\n existingItemInstance.inc(-count);\n if (!(\"count\" in existingItemInstance.state) &&\n existingItemInstance.count === 0\n ) {\n delete that._itemInstances[existingItemInstance.item.kind];\n destroy(existingItemInstance);\n }\n }\n }\n if (existingItemInstance.item.properties.overlay !== undefined) {\n updateOverlays();\n }\n if ($.isEmptyObject(existingItemInstance.item.modifiers)) {\n updateModifiers();\n }\n //if (existingItemInstance.item.properties.random !== undefined) {\n updateRandom();\n //}\n }\n };\n\n this._setItemState = function (kind, key, value) {\n let existingItemInstance = that._itemInstances[kind];\n if (existingItemInstance === undefined) {\n return;\n }\n existingItemInstance.setState(key, value);\n };\n\n this._addItem = function (kind, count, liveId) {\n // console.log(\"Adding \" + kind + \" to \" + location + \" (\" + count + \") \" + liveId);\n\n let existingItemInstance = that._itemInstances[kind];\n if (\n existingItemInstance !== undefined &&\n existingItemInstance.faceIcon !== null\n ) {\n existingItemInstance.faceIcon.update(null, liveId);\n game.friendFaces.remove(existingItemInstance.faceIcon);\n if (existingItemInstance.liveId !== liveId) {\n existingItemInstance.setLiveId(liveId);\n game.friendFaces.add(existingItemInstance.faceIcon);\n } else {\n existingItemInstance.setLiveId();\n }\n /*\n\t\t\t\tif (existingItemInstance.infinite) {\n\t\t\t\t\tcount = undefined;\n\t\t\t\t}\n\t\t\t\tdelete that._itemInstances[kind];\n\t\t\t\tdestroy(existingItemInstance);\n\t\t\t\texistingItemInstance = undefined;\n\t\t\t\t*/\n }\n\n if (existingItemInstance === undefined) {\n let item = game.itemManager.getItem(kind);\n\n if (item !== null) {\n if (item.properties.unique !== undefined && count !== undefined) {\n for (const i of that._itemInstances) {\n if (\n i.item.properties.unique === item.properties.unique &&\n !i.infinite\n ) {\n delete that._itemInstances[i.item.kind];\n destroy(i);\n }\n }\n }\n\n existingItemInstance = item.createInstance(\n itemLayout(),\n true,\n liveId\n );\n existingItemInstance.spot = that;\n that._itemInstances[kind] = existingItemInstance;\n existingItemInstance.$.attr(\"data-location\", location).attr(\n \"data-id\",\n \"item:\" + location + \":\" + kind\n );\n if (item.properties.steady === undefined) {\n //%% existingItemInstance.$.addClass(\"hoverable\");\n game.dragAndDropManager.configureItemInstance(existingItemInstance);\n }\n\n if (existingItemInstance.faceIcon !== null) {\n existingItemInstance.setLiveId(); // Initialized deactivated\n // game.friendFaces.add(existingItemInstance.faceIcon);\n }\n updateItemPositions();\n } else {\n existingItemInstance = null;\n }\n }\n if (existingItemInstance !== null) {\n if (count === undefined) {\n existingItemInstance.setInfinite();\n } else {\n existingItemInstance.inc(count);\n }\n\n if (existingItemInstance.item.properties.overlay !== undefined) {\n updateOverlays();\n }\n if ($.isEmptyObject(existingItemInstance.item.modifiers)) {\n updateModifiers();\n }\n //if (existingItemInstance.item.properties.random !== undefined) {\n updateRandom();\n //}\n }\n };\n\n this._updateItem = function (kind, liveId) {\n let existingItemInstance = that._itemInstances[kind];\n if (\n existingItemInstance === undefined ||\n existingItemInstance.faceIcon === null\n ) {\n return;\n }\n if (existingItemInstance.liveId !== undefined) {\n game.friendFaces.remove(existingItemInstance.faceIcon);\n }\n existingItemInstance.faceIcon.update(null, liveId);\n if (existingItemInstance.liveId !== liveId) {\n existingItemInstance.setLiveId(liveId);\n game.friendFaces.add(existingItemInstance.faceIcon);\n } else {\n existingItemInstance.setLiveId();\n }\n };\n\n this._destroy = function () {\n //%% that.$.addClass(\"destroyed\");\n that.$.remove();\n };\n }", "change() {\n this._closeAll();\n removeClass(this.el, ['ready', 'show-more', 'measured']);\n var v = document.createDocumentFragment();\n for (var i = 0; i < this.items.length; i++) {\n v.appendChild(this.items[i].el);\n }\n this.visibleContainer.appendChild(v);\n this._initItems();\n addClass(this.el, 'measured');\n this._calculateStyles();\n addClass(this.el, 'ready');\n return this;\n }", "_refreshCostume () {\n if (this.costume) {\n this.width = this.costume.visibleWidth\n this.height = this.costume.visibleHeight\n }\n\n this.element ? this.element.update(this) : null\n }", "_renderItems() {\n this.views.forEach(function(view) {\n view.remove();\n });\n this.views = [];\n this.$listBody.empty();\n\n this.model.collection.each(item => {\n this._addItem(item, item.collection, {\n animate: false,\n });\n });\n }", "getIsFilled() {\n return this.getAllItemsWidth() >= this.getContainerWidth();\n }", "function checkCanCompactFolder(folder) {\n return (\n folder.canCompact &&\n !folder.getFlag(Ci.nsMsgFolderFlags.Virtual) &&\n folder.isCommandEnabled(\"cmd_compactFolder\")\n );\n }", "deleteItem() {\n const index = this.items.findIndex((e) => e.id === this.editItemID);\n this.items.splice(index, 1);\n this.editItemID = null;\n }", "function compressItems(items) {\n console.log(items[0]); // O(1) --> Constant time\n}", "_getCompactModeDisplayValue(items) {\n const suffix = items.length === 0 || items.length > 1 ? 'values' : 'value';\n return `${items.length} ${suffix}`;\n }", "takeout(item) {\n var index = this.item.indexOf(item);\n if (this.open = true && index > -1) {\n this.item.splice(index, 1);\n alert(\"Item has been removed from the backpack.\");\n }\n }", "async compact() {\n return await this.db.persistence.compactDatafile();\n }", "function hideEditBox(expandedItem, affectedItems) {\n var collapseAnimation = WinJS.UI.Animation.createCollapseAnimation(expandedItem, affectedItems);\n // Apply styles\n expandedItem.style.position = \"absolute\";\n expandedItem.style.opacity = \"0\";\n // Execute animation\n collapseAnimation.execute().done(\n function () { expandedItem.style.display = \"none\"; }\n );\n }", "function compressInventoryItem(itemName) {\n\t//get the quantity of the item\n\tvar quantity = calcItemQuantity(itemName);\n\t\n\t//find the item buttons\n\tvar allInputs, itemInput, itemForm;\n\tallInputs = document.evaluate(\n\t \"//input[@value='\" + itemName + \"']\",\n\t document,\n\t null,\n\t XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,\n\t null);\n\t\t\n\t//if the item is actually in the inventory\n\tif (allInputs.snapshotLength > 0) {\n\t\tvar ammo, thisAmmo, weaponList, isWeapon;\n\t\t\n\t\t//if it is an ammo weapon\n\t\tif (itemName == \"shotgun\" || itemName == \"pistol\") {\n\t\t\tammo = 0;\n\t\t\tweaponList = \"\";\n\t\t\tisWeapon = true;\n\t\t}\n\t\telse {\n\t\t\tammo = \"\";\n\t\t\tweaponList = \"\";\n\t\t\tisWeapon = false;\n\t\t}\n\t\t\n\t\t//go through each item button after the first one\n\t\tfor (var i = 1; i < allInputs.snapshotLength; i++) {\n\t\t\t//get the current button\n\t\t\titemInput = allInputs.snapshotItem(i);\n\t\t\t//get the button's corresponding form\n\t\t\titemForm = itemInput.parentNode;\n\n\t\t\tif (isWeapon) {\n\t\t\t\t//get the amount of ammo\n\t\t\t\tthisAmmo = itemForm.textContent.replace(/\\D/g, \"\");\n\t\t\t\t\n\t\t\t\t//add this weapon's ammo to the list\n\t\t\t\tweaponList += \", \" + thisAmmo;\n\t\t\t\t\n\t\t\t\t//increase the total ammo\n\t\t\t\tammo += parseInt(thisAmmo);\n\t\t\t}\n\t\t\t\n\t\t\t//delete the form including the button\n\t\t\titemForm.parentNode.removeChild(itemForm);\n\t\t}\n\t\t\n\t\t//transform the first item button\n\t\titemInput = allInputs.snapshotItem(0);\n\t\titemForm = itemInput.parentNode;\n\t\tif (isWeapon) {\n\t\t\t//format the form as a weapon\n\t\t\tthisAmmo = itemForm.textContent.replace(/\\D/g, \"\");\n\t\t\tweaponList = thisAmmo + weaponList;\n\t\t\tammo += parseInt(thisAmmo);\n\t\t\titemForm.innerHTML = \"\";\n\t\t\titemForm.appendChild(itemInput);\n\t\t\titemForm.innerHTML = quantity + \" x \" + itemForm.innerHTML + \"(\" + weaponList + \") at \" + ammo + \" shots\";\n\t\t}\n\t\telse {\n\t\t\t//format the form as a normal item\n\t\t\titemForm.innerHTML = quantity + \" x \" + itemForm.innerHTML;\n\t\t}\n\t}\n}", "set isExpanded(value) {}", "destroy() {\n const bar = this.items[this.index][0];\n const content = this.items[this.index][1];\n hide(content);\n bar.removeAttribute(ATTRIBUTE_ACTIVE);\n content.removeAttribute(ATTRIBUTE_ACTIVE);\n }", "popItem() {\n let item = this._items.pop();\n this.graphicNode.removeAllItems();\n this._items.forEach((item) => {\n this.graphicNode.addItem(item);\n });\n return item;\n }", "itemModeForceRender() {\n if (this.item) {\n this.forceRender();\n }\n }", "function displayValid(entryItem) {\n entryItem.removeClass();\n}", "function deallocate(item) {\n var index = ctrl.allocated.sourceItems.indexOf(item);\n if (index >= 0) {\n ctrl.allocated.sourceItems.splice(index, 1);\n delete ctrl.allocatedIds[item.id];\n }\n }", "updateExpandIcon() {}", "function removeBagItem(itemIndex){\n bagInventory.splice(itemIndex,1);\n game.scene.run('UIS');\n}", "expand() {\n const previous = this._lastCurrent || (this._items.length > 0 && this._items[0].widget);\n if (previous) {\n this.activate(previous.id);\n }\n }", "removeFlipped ()\r\n {\r\n //card.classList.remove(\"revealed\");\r\n this.arr.forEach (card => {card.classList.remove(\"visible\");})\r\n }", "function _compact() {\n DEBUG && _log.trace(\"Calling Compact().\");\n var droppedRequests = { count: 0};\n _compactChunks(_audioChunks, droppedRequests);\n _compactChunks(_videoChunks, droppedRequests);\n _compactByteBuffer(droppedRequests);\n\n // tell the ASE session to update the pipeline bookkeeping\n if (config.useASE && playback.streamingSession && config.pruneRequestsFromNative &&\n (droppedRequests.count > 0)) {\n _pruneASERequests();\n }\n }", "_showItems () {\n this.listItems.forEach(listItem => listItem.classList.remove(\"responsive-hidden\"));\n }", "function removeItem() {\n let item = this.parentNode.parentNode;\n let parent = item.parentNode;\n parent.removeChild(item);\n deleteTasks();\n \n}", "function completeItem() {\n const item = this.parentNode.parentNode\n const parent = item.parentNode\n const id = parent.id\n\n /* Check if the item should be added to the readed list or to re-added to unread list */\n const target = (id === 'unreadList') ? document.getElementById('readedList'):document.getElementById('unreadList')\n \n /* Remove from readed list */\n parent.removeChild(item)\n /* Re-add to unreadList */\n target.insertBefore(item, target.childNodes[0])\n}", "removeChild(node) {\n const that = this;\n\n function getNewNeighbourItem(deletedItemIndex, item, direction) {\n let index = deletedItemIndex,\n newNeighbourItem = that._items[index];\n\n while (newNeighbourItem) {\n if (!newNeighbourItem.collapsed) {\n break;\n }\n\n newNeighbourItem = that._items[index += direction]\n }\n\n return newNeighbourItem;\n }\n\n if (!that.isCompleted || node instanceof HTMLElement && node.classList.contains('jqx-resize-trigger-container')) {\n const args = Array.prototype.slice.call(arguments, 2);\n return HTMLElement.prototype.removeChild.apply(that, args.concat(Array.prototype.slice.call(arguments)));\n }\n\n if (!node || !(node instanceof JQX.SplitterItem)) {\n that.error(that.localize('invalidNode', { elementType: that.nodeName.toLowerCase(), method: 'removeChild', node: 'node' }));\n return\n }\n\n if (!that._items) {\n return;\n }\n\n let itemIndex = that._items.indexOf(node);\n\n if (node.collapsed) {\n that.$.container.removeChild(that._items.indexOf(node._neighbourItem) > itemIndex ? node.nextElementSibling : node.previousElementSibling);\n }\n else {\n if (node.previousElementSibling instanceof JQX.SplitterBar) {\n that.$.container.removeChild(node.previousElementSibling);\n }\n else if (node.nextElementSibling instanceof JQX.SplitterBar) {\n that.$.container.removeChild(node.nextElementSibling);\n }\n }\n\n that._items.splice(itemIndex, 1);\n itemIndex = Math.max(0, itemIndex - 1);\n\n let totalItemSize = 0\n const uncollapsedItems = that._items.filter(item => !item.collapsed && !item.locked),\n nodeSize = node._sizeBeforeCollapse || node[that._measurements.size];\n\n uncollapsedItems.map(item => totalItemSize += ((item.style[that._measurements.dimension] ? item._sizeBeforeCollapse : 0) || item[that._measurements.size]));\n\n that.$.content.removeChild(node);\n\n //If all left items are collapsed, force uncollapsing of the last item\n if ((that._items.length === 1 && that._items[0].collapsed) || (that._items.length > 0 && that._items.map(item => item.collapsed).indexOf(false) < 0)) {\n const lastItem = that._items[that._items.length - 1];\n let context = lastItem.context;\n\n lastItem.context = lastItem;\n lastItem._expand();\n lastItem.context = context;\n }\n\n for (let i = 0; i < that._items.length; i++) {\n if (that._items[i].collapsed && that._items[i]._neighbourItem === node) {\n let splitterBar, splitterBarContext;\n\n that._items[i]._neighbourItem = getNewNeighbourItem(itemIndex, that._items[i], 1);\n\n if (!that._items[i]._neighbourItem) {\n that._items[i]._neighbourItem = getNewNeighbourItem(itemIndex, that._items[i], -1);\n splitterBar = that._items[i].previousElementSibling;\n\n if (splitterBar) {\n splitterBarContext = splitterBar.context;\n splitterBar.context = splitterBar;\n splitterBar.itemCollapsed = true;\n splitterBar.showFarButton = !(splitterBar.showNearButton = false);\n splitterBar.context = splitterBarContext;\n }\n }\n else {\n splitterBar = that._items[i].nextElementSibling;\n\n if (splitterBar) {\n splitterBarContext = splitterBar.context;\n splitterBar.context = splitterBar;\n splitterBar.itemCollapsed = true;\n splitterBar.showNearButton = !(splitterBar.showFarButton = false);\n splitterBar.context = splitterBarContext;\n }\n }\n }\n }\n\n if (that.autoFitMode === 'proportional') {\n let currentItemSize, newSize, itemMinSize;\n\n for (let i = 0; i < uncollapsedItems.length; i++) {\n currentItemSize = uncollapsedItems[i]._sizeBeforeCollapse || uncollapsedItems[i][that._measurements.size];\n newSize = currentItemSize + (nodeSize * (currentItemSize / totalItemSize));\n\n //Check for item min size\n itemMinSize = uncollapsedItems[i]._sizeLimits[that._measurements.minDimension] || 0;\n uncollapsedItems[i].style[that._measurements.dimension] = (uncollapsedItems[i]._sizeBeforeCollapse = Math.max(0, newSize)) + 'px';\n\n if (itemMinSize > currentItemSize) {\n uncollapsedItems[i][that._measurements.minDimension] = newSize + 'px';\n }\n }\n }\n\n that._autoFitItems();\n }", "function minusItem(){\n let elem = event.currentTarget.dataset.index;\n let elemParent = event.currentTarget.parentElement;\n elemParent.remove();\n pushCameArray();\n cameArray.splice(elem, 1);\n localStorage.setItem(localStorageKey, JSON.stringify(cameArray));\n}", "function clean (callback) {\n return del([layout.destPath], callback);\n}", "function flipCard(item) {\n debug(\"flipCard\", item);\n item.setAttribute(\"class\", \"card open show\");\n }", "function minimize()\n\t{\n\t\t// minimize container\n\t\tif (_container != null)\n\t\t{\n\t\t\t_container.css({\"overflow\": \"hidden\",\n\t\t\t\t\"height\": _options.minimizedHeight});\n\t\t\t_minimized = true;\n\t\t}\n\t}", "get compactOnPropsChange() { return this._compactOnPropsChange; }", "function removeItem() {\n const item = this.parentNode.parentNode\n const parent = item.parentNode\n parent.removeChild(item)\n}" ]
[ "0.65435094", "0.6205933", "0.6028729", "0.58313006", "0.563084", "0.543494", "0.5427491", "0.53059065", "0.52136564", "0.5196293", "0.5195224", "0.5178401", "0.5178401", "0.5178401", "0.50718397", "0.4988913", "0.4960946", "0.49316293", "0.49251086", "0.4842231", "0.48367047", "0.4831614", "0.48242956", "0.48159802", "0.47988653", "0.47935838", "0.47632885", "0.46294695", "0.4622282", "0.46159315", "0.46054515", "0.4603431", "0.45842052", "0.4582621", "0.45808622", "0.45744666", "0.45579186", "0.4556737", "0.45510638", "0.45453414", "0.45398694", "0.45390114", "0.4535995", "0.4520325", "0.45119646", "0.45107797", "0.45103282", "0.45075136", "0.45069048", "0.45038155", "0.44985545", "0.44982994", "0.44804126", "0.44462612", "0.4443855", "0.444351", "0.44434795", "0.4441585", "0.4439929", "0.44352064", "0.44332665", "0.44327745", "0.44255838", "0.44230592", "0.4413868", "0.43976438", "0.43926993", "0.43875372", "0.43840754", "0.43792525", "0.4356379", "0.43545714", "0.43512648", "0.43510258", "0.4349356", "0.43483853", "0.43469253", "0.4336921", "0.4335319", "0.43346396", "0.4329458", "0.43292537", "0.43261084", "0.43255126", "0.4304979", "0.43001235", "0.42988572", "0.42946324", "0.42925957", "0.4282743", "0.4279175", "0.4278165", "0.42718568", "0.42707852", "0.4269759", "0.42657542", "0.42626554", "0.42623737", "0.42567968" ]
0.6573985
1
Test for the element that's "above" all other qualifiers
function indexOfDeepestElement(elements) { let deepestNodeParents = []; let deepestNodeIndex; for (let i = 0; i < elements.length; i++) { const currentNode = elements[i]; const deepestNode = elements[deepestNodeIndex]; // node may appear in elements array multiple times if (!currentNode || i === deepestNodeIndex) { continue; } if (!deepestNode) { deepestNodeIndex = i; continue; } const currentNodeParent = getParent(currentNode); const deepestNodeParent = getParent(deepestNode); // check if the deepest or current are document.documentElement/rootElement // - if the current node is, do nothing and continue if (currentNodeParent === currentNode.ownerDocument) { continue; } // - if deepest is, update with the current node and continue to next else if (deepestNodeParent === currentNode.ownerDocument) { deepestNodeIndex = i; continue; } // compare zIndex of siblings if (currentNodeParent === deepestNodeParent) { if (zIndexIsHigherThan(currentNode, deepestNode)) { deepestNodeIndex = i; } continue; } // populate the ancestry array for the latest deepest node deepestNodeParents = deepestNodeParents.length ? deepestNodeParents : getNodeParents(deepestNode); let ancestryStart; // if the deepest node is an HTMLElement and the current node is a non root svg element if (deepestNode instanceof utils_domObjects.HTMLElement && currentNode instanceof utils_domObjects.SVGElement && !(currentNode instanceof utils_domObjects.SVGSVGElement)) { // TODO: is this check necessary? Was this for HTML elements embedded in SVG? if (currentNode === deepestNodeParent) { continue; } ancestryStart = currentNode.ownerSVGElement; } else { ancestryStart = currentNode; } const currentNodeParents = getNodeParents(ancestryStart, deepestNode.ownerDocument); let commonIndex = 0; // get (position of closest common ancestor) + 1 while (currentNodeParents[commonIndex] && currentNodeParents[commonIndex] === deepestNodeParents[commonIndex]) { commonIndex++; } const parents = [currentNodeParents[commonIndex - 1], currentNodeParents[commonIndex], deepestNodeParents[commonIndex]]; let child = parents[0].lastChild; while (child) { if (child === parents[1]) { deepestNodeIndex = i; deepestNodeParents = currentNodeParents; break; } else if (child === parents[2]) { break; } child = child.previousSibling; } } return deepestNodeIndex; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function above(a, curr){\n\tvar minH = a.self.minHeight/2; //makes function less sensitive\n\tif( (a.top + a.h - minH ) <= curr.top){\n\t\tif(curr.top <= (a.top + a.h + minH ) ){\n\t\t\treturn true;\n\t\t}\n\t} \n\treturn false;\n}", "aboveView(element) {\n const br = this.getBoundingClientRect(element);\n return -1 * (br.top - this.viewport.top) > br.height;\n }", "function below(a, curr){\n\tvar minH = a.self.minHeight/2;\t//makes function less sensitive\n\tvar c = curr.top + curr.h;\n\tif(a.top - minH <= c){\n\t\tif(c <= a.top + minH){\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}", "static vertLocationCheck3Elemets(selectorTopEl, selectorMiddleEl, selectorBottomEl){\n const topElLocation = $(selectorTopEl).getLocation('y');\n const middleElLocation = $(selectorMiddleEl).getLocation('y');\n const bottomElLocation = $(selectorBottomEl).getLocation('y');\n return (topElLocation < middleElLocation && middleElLocation < bottomElLocation);\n }", "isApproachingToElement(){\n\t\tif ((this.elem.getBoundingClientRect().top - document.documentElement.clientHeight) < this.startDistance) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "within(a, b) {\n\t\tconst min = this.displayPosition;\n\t\tconst max = new NPoint(min.x + this.nodeDiv.clientWidth, min.y + this.nodeDiv.clientHeight);\n\t\treturn (min.x >= a.x && max.x <= b.x && min.y >= a.y && max.y <= b.y);\n\t}", "within(a, b) {\n\t\tconst min = this.displayPosition;\n\t\tconst max = new NPoint(min.x + this.nodeDiv.clientWidth, min.y + this.nodeDiv.clientHeight);\n\t\treturn (min.x >= a.x && max.x <= b.x && min.y >= a.y && max.y <= b.y);\n\t}", "function locallyInside(a, b) {\n\t return area(a.prev, a, a.next) < 0 ?\n\t area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :\n\t area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\n\t}", "function locallyInside(a, b) {\n\t return area(a.prev, a, a.next) < 0 ?\n\t area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :\n\t area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\n\t}", "function locallyInside(a, b) {\n\t return area(a.prev, a, a.next) < 0 ?\n\t area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :\n\t area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\n\t}", "function locallyInside(a, b) {\n\t return area(a.prev, a, a.next) < 0 ?\n\t area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :\n\t area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\n\t}", "function locallyInside(a, b) {\n\t return area(a.prev, a, a.next) < 0 ?\n\t area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :\n\t area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\n\t}", "function inAnimationRange(element) {\n\t\tvar elementTop = $(element).offset().top;\n\t\tvar elementBottom = elementTop + $(element).height();\n\n\t\treturn ((elementBottom < lowerThreshold) && (elementTop > upperThreshold));\n\t}", "function locallyInside(a, b) {\n return area(a.prev, a, a.next) < 0 ?\n area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :\n area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\n}", "function locallyInside(a, b) {\n return area(a.prev, a, a.next) < 0 ? area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 : area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\n}", "function locallyInside(a, b) {\n return area(a.prev, a, a.next) < 0 ? area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 : area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\n}", "function locallyInside(a, b) {\n return area(a.prev, a, a.next) < 0 ?\n area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :\n area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\n}", "function locallyInside(a, b) {\n return area(a.prev, a, a.next) < 0 ?\n area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :\n area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\n}", "function locallyInside(a, b) {\n return area(a.prev, a, a.next) < 0 ?\n area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :\n area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\n}", "function locallyInside(a, b) {\n return area(a.prev, a, a.next) < 0 ?\n area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :\n area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\n}", "function locallyInside(a, b) {\n return area(a.prev, a, a.next) < 0 ?\n area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :\n area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\n}", "function locallyInside(a, b) {\n return area(a.prev, a, a.next) < 0 ?\n area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :\n area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\n}", "function locallyInside(a, b) {\n return area(a.prev, a, a.next) < 0 ?\n area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :\n area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\n}", "function locallyInside(a, b) {\n return area(a.prev, a, a.next) < 0 ?\n area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :\n area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\n}", "function locallyInside(a, b) {\n return area(a.prev, a, a.next) < 0 ?\n area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :\n area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\n}", "function locallyInside(a, b) {\n return area(a.prev, a, a.next) < 0 ?\n area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :\n area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\n}", "function locallyInside(a, b) {\n return area(a.prev, a, a.next) < 0 ?\n area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :\n area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\n}", "function locallyInside(a, b) {\n return area(a.prev, a, a.next) < 0 ?\n area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :\n area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\n}", "function locallyInside(a, b) {\n return area(a.prev, a, a.next) < 0 ?\n area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :\n area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\n}", "function locallyInside(a, b) {\n return area(a.prev, a, a.next) < 0 ?\n area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :\n area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\n}", "function locallyInside(a, b) {\n return area(a.prev, a, a.next) < 0 ?\n area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :\n area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\n}", "function locallyInside(a, b) {\n return area(a.prev, a, a.next) < 0 ?\n area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :\n area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\n}", "function locallyInside(a, b) {\n return area(a.prev, a, a.next) < 0 ?\n area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :\n area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\n}", "function hit(elemOne, elemTwo)\n{\n\tvar posOneTop = elemOne.offsetTop,\n\tposOneLeft = elemOne.offsetLeft,\n\tposOneHeight = elemOne.offsetHeight,\n\tposOneWidth = elemOne.offsetWidth ;\n\n\tvar posTwoTop = elemTwo.offsetTop,\n\tposTwoLeft = elemTwo.offsetLeft,\n\tposTwoHeight = elemTwo.offsetHeight,\n\tposTwoWidth = elemTwo.offsetWidth ;\n\tvar leftTop = posTwoLeft > posOneLeft && posTwoLeft < posOneLeft+posOneWidth && posTwoTop > posOneTop && posTwoTop < posOneTop+posOneHeight,\n\trightTop = posTwoLeft+posTwoWidth > posOneLeft && posTwoLeft+posTwoWidth < posOneLeft+posOneWidth && posTwoTop > posOneTop && posTwoTop < posOneTop+posOneHeight,\n\tleftBottom = posTwoLeft > posOneLeft && posTwoLeft < posOneLeft+posOneWidth && posTwoTop+posTwoHeight > posOneTop && posTwoTop+posTwoHeight < posOneTop+posOneHeight,\n\trightBottom = posTwoLeft+posTwoWidth > posOneLeft && posTwoLeft+posTwoWidth < posOneLeft+posOneWidth && posTwoTop+posTwoHeight > posOneTop && posTwoTop+posTwoHeight < posOneTop+posOneHeight;\n return leftTop || rightTop || leftBottom || rightBottom;\n}", "function isWithin(element, otherElement) {\n\t\t\t\n\t\t\tif(element.ID != otherElement.ID) {\n\t\t\t\t\n\t\t\t\t/* Calculate element bounds */\n\t\t\t\t\n\t\t\t\tvar elementLeastX = element.x - (element.width / 2);\n\t\t\t\tvar elementMostX = element.x + (element.width / 2);\n\t\t\t\tvar elementLeastY = element.y - (element.height / 2);\n\t\t\t\tvar elementMostY = element.y + (element.height / 2);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t/* Calculate other element bounds */\n\t\t\t\t\n\t\t\t\tvar otherElementLeastX = otherElement.x - (otherElement.width / 2);\n\t\t\t\tvar otherElementMostX = otherElement.x + (otherElement.width / 2);\n\t\t\t\tvar otherElementLeastY = otherElement.y - (otherElement.height / 2);\n\t\t\t\tvar otherElementMostY = otherElement.y + (otherElement.height / 2);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t/* If element is within other element */\n\t\t\t\t\n\t\t\t\tif((elementMostX < otherElementMostX)\n\t\t\t\t\t&& (otherElementLeastX < elementLeastX)\n\t\t\t\t\t&& (elementMostY < otherElementMostY)\n\t\t\t\t\t&& (otherElementLeastY < elementLeastY)) {\n\t\t\t\t\t\n\t\t\t\t\treturn true; // Is within\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn false; // Is not within\n\t\t\t\n\t\t}", "function locallyInside(a, b) {\n\n\treturn area(a.prev, a, a.next) < 0 ? area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 : area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\n}", "function locallyInside( a, b ) {\n\n\treturn area( a.prev, a, a.next ) < 0 ?\n\t\tarea( a, b, a.next ) >= 0 && area( a, a.prev, b ) >= 0 :\n\t\tarea( a, b, a.prev ) < 0 || area( a, a.next, b ) < 0;\n\n}", "function locallyInside( a, b ) {\n\n\treturn area( a.prev, a, a.next ) < 0 ?\n\t\tarea( a, b, a.next ) >= 0 && area( a, a.prev, b ) >= 0 :\n\t\tarea( a, b, a.prev ) < 0 || area( a, a.next, b ) < 0;\n\n}", "function locallyInside( a, b ) {\n\n\treturn area( a.prev, a, a.next ) < 0 ?\n\t\tarea( a, b, a.next ) >= 0 && area( a, a.prev, b ) >= 0 :\n\t\tarea( a, b, a.prev ) < 0 || area( a, a.next, b ) < 0;\n\n}", "function locallyInside( a, b ) {\n\n\treturn area( a.prev, a, a.next ) < 0 ?\n\t\tarea( a, b, a.next ) >= 0 && area( a, a.prev, b ) >= 0 :\n\t\tarea( a, b, a.prev ) < 0 || area( a, a.next, b ) < 0;\n\n}", "function locallyInside( a, b ) {\n\n\treturn area( a.prev, a, a.next ) < 0 ?\n\t\tarea( a, b, a.next ) >= 0 && area( a, a.prev, b ) >= 0 :\n\t\tarea( a, b, a.prev ) < 0 || area( a, a.next, b ) < 0;\n\n}", "belowView(element) {\n const br = this.getBoundingClientRect(element);\n return br.top - this.viewport.top > this.viewport.height;\n }", "static vertLocationCheck2Elemets(selectorTopEl, selectorBottomEl){\n const emailLocation = $(selectorTopEl).getLocation('y');\n const errorLocation = $(selectorBottomEl).getLocation('y');\n return (emailLocation < errorLocation);\n }", "function locallyInside( a, b ) {\n\n\t\treturn area( a.prev, a, a.next ) < 0 ?\n\t\t\tarea( a, b, a.next ) >= 0 && area( a, a.prev, b ) >= 0 :\n\t\t\tarea( a, b, a.prev ) < 0 || area( a, a.next, b ) < 0;\n\n\t}", "function locallyInside( a, b ) {\n\n\t\treturn area( a.prev, a, a.next ) < 0 ?\n\t\t\tarea( a, b, a.next ) >= 0 && area( a, a.prev, b ) >= 0 :\n\t\t\tarea( a, b, a.prev ) < 0 || area( a, a.next, b ) < 0;\n\n\t}", "function locallyInside( a, b ) {\n\n\t\treturn area( a.prev, a, a.next ) < 0 ?\n\t\t\tarea( a, b, a.next ) >= 0 && area( a, a.prev, b ) >= 0 :\n\t\t\tarea( a, b, a.prev ) < 0 || area( a, a.next, b ) < 0;\n\n\t}", "function locallyInside( a, b ) {\n\n\t\treturn area( a.prev, a, a.next ) < 0 ?\n\t\t\tarea( a, b, a.next ) >= 0 && area( a, a.prev, b ) >= 0 :\n\t\t\tarea( a, b, a.prev ) < 0 || area( a, a.next, b ) < 0;\n\n\t}", "function recordContaining(elt) {\n const $elt = $(elt), eltRect = elt.getBoundingClientRect();\n const nia = nonInlineAncestors(elt);\n for (const ancestorElt of nia) {\n const ancestorRect = ancestorElt.getBoundingClientRect();\n if (\n eltRect.top < ancestorRect.top ||\n eltRect.left < ancestorRect.left ||\n eltRect.bottom > ancestorRect.bottom ||\n eltRect.right > ancestorRect.right\n ) {\n continue;\n }\n const ancestorArea = eltArea(ancestorElt);\n for (const curClass of Array.from(ancestorElt.classList)) {\n // Only look at classes for elements that are the tightest fit around\n // elt:\n if ($elt.closest('.' + curClass)[0] !== ancestorElt) {\n continue;\n }\n\n const classArea = occupiedSpace('.' + curClass);\n if (ancestorArea * 8 <= classArea) {\n // curClass is probably the \"record class\": it is on a block element\n // and the total real estate of that kind of block is at least 8 times\n // larger than the real estate of ancestorElt.\n return ancestorElt;\n }\n }\n }\n return nia[nia.length - 1] || elt;\n}", "function within (evt, elem, fallback) {\n var targ = evt.relatedTarget, ret;\n if (targ == null) {\n targ = evt[fallback] || null;\n }\n try {\n while (targ && targ !== elem) {\n targ = targ.parentNode;\n }\n ret = (targ === elem);\n } catch(e) {\n ret = false;\n }\n return ret;\n}", "lte(other) { return this.cmp(other) <= 0; }", "function onTopOf(obj) {\n\t\treturn (!(this.x + this.boundingBox.left >= obj.x + obj.boundingBox.right ||\n\t\t\tthis.x + this.boundingBox.right <= obj.x + obj.boundingBox.left) &&\n\t\tthis.y + this.boundingBox.bottom === obj.y + obj.boundingBox.top);\n\t}", "function objectContainedInObject(object1, object2) {\n if((object1.offsetTop >= object2.offsetTop) &&\n (object1.offsetTop + object1.offsetHeight <= object2.offsetTop + object2.offsetHeight) &&\n (object1.offsetLeft > object2.offsetLeft) &&\n (object1.offsetLeft + object1.offsetWidth <= object2.offsetLeft + object2.offsetWidth))\n return true;\n else\n return false;\n}", "static locallyInside(a, b) {\n return GraphicsGeometry.area(a.prev, a, a.next) < 0 ?\n GraphicsGeometry.area(a, b, a.next) >= 0 && GraphicsGeometry.area(a, a.prev, b) >= 0 :\n GraphicsGeometry.area(a, b, a.prev) < 0 || GraphicsGeometry.area(a, a.next, b) < 0;\n }", "function isFullAge(limit, element) {\n return element >= limit;\n}", "function checkMostlyVisible(elm) {\n var rect = elm.getBoundingClientRect();\n var viewHeight = Math.max(document.documentElement.clientHeight, window.innerHeight);\n return !(rect.bottom < viewHeight/2 || rect.top - viewHeight/2 >= 0);\n}", "function isOver(mid) {\r\n\tvar l = lowest($(\"#main-container\"));\r\n\tvar flat = flatten(l);\r\n\r\n\tvar ret = false;\r\n\tflat.forEach(function(entry) {\r\n\t\tvar entry = $(entry);\r\n \tvar top = entry.offset().top;\r\n \tvar left = entry.offset().left;\r\n \tvar height = entry[0].clientHeight;\r\n \tvar width = entry[0].clientWidth;\r\n\r\n \t\r\n \tif(mid[0] > top && mid[0] < top + height && mid[1] > left && mid[1] < left + width) {\r\n \t\tret = entry;\r\n \t}\r\n\t});\r\n\treturn ret;\r\n}", "function isVisible(elem){var coords=elem.getBoundingClientRect();var windowHeight=document.documentElement.clientHeight;var extendedTop=-windowHeight;var extendedBottom=2*windowHeight;// верхняя граница elem в пределах видимости ИЛИ нижняя граница видима\nvar topVisible=coords.top>extendedTop&&coords.top<extendedBottom;var bottomVisible=coords.bottom<extendedBottom&&coords.bottom>extendedTop;return topVisible||bottomVisible;}", "hasPreviousSibling() {\n return Array.isArray(this._containers.top()) && this._indexes.top() > 0;\n }", "function winnow(elements,qualifier,not){if(jQuery.isFunction(qualifier)){return jQuery.grep(elements,function(elem,i){/* jshint -W018 */return!!qualifier.call(elem,i,elem)!==not;});}if(qualifier.nodeType){return jQuery.grep(elements,function(elem){return elem===qualifier!==not;});}if(typeof qualifier===\"string\"){if(risSimple.test(qualifier)){return jQuery.filter(qualifier,elements,not);}qualifier=jQuery.filter(qualifier,elements);}return jQuery.grep(elements,function(elem){return jQuery.inArray(elem,qualifier)>-1!==not;});}", "function winnow(elements,qualifier,not){if(jQuery.isFunction(qualifier)){return jQuery.grep(elements,function(elem,i){ /* jshint -W018 */return !!qualifier.call(elem,i,elem)!==not;});}if(qualifier.nodeType){return jQuery.grep(elements,function(elem){return elem===qualifier!==not;});}if(typeof qualifier===\"string\"){if(risSimple.test(qualifier)){return jQuery.filter(qualifier,elements,not);}qualifier=jQuery.filter(qualifier,elements);}return jQuery.grep(elements,function(elem){return indexOf.call(qualifier,elem)>-1!==not;});}", "function winnow(elements,qualifier,not){if(jQuery.isFunction(qualifier)){return jQuery.grep(elements,function(elem,i){ /* jshint -W018 */return !!qualifier.call(elem,i,elem)!==not;});}if(qualifier.nodeType){return jQuery.grep(elements,function(elem){return elem===qualifier!==not;});}if(typeof qualifier===\"string\"){if(risSimple.test(qualifier)){return jQuery.filter(qualifier,elements,not);}qualifier=jQuery.filter(qualifier,elements);}return jQuery.grep(elements,function(elem){return indexOf.call(qualifier,elem)>-1!==not;});}", "function winnow(elements,qualifier,not){if(jQuery.isFunction(qualifier)){return jQuery.grep(elements,function(elem,i){/* jshint -W018 */return!!qualifier.call(elem,i,elem)!==not;});}if(qualifier.nodeType){return jQuery.grep(elements,function(elem){return elem===qualifier!==not;});}if(typeof qualifier===\"string\"){if(risSimple.test(qualifier)){return jQuery.filter(qualifier,elements,not);}qualifier=jQuery.filter(qualifier,elements);}return jQuery.grep(elements,function(elem){return indexOf.call(qualifier,elem)>-1!==not&&elem.nodeType===1;});}", "function elFllVsbl(el) {\n return (el.getBoundingClientRect().top >= 0 && el.getBoundingClientRect().bottom < window.innerHeight);\n}", "function mainContentBelowFold(){\n\tvar below = true;\n\tvar main_node = scanWordCount(document.querySelectorAll('*'))[0].node;\n\tvar rect = main_node.getBoundingClientRect();\n\t// rect.top, rect.right, rect.bottom, rect.left;\n\tbelow = window.innerHeight < rect.top;\n\treturn below;\n}", "function winnow(elements,qualifier,not){if(jQuery.isFunction(qualifier)){return jQuery.grep(elements,function(elem,i){/* jshint -W018 */return!!qualifier.call(elem,i,elem)!==not;});}if(qualifier.nodeType){return jQuery.grep(elements,function(elem){return elem===qualifier!==not;});}if(typeof qualifier===\"string\"){if(isSimple.test(qualifier)){return jQuery.filter(qualifier,elements,not);}qualifier=jQuery.filter(qualifier,elements);}return jQuery.grep(elements,function(elem){return jQuery.inArray(elem,qualifier)>=0!==not;});}", "function winnow(elements,qualifier,not){if(jQuery.isFunction(qualifier)){return jQuery.grep(elements,function(elem,i){ /* jshint -W018 */return !!qualifier.call(elem,i,elem) !== not;});}if(qualifier.nodeType){return jQuery.grep(elements,function(elem){return elem === qualifier !== not;});}if(typeof qualifier === \"string\"){if(risSimple.test(qualifier)){return jQuery.filter(qualifier,elements,not);}qualifier = jQuery.filter(qualifier,elements);}return jQuery.grep(elements,function(elem){return indexOf.call(qualifier,elem) >= 0 !== not;});}", "function winnow(elements, qualifier, not) {\n if (jQuery.isFunction(qualifier)) {\n return jQuery.grep(elements, function (elem, i) {\n /* jshint -W018 */\n return !!qualifier.call(elem, i, elem) !== not;\n });\n\n }\n\n if (qualifier.nodeType) {\n return jQuery.grep(elements, function (elem) {\n return (elem === qualifier) !== not;\n });\n\n }\n\n if (typeof qualifier === \"string\") {\n if (risSimple.test(qualifier)) {\n return jQuery.filter(qualifier, elements, not);\n }\n\n qualifier = jQuery.filter(qualifier, elements);\n }\n\n return jQuery.grep(elements, function (elem) {\n return (jQuery.inArray(elem, qualifier) >= 0) !== not;\n });\n }", "function viewportChecker(elem) {\n let secPosition = elem.getBoundingClientRect();\n return (secPosition.top >= 0);\n}", "function occursBefore(name1, name2){\n\tvar field1 = jq(\"[name='\" + escapeName(name1) + \"']\");\n\tvar field2 = jq(\"[name='\" + escapeName(name2) + \"']\");\n\n\tfield1.addClass(\"prereqcheck\");\n\tfield2.addClass(\"prereqcheck\");\n\n\tvar fields = jq(\".prereqcheck\");\n\n\tfield1.removeClass(\"prereqcheck\");\n\tfield2.removeClass(\"prereqcheck\");\n\n\tif(fields.index(field1) < fields.index(field2) ){\n\t\treturn true;\n\t}\n\telse{\n\t\treturn false;\n\t}\n}", "gt(other) { return this.cmp(other) > 0; }", "function filterByLowImportance(el) {\n if (el.importance <= 1) {\n return true;\n }\n }", "function erKollisjonMellom(elementA, elementB){\n\tif(elementA.offsetLeft> (elementB.offsetLeft+elementB.width)){\n\t\treturn false; // A is completeley to the right of B\n\t} else if(elementB.offsetLeft> (elementA.offsetLeft+elementA.width)){\n\t\treturn false; // B is completeley to the right of A\n\t} else if(elementA.offsetTop > (elementB.offsetTop+elementB.height)){\n\t\treturn false; // A is completely below B\n\t} else if(elementB.offsetTop > (elementA.offsetTop+elementA.height)){\n\t\treturn false; // B is completely below A\n\t} else {\n\t\treturn true;\n\t}\n}", "_isStacked() {\n if (!this.$watched[0] || !this.$watched[1]) {\n return true;\n }\n return this.$watched[0].getBoundingClientRect().top !== this.$watched[1].getBoundingClientRect().top;\n }", "function winnow( elements, qualifier, keep ) {\nif ( pL.isFunction( qualifier ) ) {\nreturn pL.grep(elements, function( elem, i ) {\nvar retVal = !!qualifier.call( elem, i, elem );\nreturn retVal === keep;\n});\n} else if ( qualifier.nodeType ) {\nreturn pL.grep(elements, function( elem, i ) {\nreturn (elem === qualifier) === keep;\n});\n} else if ( typeof qualifier === \"string\" ) {\nvar filtered = pL.grep(elements, function( elem ) {\nreturn elem.nodeType === 1;\n});\nif ( isSimple.test( qualifier ) ) {\nreturn pL.filter(qualifier, filtered, !keep);\n} else {\nqualifier = pL.filter( qualifier, filtered );\n}\n}\nreturn pL.grep(elements, function( elem, i ) {\nreturn (pL.inArray( elem, qualifier ) >= 0) === keep;\n});\n}", "function winnow( elements, qualifier, not ) {\n\t\tif ( jQuery.isFunction( qualifier ) ) {\n\t\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t\t} );\n\t\n\t\t}\n\t\n\t\tif ( qualifier.nodeType ) {\n\t\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\t\treturn ( elem === qualifier ) !== not;\n\t\t\t} );\n\t\n\t\t}\n\t\n\t\tif ( typeof qualifier === \"string\" ) {\n\t\t\tif ( risSimple.test( qualifier ) ) {\n\t\t\t\treturn jQuery.filter( qualifier, elements, not );\n\t\t\t}\n\t\n\t\t\tqualifier = jQuery.filter( qualifier, elements );\n\t\t}\n\t\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not && elem.nodeType === 1;\n\t\t} );\n\t}", "function winnow( elements, qualifier, not ) {\n\t\tif ( jQuery.isFunction( qualifier ) ) {\n\t\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t\t} );\n\t\n\t\t}\n\t\n\t\tif ( qualifier.nodeType ) {\n\t\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\t\treturn ( elem === qualifier ) !== not;\n\t\t\t} );\n\t\n\t\t}\n\t\n\t\tif ( typeof qualifier === \"string\" ) {\n\t\t\tif ( risSimple.test( qualifier ) ) {\n\t\t\t\treturn jQuery.filter( qualifier, elements, not );\n\t\t\t}\n\t\n\t\t\tqualifier = jQuery.filter( qualifier, elements );\n\t\t}\n\t\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not && elem.nodeType === 1;\n\t\t} );\n\t}", "function winnow( elements, qualifier, not ) {\n\t\tif ( jQuery.isFunction( qualifier ) ) {\n\t\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t\t} );\n\t\n\t\t}\n\t\n\t\tif ( qualifier.nodeType ) {\n\t\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\t\treturn ( elem === qualifier ) !== not;\n\t\t\t} );\n\t\n\t\t}\n\t\n\t\tif ( typeof qualifier === \"string\" ) {\n\t\t\tif ( risSimple.test( qualifier ) ) {\n\t\t\t\treturn jQuery.filter( qualifier, elements, not );\n\t\t\t}\n\t\n\t\t\tqualifier = jQuery.filter( qualifier, elements );\n\t\t}\n\t\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not && elem.nodeType === 1;\n\t\t} );\n\t}", "function pointerIsOver(x,y, element) {\n var bounds = element.getBoundingClientRect()\n return bounds.top <= y&&y <= bounds.bottom\n && bounds.left <= x&&x <= bounds.right\n}", "function pointerIsOver(x,y, element) {\n var bounds = element.getBoundingClientRect()\n return bounds.top <= y&&y <= bounds.bottom\n && bounds.left <= x&&x <= bounds.right\n}", "function winnow( elements, qualifier, not ) {\n\tif ( jQuery.isFunction( qualifier ) ) {\n\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\t/* jshint -W018 */\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t} );\n\n\t}\n\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t} );\n\n\t}\n\n\tif ( typeof qualifier === \"string\" ) {\n\t\tif ( risSimple.test( qualifier ) ) {\n\t\t\treturn jQuery.filter( qualifier, elements, not );\n\t\t}\n\n\t\tqualifier = jQuery.filter( qualifier, elements );\n\t}\n\n\treturn jQuery.grep( elements, function( elem ) {\n\t\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not && elem.nodeType === 1;\n\t} );\n}", "function winnow( elements, qualifier, not ) {\n\tif ( jQuery.isFunction( qualifier ) ) {\n\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\t/* jshint -W018 */\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t} );\n\n\t}\n\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t} );\n\n\t}\n\n\tif ( typeof qualifier === \"string\" ) {\n\t\tif ( risSimple.test( qualifier ) ) {\n\t\t\treturn jQuery.filter( qualifier, elements, not );\n\t\t}\n\n\t\tqualifier = jQuery.filter( qualifier, elements );\n\t}\n\n\treturn jQuery.grep( elements, function( elem ) {\n\t\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not && elem.nodeType === 1;\n\t} );\n}", "function element_in_scroll(elem) {\n var docViewTop = $(window).scrollTop();\n var docViewBottom = docViewTop + $(window).height();\n\n var elemTop = $(elem).offset().top;\n var elemBottom = elemTop - $(elem).height() - 100;\n\n return ((elemBottom <= docViewBottom) && (elemTop >= docViewTop));\n }", "function winnow(elements, qualifier, not) {\n if (jQuery.isFunction(qualifier)) {\n return jQuery.grep(elements, function (elem, i) {\n /* jshint -W018 */\n return !!qualifier.call(elem, i, elem) !== not;\n });\n }\n\n if (qualifier.nodeType) {\n return jQuery.grep(elements, function (elem) {\n return elem === qualifier !== not;\n });\n }\n\n if (typeof qualifier === \"string\") {\n if (risSimple.test(qualifier)) {\n return jQuery.filter(qualifier, elements, not);\n }\n\n qualifier = jQuery.filter(qualifier, elements);\n }\n\n return jQuery.grep(elements, function (elem) {\n return jQuery.inArray(elem, qualifier) > -1 !== not;\n });\n }", "function isHere(coverElement) {\n for (var i = 0; i < ro.length; ++i) {\n var helperCounter = 0;\n for (var j = 0; j < coverElement.length; ++j) {\n if (ro[i].includes(coverElement[j])) helperCounter++;\n }\n if (helperCounter === coverElement.length) return false;\n }\n return true;\n}", "function winnow( elements, qualifier, not ) {\n\tif ( jQuery.isFunction( qualifier ) ) {\n\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t} );\n\n\t}\n\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t} );\n\n\t}\n\n\tif ( typeof qualifier === \"string\" ) {\n\t\tif ( risSimple.test( qualifier ) ) {\n\t\t\treturn jQuery.filter( qualifier, elements, not );\n\t\t}\n\n\t\tqualifier = jQuery.filter( qualifier, elements );\n\t}\n\n\treturn jQuery.grep( elements, function( elem ) {\n\t\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not && elem.nodeType === 1;\n\t} );\n}", "function winnow( elements, qualifier, not ) {\n\tif ( jQuery.isFunction( qualifier ) ) {\n\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t} );\n\n\t}\n\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t} );\n\n\t}\n\n\tif ( typeof qualifier === \"string\" ) {\n\t\tif ( risSimple.test( qualifier ) ) {\n\t\t\treturn jQuery.filter( qualifier, elements, not );\n\t\t}\n\n\t\tqualifier = jQuery.filter( qualifier, elements );\n\t}\n\n\treturn jQuery.grep( elements, function( elem ) {\n\t\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not && elem.nodeType === 1;\n\t} );\n}", "function winnow( elements, qualifier, not ) {\n\tif ( jQuery.isFunction( qualifier ) ) {\n\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t} );\n\n\t}\n\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t} );\n\n\t}\n\n\tif ( typeof qualifier === \"string\" ) {\n\t\tif ( risSimple.test( qualifier ) ) {\n\t\t\treturn jQuery.filter( qualifier, elements, not );\n\t\t}\n\n\t\tqualifier = jQuery.filter( qualifier, elements );\n\t}\n\n\treturn jQuery.grep( elements, function( elem ) {\n\t\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not && elem.nodeType === 1;\n\t} );\n}", "function winnow( elements, qualifier, not ) {\n\tif ( jQuery.isFunction( qualifier ) ) {\n\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t} );\n\n\t}\n\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t} );\n\n\t}\n\n\tif ( typeof qualifier === \"string\" ) {\n\t\tif ( risSimple.test( qualifier ) ) {\n\t\t\treturn jQuery.filter( qualifier, elements, not );\n\t\t}\n\n\t\tqualifier = jQuery.filter( qualifier, elements );\n\t}\n\n\treturn jQuery.grep( elements, function( elem ) {\n\t\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not && elem.nodeType === 1;\n\t} );\n}", "function winnow( elements, qualifier, not ) {\n\tif ( jQuery.isFunction( qualifier ) ) {\n\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t} );\n\n\t}\n\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t} );\n\n\t}\n\n\tif ( typeof qualifier === \"string\" ) {\n\t\tif ( risSimple.test( qualifier ) ) {\n\t\t\treturn jQuery.filter( qualifier, elements, not );\n\t\t}\n\n\t\tqualifier = jQuery.filter( qualifier, elements );\n\t}\n\n\treturn jQuery.grep( elements, function( elem ) {\n\t\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not && elem.nodeType === 1;\n\t} );\n}", "function winnow( elements, qualifier, not ) {\n\tif ( jQuery.isFunction( qualifier ) ) {\n\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t} );\n\n\t}\n\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t} );\n\n\t}\n\n\tif ( typeof qualifier === \"string\" ) {\n\t\tif ( risSimple.test( qualifier ) ) {\n\t\t\treturn jQuery.filter( qualifier, elements, not );\n\t\t}\n\n\t\tqualifier = jQuery.filter( qualifier, elements );\n\t}\n\n\treturn jQuery.grep( elements, function( elem ) {\n\t\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not && elem.nodeType === 1;\n\t} );\n}", "function winnow( elements, qualifier, not ) {\n\tif ( jQuery.isFunction( qualifier ) ) {\n\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t} );\n\n\t}\n\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t} );\n\n\t}\n\n\tif ( typeof qualifier === \"string\" ) {\n\t\tif ( risSimple.test( qualifier ) ) {\n\t\t\treturn jQuery.filter( qualifier, elements, not );\n\t\t}\n\n\t\tqualifier = jQuery.filter( qualifier, elements );\n\t}\n\n\treturn jQuery.grep( elements, function( elem ) {\n\t\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not && elem.nodeType === 1;\n\t} );\n}", "function winnow( elements, qualifier, not ) {\n\tif ( jQuery.isFunction( qualifier ) ) {\n\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t} );\n\n\t}\n\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t} );\n\n\t}\n\n\tif ( typeof qualifier === \"string\" ) {\n\t\tif ( risSimple.test( qualifier ) ) {\n\t\t\treturn jQuery.filter( qualifier, elements, not );\n\t\t}\n\n\t\tqualifier = jQuery.filter( qualifier, elements );\n\t}\n\n\treturn jQuery.grep( elements, function( elem ) {\n\t\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not && elem.nodeType === 1;\n\t} );\n}", "function winnow( elements, qualifier, not ) {\n\tif ( jQuery.isFunction( qualifier ) ) {\n\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t} );\n\n\t}\n\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t} );\n\n\t}\n\n\tif ( typeof qualifier === \"string\" ) {\n\t\tif ( risSimple.test( qualifier ) ) {\n\t\t\treturn jQuery.filter( qualifier, elements, not );\n\t\t}\n\n\t\tqualifier = jQuery.filter( qualifier, elements );\n\t}\n\n\treturn jQuery.grep( elements, function( elem ) {\n\t\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not && elem.nodeType === 1;\n\t} );\n}", "function isFullAge(element) {\n return element >= 18;\n}", "function winnow( elements, qualifier, not ) {\n\t\tif ( jQuery.isFunction( qualifier ) ) {\n\t\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t\t} );\n\n\t\t}\n\n\t\tif ( qualifier.nodeType ) {\n\t\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\t\treturn ( elem === qualifier ) !== not;\n\t\t\t} );\n\n\t\t}\n\n\t\tif ( typeof qualifier === \"string\" ) {\n\t\t\tif ( risSimple.test( qualifier ) ) {\n\t\t\t\treturn jQuery.filter( qualifier, elements, not );\n\t\t\t}\n\n\t\t\tqualifier = jQuery.filter( qualifier, elements );\n\t\t}\n\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( indexOf.call( qualifier, elem ) > -1 ) !== not && elem.nodeType === 1;\n\t\t} );\n\t}", "contains(x, y) {\n return x < this.right && x > this.left && y < this.bottom && y > this.top;\n }", "function isFullAGe(el) {\n return el >= 18;\n}", "function checkEat(elm1, elm2) {\n elm1top = elm1.offsetTop;\n elm1left = elm1.offsetLeft;\n elm1right = Number(elm1.offsetLeft) + Number(elm1.offsetWidth);\n elm1bottom = Number(elm1.offsetTop) + Number(elm1.offsetHeight);\n\n elm2top = elm2.offsetTop;\n elm2left = elm2.offsetLeft;\n elm2right = Number(elm2.offsetLeft) + Number(elm2.offsetWidth);\n elm2bottom = Number(elm2.offsetTop) + Number(elm2.offsetHeight);\n\n if (elm1right > elm2left && \n elm1left < elm2right && \n elm1top < elm2bottom && \n elm1bottom > elm2top ) {\n \t\tpsc += 10;\n score.innerHTML = psc;\n soundBite();\n pig.classList.add('eat');\n }\n}", "function pointerIsOver(x,y, element) {\n\t var bounds = element.getBoundingClientRect()\n\t return bounds.top <= y&&y <= bounds.bottom\n\t && bounds.left <= x&&x <= bounds.right\n\t}", "function isBelowThreshold(item) {\n return item < 10;\n }", "function winnow(elements, qualifier, keep) {\n if (pL.isFunction(qualifier)) {\n return pL.grep(elements, function(elem, i) {\n var retVal = !!qualifier.call(elem, i, elem);\n return retVal === keep;\n });\n } else if (qualifier.nodeType) {\n return pL.grep(elements, function(elem, i) {\n return (elem === qualifier) === keep;\n });\n } else if (typeof qualifier === \"string\") {\n var filtered = pL.grep(elements, function(elem) {\n return elem.nodeType === 1;\n });\n if (isSimple.test(qualifier)) {\n return pL.filter(qualifier, filtered, !keep);\n } else {\n qualifier = pL.filter(qualifier, filtered);\n }\n }\n return pL.grep(elements, function(elem, i) {\n return pL.inArray(elem, qualifier) >= 0 === keep;\n });\n }" ]
[ "0.63345236", "0.60817", "0.60250175", "0.5881726", "0.5856268", "0.5846907", "0.5846907", "0.5841965", "0.5841965", "0.5841965", "0.5841965", "0.5841965", "0.5829468", "0.58091694", "0.5791276", "0.5791276", "0.5758806", "0.5758806", "0.5758806", "0.5758806", "0.5758806", "0.5758806", "0.5758806", "0.5758806", "0.5758806", "0.5758806", "0.5758806", "0.5758806", "0.5758806", "0.5758806", "0.5758806", "0.5758806", "0.5758806", "0.5756995", "0.57554233", "0.5709429", "0.5645143", "0.5645143", "0.5645143", "0.5645143", "0.5645143", "0.5643861", "0.5631761", "0.56189483", "0.56189483", "0.56189483", "0.56189483", "0.5598546", "0.55494857", "0.5540067", "0.55013126", "0.54985726", "0.5474281", "0.54525435", "0.5449389", "0.54448503", "0.5433009", "0.5426425", "0.541229", "0.54043627", "0.54043627", "0.5394828", "0.5390595", "0.5386304", "0.5381881", "0.5370187", "0.5368251", "0.5367921", "0.5353438", "0.5350481", "0.53349376", "0.5333609", "0.53310555", "0.53203875", "0.53203595", "0.53203595", "0.53203595", "0.53188586", "0.53188586", "0.53166276", "0.53166276", "0.5315306", "0.52994454", "0.52982736", "0.52965915", "0.52965915", "0.52965915", "0.52965915", "0.52965915", "0.52965915", "0.52965915", "0.52965915", "0.52965915", "0.52914", "0.528811", "0.52824783", "0.5278727", "0.5276165", "0.52657014", "0.52585316", "0.52394086" ]
0.0
-1
Don't call any other listeners (even on the current target)
stopPropagation() { this.propagationStopped = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function emitNone(handler, isFn, self) {\n if (isFn) handler.call(self);else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n\n for (var i = 0; i < len; ++i) listeners[i].call(self);\n }\n }", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n }", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n }", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n }", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n }", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n }", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n }", "function emitNone(handler, isFn, self) {\n\t if (isFn)\n\t handler.call(self);\n\t else {\n\t var len = handler.length;\n\t var listeners = arrayClone(handler, len);\n\t for (var i = 0; i < len; ++i)\n\t listeners[i].call(self);\n\t }\n\t}", "function emitNone(handler, isFn, self) {\n\t if (isFn)\n\t handler.call(self);\n\t else {\n\t var len = handler.length;\n\t var listeners = arrayClone(handler, len);\n\t for (var i = 0; i < len; ++i)\n\t listeners[i].call(self);\n\t }\n\t}", "function emitNone(handler, isFn, self) {\n\t if (isFn)\n\t handler.call(self);\n\t else {\n\t var len = handler.length;\n\t var listeners = arrayClone(handler, len);\n\t for (var i = 0; i < len; ++i)\n\t listeners[i].call(self);\n\t }\n\t}", "function emitNone(handler, isFn, self) {\n\t if (isFn)\n\t handler.call(self);\n\t else {\n\t var len = handler.length;\n\t var listeners = arrayClone(handler, len);\n\t for (var i = 0; i < len; ++i)\n\t listeners[i].call(self);\n\t }\n\t}", "function emitNone(handler, isFn, self) {\n\t if (isFn)\n\t handler.call(self);\n\t else {\n\t var len = handler.length;\n\t var listeners = arrayClone(handler, len);\n\t for (var i = 0; i < len; ++i)\n\t listeners[i].call(self);\n\t }\n\t}", "function emitNone(handler, isFn, self) {\n\t if (isFn)\n\t handler.call(self);\n\t else {\n\t var len = handler.length;\n\t var listeners = arrayClone(handler, len);\n\t for (var i = 0; i < len; ++i)\n\t listeners[i].call(self);\n\t }\n\t}", "function emitNone(handler, isFn, self) {\n\t if (isFn)\n\t handler.call(self);\n\t else {\n\t var len = handler.length;\n\t var listeners = arrayClone(handler, len);\n\t for (var i = 0; i < len; ++i)\n\t listeners[i].call(self);\n\t }\n\t}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n }", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\r\n if (isFn)\r\n handler.call(self);\r\n else {\r\n var len = handler.length;\r\n var listeners = arrayClone(handler, len);\r\n for (var i = 0; i < len; ++i)\r\n listeners[i].call(self);\r\n }\r\n}", "function emitNone(handler,isFn,self){if(isFn)handler.call(self);else{var len=handler.length;var listeners=arrayClone(handler,len);for(var i=0;i<len;++i){listeners[i].call(self);}}}", "function emitNone(handler,isFn,self){if(isFn)handler.call(self);else{var len=handler.length;var listeners=arrayClone(handler,len);for(var i=0;i<len;++i){listeners[i].call(self);}}}", "_stopObserver() {\n for (var i = 0; i < this.__eventNames.length; i++) {\n qx.bom.Event.removeNativeListener(\n this.__defaultTarget,\n this.__eventNames[i],\n this.__wrappedListener\n );\n }\n }", "_unlisten() {\n const that = this;\n\n if (that._trackListener) {\n that._trackListener.unlisten();\n }\n\n if (that._fillListener) {\n that._fillListener.unlisten();\n }\n\n if (that._lineListener) {\n that._lineListener.unlisten();\n }\n }", "function turnOffListenersButCurrentOne($listener){\n\t\tfor(var i=0; i < arrayDropDowns.length; i++){\n\t\t\tif(arrayDropDowns[i] == $listener){//the one we exclude\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tarrayDropDowns[i].off(\"change\");\n\t\t\t}\n\t\t}\n\t}", "function EventTarget(){this._listeners={}}", "unbind() {}", "detachAllEvents() {\n this.handledEvents.forEach((value, key) => {\n this.offEvent(key, value.target, value.options);\n });\n }", "_stopPropagationIfTargetIsMe (event) {\n if (event.eventPhase === cc.Event.AT_TARGET && event.target === this.node) {\n event.stopPropagation();\n }\n }", "function ignr(o, t, f)\r\n{\r\n if (o.removeEventListener){\r\n // Because MSIE only has a bubbling phase, capture will always be false.\r\n o.removeEventListener(t, f, false);\r\n return true;\r\n } else if (o.detachEvent){\r\n return o.detachEvent(\"on\" + t, f);\r\n }\r\n return false;\r\n}", "function EventTarget(){this._listeners={};}", "function EventTarget(){this._listeners={};}", "function EventTarget(){this._listeners={};}", "function EventTarget(){this._listeners={};}", "_stopPropagationIfTargetIsMe(event) {\n if (event.eventPhase === Event.AT_TARGET && event.target === this.node) {\n event.propagationStopped = true;\n }\n }", "function y(t){if(null!=t&&null!=t._parent)for(const e in t._handlers)t._parent.removeListener(e,t._handlers[e])}", "function _removeEventListeners(target) {\n\t for (var i in this._eventOutput.listeners) {\n\t target.removeEventListener(i, this.eventForwarder);\n\t }\n\t }", "removeListeners() {}", "removeListeners() {}", "removeListeners() {}", "function disableEventListeners(){if(this.state.eventsEnabled){cancelAnimationFrame(this.scheduleUpdate);this.state = removeEventListeners(this.reference,this.state);}}", "_stopTouchObserver() {\n for (var i = 0; i < this.__touchEventNames.length; i++) {\n qx.bom.Event.removeNativeListener(\n this.__target,\n this.__touchEventNames[i],\n this.__onTouchEventWrapper\n );\n }\n }", "function dumbListener2(event) {}", "function dumbListener2(event) {}", "_stopPropagationIfTargetIsMe(event) {\n if (event.eventPhase === _index3.Event.AT_TARGET && event.target === this.node) {\n event.propagationStopped = true;\n }\n }", "onDisable() {}", "disable () {\n this.hook.disable()\n }", "disable_() {\n const map = this.getMap();\n console.assert(map, 'Map should be set.');\n this.listenerKeys_.forEach(olEvents.unlistenByKey);\n this.listenerKeys_.length = 0;\n }", "function _removeEventListeners(target) {\n for (var i in this._eventOutput.listeners) {\n target.removeEventListener(i, this.eventForwarder);\n }\n }", "pcBindEvent(){ return false }", "removeClickAwayEvent() {\n $('main').off('click.atkPanel');\n $(document).off('keyup.atkPanel');\n }", "off(event) { // TODO\n\n }", "off(event) { // TODO\n\n }", "_noopInputHandler() {\n // no-op handler that ensures we're running change detection on input events.\n }" ]
[ "0.6393755", "0.63129365", "0.63129365", "0.63129365", "0.6291394", "0.6291394", "0.6291394", "0.6281797", "0.6281797", "0.6281797", "0.6281797", "0.6281797", "0.6281797", "0.6281797", "0.62762684", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61575717", "0.6126786", "0.6126786", "0.6081475", "0.60727173", "0.5975431", "0.59735596", "0.59621584", "0.5943657", "0.59238976", "0.5918476", "0.5897981", "0.5897981", "0.5897981", "0.5897981", "0.5893687", "0.5881983", "0.5879506", "0.58740896", "0.58740896", "0.58740896", "0.58315754", "0.583017", "0.58300084", "0.58300084", "0.58228", "0.58198375", "0.5801098", "0.57945055", "0.57680845", "0.5745702", "0.5741373", "0.57310814", "0.57310814", "0.57239175" ]
0.0
-1
Don't call listeners on the remaining targets
stopImmediatePropagation() { this.immediatePropagationStopped = this.propagationStopped = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "removeListeners() {}", "removeListeners() {}", "removeListeners() {}", "function _removeEventListeners(target) {\n\t for (var i in this._eventOutput.listeners) {\n\t target.removeEventListener(i, this.eventForwarder);\n\t }\n\t }", "disableAll()\n {\n let targets = document.querySelectorAll('.target');\n\n if(targets.length > 0)\n {\n targets.forEach( t => {\n\n t.classList.remove('target')\n });\n }\n }", "function _removeEventListeners(target) {\n for (var i in this._eventOutput.listeners) {\n target.removeEventListener(i, this.eventForwarder);\n }\n }", "function invokeListener(listeners) {\n for (let i = 0, len = listeners.length; i < len; ++i) {\n listeners[i].call(undefined);\n }\n }", "function emitNone(handler, isFn, self) {\n if (isFn) handler.call(self);else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n\n for (var i = 0; i < len; ++i) listeners[i].call(self);\n }\n }", "detachAllEvents() {\n this.handledEvents.forEach((value, key) => {\n this.offEvent(key, value.target, value.options);\n });\n }", "fireListeners() {\n this.listeners.forEach((listener) => listener());\n }", "function target() {}", "function _removeEventListeners(target) {\n for (var i in this.eventHandler.listeners) {\n target.removeEventListener(i, this.eventForwarder);\n }\n }", "cleanEchoListeners() {\n this.echoListeners.forEach(element => {\n window.Echo.private(\n element.channel\n ).stopListening(element.event);\n });\n }", "callListeners() {\r\n const listenersCopy = [...this.listeners];\r\n listenersCopy.forEach(listener => {\r\n try {\r\n listener.call();\r\n }\r\n catch (e) {\r\n hookErrorHandler_1.handleHookError(e, this, listener, \"onCall\");\r\n }\r\n });\r\n }", "function EventTarget(){this._listeners={}}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n }", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n }", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n }", "function clearTarget() {\n\thasTarget = false;\n}", "function EventTarget(){this._listeners={};}", "function EventTarget(){this._listeners={};}", "function EventTarget(){this._listeners={};}", "function EventTarget(){this._listeners={};}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n }", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n }", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n }", "emit() {\n\t\t\tlet currentListeners = listeners;\n\t\t\tfor (let i=0; i<currentListeners.length; i++) {\n\t\t\t\tcurrentListeners[i].apply(null, arguments);\n\t\t\t}\n\t\t}", "function accumulateTwoPhaseDispatchesSingleSkipTarget(event){if(event&&event.dispatchConfig.phasedRegistrationNames){var targetInst=event._targetInst;var parentInst=targetInst?getParentInstance(targetInst):null;traverseTwoPhase(parentInst,accumulateDirectionalDispatches,event);}}", "function accumulateTwoPhaseDispatchesSingleSkipTarget(event){if(event&&event.dispatchConfig.phasedRegistrationNames){var targetInst=event._targetInst;var parentInst=targetInst?getParentInstance(targetInst):null;traverseTwoPhase(parentInst,accumulateDirectionalDispatches,event);}}", "function accumulateTwoPhaseDispatchesSingleSkipTarget(event){if(event&&event.dispatchConfig.phasedRegistrationNames){var targetInst=event._targetInst;var parentInst=targetInst?getParentInstance(targetInst):null;traverseTwoPhase(parentInst,accumulateDirectionalDispatches,event);}}", "function accumulateTwoPhaseDispatchesSingleSkipTarget(event){if(event&&event.dispatchConfig.phasedRegistrationNames){var targetInst=event._targetInst;var parentInst=targetInst?getParentInstance(targetInst):null;traverseTwoPhase(parentInst,accumulateDirectionalDispatches,event);}}", "function accumulateTwoPhaseDispatchesSingleSkipTarget(event){if(event&&event.dispatchConfig.phasedRegistrationNames){var targetInst=event._targetInst;var parentInst=targetInst?getParentInstance(targetInst):null;traverseTwoPhase(parentInst,accumulateDirectionalDispatches,event);}}", "function nu(t, e) {\n t.kh.on(e.targetId), _u(t).uh(e)\n /**\n * We need to increment the expected number of pending responses we're due\n * from watch so we wait for the removal on the server before we process any\n * messages from this target.\n */;\n}", "function accumulateTwoPhaseDispatchesSingleSkipTarget(event){if(event&&event.dispatchConfig.phasedRegistrationNames){var targetInst=event._targetInst;var parentInst=targetInst?EventPluginUtils.getParentInstance(targetInst):null;EventPluginUtils.traverseTwoPhase(parentInst,accumulateDirectionalDispatches,event);}}", "function accumulateTwoPhaseDispatchesSingleSkipTarget(event){if(event&&event.dispatchConfig.phasedRegistrationNames){var targetInst=event._targetInst;var parentInst=targetInst?EventPluginUtils.getParentInstance(targetInst):null;EventPluginUtils.traverseTwoPhase(parentInst,accumulateDirectionalDispatches,event);}}", "function accumulateTwoPhaseDispatchesSingleSkipTarget(event){if(event&&event.dispatchConfig.phasedRegistrationNames){var targetInst=event._targetInst;var parentInst=targetInst?EventPluginUtils.getParentInstance(targetInst):null;EventPluginUtils.traverseTwoPhase(parentInst,accumulateDirectionalDispatches,event);}}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n }", "function _addEventListeners(target) {\n\t for (var i in this._eventOutput.listeners) {\n\t target.addEventListener(i, this.eventForwarder);\n\t }\n\t }", "_unlisten() {\n const that = this;\n\n if (that._trackListener) {\n that._trackListener.unlisten();\n }\n\n if (that._fillListener) {\n that._fillListener.unlisten();\n }\n\n if (that._lineListener) {\n that._lineListener.unlisten();\n }\n }", "function y(t){if(null!=t&&null!=t._parent)for(const e in t._handlers)t._parent.removeListener(e,t._handlers[e])}", "_stopObserver() {\n for (var i = 0; i < this.__eventNames.length; i++) {\n qx.bom.Event.removeNativeListener(\n this.__defaultTarget,\n this.__eventNames[i],\n this.__wrappedListener\n );\n }\n }", "function emitNone(handler, isFn, self) {\n\t if (isFn)\n\t handler.call(self);\n\t else {\n\t var len = handler.length;\n\t var listeners = arrayClone(handler, len);\n\t for (var i = 0; i < len; ++i)\n\t listeners[i].call(self);\n\t }\n\t}", "function emitNone(handler, isFn, self) {\n\t if (isFn)\n\t handler.call(self);\n\t else {\n\t var len = handler.length;\n\t var listeners = arrayClone(handler, len);\n\t for (var i = 0; i < len; ++i)\n\t listeners[i].call(self);\n\t }\n\t}", "function emitNone(handler, isFn, self) {\n\t if (isFn)\n\t handler.call(self);\n\t else {\n\t var len = handler.length;\n\t var listeners = arrayClone(handler, len);\n\t for (var i = 0; i < len; ++i)\n\t listeners[i].call(self);\n\t }\n\t}", "function emitNone(handler, isFn, self) {\n\t if (isFn)\n\t handler.call(self);\n\t else {\n\t var len = handler.length;\n\t var listeners = arrayClone(handler, len);\n\t for (var i = 0; i < len; ++i)\n\t listeners[i].call(self);\n\t }\n\t}", "function emitNone(handler, isFn, self) {\n\t if (isFn)\n\t handler.call(self);\n\t else {\n\t var len = handler.length;\n\t var listeners = arrayClone(handler, len);\n\t for (var i = 0; i < len; ++i)\n\t listeners[i].call(self);\n\t }\n\t}", "function emitNone(handler, isFn, self) {\n\t if (isFn)\n\t handler.call(self);\n\t else {\n\t var len = handler.length;\n\t var listeners = arrayClone(handler, len);\n\t for (var i = 0; i < len; ++i)\n\t listeners[i].call(self);\n\t }\n\t}", "function emitNone(handler, isFn, self) {\n\t if (isFn)\n\t handler.call(self);\n\t else {\n\t var len = handler.length;\n\t var listeners = arrayClone(handler, len);\n\t for (var i = 0; i < len; ++i)\n\t listeners[i].call(self);\n\t }\n\t}", "onDetatch() {}", "function cancel(listener){\n for(var property in listeners){\n off(property, listener);\n }\n }", "reset() {\n const {\n listeners\n } = this;\n const len = listeners.length;\n\n if (len > 0) {\n for (let i = 0; i < len; i += 1) {\n const set = listeners[i];\n const pos = ArrayIndexOf$1.call(listeners[i], this);\n ArraySplice$1.call(set, pos, 1);\n }\n\n listeners.length = 0;\n }\n }", "function turnOffListenersButCurrentOne($listener){\n\t\tfor(var i=0; i < arrayDropDowns.length; i++){\n\t\t\tif(arrayDropDowns[i] == $listener){//the one we exclude\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tarrayDropDowns[i].off(\"change\");\n\t\t\t}\n\t\t}\n\t}", "function _addEventListeners(target) {\n for (var i in this._eventOutput.listeners) {\n target.addEventListener(i, this.eventForwarder);\n }\n }", "reset() {\n const {\n listeners\n } = this;\n const len = listeners.length;\n\n if (len > 0) {\n for (let i = 0; i < len; i += 1) {\n const set = listeners[i];\n const pos = ArrayIndexOf.call(listeners[i], this);\n ArraySplice.call(set, pos, 1);\n }\n\n listeners.length = 0;\n }\n }", "_stopPropagationIfTargetIsMe(event) {\n if (event.eventPhase === Event.AT_TARGET && event.target === this.node) {\n event.propagationStopped = true;\n }\n }", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}" ]
[ "0.6190093", "0.6190093", "0.6190093", "0.6154329", "0.60922897", "0.6044791", "0.5960415", "0.5938747", "0.59332216", "0.5925244", "0.58966786", "0.5896583", "0.58711004", "0.58709276", "0.58499765", "0.5828798", "0.5828798", "0.5828798", "0.5821923", "0.5820081", "0.5820081", "0.5820081", "0.5820081", "0.580784", "0.580784", "0.580784", "0.57940257", "0.57938606", "0.57938606", "0.57938606", "0.57938606", "0.57938606", "0.5789515", "0.5787238", "0.5787238", "0.5787238", "0.57850176", "0.57849073", "0.57803124", "0.57684827", "0.57680297", "0.57549036", "0.57549036", "0.57549036", "0.57549036", "0.57549036", "0.57549036", "0.57549036", "0.5720974", "0.57138616", "0.57050693", "0.57000273", "0.5687723", "0.56865066", "0.56820774", "0.56748927", "0.56748927", "0.56748927", "0.56748927", "0.56748927", "0.56748927", "0.56748927", "0.56748927", "0.56748927", "0.56748927", "0.56748927", "0.56748927", "0.56748927", "0.56748927", "0.56748927", "0.56748927", "0.56748927", "0.56748927", "0.56748927", "0.56748927", "0.56748927", "0.56748927", "0.56748927", "0.56748927", "0.56748927", "0.56748927", "0.56748927", "0.56748927", "0.56748927", "0.56748927", "0.56748927", "0.56748927", "0.56748927", "0.56748927", "0.56748927", "0.56748927", "0.56748927", "0.56748927", "0.56748927", "0.56748927", "0.56748927", "0.56748927", "0.56748927", "0.56748927", "0.56748927", "0.56748927" ]
0.0
-1
Don't call listeners on the remaining targets
stopImmediatePropagation() { this.immediatePropagationStopped = this.propagationStopped = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "removeListeners() {}", "removeListeners() {}", "removeListeners() {}", "function _removeEventListeners(target) {\n\t for (var i in this._eventOutput.listeners) {\n\t target.removeEventListener(i, this.eventForwarder);\n\t }\n\t }", "disableAll()\n {\n let targets = document.querySelectorAll('.target');\n\n if(targets.length > 0)\n {\n targets.forEach( t => {\n\n t.classList.remove('target')\n });\n }\n }", "function _removeEventListeners(target) {\n for (var i in this._eventOutput.listeners) {\n target.removeEventListener(i, this.eventForwarder);\n }\n }", "function invokeListener(listeners) {\n for (let i = 0, len = listeners.length; i < len; ++i) {\n listeners[i].call(undefined);\n }\n }", "function emitNone(handler, isFn, self) {\n if (isFn) handler.call(self);else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n\n for (var i = 0; i < len; ++i) listeners[i].call(self);\n }\n }", "detachAllEvents() {\n this.handledEvents.forEach((value, key) => {\n this.offEvent(key, value.target, value.options);\n });\n }", "fireListeners() {\n this.listeners.forEach((listener) => listener());\n }", "function _removeEventListeners(target) {\n for (var i in this.eventHandler.listeners) {\n target.removeEventListener(i, this.eventForwarder);\n }\n }", "function target() {}", "callListeners() {\r\n const listenersCopy = [...this.listeners];\r\n listenersCopy.forEach(listener => {\r\n try {\r\n listener.call();\r\n }\r\n catch (e) {\r\n hookErrorHandler_1.handleHookError(e, this, listener, \"onCall\");\r\n }\r\n });\r\n }", "cleanEchoListeners() {\n this.echoListeners.forEach(element => {\n window.Echo.private(\n element.channel\n ).stopListening(element.event);\n });\n }", "function EventTarget(){this._listeners={}}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n }", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n }", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n }", "function clearTarget() {\n\thasTarget = false;\n}", "function EventTarget(){this._listeners={};}", "function EventTarget(){this._listeners={};}", "function EventTarget(){this._listeners={};}", "function EventTarget(){this._listeners={};}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n }", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n }", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n }", "function accumulateTwoPhaseDispatchesSingleSkipTarget(event){if(event&&event.dispatchConfig.phasedRegistrationNames){var targetInst=event._targetInst;var parentInst=targetInst?getParentInstance(targetInst):null;traverseTwoPhase(parentInst,accumulateDirectionalDispatches,event);}}", "function accumulateTwoPhaseDispatchesSingleSkipTarget(event){if(event&&event.dispatchConfig.phasedRegistrationNames){var targetInst=event._targetInst;var parentInst=targetInst?getParentInstance(targetInst):null;traverseTwoPhase(parentInst,accumulateDirectionalDispatches,event);}}", "function accumulateTwoPhaseDispatchesSingleSkipTarget(event){if(event&&event.dispatchConfig.phasedRegistrationNames){var targetInst=event._targetInst;var parentInst=targetInst?getParentInstance(targetInst):null;traverseTwoPhase(parentInst,accumulateDirectionalDispatches,event);}}", "function accumulateTwoPhaseDispatchesSingleSkipTarget(event){if(event&&event.dispatchConfig.phasedRegistrationNames){var targetInst=event._targetInst;var parentInst=targetInst?getParentInstance(targetInst):null;traverseTwoPhase(parentInst,accumulateDirectionalDispatches,event);}}", "function accumulateTwoPhaseDispatchesSingleSkipTarget(event){if(event&&event.dispatchConfig.phasedRegistrationNames){var targetInst=event._targetInst;var parentInst=targetInst?getParentInstance(targetInst):null;traverseTwoPhase(parentInst,accumulateDirectionalDispatches,event);}}", "emit() {\n\t\t\tlet currentListeners = listeners;\n\t\t\tfor (let i=0; i<currentListeners.length; i++) {\n\t\t\t\tcurrentListeners[i].apply(null, arguments);\n\t\t\t}\n\t\t}", "function nu(t, e) {\n t.kh.on(e.targetId), _u(t).uh(e)\n /**\n * We need to increment the expected number of pending responses we're due\n * from watch so we wait for the removal on the server before we process any\n * messages from this target.\n */;\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n }", "function accumulateTwoPhaseDispatchesSingleSkipTarget(event){if(event&&event.dispatchConfig.phasedRegistrationNames){var targetInst=event._targetInst;var parentInst=targetInst?EventPluginUtils.getParentInstance(targetInst):null;EventPluginUtils.traverseTwoPhase(parentInst,accumulateDirectionalDispatches,event);}}", "function accumulateTwoPhaseDispatchesSingleSkipTarget(event){if(event&&event.dispatchConfig.phasedRegistrationNames){var targetInst=event._targetInst;var parentInst=targetInst?EventPluginUtils.getParentInstance(targetInst):null;EventPluginUtils.traverseTwoPhase(parentInst,accumulateDirectionalDispatches,event);}}", "function accumulateTwoPhaseDispatchesSingleSkipTarget(event){if(event&&event.dispatchConfig.phasedRegistrationNames){var targetInst=event._targetInst;var parentInst=targetInst?EventPluginUtils.getParentInstance(targetInst):null;EventPluginUtils.traverseTwoPhase(parentInst,accumulateDirectionalDispatches,event);}}", "function _addEventListeners(target) {\n\t for (var i in this._eventOutput.listeners) {\n\t target.addEventListener(i, this.eventForwarder);\n\t }\n\t }", "_unlisten() {\n const that = this;\n\n if (that._trackListener) {\n that._trackListener.unlisten();\n }\n\n if (that._fillListener) {\n that._fillListener.unlisten();\n }\n\n if (that._lineListener) {\n that._lineListener.unlisten();\n }\n }", "function y(t){if(null!=t&&null!=t._parent)for(const e in t._handlers)t._parent.removeListener(e,t._handlers[e])}", "_stopObserver() {\n for (var i = 0; i < this.__eventNames.length; i++) {\n qx.bom.Event.removeNativeListener(\n this.__defaultTarget,\n this.__eventNames[i],\n this.__wrappedListener\n );\n }\n }", "function emitNone(handler, isFn, self) {\n\t if (isFn)\n\t handler.call(self);\n\t else {\n\t var len = handler.length;\n\t var listeners = arrayClone(handler, len);\n\t for (var i = 0; i < len; ++i)\n\t listeners[i].call(self);\n\t }\n\t}", "function emitNone(handler, isFn, self) {\n\t if (isFn)\n\t handler.call(self);\n\t else {\n\t var len = handler.length;\n\t var listeners = arrayClone(handler, len);\n\t for (var i = 0; i < len; ++i)\n\t listeners[i].call(self);\n\t }\n\t}", "function emitNone(handler, isFn, self) {\n\t if (isFn)\n\t handler.call(self);\n\t else {\n\t var len = handler.length;\n\t var listeners = arrayClone(handler, len);\n\t for (var i = 0; i < len; ++i)\n\t listeners[i].call(self);\n\t }\n\t}", "function emitNone(handler, isFn, self) {\n\t if (isFn)\n\t handler.call(self);\n\t else {\n\t var len = handler.length;\n\t var listeners = arrayClone(handler, len);\n\t for (var i = 0; i < len; ++i)\n\t listeners[i].call(self);\n\t }\n\t}", "function emitNone(handler, isFn, self) {\n\t if (isFn)\n\t handler.call(self);\n\t else {\n\t var len = handler.length;\n\t var listeners = arrayClone(handler, len);\n\t for (var i = 0; i < len; ++i)\n\t listeners[i].call(self);\n\t }\n\t}", "function emitNone(handler, isFn, self) {\n\t if (isFn)\n\t handler.call(self);\n\t else {\n\t var len = handler.length;\n\t var listeners = arrayClone(handler, len);\n\t for (var i = 0; i < len; ++i)\n\t listeners[i].call(self);\n\t }\n\t}", "function emitNone(handler, isFn, self) {\n\t if (isFn)\n\t handler.call(self);\n\t else {\n\t var len = handler.length;\n\t var listeners = arrayClone(handler, len);\n\t for (var i = 0; i < len; ++i)\n\t listeners[i].call(self);\n\t }\n\t}", "onDetatch() {}", "function cancel(listener){\n for(var property in listeners){\n off(property, listener);\n }\n }", "reset() {\n const {\n listeners\n } = this;\n const len = listeners.length;\n\n if (len > 0) {\n for (let i = 0; i < len; i += 1) {\n const set = listeners[i];\n const pos = ArrayIndexOf$1.call(listeners[i], this);\n ArraySplice$1.call(set, pos, 1);\n }\n\n listeners.length = 0;\n }\n }", "function turnOffListenersButCurrentOne($listener){\n\t\tfor(var i=0; i < arrayDropDowns.length; i++){\n\t\t\tif(arrayDropDowns[i] == $listener){//the one we exclude\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tarrayDropDowns[i].off(\"change\");\n\t\t\t}\n\t\t}\n\t}", "reset() {\n const {\n listeners\n } = this;\n const len = listeners.length;\n\n if (len > 0) {\n for (let i = 0; i < len; i += 1) {\n const set = listeners[i];\n const pos = ArrayIndexOf.call(listeners[i], this);\n ArraySplice.call(set, pos, 1);\n }\n\n listeners.length = 0;\n }\n }", "function _addEventListeners(target) {\n for (var i in this._eventOutput.listeners) {\n target.addEventListener(i, this.eventForwarder);\n }\n }", "_stopPropagationIfTargetIsMe(event) {\n if (event.eventPhase === Event.AT_TARGET && event.target === this.node) {\n event.propagationStopped = true;\n }\n }", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}" ]
[ "0.6191328", "0.6191328", "0.6191328", "0.6153781", "0.60927093", "0.60443074", "0.5960602", "0.59406245", "0.59342444", "0.5926158", "0.5896547", "0.58947796", "0.58716375", "0.5871608", "0.5848864", "0.5830736", "0.5830736", "0.5830736", "0.5820654", "0.58190036", "0.58190036", "0.58190036", "0.58190036", "0.5809735", "0.5809735", "0.5809735", "0.579375", "0.579375", "0.579375", "0.579375", "0.579375", "0.57935715", "0.5789731", "0.5786959", "0.5786899", "0.5786899", "0.5786899", "0.57829684", "0.5781444", "0.57696074", "0.5769371", "0.57566285", "0.57566285", "0.57566285", "0.57566285", "0.57566285", "0.57566285", "0.57566285", "0.5722017", "0.5715743", "0.5706952", "0.5702794", "0.5688429", "0.5685913", "0.5681532", "0.56767654", "0.56767654", "0.56767654", "0.56767654", "0.56767654", "0.56767654", "0.56767654", "0.56767654", "0.56767654", "0.56767654", "0.56767654", "0.56767654", "0.56767654", "0.56767654", "0.56767654", "0.56767654", "0.56767654", "0.56767654", "0.56767654", "0.56767654", "0.56767654", "0.56767654", "0.56767654", "0.56767654", "0.56767654", "0.56767654", "0.56767654", "0.56767654", "0.56767654", "0.56767654", "0.56767654", "0.56767654", "0.56767654", "0.56767654", "0.56767654", "0.56767654", "0.56767654", "0.56767654", "0.56767654", "0.56767654", "0.56767654", "0.56767654", "0.56767654", "0.56767654", "0.56767654", "0.56767654" ]
0.0
-1
Don't call any other listeners (even on the current target)
stopPropagation() { this.propagationStopped = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function emitNone(handler, isFn, self) {\n if (isFn) handler.call(self);else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n\n for (var i = 0; i < len; ++i) listeners[i].call(self);\n }\n }", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n }", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n }", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n }", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n }", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n }", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n }", "function emitNone(handler, isFn, self) {\n\t if (isFn)\n\t handler.call(self);\n\t else {\n\t var len = handler.length;\n\t var listeners = arrayClone(handler, len);\n\t for (var i = 0; i < len; ++i)\n\t listeners[i].call(self);\n\t }\n\t}", "function emitNone(handler, isFn, self) {\n\t if (isFn)\n\t handler.call(self);\n\t else {\n\t var len = handler.length;\n\t var listeners = arrayClone(handler, len);\n\t for (var i = 0; i < len; ++i)\n\t listeners[i].call(self);\n\t }\n\t}", "function emitNone(handler, isFn, self) {\n\t if (isFn)\n\t handler.call(self);\n\t else {\n\t var len = handler.length;\n\t var listeners = arrayClone(handler, len);\n\t for (var i = 0; i < len; ++i)\n\t listeners[i].call(self);\n\t }\n\t}", "function emitNone(handler, isFn, self) {\n\t if (isFn)\n\t handler.call(self);\n\t else {\n\t var len = handler.length;\n\t var listeners = arrayClone(handler, len);\n\t for (var i = 0; i < len; ++i)\n\t listeners[i].call(self);\n\t }\n\t}", "function emitNone(handler, isFn, self) {\n\t if (isFn)\n\t handler.call(self);\n\t else {\n\t var len = handler.length;\n\t var listeners = arrayClone(handler, len);\n\t for (var i = 0; i < len; ++i)\n\t listeners[i].call(self);\n\t }\n\t}", "function emitNone(handler, isFn, self) {\n\t if (isFn)\n\t handler.call(self);\n\t else {\n\t var len = handler.length;\n\t var listeners = arrayClone(handler, len);\n\t for (var i = 0; i < len; ++i)\n\t listeners[i].call(self);\n\t }\n\t}", "function emitNone(handler, isFn, self) {\n\t if (isFn)\n\t handler.call(self);\n\t else {\n\t var len = handler.length;\n\t var listeners = arrayClone(handler, len);\n\t for (var i = 0; i < len; ++i)\n\t listeners[i].call(self);\n\t }\n\t}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n }", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\n if (isFn)\n handler.call(self);\n else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n listeners[i].call(self);\n }\n}", "function emitNone(handler, isFn, self) {\r\n if (isFn)\r\n handler.call(self);\r\n else {\r\n var len = handler.length;\r\n var listeners = arrayClone(handler, len);\r\n for (var i = 0; i < len; ++i)\r\n listeners[i].call(self);\r\n }\r\n}", "function emitNone(handler,isFn,self){if(isFn)handler.call(self);else{var len=handler.length;var listeners=arrayClone(handler,len);for(var i=0;i<len;++i){listeners[i].call(self);}}}", "function emitNone(handler,isFn,self){if(isFn)handler.call(self);else{var len=handler.length;var listeners=arrayClone(handler,len);for(var i=0;i<len;++i){listeners[i].call(self);}}}", "_stopObserver() {\n for (var i = 0; i < this.__eventNames.length; i++) {\n qx.bom.Event.removeNativeListener(\n this.__defaultTarget,\n this.__eventNames[i],\n this.__wrappedListener\n );\n }\n }", "_unlisten() {\n const that = this;\n\n if (that._trackListener) {\n that._trackListener.unlisten();\n }\n\n if (that._fillListener) {\n that._fillListener.unlisten();\n }\n\n if (that._lineListener) {\n that._lineListener.unlisten();\n }\n }", "function turnOffListenersButCurrentOne($listener){\n\t\tfor(var i=0; i < arrayDropDowns.length; i++){\n\t\t\tif(arrayDropDowns[i] == $listener){//the one we exclude\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tarrayDropDowns[i].off(\"change\");\n\t\t\t}\n\t\t}\n\t}", "function EventTarget(){this._listeners={}}", "unbind() {}", "detachAllEvents() {\n this.handledEvents.forEach((value, key) => {\n this.offEvent(key, value.target, value.options);\n });\n }", "_stopPropagationIfTargetIsMe (event) {\n if (event.eventPhase === cc.Event.AT_TARGET && event.target === this.node) {\n event.stopPropagation();\n }\n }", "function ignr(o, t, f)\r\n{\r\n if (o.removeEventListener){\r\n // Because MSIE only has a bubbling phase, capture will always be false.\r\n o.removeEventListener(t, f, false);\r\n return true;\r\n } else if (o.detachEvent){\r\n return o.detachEvent(\"on\" + t, f);\r\n }\r\n return false;\r\n}", "function EventTarget(){this._listeners={};}", "function EventTarget(){this._listeners={};}", "function EventTarget(){this._listeners={};}", "function EventTarget(){this._listeners={};}", "_stopPropagationIfTargetIsMe(event) {\n if (event.eventPhase === Event.AT_TARGET && event.target === this.node) {\n event.propagationStopped = true;\n }\n }", "function y(t){if(null!=t&&null!=t._parent)for(const e in t._handlers)t._parent.removeListener(e,t._handlers[e])}", "function _removeEventListeners(target) {\n\t for (var i in this._eventOutput.listeners) {\n\t target.removeEventListener(i, this.eventForwarder);\n\t }\n\t }", "removeListeners() {}", "removeListeners() {}", "removeListeners() {}", "function disableEventListeners(){if(this.state.eventsEnabled){cancelAnimationFrame(this.scheduleUpdate);this.state = removeEventListeners(this.reference,this.state);}}", "_stopTouchObserver() {\n for (var i = 0; i < this.__touchEventNames.length; i++) {\n qx.bom.Event.removeNativeListener(\n this.__target,\n this.__touchEventNames[i],\n this.__onTouchEventWrapper\n );\n }\n }", "function dumbListener2(event) {}", "function dumbListener2(event) {}", "_stopPropagationIfTargetIsMe(event) {\n if (event.eventPhase === _index3.Event.AT_TARGET && event.target === this.node) {\n event.propagationStopped = true;\n }\n }", "onDisable() {}", "disable () {\n this.hook.disable()\n }", "disable_() {\n const map = this.getMap();\n console.assert(map, 'Map should be set.');\n this.listenerKeys_.forEach(olEvents.unlistenByKey);\n this.listenerKeys_.length = 0;\n }", "function _removeEventListeners(target) {\n for (var i in this._eventOutput.listeners) {\n target.removeEventListener(i, this.eventForwarder);\n }\n }", "pcBindEvent(){ return false }", "removeClickAwayEvent() {\n $('main').off('click.atkPanel');\n $(document).off('keyup.atkPanel');\n }", "off(event) { // TODO\n\n }", "off(event) { // TODO\n\n }", "_noopInputHandler() {\n // no-op handler that ensures we're running change detection on input events.\n }" ]
[ "0.6393755", "0.63129365", "0.63129365", "0.63129365", "0.6291394", "0.6291394", "0.6291394", "0.6281797", "0.6281797", "0.6281797", "0.6281797", "0.6281797", "0.6281797", "0.6281797", "0.62762684", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61869866", "0.61575717", "0.6126786", "0.6126786", "0.6081475", "0.60727173", "0.5975431", "0.59735596", "0.59621584", "0.5943657", "0.59238976", "0.5918476", "0.5897981", "0.5897981", "0.5897981", "0.5897981", "0.5893687", "0.5881983", "0.5879506", "0.58740896", "0.58740896", "0.58740896", "0.58315754", "0.583017", "0.58300084", "0.58300084", "0.58228", "0.58198375", "0.5801098", "0.57945055", "0.57680845", "0.5745702", "0.5741373", "0.57310814", "0.57310814", "0.57239175" ]
0.0
-1
Remove this interactable from the list of interactables and remove it's action capabilities and event listeners
unset() { if (is.string(this.target)) { // remove delegated events for (const type in this._scopeEvents.delegatedEvents) { const delegated = this._scopeEvents.delegatedEvents[type]; for (let i = delegated.length - 1; i >= 0; i--) { const { selector, context, listeners } = delegated[i]; if (selector === this.target && context === this._context) { delegated.splice(i, 1); } for (let l = listeners.length - 1; l >= 0; l--) { this._scopeEvents.removeDelegate(this.target, this._context, type, listeners[l][0], listeners[l][1]); } } } } else { this._scopeEvents.remove(this.target, 'all'); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function removeInteractables(type) {\n console.log(\"remove interactables\");\n switch (type) {\n case \"visible\":\n if (currentInteractables.length != null) {\n console.log(`CURRENT INTERACTABLES: ${currentInteractables}`);\n currentInteractables.forEach((object) => {\n canvas.remove(object);\n });\n } else {\n return;\n }\n break;\n case \"hidden\":\n if (currentHiddenInteractables.length != null) {\n console.log(`CURRENT HIDDEN INTERACTABLES: ${currentInteractables}`);\n currentHiddenInteractables.forEach((object) => {\n console.log(`object for removal type: ${object.type}`)\n if(object.type === 'group'){\n object.forEachObject((item) => {\n canvas.remove(item);\n console.log('item removed');\n });\n }else{\n canvas.remove(object);\n }\n });\n } else {\n return;\n }\n break;\n default:\n return;\n }\n}", "removeEvents()\n {\n if (!this.interactionDOMElement)\n {\n return;\n }\n\n ticker.shared.remove(this.update);\n\n if (window.navigator.msPointerEnabled)\n {\n this.interactionDOMElement.style['-ms-content-zooming'] = '';\n this.interactionDOMElement.style['-ms-touch-action'] = '';\n }\n else if (this.supportsPointerEvents)\n {\n this.interactionDOMElement.style['touch-action'] = '';\n }\n\n window.document.removeEventListener('mousemove', this.onMouseMove, true);\n this.interactionDOMElement.removeEventListener('mousedown', this.onMouseDown, true);\n this.interactionDOMElement.removeEventListener('mouseout', this.onMouseOut, true);\n this.interactionDOMElement.removeEventListener('mouseover', this.onMouseOver, true);\n window.removeEventListener('mouseup', this.onMouseUp, true);\n\n if (this.supportsTouchEvents)\n {\n this.interactionDOMElement.removeEventListener('touchstart', this.onTouchStart, true);\n this.interactionDOMElement.removeEventListener('touchend', this.onTouchEnd, true);\n this.interactionDOMElement.removeEventListener('touchmove', this.onTouchMove, true);\n }\n\n if (this.supportsPointerEvents)\n {\n window.document.removeEventListener('pointermove', this.onPointerMove, true);\n this.interactionDOMElement.removeEventListener('pointerdown', this.onPointerDown, true);\n this.interactionDOMElement.removeEventListener('pointerout', this.onPointerOut, true);\n this.interactionDOMElement.removeEventListener('pointerover', this.onPointerOver, true);\n window.removeEventListener('pointerup', this.onPointerUp, true);\n }\n else\n {\n /**\n * If pointer events aren't available on a device, this will turn either the touch or\n * mouse events into pointer events. This allows a developer to just listen for emitted\n * pointer events on interactive sprites\n */\n if (this.normalizeTouchEvents)\n {\n this.interactionDOMElement.removeEventListener('touchstart', this.onPointerDown, true);\n this.interactionDOMElement.removeEventListener('touchend', this.onPointerUp, true);\n this.interactionDOMElement.removeEventListener('touchmove', this.onPointerMove, true);\n }\n\n if (this.normalizeMouseEvents)\n {\n window.document.removeEventListener('mousemove', this.onPointerMove, true);\n this.interactionDOMElement.removeEventListener('mousedown', this.onPointerDown, true);\n this.interactionDOMElement.removeEventListener('mouseout', this.onPointerOut, true);\n window.removeEventListener('mouseup', this.onPointerUp, true);\n }\n }\n\n this.interactionDOMElement = null;\n\n this.eventsAdded = false;\n }", "_removeEventListeners() {\n this.currentEventListeners.forEach(listener => {\n this.domElement.removeEventListener(listener.event, listener.callBack);\n });\n this.currentEventListeners = null;\n }", "function removeListeners() {\n $(\"#controls\").off(\"click\");\n $(\"#sequence\").off(\"click\");\n}", "destroy() {\n\t\tif (this._buttons) {\n\t\t\tthis._buttons\n\t\t\t\t.off(EVENT_CLICK, this._onClick)\n\t\t\t\t.off(EVENT_KEYDOWN, this._onKeydown)\n\t\t\t\t.off(EVENT_FOCUS, this._onFocus);\n\n\t\t\tthis._buttons = undefined;\n\t\t\tdelete(this._buttons);\n\t\t}\n\n\t\tif (this._alternativeButtons) {\n\t\t\tthis._alternativeButtons\n\t\t\t\t.off(EVENT_CLICK, this._onAlternativeClick);\n\t\t\tthis._alternativeButtons = undefined;\n\t\t\tdelete(this._alternativeButtons);\n\t\t}\n\n\t\tsuper.destroy();\n\t}", "undelegateEvents() {\n this.delegatedEventListeners.forEach(({ type, listener }) => {\n this.el.removeEventListener(type, listener);\n });\n\n this.delegatedEventListeners = [];\n }", "function DDLightbarMenu_RemoveAllItemHotkeys()\n{\n\tfor (var i = 0; i < this.items.length; ++i)\n\t\tthis.items[i].hotkeys = [];\n}", "removeListeners() {\n var descriptor = this.getDescriptor();\n if (descriptor) {\n descriptor.unlisten(DescriptorEventType.ACTIVATED, this.onActivated, false, this);\n descriptor.unlisten(DescriptorEventType.DEACTIVATED, this.onDeactivated, false, this);\n descriptor.unlisten(DescriptorEventType.DEACTIVATED, this.onActivationError, false, this);\n }\n }", "remove() {\n super.remove();\n\n /* Remove event listeners */\n this.playerBoard.remove();\n this.oppositeBoard.remove();\n }", "removeEventListeners_() {\n this.$button_.off(app.InputEvent.START, this.onDropClick);\n }", "function removeListeners() {\n debug(\"removeListeners\");\n cards().forEach(function(card) {\n card.removeEventListener('click', cardMagic)\n })\n }", "deactivate() {\n if (!this.isActive || this.isMobileAccessibility) {\n return;\n }\n this.isActive = false;\n window.document.removeEventListener('mousemove', this._onMouseMove, true);\n window.addEventListener('keydown', this._onKeyDown, false);\n this.renderer.off('postrender', this.update);\n if (this.div.parentNode) {\n this.div.parentNode.removeChild(this.div);\n }\n }", "destroy()\n {\n this.element.removeEventListener('mousedown', this.events.mousedown);\n this.element.removeEventListener('mouseup', this.events.mouseup);\n this.element.removeEventListener('mousemove', this.events.mousemove);\n this.element.removeEventListener('touchstart', this.events.touchstart, { passive: true });\n this.element.removeEventListener('touchmove', this.events.touchmove, { passive: true });\n this.element.removeEventListener('touchcancel', this.events.touchcancel);\n this.element.removeEventListener('touchend', this.events.touchend);\n }", "function removeListeners() {\n $element.unbind(START_EV, touchStart);\n $element.unbind(CANCEL_EV, touchCancel);\n $element.unbind(MOVE_EV, touchMove);\n $element.unbind(END_EV, touchEnd);\n \n //we only have leave events on desktop, we manually calculate leave on touch as its not supported in webkit\n if(LEAVE_EV) { \n $element.unbind(LEAVE_EV, touchLeave);\n }\n \n setTouchInProgress(false);\n }", "function removeListeners() {\n\t\t\t$element.unbind(START_EV, touchStart);\n\t\t\t$element.unbind(CANCEL_EV, touchCancel);\n\t\t\t$element.unbind(MOVE_EV, touchMove);\n\t\t\t$element.unbind(END_EV, touchEnd);\n\t\t\t\n\t\t\t//we only have leave events on desktop, we manually calculate leave on touch as its not supported in webkit\n\t\t\tif(LEAVE_EV) { \n\t\t\t\t$element.unbind(LEAVE_EV, touchLeave);\n\t\t\t}\n\t\t\t\n\t\t\tsetTouchInProgress(false);\n\t\t}", "function removeListeners() {\n\t\t\t$element.unbind(START_EV, touchStart);\n\t\t\t$element.unbind(CANCEL_EV, touchCancel);\n\t\t\t$element.unbind(MOVE_EV, touchMove);\n\t\t\t$element.unbind(END_EV, touchEnd);\n\t\t\t\n\t\t\t//we only have leave events on desktop, we manually calculate leave on touch as its not supported in webkit\n\t\t\tif(LEAVE_EV) { \n\t\t\t\t$element.unbind(LEAVE_EV, touchLeave);\n\t\t\t}\n\t\t\t\n\t\t\tsetTouchInProgress(false);\n\t\t}", "_removeEventListeners() {\n this.el.removeEventListener('click', this._onClickBound);\n this.el.removeEventListener('keydown', this._onKeydownBound);\n }", "function removeListeners() {\n\t\t\t$element.unbind(START_EV, touchStart);\n\t\t\t$element.unbind(CANCEL_EV, touchCancel);\n\t\t\t$element.unbind(MOVE_EV, touchMove);\n\t\t\t$element.unbind(END_EV, touchEnd);\n\n\t\t\t//we only have leave events on desktop, we manually calculate leave on touch as its not supported in webkit\n\t\t\tif(LEAVE_EV) {\n\t\t\t\t$element.unbind(LEAVE_EV, touchLeave);\n\t\t\t}\n\n\t\t\tsetTouchInProgress(false);\n\t\t}", "removeEventListeners() {\n\t\twindow.removeEventListener('resize', this.bindResize);\n\t\tthis.domElement.removeEventListener('click', this.bindClick);\n\t\tTweenMax.ticker.removeEventListener('tick', this.bindRender);\n\t\tEmitter.off('LOADING_COMPLETE', this.bindEnter);\n\t\twindow.removeEventListener('mousemove', this.boundMouseMove);\n\t}", "removeAllListeners() {\n\t\tfor (let i = 0; i < this.eventHandles_.length; i++) {\n\t\t\tthis.eventHandles_[i].removeListener();\n\t\t}\n\n\t\tthis.eventHandles_ = [];\n\t}", "function removeListeners() {\n $element.unbind(START_EV, touchStart);\n $element.unbind(CANCEL_EV, touchCancel);\n $element.unbind(MOVE_EV, touchMove);\n $element.unbind(END_EV, touchEnd);\n\n //we only have leave events on desktop, we manually calculate leave on touch as its not supported in webkit\n if (LEAVE_EV) {\n $element.unbind(LEAVE_EV, touchLeave);\n }\n\n setTouchInProgress(false);\n }", "function deactivate() {\n if (disposables) {\n disposables.forEach(item => item.dispose());\n }\n disposables = [];\n}", "function handleRemoveAccessibility() {\n\t\t\t$('#removeAccessibility').hide();\n\t\t\ttheInterface.emit('ui:removeAccessibility');\n\t\t}", "dispose() {\n // Remove event handlers.\n if (this.mouseOverHandler_) {\n browserEvents.unbind(this.mouseOverHandler_);\n this.mouseOverHandler_ = null;\n }\n if (this.clickHandler_) {\n browserEvents.unbind(this.clickHandler_);\n this.clickHandler_ = null;\n }\n if (this.mouseEnterHandler_) {\n browserEvents.unbind(this.mouseEnterHandler_);\n this.mouseEnterHandler_ = null;\n }\n if (this.mouseLeaveHandler_) {\n browserEvents.unbind(this.mouseLeaveHandler_);\n this.mouseLeaveHandler_ = null;\n }\n if (this.onKeyDownHandler_) {\n browserEvents.unbind(this.onKeyDownHandler_);\n this.onKeyDownHandler_ = null;\n }\n\n // Remove menu items.\n for (let i = 0, menuItem; (menuItem = this.menuItems_[i]); i++) {\n menuItem.dispose();\n }\n this.element_ = null;\n }", "removeAllEventListeners() {\n this.eventListeners.forEach(({ target, type, boundListener }) => {\n this.log(`Removing \"${type}\" eventlistener`, target);\n target.removeEventListener(type, boundListener);\n });\n this.eventListeners.length = 0;\n }", "function stopListeningToRControls() {\n $('.rcontrols-remove').off(\"click\");\n $('.rcontrols-add').off(\"click\");\n}", "removeAllEventListeners() {\n this.eventListeners.forEach(({target, type, boundListener}) => {\n this.log(`Removing \"${type}\" eventlistener`, target);\n target.removeEventListener(type, boundListener);\n });\n this.eventListeners.length = 0;\n }", "desactiver() {\n\t\t\tthis.suprimerObjet(\"cle\");// #tim Jessy, Suppression de linventaire lors de la fin de partie\n\t\t\tSprite.removeEventListeners(window, this.evt.window);\n }", "function clearRemainingListeners() {\n observerTestState.toBeEnabled.forEach(function(feature) {\n chrome.accessibilityFeatures[feature.name].onChange.removeListener(\n feature.listener);\n feature.listener = null;\n });\n observerTestState.toBeDisabled.forEach(function(feature) {\n chrome.accessibilityFeatures[feature.name].onChange.removeListener(\n feature.listener);\n feature.listener = null;\n });\n }", "unregisterShortcuts() {\n const shortcutManager = this.hot.getShortcutManager();\n const editorContext = shortcutManager.getContext('editor');\n\n editorContext.removeShortcutsByGroup(SHORTCUTS_GROUP);\n }", "detach() {\n this.attached.removeEventListener('mousedown', this.event);\n this.attached.removeEventListener('mouseup', this.event);\n this.attached.removeEventListener('click', this.event);\n this.attached.removeEventListener('dblclick', this.event);\n \n this.attached = null;\n }", "detach() {\n const that = this;\n that._removeEventListeners();\n }", "deselectUITools() {\n $('.toolBtn').removeClass('active');\n $(this.app.canvas).removeClass('crosshair');\n }", "kill() {\n this.removeEventListeners();\n }", "function removeListeners() {\r\n gameOverModal.btn.removeEventListener(\"click\", backToMenu);\r\n }", "unbindEvents() {\n if (this.items.size === 0) {\n OdoWindowEvents.remove(this.resizeId);\n OdoWindowEvents.remove(this.scrollId);\n\n this.hasActiveHandlers = false;\n }\n }", "removeListener() {\n document.getElementById('banner-picture').removeEventListener('mousedown', this.mouseDownHandler);\n document.removeEventListener('mouseup', this.mouseUpHandler);\n document.getElementById('banner-picture').removeEventListener('mouseenter', this.mouseEnterHandler);\n document.getElementById('banner-picture').removeEventListener('mousemove', this.mouseMoveHandler);\n }", "destroy() {\n\t\tfor(const [event, listener] of this.listeners) this.client.removeListener(event, listener);\n\t\tthis.listeners.clear();\n\t}", "detach() {\n this.draggable.off('draggable:initialize', this[onInitialize]).off('draggable:destroy', this[onDestroy]);\n\n // Remove modified elements when detach\n this[onDestroy]();\n }", "removeAllListeners() {\n const me = this,\n listeners = me.eventListeners || (me.eventListeners = {});\n\n for (let event in listeners) {\n listeners[event].forEach((cfg) => me.removeListener(event, cfg));\n }\n }", "removeAllEventListeners () {\n this.eventListeners = [];\n }", "removeListeners() {}", "removeListeners() {}", "removeListeners() {}", "removeEventListeners() {\n // Empty in base class.\n }", "clear () {\n for (let i = 0; i < this.listeningIpcs.length; i++) {\n let pair = this.listeningIpcs[i];\n _ipc.removeListener( pair[0], pair[1] );\n }\n this.listeningIpcs.length = 0;\n }", "_removeEventListeners() {\n\n this.el.removeEventListener('click', this._onClickBound);\n window.removeEventListener('scroll', this._onScrollBound);\n window.removeEventListener('orientationchange', this._onScrollBound);\n document.removeEventListener('spark.visible-children', this._onVisibleBound, true);\n\n if (canObserve)\n this._removeMutationObserver();\n else\n window.removeEventListener('resize', this._onResizeBound);\n }", "_clearListeners() {\n for (const listener of this._listeners) {\n listener.remove();\n }\n this._listeners = [];\n }", "removeEventListeners() {\n this.elementListener.removeEventListener(\"mouseenter\", this.onMouseEnterBind);\n this.elementListener.removeEventListener(\"mouseleave\", this.onMouseLeaveBind);\n this.elementListener.removeEventListener(\"mousemove\", this.onMouseMoveBind);\n\n if (this.gyroscope) {\n window.removeEventListener(\"deviceorientation\", this.onDeviceOrientationBind);\n }\n\n if (this.glare || this.fullPageListening) {\n window.removeEventListener(\"resize\", this.onWindowResizeBind);\n }\n }", "_clearListeners() {\n for (let listener of this._listeners) {\n listener.remove();\n }\n this._listeners = [];\n }", "removeDisplayedListeners() {\n if ( this.visibilityTracker ) {\n this.visibilityTracker.removeListener( this.boundVisibilityListener );\n this.visibilityTracker.dispose();\n this.visibilityTracker = null;\n }\n if ( this.node ) {\n this.node.changedInstanceEmitter.removeListener( this.boundInstancesChangedListener );\n this.node = null;\n }\n }", "cleanup() {\n this.element_.removeEventListener('touchstart', this.boundOnTouchStart_);\n this.element_.removeEventListener('touchend', this.boundOnTouchEnd_);\n this.element_.removeEventListener('touchmove', this.boundOnTouchMove_);\n this.element_.removeEventListener('touchcancel', this.boundOnTouchCancel_);\n delete this.element_[PROP_];\n this.pass_.cancel();\n }", "unregisterIosButtonDelegates() {\n //OLog.debug(\"ux.js unregisterIosButtonDelegates *purging*\")\n const iosState = { ...Store.getState().iosState }\n delete iosState.iosButtonState\n Store.dispatch(setIosState(iosState))\n Object.keys(UXState).forEach(componentId => {\n if (componentId.startsWith(\"ios-button\")) {\n delete UXState[componentId]\n }\n })\n }", "_removeTrackListeners() {\n var interactionRects = Px.d3.selectAll(Polymer.dom(this.$$('#sliderSVG')).querySelectorAll('.sliderTrack'));\n\n interactionRects.on('click', null);\n }", "RemoveInactives()\n {\n for(var i = 0; i < this.gameObjects.length; i++)\n {\n if(!this.gameObjects[i].object.active)\n {\n this.gameObjects.splice(i, 1);\n this.UpdateIndex();\n }\n }\n }", "unsubscribeEventListeners () {\n // Remove Aurelia event listeners\n this.subscriptions.forEach((subscription) => {\n subscription.dispose();\n });\n this.subscriptions = undefined;\n\n // Remove basic JS event listeners.\n if (this.canvas) {\n this.canvas.removeEventListener(\n 'contextmenu', this.canvasContextMenuHandler\n );\n this.canvas.removeEventListener('mousedown', this.canvasMouseDownHandler);\n this.canvas.removeEventListener('mouseleave', this.canvasMouseUpHandler);\n this.canvas.removeEventListener('mousemove', this.canvasMouseMoveHandler);\n this.canvas.removeEventListener('mouseup', this.canvasMouseUpHandler);\n this.canvas.removeEventListener('mousewheel', this.canvasMouseWheelHandler);\n }\n }", "remove() {\n window.removeEventListener('vrdisplaypresentchange', this.__onVRDisplayPresentChange);\n if (screenfull.enabled) {\n document.removeEventListener(screenfull.raw.fullscreenchanged, this.__onChangeFullscreen);\n }\n\n this.removeAllListeners();\n }", "stopObservingAllElements() {\n this._observer.disconnect();\n }", "function removeButtonListeners() {\n if (buttons.fw) {\n buttons.fw.removeEventListener('click', handleForwardButtonClick);\n }\n if (buttons.bk) {\n buttons.bk.removeEventListener('click', handleBackwardButtonClick);\n }\n }", "destroy() {\n //this.unobserve(this.slider.selector);\n this.unobserve(window);\n const tx = document.documentElement;\n tx.removeEventListener(\"pointermove\", this.onpointermove);\n tx.removeEventListener(\"mousemove\", this.mousemoveUpdater);\n /*this.slider.selector.removeEventListener(\"touchend\", this.mtimerUpdater);\n this.slider.selector.removeEventListener(\"mouseup\", this.mtimerUpdater);\n this.slider.selector.removeEventListener(\"mousedown\", this.mtimerUpdater);\n this.slider.selector.removeEventListener(\"mousemove\", this.mousemoveHandler);*/\n\n this.coordinator = null;\n }", "destroy() {\n\t\tthis.interactionElement.innerHTML = '';\n\t\tsetTimeout(() => {\n this.destroySounds();\n\t\t}, 1000);\n\t}", "detach() {\n this.draggable.off('sortable:sort', this[onSortableSort]);\n this.draggable.off('sortable:sorted', this[onSortableSorted]);\n }", "removeAllListeners() {\n this.click = [];\n this.drag = [];\n this.dragStart = [];\n this.dragEnd = [];\n }", "stop () {\n this._client.removeAllListeners('messageCreate')\n this._client.removeAllListeners('messageReactionAdd')\n this._client.removeAllListeners('messageReactionRemove')\n }", "removeListeners() {\n const client = MatrixClientPeg.get();\n if (client === null) return;\n\n client.removeListener('sync', this.onSync);\n client.removeListener('Room.timeline', this.onRoomTimeline);\n client.removeListener('Event.decrypted', this.onEventDecrypted);\n client.removeListener('Room.timelineReset', this.onTimelineReset);\n client.removeListener('Room.redaction', this.onRedaction);\n }", "function destroy() {\n // remove protected internal listeners\n removeEvent(INTERNAL_EVENT_NS.aria);\n removeEvent(INTERNAL_EVENT_NS.tooltips);\n Object.keys(options.cssClasses).forEach(function (key) {\n removeClass(scope_Target, options.cssClasses[key]);\n });\n while (scope_Target.firstChild) {\n scope_Target.removeChild(scope_Target.firstChild);\n }\n delete scope_Target.noUiSlider;\n }", "onremove() {\n // Slider and binder\n if(this.binder)\n this.binder.destroy();\n if(this.slider)\n this.slider.destroy();\n\n // Destroy classes & objects\n this.binder = this.slider = this.publication = this.series = this.ui = this.config = null;\n }", "killSelf()\n {\n // Kill my children\n for (var i = 0; i < this.component_list.length; i++)\n if (this.component_list[i] == this)\n this.component_list.killSelf();\n\n // Kill myself\n for (var i = 0; i < ui_component_list.length; i++)\n if (ui_component_list[i] == this)\n ui_component_list.splice(i, 1);\n\n // Aint that depressing?\n }", "function cleanupInteractiveMouseListeners() {\n document.body.removeEventListener('mouseleave', scheduleHide);\n document.removeEventListener('mousemove', debouncedOnMouseMove);\n mouseMoveListeners = mouseMoveListeners.filter(function (listener) {\n return listener !== debouncedOnMouseMove;\n });\n }", "_removeSubComponentsListenersAndDebugDashboards() {\n const self = this;\n if (self._subI13nComponents && self._subI13nComponents.length > 0) {\n self._subI13nComponents.forEach((subI13nComponent) => {\n subI13nComponent.componentClickListener.remove();\n if (subI13nComponent.viewportDetector) {\n subI13nComponent.viewportDetector.unsubscribeAll();\n }\n if (subI13nComponent.debugDashboard) {\n subI13nComponent.debugDashboard.destroy();\n }\n });\n }\n }", "remove() {\n this.target.removeEventListener(this.eventType, this.fn, false);\n }", "function unsetMoveable(tile){\n tile.disp.classList.remove(\"moveable\");\n tile.disp.onclick = null;\n}", "function removeListeners() {\n\t\t$(document).off(EVENT_NAME_KEYPRESS);\n\t\t$(document).off(EVENT_NAME_KEYUP);\n\t}", "destroy () {\n this.eventListeners = null;\n }", "function novel_clearMenuItems()\n{\n var actor;\n var domObject;\n var i;\n if (novel)\n {\n i = 0;\n while (i < novel.actors.length)\n {\n if (novel.actors[i].constructor == MenuItem)\n {\n domObject = novel.actors[i].domRef;\n if (domObject != null)\n {\n domObject.parentNode.removeChild(domObject);\n }\n novel.actors[i].domRef = null;\n novel.actors.splice(i, 1);\n }\n else\n {\n i++;\n }\n }\n }\n}", "remove() {\n Object.keys(this.delegates).forEach((key) => {\n this.delegates[key].destroy();\n });\n }", "_removeEventListeners() {\n window.removeEventListener('deviceorientation', this._onOrientationFound);\n\n this._map\n .off('locationfound', this._onLocationFound, this)\n .off('locationerror', this._onLocationError, this)\n .off('dragstart', this._onDragStart, this)\n .off('moveend', this._onMoveEnd, this);\n }", "function stopInteraction() {\n if (GC.interactor !== null) {\n GC.interactor.kill();\n }\n}", "_removeTriggerEvents() {\n if (this._triggerElement) {\n pointerDownEvents.forEach((type) => {\n this._triggerElement.removeEventListener(type, this, passiveEventOptions);\n });\n if (this._pointerUpEventsRegistered) {\n pointerUpEvents.forEach((type) => {\n this._triggerElement.removeEventListener(type, this, passiveEventOptions);\n });\n }\n }\n }", "_removeTriggerEvents() {\n if (this._triggerElement) {\n pointerDownEvents.forEach((type) => {\n this._triggerElement.removeEventListener(type, this, passiveEventOptions);\n });\n if (this._pointerUpEventsRegistered) {\n pointerUpEvents.forEach((type) => {\n this._triggerElement.removeEventListener(type, this, passiveEventOptions);\n });\n }\n }\n }", "_removeTriggerEvents() {\n if (this._triggerElement) {\n pointerDownEvents.forEach((type) => {\n this._triggerElement.removeEventListener(type, this, passiveEventOptions);\n });\n if (this._pointerUpEventsRegistered) {\n pointerUpEvents.forEach((type) => {\n this._triggerElement.removeEventListener(type, this, passiveEventOptions);\n });\n }\n }\n }", "detach() {\n for (const container of this.containers) {\n container.removeEventListener('webkitmouseforcewillbegin', this[onMouseForceWillBegin], false);\n container.removeEventListener('webkitmouseforcedown', this[onMouseForceDown], false);\n container.removeEventListener('mousedown', this[onMouseDown], true);\n container.removeEventListener('webkitmouseforcechanged', this[onMouseForceChange], false);\n }\n\n document.removeEventListener('mousemove', this[onMouseMove]);\n document.removeEventListener('mouseup', this[onMouseUp]);\n }", "function cleanupInteractiveMouseListeners() {\n document.body.removeEventListener('mouseleave', scheduleHide);\n document.removeEventListener('mousemove', debouncedOnMouseMove);\n mouseMoveListeners = mouseMoveListeners.filter(function (listener) {\n return listener !== debouncedOnMouseMove;\n });\n }", "removeEventListeners() {\r\n this.elementListener.removeEventListener(\"mouseenter\", this.onMouseEnterBind);\r\n this.elementListener.removeEventListener(\"mouseleave\", this.onMouseLeaveBind);\r\n this.elementListener.removeEventListener(\"mousemove\", this.onMouseMoveBind);\r\n \r\n if (this.gyroscope) {\r\n window.removeEventListener(\"deviceorientation\", this.onDeviceOrientationBind);\r\n }\r\n \r\n if (this.glare || this.fullPageListening) {\r\n window.removeEventListener(\"resize\", this.onWindowResizeBind);\r\n }\r\n }", "destroy() {\n // Remove event listeners connected to this instance\n this.eventDelegate.off();\n\n // Delete references to instance\n delete this.ui.element.dataset[`${this.name}Instance`];\n\n delete window[namespace].modules[this.name].instances[this.uuid];\n }", "__remove() {\n this.__detach();\n this.attrs.onRemoved && this.attrs.onRemoved.trigger();\n this.removed();\n Akili.removeScope(this.__scope.__name);\n this.el.remove();\n }", "function killOtherButtons() {\n for (var i = 0; i < choiceBtns.children.length; i++) {\n choiceBtns.children[i].removeAttribute(\"onclick\");\n\n }\n\n}", "function destroy() {\n\t\t\t// Iterate over each matching element.\n\t\t\t$el.each(function() {\n\t\t\t\tvar el = this;\n\t\t\t\tvar $el = $(this);\n\n\t\t\t\t// Destroy completely the element and remove event listeners\n\t\t\t\t$(window).off('resize.timeliny');\n\t\t\t\t$el.find('.' + options.className + '-timeblock:not(.inactive) .' + options.className + '-dot').off('click');\n\t\t\t\t$(document).off('mousemove.timeliny');\n\t\t\t\t$(document).off('mouseup.timeliny');\n\t\t\t\t$el.first().off('mousedown');\n\t\t\t\t$el.remove();\n\t\t\t\thook('onDestroy');\n\n\t\t\t\t// Remove Plugin instance from the element.\n\t\t\t\t$el.removeData('plugin_timeliny');\n\t\t\t});\n\t\t}", "destroy()\n {\n this.removeEvents();\n\n this.removeAllListeners();\n\n this.renderer = null;\n\n this.mouse = null;\n\n this.eventData = null;\n\n this.interactiveDataPool = null;\n\n this.interactionDOMElement = null;\n\n this.onMouseDown = null;\n this.processMouseDown = null;\n\n this.onMouseUp = null;\n this.processMouseUp = null;\n\n this.onMouseMove = null;\n this.processMouseMove = null;\n\n this.onMouseOut = null;\n this.processMouseOverOut = null;\n\n this.onMouseOver = null;\n\n this.onPointerDown = null;\n this.processPointerDown = null;\n\n this.onPointerUp = null;\n this.processPointerUp = null;\n\n this.onPointerMove = null;\n this.processPointerMove = null;\n\n this.onPointerOut = null;\n this.processPointerOverOut = null;\n\n this.onPointerOver = null;\n\n this.onTouchStart = null;\n this.processTouchStart = null;\n\n this.onTouchEnd = null;\n this.processTouchEnd = null;\n\n this.onTouchMove = null;\n this.processTouchMove = null;\n\n this._tempPoint = null;\n }", "function stopListeningToQControls() {\n $('.qcontrols-remove').off(\"click\");\n $('.qcontrols-add').off(\"click\");\n}", "destroy () {\n\t\tthis.options.element.removeEventListener('click', this.onClickToElement);\n\t\tthis.options.element.removeChild(this.options.element.querySelector('.pollsr'));\n\t}", "function eraseAccessibilityFeatures() {\n\t\t\tvar layer = this.theMap.getLayersByName(this.ACCESSIBILITY)[0];\n\t\t\tlayer.removeAllFeatures();\n\t\t}", "__removeBroadcastEventListeners() {\n let bindEvents = this._bindBroadcastEvents;\n /* istanbul ignore next */\n if (!bindEvents) {\n return;\n }\n\n bindEvents.forEach(item => eventCenter.off(item[0], item[1]));\n this._bindBroadcastEvents = [];\n }", "function removeClickEvents() {\n options.forEach((element, index) => {\n element.removeEventListener('click', playGame);\n })\n\n}", "removeClickAwayEvent() {\n $('main').off('click.atkPanel');\n $(document).off('keyup.atkPanel');\n }", "function RemoveFeatures() {\n\t\t\t\ttry {\n\t\t\t\t\tif (!featuresAdded)\n\t\t\t\t\t\treturn;\n\t\t\t\t\tiLog(\"RemoveFeatures\", \"Called\");\n\t\t\t\t\t\n\t\t\t\t\t//LK: due problems changing Target back to onclick here on live object, it is done later in PageHelper.CleanVRM!\n\t\t\t\t\tlink.removeClass(\"moving\");\n\t\t\t\t\tcontrol.draggable(\"destroy\")\n\t\t\t\t\t\t.removeClass(\"editing\")\n\t\t\t\t\t\t.removeClass(\"moving\");\n\t\t\t\t\t\n\t\t\t\t\tfeaturesAdded = false;\n\t\t\t\t} catch (err) {\n\t\t\t\t\tiLog(\"RemoveFeatures\", err, Log.Type.Error);\n\t\t\t\t}\n\t\t\t}", "function removeEventListeners(){\n _.forEach(unlistenCallbacks, function(unlisten){\n unlisten();\n });\n unlistenCallbacks = [];\n }", "removeAll() {\n this.listeners.forEach(listener => listener.destroy());\n this.listeners = [];\n }", "function stopListeningToMultiControls() {\n $('a.multi-control-remove').off(\"click\");\n $('a.multi-control-add').off(\"click\");\n}" ]
[ "0.7001901", "0.6090667", "0.6058484", "0.5875442", "0.58519256", "0.5830807", "0.5759036", "0.5724558", "0.5636188", "0.56281585", "0.562698", "0.56256896", "0.56230146", "0.56032354", "0.559707", "0.559707", "0.5593645", "0.55921054", "0.55734605", "0.55620927", "0.55593055", "0.5554658", "0.5545743", "0.5545739", "0.55405813", "0.55361044", "0.5529489", "0.5528211", "0.54901516", "0.5490003", "0.5484072", "0.5479095", "0.5465319", "0.54512113", "0.5445437", "0.54387426", "0.5425949", "0.541683", "0.54146665", "0.54073995", "0.53958845", "0.5395307", "0.5395307", "0.5395307", "0.5392635", "0.53709483", "0.5369252", "0.53688437", "0.53564286", "0.5352117", "0.5338833", "0.5330031", "0.5309778", "0.5300046", "0.5299319", "0.5296341", "0.5295031", "0.5289538", "0.52877945", "0.52851355", "0.5276737", "0.52757716", "0.5271243", "0.5266463", "0.5264599", "0.5262729", "0.5260501", "0.5251983", "0.52478284", "0.5242375", "0.5239918", "0.52358115", "0.5233588", "0.52299756", "0.5221806", "0.5211933", "0.52110267", "0.52087754", "0.52076155", "0.52076155", "0.52076155", "0.52074564", "0.5206811", "0.5205051", "0.51985323", "0.51977384", "0.5195186", "0.5190628", "0.518924", "0.51881856", "0.51854426", "0.5182659", "0.51818866", "0.5178886", "0.5176424", "0.51760453", "0.51751983", "0.5175019", "0.5168073" ]
0.537152
46
listener is added to a selector interactable
function delegateListener(event, optionalArg) { const options = getOptions(optionalArg); const fakeEvent = new events_FakeEvent(event); const delegates = delegatedEvents[event.type]; const [eventTarget] = getEventTargets(event); let element = eventTarget; // climb up document tree looking for selector matches while (is.element(element)) { for (let i = 0; i < delegates.length; i++) { const cur = delegates[i]; const { selector, context } = cur; if (matchesSelector(element, selector) && nodeContains(context, eventTarget) && nodeContains(context, element)) { const { listeners } = cur; fakeEvent.currentTarget = element; for (const [fn, { capture, passive }] of listeners) { if (capture === options.capture && passive === options.passive) { fn(fakeEvent); } } } } element = parentNode(element); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "_addEventListeners() {\n\n if (this._isNative) {\n this.selectEl.addEventListener('change', this._onInputBound);\n }\n else {\n this.el.addEventListener('change', this._onInputBound, true);\n }\n }", "function evtListener() {\n debug(\"evtListener\");\n cards().forEach(function(node) {\n node.addEventListener('click', cardMagic);\n })\n }", "actionEventHandler() {\n const selectorElement = document.getElementById(this.element.getAttribute(SELECTOR_ID));\n const event = {\n 'target': selectorElement\n };\n this.eventHandler(event);\n }", "enableUserSelection() {\n this[addDivListener]('mousedown', this[userSelectionDragListenerSym]);\n }", "activeClick() {\n var $_this = this;\n var action = this.options.dblClick ? 'dblclick' : 'click';\n\n this.$selectableUl.on(action, '.SELECT-elem-selectable', function () {\n $_this.select($(this).data('SELECT-value'));\n });\n this.$selectionUl.on(action, '.SELECT-elem-selection', function () {\n $_this.deselect($(this).data('SELECT-value'));\n });\n\n }", "initEventListners() {\n this.engine.getSession().selection.on('changeCursor', () => this.updateCursorLabels());\n\n this.engine.getSession().on('change', (e) => {\n // console.log(e);\n\n // Make sure the editor has content before allowing submissions\n this.allowCodeSubmission = this.engine.getValue() !== '';\n this.enableRunButton(this.allowCodeSubmission);\n });\n }", "function set_custom_listener(select) {\n select.change(enable_custom_input);\n}", "function delegateEvents() {\n createDelegatedEventListener(\"click\", CONSTANTS.EVENT_SEL_CAROUSEL_CONTROL, \"controlInteraction\");\n createDelegatedEventListener(\"click\", CONSTANTS.EVENT_SEL_CAROUSEL_INDEX_ITEM, \"indexInteraction\");\n}", "function itoolSelectionHandler(){\n var iframeContents = _iframe.contents();\n var iframeJQuery = window.frames[0].jQuery;\n\n //Mark the highlighted element as selected\n var curSelectedElem = iframeContents.find(\".perc-itool-highlighter\").removeClass(\"perc-itool-highlighter\").addClass(\"perc-itool-selected-elem\");\n //Hide the overlay highlighter\n iframeContents.find(\"#itool-placeholder-highlighter\").hide();\n\n iframeJQuery(\".perc-text-node-wrapper\").contents().unwrap();\n\n //Add classes to recognize multiselectable elements\n if(curSelectedElem.prev() && !curSelectedElem.prev().hasClass(\"perc-itool-selected-elem\"))\n {\n curSelectedElem.prev().addClass(\"perc-itool-multi-selectable\");\n }\n if(curSelectedElem.next() && !curSelectedElem.next().hasClass(\"perc-itool-selected-elem\"))\n {\n curSelectedElem.next().addClass(\"perc-itool-multi-selectable\");\n }\n\n highlightSelectedElements(curSelectedElem, false);\n highlightSiblings(curSelectedElem);\n\n if(curSelectedElem.hasClass(\"perc-itool-multi-selectable\"))\n curSelectedElem.removeClass(\"perc-itool-multi-selectable\");\n\n updateInspectToolMenu(true);\n\n }", "click(event){\n if(event.target.tagName === \"MULTI-SELECTION\"){\n const onContainerMouseClick = this.onContainerMouseClick;\n\n if(onContainerMouseClick){\n onContainerMouseClick();\n }\n }\n }", "function click() {\n\t\t\t$(\".characterGroup\").children().on(\"click\", selectNewEnemy);\n\t\t}", "function addListener(selector,eventName,cb){\r\n document.querySelector(selector).addEventListener(eventName,cb)\r\n}", "_addEventsListeners ()\n {\n this._onChange();\n }", "activateListeners(html) {\n html.find(\".clickable-element\").click(this._nodeClicked.bind(this));\n super.activateListeners(html);\n }", "_initEvents () {\n this.el.addEventListener('click', (e) => {\n if (e.target.dataset.action in this.actions) {\n this.actions[e.target.dataset.action](e.target);\n } else this._checkForLi(e.target);\n });\n }", "function addListeners(){\r\ndocument.getElementById(\"choice1\").addEventListener(\"click\",choice1Select);\r\ndocument.getElementById(\"choice2\").addEventListener(\"click\",choice2Select);\r\ndocument.getElementById(\"choice3\").addEventListener(\"click\",choice3Select);\r\ndocument.getElementById(\"choice4\").addEventListener(\"click\",choice4Select);\r\n}", "function select(listener) {\n console.log()\n listener.question('dp: What would you like to do?\\n\\n', (reply)=> {\n console.log()\n select_loop(listener, reply.split(' '), 0)\n })\n}", "handleJDotterClick() {}", "function addSelectListener() {\n var list = document.getElementsByClassName(\"text-content\");\n for(var i=0;i<list.length;i++) {\n list[i].addEventListener(\"click\", toggleSelectModel);\n }\n}", "function UISelection(){\n\n }", "function selectingButtonListener() {\n var button = $('.contacts-search-bar button');\n button.click(searchToArrow);\n}", "function evtHandler() {\n // console.log(\"event handler initialized\");\n //jQuery('#editbox').dialog({'autoOpen': false});\n\n jQuery('#list-usePref li').click(function () {\n\n resetClass(jQuery(this), 'active');\n jQuery(this).addClass('active');\n // console.log(\"colorSelector: \",colorSelector);\n triggerViz(styleVal);\n\n });\n\n }", "onSelect(event) {}", "addListeners() {\n\t\tthis.findTarget();\n\t\tthis.findControls();\n\t\t\n\t\tthis.showerElement.addEventListener('click', () => {\n\t\t\tthis.showTarget();\n\t\t\tthis.hiderElement.style.display = this.controlsDisplay\n\t\t\tthis.showerElement.style.display = 'none';\n\t\t\t\n\t\t})\n\t\t\n\t\tthis.hiderElement.addEventListener('click', () => {\n\t\t\tthis.hideTarget();\n\t\t\tthis.hiderElement.style.display = 'none'; \n\t\t\tthis.showerElement.style.display = this.controlsDisplay;\n\t\t})\t\t\n\t}", "function apply_card_event_handlers(){\n $('.card').click(card_selected($(this)));\n }", "function addListenersTo(elementToListenTo) {window.addEventListener(\"keydown\",kdown);window.addEventListener(\"keyup\",kup);elementToListenTo.addEventListener(\"mousedown\",mdown);elementToListenTo.addEventListener(\"mouseup\",mup);elementToListenTo.addEventListener(\"mousemove\",mmove);elementToListenTo.addEventListener(\"contextmenu\",cmenu);elementToListenTo.addEventListener(\"wheel\",scrl);}", "click (event) {\n this.onSelectionChange([])\n }", "mouseClicked() {\n this.inputNode.mouseClicked();\n }", "function bindEvents() {\n\t\t\tif(options.selection.mode != null){\n\t\t\t\toverlay.observe('mousedown', mouseDownHandler);\t\t\t\t\n\t\t\t}\t\t\t\t\t\n\t\t\toverlay.observe('mousemove', mouseMoveHandler)\n\t\t\toverlay.observe('click', clickHandler)\n\t\t}", "addFocusEventListener() {\n this.input.addEventListener('focus', () => this.input.select());\n }", "handleInteraction(){\r\n for(let i = 0; i < keys.length; i++){\r\n keys[i].addEventListener(\"click\", (e)=>{\r\n target = e.target.textContent;\r\n e.target.disabled = true;\r\n if(activePhrase.checkLetter()){\r\n e.target.classList.add(\"chosen\");\r\n activePhrase.showMatchedLetter();\r\n this.checkForWin()\r\n } else {\r\n this.removeLife();\r\n e.target.classList.add(\"wrong\");\r\n this.checkForWin();\r\n };\r\n if(this.checkForWin() === true || this.missed === 5){\r\n this.gameOver(); \r\n };\r\n });\r\n }\r\n }", "selectionChangeHandler (event) {\n const target = this.activeElement;\n const handler = target && get(target, selectionChangeHandlerName);\n if (handler) { handler(event); }\n }", "_selectViaInteraction() {\n if (!this.disabled) {\n this._selected = this.multiple ? !this._selected : true;\n this._changeDetectorRef.markForCheck();\n this._emitSelectionChangeEvent(true);\n }\n }", "_selectViaInteraction() {\n if (!this.disabled) {\n this._selected = this.multiple ? !this._selected : true;\n this._changeDetectorRef.markForCheck();\n this._emitSelectionChangeEvent(true);\n }\n }", "_selectViaInteraction() {\n if (!this.disabled) {\n this._selected = this.multiple ? !this._selected : true;\n this._changeDetectorRef.markForCheck();\n this._emitSelectionChangeEvent(true);\n }\n }", "_selectViaInteraction() {\n if (!this.disabled) {\n this._selected = this.multiple ? !this._selected : true;\n this._changeDetectorRef.markForCheck();\n this._emitSelectionChangeEvent(true);\n }\n }", "function listenTarget(id) {\n var targetChoice = document.getElementById(id);\n if (typeof window.addEventListener === 'function') {\n targetChoice.addEventListener(\"click\", function() {\n console.log(targetChoice.style.backgroundColor);\n if (targetChoice.style.backgroundColor == 'rgb(244, 222, 199)') {\n targetChoice.style.backgroundColor = '#AB6B3A';\n targetChoice.style.color = 'white';\n\n if (selected_target != null) {\n prevTargetChoice = selected_target;\n prevTargetChoice.style.backgroundColor = '#F4DEC7';\n prevTargetChoice.style.color = 'black';\n unselectTarget(prevTargetChoice.innerHTML);\n }\n\n selected_target = targetChoice;\n selectTarget(targetChoice.innerHTML);\n } else {\n targetChoice.style.backgroundColor = '#F4DEC7';\n targetChoice.style.color = 'black';\n unselectTarget(targetChoice.innerHTML);\n }\n });\n }\n }", "isSelectable() {\n return this.selectable === true\n }", "selectedClickListener(d, i){\n var self = this;\n // ID Is selected from the the element tag field\n var id = self.selectedExtractID(d).split(\" \").join(\"-\");\n self.boxZoom(self.path.bounds(d), self.path.centroid(d), 20);\n self.applyStateSelection(id);\n self.ui.setDistrictInfo(id);\n self.ui.addLabel(); \n self.ui.retrievePoliticianImages(id);\n }", "function addEventListeners() {\n $(\".cell\").click(function() {\n $(\".rooty\").removeClass(\"onFocus\");\n $(\".extension\").removeClass(\"onFocus\");\n $(\".cell\").removeClass(\"onFocus\");\n $(\".cell\").removeClass(\"selected\");\n chord = \"\";\n extension = \"\";\n\n $(this).addClass(\"onFocus\");\n $(this).addClass(\"selected\");\n index = parseInt($(this).attr(\"id\"));\n });\n\n $(\".rooty\").click(function() {\n $(\".rooty\").removeClass(\"onFocus\");\n $(this).addClass(\"onFocus\");\n chord = $(this).text();\n answer[index].chord = chord;\n displayFullChord(\".selected\");\n });\n\n $(\".extension\").click(function() {\n $(\".extension\").removeClass(\"onFocus\");\n $(this).addClass(\"onFocus\");\n extension = $(this).text();\n answer[index].exten = extension;\n displayFullChord(\".selected\");\n });\n }", "startSelecting () {\n if (!_utils_env__WEBPACK_IMPORTED_MODULE_2__[\"isBrowser\"]) return\n window.addEventListener('mouseover', this.elementMouseOver, true)\n window.addEventListener('click', this.elementClicked, true)\n window.addEventListener('mouseout', this.cancelEvent, true)\n window.addEventListener('mouseenter', this.cancelEvent, true)\n window.addEventListener('mouseleave', this.cancelEvent, true)\n window.addEventListener('mousedown', this.cancelEvent, true)\n window.addEventListener('mouseup', this.cancelEvent, true)\n }", "function bindEquipListener(){\n\t\t$('.equippable-item').click(function(){\n\t\t\tequippableItemClicked($(this).data('component-id'));\n\t\t});\n\t}", "startSelecting() {\n if (!shared_utils_1.isBrowser)\n return;\n window.addEventListener('mouseover', this.elementMouseOver, true);\n window.addEventListener('click', this.elementClicked, true);\n window.addEventListener('mouseout', this.cancelEvent, true);\n window.addEventListener('mouseenter', this.cancelEvent, true);\n window.addEventListener('mouseleave', this.cancelEvent, true);\n window.addEventListener('mousedown', this.cancelEvent, true);\n window.addEventListener('mouseup', this.cancelEvent, true);\n }", "addSelectionListeners(){\n\t\tif(!this.document) {\n\t\t\treturn;\n\t\t}\n\t\tthis._onSelectionChange = this.onSelectionChange.bind(this);\n\t\tthis.document.addEventListener(\"selectionchange\", this._onSelectionChange, { passive: true });\n\t}", "handleEvent(node, eventName, callback, locals) {\n if (eventName !== 'select') {\n super.handleEvent(this.nativeElement, eventName, callback, locals);\n }\n }", "function markButton(event){\n// $(\"#qwerty button\").on(\"click\", (event) => {\nevent.target.disabled = true;\nevent.target.classList.add (\"chosen\")\n// if (event.target.tagName === \"BUTTON\")\napp.handleInteraction(event.target.innerHTML.toLowerCase());\n}", "onSelect() {}", "function SelectionChange() {}", "function SelectionChange() {}", "function SelectionChange() {}", "function SelectionChange() {}", "function aiClick(selector) {\n console.assert(selector, 'aiClick received no selector...');\n playArea.removeClass('interaction-disabled');\n $(selector).first().click();\n}", "bindCardChoice(handler) {\n this.cardLinks = document.querySelectorAll('.pict1');\n this.cardLinks.forEach(element =>element.addEventListener('click', MemoryEvent => {\n handler(element.id-1);\n }));\n }", "static _onListen () {\n debug('_onListen');\n\n TalkieActions.setActiveAnimation('receiving');\n }", "onIntersectedByMouse(){\n }", "addButtonListener() {\n for (const color in this.colors) {\n this.colors[color].addEventListener(`click`, this.chooseColor);\n }\n }", "openOnwerFilter(){\n\n var selected = this.template.querySelector(\".selected-owner\");\n var optionsContainer = this.template.querySelector(\".options-container-owner\");\n var optionsList =this.template.querySelectorAll(\".option-owner\");\n selected.addEventListener(\"click\", () => {\n optionsContainer.classList.toggle(\"active\");\n }); \n //selected.addEventListener(\"click\", () => {\n //});\n\n /* optionsList.forEach(o => {\n o.addEventListener(\"click\", () => {\n selected.innerHTML = o.querySelector(\"label\").innerHTML;\n optionsContainer.classList.remove(\"active\");\n });\n });\n */\n }", "function on_event_select_add_entry_to_logick_menu(e)\n{\n /*removes old Logick*/\n delete_custom_logick_of_element();\n \n /*sets the new custom elements*/\n logick_elements.custom_logick_elements = e.param1.custom_logick_menu;\n\n /*applays the custom logick to the logick menu*/\n apply_custom_logick_onselect();\n \n}", "loadCheckboxInputEventListeners(dataCtrl,uiCtrl){\n const className = uiCtrl.returnIds().classNames.checkboxesSelector\n for(const input of document.getElementsByClassName(className)){\n input.addEventListener('click',(e)=>{\n dataCtrl.updateRegChecked(e.target.id)\n dataCtrl.addSelectedRow(parseInt(e.target.id),e.target.checked)\n uiCtrl.updateButtonTextValue(dataCtrl.returnData('selectedRow').length)\n })\n }\n }", "setupContainerListener_() {\n dev().assert(this.container_);\n const toggleControls = this.toggleControls_.bind(this);\n listen(dev().assertElement(this.container_), 'click', toggleControls);\n }", "function iniciaListener() {\n //Creo un listener para cada div (u otro elemento) de la pagina\n var lista_divs = document.querySelectorAll(\"div\");\n for (var i = 0; i < lista_divs.length; i++) {\n lista_divs[i].addEventListener('click', elementoOnclick);\n }\n }", "_listenToChipsSelection() {\n this._chipSelectionSubscription = this.chipSelectionChanges.subscribe((chipSelectionChange) => {\n this._chipSetFoundation.handleChipSelection({\n chipId: chipSelectionChange.source.id,\n selected: chipSelectionChange.selected,\n shouldIgnore: false\n });\n if (chipSelectionChange.isUserInput) {\n this._propagateChanges();\n }\n });\n }", "_listenToChipsSelection() {\n this._chipSelectionSubscription = this.chipSelectionChanges.subscribe((chipSelectionChange) => {\n this._chipSetFoundation.handleChipSelection({\n chipId: chipSelectionChange.source.id,\n selected: chipSelectionChange.selected,\n shouldIgnore: false\n });\n if (chipSelectionChange.isUserInput) {\n this._propagateChanges();\n }\n });\n }", "function select() {\n let xPos = event.offsetX;\n let yPos = event.offsetY;\n player.cards.onHand.forEach(element => {\n if (\n yPos > element.y &&\n yPos < element.y + element.height &&\n xPos > element.x &&\n xPos < element.x + element.width\n ) {\n console.log(\"we got ya\");\n element.selected = true;\n element.degrees = 0;\n console.log(element);\n //than create event listener\n myDom.canvas3.addEventListener(\"mousemove\", getCurPos, false);\n }\n });\n}", "createListeners() {\r\n html.get('.first').addEventListener('click', () => { // 'first' é a classe atribuida no html\r\n controls.goTo(1)\r\n update()\r\n })\r\n\r\n html.get('.last').addEventListener('click', () => {\r\n controls.goTo(state.totalPage)\r\n update()\r\n })\r\n\r\n html.get('.next').addEventListener('click', () => {\r\n controls.next()\r\n update()\r\n \r\n })\r\n\r\n html.get('.prev').addEventListener('click', () => {\r\n controls.prev()\r\n update()\r\n })\r\n\r\n //-- pesquisa\r\n html.get('.btnSearch').addEventListener('click', () => {\r\n controls.search()\r\n controls.searchShow()\r\n update()\r\n })\r\n\r\n }", "function set_selector(selector, selected) {\n\n clean();\n\n window.setSelector = selector;\n\n var element = iframe.find(get_foundable_query(selector, true, false, false));\n\n body.attr(\"data-clickable-select\", selector);\n\n if (iframe.find(\".yp-will-selected\").length > 0) {\n iframe.find(\".yp-will-selected\").trigger(\"mouseover\").trigger(\"click\");\n iframe.find(\".yp-will-selected\").removeClass(\"yp-will-selected\");\n } else if (selected !== null) {\n selected.trigger(\"mouseover\").trigger(\"click\");\n } else {\n element.filter(\":visible\").first().trigger(\"mouseover\").trigger(\"click\");\n }\n\n if (element.length > 1) {\n element.addClass(\"yp-selected-others\");\n get_selected_element().removeClass(\"yp-selected-others\");\n }\n\n body.addClass(\"yp-content-selected\");\n\n if ($(\".advanced-info-box\").css(\"display\") == 'block' && $(\".element-btn\").hasClass(\"active\")) {\n update_design_information(\"element\");\n }\n\n var tooltip = iframe.find(\".yp-selected-tooltip\");\n tooltip.html(\"<small class='yp-tooltip-small'>\" + iframe.find(\".yp-selected-tooltip small\").html() + \"</small> \" + selector);\n\n // Use native hover system\n if (selector.match(/:hover/g)) {\n\n body.addClass(\"yp-selector-hover\");\n body.attr(\"data-yp-selector\", \":hover\");\n $(\".yp-contextmenu-hover\").addClass(\"yp-active-contextmenu\");\n iframe.find(\".yp-selected-tooltip span\").remove();\n selector = selector.replace(/:hover/g, \"\");\n\n }\n\n // Use native focus system\n if (selector.match(/:focus/g)) {\n\n body.addClass(\"yp-selector-focus\");\n body.attr(\"data-yp-selector\", \":focus\");\n $(\".yp-contextmenu-focus\").addClass(\"yp-active-contextmenu\");\n iframe.find(\".yp-selected-tooltip span\").remove();\n selector = selector.replace(/:focus/g, \"\");\n\n }\n\n css_editor_toggle(true); // show if hide\n\n body.attr(\"data-clickable-select\", selector);\n\n insert_default_options();\n\n gui_update();\n\n draw();\n\n // Update the element informations.\n if ($(\".advanced-info-box\").css(\"display\") == 'block' && $(\".element-btn\").hasClass(\"active\")) {\n update_design_information(\"element\");\n }\n\n window.setSelector = false;\n\n }", "constructor(elem) {\n\n // the element is saved\n this.element = elem;\n // list of elements inside the carousel\n this.content = [...elem.children];\n\n // each one should have an event to select it\n for (let el of this.content) {\n el.addEventListener(\"click\", this.select);\n }\n\n // the first one should be selected, so here the event is triggered on the first\n // element of the current carousel\n this.select({\n target: this.content[0]\n });\n }", "onAfterAttach(msg) {\n this.node.addEventListener('keydown', this, true);\n this.node.addEventListener('contextmenu', this, true);\n }", "eventListenerIn(e) {\n const scene = this.scenes[this.currentSceneIndex];\n if (scene) {\n // process ui object events primarily\n const processed = scene.uiObjects.reduce((acc, uiObject) => {return acc || uiObject.eventListener(this, scene, e)}, false);\n if (!processed) {\n scene.eventListener(this, scene, e);\n }\n }\n if (e.type !== this.EVENT_TYPE_MOUSEDOWN) {\n // when mousedown event occurred it needs a system's default process to get focus\n e.preventDefault()\n }\n }", "setEvents(){\n const listElements = this.el.childNodes;\n for(let i = 0; i < listElements.length; i++){\n listElements[i].addEventListener('mousedown',this.onItemClickedEvent,true);\n }\n }", "connectedCallback() {\n super.connectedCallback();\n afterNextRender(this, function() {\n this.addEventListener(\"mousedown\", this.tapEventOn);\n this.addEventListener(\"mouseover\", this.tapEventOn);\n this.addEventListener(\"mouseout\", this.tapEventOff);\n this.$.button.addEventListener(\"focused-changed\", this.focusToggle);\n });\n }", "function componingMsgListener() {\n var target = $('#main-search-bar-input');\n target.keyup(sendKeyupPressed);\n}", "function addEditorListener() {\n\t\t$('.editing .edit').on('keyup', function(e) {\n\t\t\tcheckEditPress(e);\n\t\t})\n\n\t}", "function eventListeners(){\n changeOnButtonClicks();\n changeOnDotClicks();\n changeOnArrowKeys();\n changeOnAnnaLink();\n highlightDotsOnMouseover();\n highlightButtonsOnMouseover();\n highlightAnnaLinkOnMouseover();\n $(document).on(\"mousemove\", foregroundButtons);\n}", "function addInteraction(obj) {\n obj.interactive = true;\n obj\n .on('pointerdown', onDragStart)\n .on('pointerup', onDragEnd)\n .on('pointerupoutside', onDragEnd)\n .on('pointermove', onDragMove);\n }", "addEventListeners_() {\n this.$button_.on(app.InputEvent.START, this.onDropClick);\n }", "function enableEnemySelection () {\n $('.enemy').on('click.enemySelect', function () {\n console.log('opponent selected')\n var opponentKey = $(this).attr('data-name')\n gameState.selectedDefender = characters[opponentKey]\n\n // move enemy\n $('#defender').append(this)\n /*\n * HOMEWORK INSTRUCTIONS: Once the player selects an opponent,\n that enemy is moved to a `defender area`.\n The player will now be able to click the `attack` button\n */\n $('#attack-button').show()\n $('.enemy').off('click.enemySelect')\n })\n}", "selectHandler(e) {\n const { trigger } = this.props;\n trigger(e);\n }", "selectViaInteraction() {\n if (!this.selectable) {\n return;\n }\n else if (!this.selected) {\n this._chipFoundation.setSelected(true);\n this._dispatchSelectionChange(true);\n }\n }", "add() {\n this.target.addEventListener(this.eventType, this.fn, false);\n }", "function trigger(e,t){var n={type:t,target:e};for(var i in e.$listeners[n.type])e.$listeners[n.type][i](n)}", "handlepick() {\n\t\talert('i was clicked');\n\t}", "function addEventListeners() {\n\n}", "addExplorerListener(id, t) {\n var instance = this;\n $(\"#\" + t + \" .bordered\").each(function () {\n if (!$(this).hasClass(\"keyup-event-added\")) {\n $(this).addClass(\"keyup-event-added\");\n $(this).on(\"keyup\", function () {\n var attr = $(this).data(\"attr\");\n var v = $(this).text();\n if (v === \"true\") { v = true } else if (v === \"false\") { v = false }\n instance[attr] = v;\n });\n }\n });\n }", "$attachEventListeners() {\n\t\tlet action = (event, key) => {\n\t\t\ttry {\n\t\t\t\tlet target = event.composedPath()[0];\n\t\t\t\t// let target = event.target;\n\t\t\t\tlet action = target.closest(`[${key}]`);\n\t\t\t\t// console.log('EEE', key, event.composedPath(), target, action, 'called by', this, event)\n\t\t\t\t// console.log('PATH', event.composedPath().map(x => this.$1(x)))\n\t\t\t\tthis[action.getAttribute(key)](action, event, target)\n\t\t\t}\n\t\t\tcatch { }\n\t\t}\n\n\n\n\n\n\n\n\n\t}", "componentDidReceiveFocus() {}", "function applyChoiceListeners (selection) {\n selection\n .attr('animating', 'no')\n .on('mousedown', choiceMouseDown)\n .on('touchstart', choiceMouseDown)\n .on('mouseup', choiceMouseUp)\n .on('touchend', choiceMouseUp)\n }", "addHikeListener() {\n // We need to loop through the children of our list and attach a listener to each, remember though that children is a nodeList...not an array. So in order to use something like a forEach we need to convert it to an array.\n }", "metodoClick(){\n console.log(\"diste click\")\n }", "on(event, selector, actionOrArray) {\n const actionChain = chainActions(actionOrArray)\n const handler = (ev) => {\n const matchedTarget =\n selector instanceof Node ? selector : ev.target.closest(selector)\n if (matchedTarget && rootNode.contains(matchedTarget)) {\n ev.$target = matchedTarget\n actionChain(ev)\n }\n }\n\n rootNode.addEventListener(event, handler)\n }", "click_extra() {\r\n }", "function klikKlar() {\n document.querySelector(\"#knap\").addEventListener(\"click\", visResultat);\n}", "setUpEventListeners() {\n chrome.clipboard.onClipboardDataChanged.addListener(\n () => this.onClipboardDataChanged_());\n document.addEventListener('paste', evt => this.onClipboardPaste_(evt));\n document.addEventListener('copy', evt => this.onClipboardCopy_(evt));\n chrome.accessibilityPrivate.onSelectToSpeakKeysPressedChanged.addListener(\n (keysPressed) => {\n this.onKeysPressedChanged_(new Set(keysPressed));\n });\n chrome.accessibilityPrivate.onSelectToSpeakMouseChanged.addListener(\n (eventType, mouseX, mouseY) => {\n this.onMouseEvent_(eventType, mouseX, mouseY);\n });\n }", "function selectControlElements() {\n\t\t\teditor.on('click', function(e) {\n\t\t\t\tvar target = e.target;\n\n\t\t\t\t// Workaround for bug, http://bugs.webkit.org/show_bug.cgi?id=12250\n\t\t\t\t// WebKit can't even do simple things like selecting an image\n\t\t\t\tif (/^(IMG|HR)$/.test(target.nodeName) && dom.getContentEditableParent(target) !== \"false\") {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tselection.select(target);\n\t\t\t\t\teditor.nodeChanged();\n\t\t\t\t}\n\n\t\t\t\tif (target.nodeName == 'A' && dom.hasClass(target, 'mce-item-anchor')) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\tselection.select(target);\n\t\t\t\t}\n\t\t\t});\n\t\t}", "onChannelSelect(e) {\n e.preventDefault();\n\n let id = e.currentTarget.id; \n //console.log(`Chat Menu onChannelSelect: ${id}`);\n this.props.onSelect( id );\n }", "function addListeners() {\n //get the elements to add listener and change image\n let cardContainers = Array.from($(\".col-md-3\"));\n addEvents(cardContainers, 'image/jazz-music-rubber-duck.jpg', 'mouseover');\n addEvents(cardContainers, 'image/question.png', 'mouseout');\n }", "function makeSelectable(e) {\n e.setStyle('user-select', 'text');\n e.setStyle('-webkit-user-select', 'text');\n e.setStyle('-moz-user-select', 'text');\n e.setStyle('-o-user-select', 'text');\n e.setStyle('-khtml-user-select', 'text');\n }", "on_desklet_clicked(event) {\n this.retrieveEvents();\n }", "function getMoseDownFunc(eventName){return function(ev){ev=ev||window.event;ev.preventDefault?ev.preventDefault():ev.returnValue=false;ev.stopPropagation();var x=ev.pageX||ev.touches[0].pageX;var y=ev.pageY||ev.touches[0].pageY;_this.el.fire(eventName,{x:x,y:y,event:ev});};}// create the selection-rectangle and add the css-class", "function getMoseDownFunc(eventName){return function(ev){ev=ev||window.event;ev.preventDefault?ev.preventDefault():ev.returnValue=false;ev.stopPropagation();var x=ev.pageX||ev.touches[0].pageX;var y=ev.pageY||ev.touches[0].pageY;_this.el.fire(eventName,{x:x,y:y,event:ev});};}// create the selection-rectangle and add the css-class", "function selectingContactListener() {\n var contact = $('.contacts-box .user-contact-box');\n contact.click(changeContactClick);\n}" ]
[ "0.5952788", "0.59171784", "0.5897984", "0.5820845", "0.58073854", "0.5802608", "0.579302", "0.5788796", "0.57814574", "0.575411", "0.57522446", "0.5751956", "0.575139", "0.5744832", "0.5704703", "0.56829983", "0.5673291", "0.5646245", "0.56339574", "0.5618962", "0.5603665", "0.56028086", "0.56005555", "0.5587002", "0.5564619", "0.5561306", "0.5559831", "0.55590075", "0.5558607", "0.5550002", "0.5547286", "0.5545536", "0.55341285", "0.55341285", "0.55341285", "0.55341285", "0.5528379", "0.55210817", "0.55186087", "0.5512266", "0.5501513", "0.5497689", "0.5497248", "0.54863375", "0.5481373", "0.5474291", "0.54652613", "0.54552275", "0.54552275", "0.54552275", "0.54552275", "0.5448633", "0.5446399", "0.54459494", "0.5443346", "0.5437913", "0.54293066", "0.5406454", "0.5404286", "0.5394635", "0.53891", "0.5381692", "0.5381692", "0.5379705", "0.53791374", "0.5377279", "0.5375825", "0.53737855", "0.5361341", "0.5359908", "0.53550804", "0.5349544", "0.53460956", "0.53423345", "0.53420436", "0.53396595", "0.5338729", "0.53382474", "0.53326106", "0.53314537", "0.5327148", "0.5322146", "0.5321519", "0.5319128", "0.53166676", "0.5315861", "0.5311389", "0.53100985", "0.531004", "0.53000253", "0.52973586", "0.52972114", "0.52969897", "0.52941924", "0.5293217", "0.5293167", "0.5292922", "0.5291738", "0.5291518", "0.5291518", "0.52841467" ]
0.0
-1
current interactable being interacted with the target element of the interactable action that's ready to be fired on next move event keep track of added pointers pointerdown/mousedown/touchstart event previous action event
get pointerMoveTolerance() { return 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function CALCULATE_TOUCH_MOVE_OR_MOUSE_MOVE() {\r\n \r\n \r\n \r\n for (var x=0;x<BUTTONS.length;x++){\r\n if ( GLOBAL_CLICK.x > BUTTONS[x].POSITION.x && GLOBAL_CLICK.x <BUTTONS[x].POSITION.x + BUTTONS[x].DIMENSIONS.W() && GLOBAL_CLICK.y > BUTTONS[x].POSITION.y && GLOBAL_CLICK.y < BUTTONS[x].POSITION.y + BUTTONS[x].DIMENSIONS.H() ) {\r\n \r\n }\r\n else {\r\n \r\n }\r\n }\r\n\r\n \r\n/////////////////////////////////////\r\n// get object highlight on mouse over\r\n/////////////////////////////////////\r\n \r\nfor (var x=0;x<HOLDER.length;x++){\r\n\r\n\r\n // HOLDER[x].POSITION.x , HOLDER[x].POSITION.y , HOLDER[x].FI \r\n if (GET_DISTANCE_FROM_OBJECT.VALUE(x) < HOLDER[x].FI ) {\r\n\t\r\n HOLDER[x].HOVER = true;\r\n \r\n VOICE.SPEAK(\"Object \" + HOLDER[x].NAME + \" selected\");\r\n \r\nif (HOLDER[x].GLOBAL_STATE == \"PASIVE\" && GLOBAL_CLICK.CLICK_PRESSED == true ) {\r\n\r\n\r\n if ( HOLDER[x].roundedRect_X < 1.8 ) {\r\n HOLDER[x].roundedRect_X = HOLDER[x].roundedRect_X + 0.01;\r\n HOLDER[x].roundedRect_W = HOLDER[x].roundedRect_W + 0.02;\r\n }\r\n\r\n \r\n }\r\n \r\n \r\n }else {\r\n HOLDER[x].HOVER = false; \r\n }\r\n\r\n\r\n\r\n}\r\n\r\n\r\n\r\n DETECTED_COLOR = SURF.getImageData(GLOBAL_CLICK.x, GLOBAL_CLICK.y, 1, 1).data; \r\n\r\n \r\n \r\n \r\n \r\n }", "function Dragging_DetectActionEnd(event)\n{\n\t//trigger final move\n\t__DRAG_DATA.OnMove(event);\n\t//are we showing?\n\tif (__DRAG_DATA.IsShowing)\n\t{\n\t\t//remove it from the body\n\t\t__DRAG_DATA.DraggingClone.parentNode.removeChild(__DRAG_DATA.DraggingClone);\n\t}\n\t//has target?\n\tif (__DRAG_DATA.DragActionDestiny && __DRAG_DATA.DragActionDestiny.HTMLBorder && __DRAG_DATA.DragActionDestiny.HTMLBorder.parentNode)\n\t{\n\t\t//remove this\n\t\t__DRAG_DATA.DragActionDestiny.HTMLBorder.parentNode.removeChild(__DRAG_DATA.DragActionDestiny.HTMLBorder);\n\t\t__DRAG_DATA.DragActionDestiny.HTMLBorder = null;\n\t\t//we have a drag action destiny so trigger the action\n\t\t__SIMULATOR.ProcessEvent(new Event_Event(__DRAG_DATA.DragActionDestiny.InterpreterObject, __NEMESIS_EVENT_DRAGDROP, __DRAG_DATA.DragActionDestiny.Data, __DRAG_DATA.DragActionSource.InterpreterObject, 0, __DRAG_DATA.DragActionSource.Data));\n\t}\n\t//no target, are we in touch mode?\n\telse if (__BROWSER_IS_TOUCH_ENABLED)\n\t{\n\t\t//no drag destiny, check the time between clicks\n\t\tvar elapsedTime = new Date().getTime() - __DRAG_DATA.StartTime;\n\t\t//less 250ms?\n\t\tif (elapsedTime < 250)\n\t\t{\n\t\t\t//switch according to class\n\t\t\tswitch (__DRAG_DATA.DragActionSource.InterpreterObject.DataObject.Class)\n\t\t\t{\n\t\t\t\tcase __NEMESIS_CLASS_LINK:\n\t\t\t\tcase __NEMESIS_CLASS_LABEL:\n\t\t\t\tcase __NEMESIS_CLASS_UNKNOWN:\n\t\t\t\t\t//click on this\n\t\t\t\t\tBrowser_FireEvent(__DRAG_DATA.DragActionSource.InterpreterObject.HTML, __BROWSER_EVENT_CLICK);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n}", "function Dragging_DetectActionMove(event)\n{\n\t//block the event\n\tBrowser_BlockEvent(event);\n\t//running a timeout?\n\tif (__DRAG_DATA.SCROLL_TIMEOUT)\n\t{\n\t\t//cancel it\n\t\t__EVENTS_QUEUE.RemoveEvent(__DRAG_DATA.SCROLL_TIMEOUT);\n\t\t//and null it\n\t\t__DRAG_DATA.SCROLL_TIMEOUT = false;\n\t}\n\n\t//we showing?\n\tif (__DRAG_DATA.IsShowing)\n\t{\n\t\t//remove it from the body\n\t\t__DRAG_DATA.DraggingClone.parentNode.removeChild(__DRAG_DATA.DraggingClone);\n\t\t//mark it\n\t\t__DRAG_DATA.IsShowing = false;\n\t}\n\t//are we showing the target border?\n\tif (__DRAG_DATA.DragActionDestiny && __DRAG_DATA.DragActionDestiny.HTMLBorder && __DRAG_DATA.DragActionDestiny.HTMLBorder.parentNode)\n\t{\n\t\t//hide the border\n\t\t__DRAG_DATA.DragActionDestiny.HTMLBorder.parentNode.removeChild(__DRAG_DATA.DragActionDestiny.HTMLBorder);\n\t}\n\n\t//get current position\n\tvar currentPos = Browser_GetScreenCoordinates(event);\n\t//Calculate the current delta\n\tvar delta = { x: currentPos.x - __DRAG_DATA.StartPosition.x, y: currentPos.y - __DRAG_DATA.StartPosition.y };\n\t//amend for scale\n\tdelta.x /= __SIMULATOR.Scale * __SCREEN_RESOLUTION_MODIFIER;\n\tdelta.y /= __SIMULATOR.Scale * __SCREEN_RESOLUTION_MODIFIER;\n\t//more than 5px?\n\tif (Math.sqrt(delta.x * delta.x + delta.y * delta.y) > 5)\n\t{\n\t\t//update the object\n\t\t__DRAG_DATA.DraggingClone.style.left = __DRAG_DATA.DraggingClone_InitialPosition.x + delta.x + \"px\";\n\t\t__DRAG_DATA.DraggingClone.style.top = __DRAG_DATA.DraggingClone_InitialPosition.y + delta.y + \"px\";\n\t\t//trigger destiny detection\n\t\tDragging_DetectDragDestiny(event);\n\t\t//make it show\n\t\t__SIMULATOR.Interpreter.DisplayPanel.appendChild(__DRAG_DATA.DraggingClone);\n\t\t//mark it\n\t\t__DRAG_DATA.IsShowing = true;\n\t}\n\t//we arent showing and we arent dragging\n\telse\n\t{\n\t\t//terminate the drag action\n\t\t__DRAG_DATA.DragActionDestiny = null;\n\t}\n}", "_strikeActivePointerMove() {\n for (let i = 0; i < this._pointerActiveMoveCallbacks.length; i++) {\n let currentCallback = this._pointerActiveMoveCallbacks[i][0];\n\n currentCallback(this, event);\n }\n\n for (let i = 0; i < this._pointerActiveMoveCallbacks.length; i++) {\n if (this._pointerActiveMoveCallbacks[i][1])\n this._pointerActiveMoveCallbacks.splice(i--, 1);\n }\n }", "idle({\n pointerType,\n scope\n }) {\n for (const interaction of scope.interactions.list) {\n // if there's already a pointer held down\n if (interaction.pointers.length === 1) {\n const target = interaction.interactable; // don't add this pointer if there is a target interactable and it\n // isn't gesturable\n\n if (target && !(target.options.gesture && target.options.gesture.enabled)) {\n continue;\n }\n } // maximum of 2 pointers per interaction\n else if (interaction.pointers.length >= 2) {\n continue;\n }\n\n if (!interaction.interacting() && pointerType === interaction.pointerType) {\n return interaction;\n }\n }\n\n return null;\n }", "idle({\n pointerType,\n scope\n }) {\n for (const interaction of scope.interactions.list) {\n // if there's already a pointer held down\n if (interaction.pointers.length === 1) {\n const target = interaction.interactable; // don't add this pointer if there is a target interactable and it\n // isn't gesturable\n\n if (target && !(target.options.gesture && target.options.gesture.enabled)) {\n continue;\n }\n } // maximum of 2 pointers per interaction\n else if (interaction.pointers.length >= 2) {\n continue;\n }\n\n if (!interaction.interacting() && pointerType === interaction.pointerType) {\n return interaction;\n }\n }\n\n return null;\n }", "function touchMove(e) {\n $this = $(e.currentTarget);\n $this.data('callee2', touchMove);\n finalCoord.x = (e.originalEvent.targetTouches) ? e.originalEvent.targetTouches[0].pageX : e.pageX;\n finalCoord.y = (e.originalEvent.targetTouches) ? e.originalEvent.targetTouches[0].pageY : e.pageY;\n\n var swipedir;\n\n // We need to check if the element to which the event was bound contains a data-xthreshold | data-vthreshold:\n var ele_x_threshold = ($this.parent().data('xthreshold')) ? $this.parent().data('xthreshold') : $this.data('xthreshold'),\n ele_y_threshold = ($this.parent().data('ythreshold')) ? $this.parent().data('ythreshold') : $this.data('ythreshold'),\n h_threshold = (typeof ele_x_threshold !== 'undefined' && ele_x_threshold !== false && parseInt(ele_x_threshold)) ? parseInt(ele_x_threshold) : settings.swipe_h_threshold,\n v_threshold = (typeof ele_y_threshold !== 'undefined' && ele_y_threshold !== false && parseInt(ele_y_threshold)) ? parseInt(ele_y_threshold) : settings.swipe_v_threshold; \n \n if (originalCoord.y > finalCoord.y && (originalCoord.y - finalCoord.y > v_threshold)) {\n swipedir = 'swipeup';\n }\n if (originalCoord.x < finalCoord.x && (finalCoord.x - originalCoord.x > h_threshold)) {\n swipedir = 'swiperight';\n }\n if (originalCoord.y < finalCoord.y && (finalCoord.y - originalCoord.y > v_threshold)) {\n swipedir = 'swipedown';\n }\n if (originalCoord.x > finalCoord.x && (originalCoord.x - finalCoord.x > h_threshold)) {\n swipedir = 'swipeleft';\n }\n if (swipedir != undefined && started) {\n originalCoord.x = 0;\n originalCoord.y = 0;\n finalCoord.x = 0;\n finalCoord.y = 0;\n started = false;\n\n // Read event data into our endEvnt:\n var origEvent = e.originalEvent;\n var endEvnt = {\n 'position': {\n 'x': (settings.touch_capable) ? origEvent.touches[0].screenX : e.screenX,\n 'y': (settings.touch_capable) ? origEvent.touches[0].screenY : e.screenY\n },\n 'offset': {\n 'x': (settings.touch_capable) ? Math.round(origEvent.changedTouches[0].pageX - ($this.offset() ? $this.offset().left : 0)) : Math.round(e.pageX - ($this.offset() ? $this.offset().left : 0)),\n 'y': (settings.touch_capable) ? Math.round(origEvent.changedTouches[0].pageY - ($this.offset() ? $this.offset().top : 0)) : Math.round(e.pageY - ($this.offset() ? $this.offset().top : 0))\n },\n 'time': Date.now(),\n 'target': e.target\n };\n\n // Calculate the swipe amount (normalized):\n var xAmount = Math.abs(startEvnt.position.x - endEvnt.position.x),\n yAmount = Math.abs(startEvnt.position.y - endEvnt.position.y);\n\n var touchData = {\n 'startEvnt': startEvnt,\n 'endEvnt': endEvnt,\n 'direction': swipedir.replace('swipe', ''),\n 'xAmount': xAmount,\n 'yAmount': yAmount,\n 'duration': endEvnt.time - startEvnt.time\n };\n hasSwiped = true;\n $this.trigger('swipe', touchData).trigger(swipedir, touchData);\n }\n }", "function CALCULATE_TOUCH_OR_CLICK(){\r\n\r\n\r\n \r\n// \tvar KLIKER = new KLIKER_POINT(GLOBAL_CLICK.x,GLOBAL_CLICK.y);\r\n \r\n\t\r\n // for rect\r\n for (var x=0; x<GLOBAL_CONTAINER.length ; x++)\r\n {\r\n\r\n if ( GLOBAL_CLICK.x > GLOBAL_CONTAINER[x].X && GLOBAL_CLICK.x < GLOBAL_CONTAINER[x].X + GLOBAL_CONTAINER[x].W && GLOBAL_CLICK.y > GLOBAL_CONTAINER[x].Y && GLOBAL_CLICK.y < GLOBAL_CONTAINER[x].Y + GLOBAL_CONTAINER[x].H ) {\r\n GLOBAL_CONTAINER[x].EVENTS();\r\n \r\n }\r\n \r\n }\r\n \r\n \r\n\r\n//###########################################\r\n// CLICK ON PLAYER ACTION \r\n//###########################################\r\n //alert(GET_DISTANCE_FROM_PLAYER.VALUE());\r\n //if (GET_DISTANCE_FROM_PLAYER.VALUE() < PLAYER.RADIUS) {\r\n //console.log(\"PLAYER TOUCHED\");\r\n //VOICE.SPEAK(\"Your Energy level is \" + PLAYER.RADIUS.toFixed(2) + \" radius\");\r\n //}\r\n \r\n\r\n for (var x=0;x<BUTTONS.length;x++){\r\n if ( GLOBAL_CLICK.x > BUTTONS[x].POSITION.x && GLOBAL_CLICK.x <BUTTONS[x].POSITION.x + BUTTONS[x].DIMENSIONS.W() && GLOBAL_CLICK.y > BUTTONS[x].POSITION.y && GLOBAL_CLICK.y < BUTTONS[x].POSITION.y + BUTTONS[x].DIMENSIONS.H() ) {\r\n BUTTONS[x].TAP()\r\n }\r\n else {\r\n \r\n }\r\n } \r\n \r\n \r\n \r\n //0000000000000000\r\n //0000000000000000\r\n \r\n if (typeof window[\"JFT_FS\"] ==='undefined') {\r\n window[\"JFT_FS\"] = 0;\r\n //launchIntoFullscreen(document.documentElement);\r\n \r\n }\r\n \r\n \r\n }", "onActivePointerMove(callback, isOnce = false) {\n this._pointerActiveMove.push([\n callback,\n isOnce\n ]);\n }", "currentPointerPosition(e) {\n const [x, y] = Mouse.rel(e);\n return this.positionToSequence({\n xPos: x,\n yPos: y,\n });\n }", "function updatePointerState(ev,pointer){var point=getEventPoint(ev);var x=pointer.x=point.pageX;var y=pointer.y=point.pageY;pointer.distanceX=x-pointer.startX;pointer.distanceY=y-pointer.startY;pointer.distance=Math.sqrt(pointer.distanceX*pointer.distanceX+pointer.distanceY*pointer.distanceY);pointer.directionX=pointer.distanceX>0?'right':pointer.distanceX<0?'left':'';pointer.directionY=pointer.distanceY>0?'down':pointer.distanceY<0?'up':'';pointer.duration=+Date.now()-pointer.startTime;pointer.velocityX=pointer.distanceX/pointer.duration;pointer.velocityY=pointer.distanceY/pointer.duration;}", "interactsWith(target) {\n let result = false\n const { sTouches } = TouchEvent\n this.getTouches(target, null, sTouches)\n\n for (let i = sTouches.length - 1; i >= 0; --i) {\n if (TouchEvent.sTouches[i].phase !== TouchPhase.ENDED) {\n result = true\n break\n }\n }\n\n sTouches.length = 0\n return result\n }", "attachEvents() {\n // Keep track pointer hold and dragging distance\n this.pointerDown = false;\n this.drag = {\n startX: 0,\n endX: 0,\n startY: 0,\n letItGo: null,\n preventClick: false,\n transformX: 0,\n transformY: 0\n };\n }", "function gestureMove(ev){if(!pointer||!typesMatch(ev,pointer))return;updatePointerState(ev,pointer);runHandlers('move',ev);}", "function getCurPos() {\n let xPos = event.offsetX;\n let yPos = event.offsetY;\n //for each selected==true ? card chang its position : nothing\n player.cards.onHand.forEach(element => {\n if (element.selected) {\n element.speaking = false;\n let distanceX = element.width / 2;\n let distanceY = element.height / 2;\n element.x = xPos - distanceX;\n element.y = yPos - distanceY;\n }\n });\n}", "function buildPukiDrag(){\t\n\tfor(n=0;n<animation_arr.length;n++){\n\t\tif(animation_arr[n].interact){\n\t\t\tvar targetAnimate = $.pukiAnimation[animation_arr[n].name];\n\t\t\ttargetAnimate.cursor = \"pointer\";\n\t\t\ttargetAnimate.addEventListener(\"mousedown\", function(evt) {\n\t\t\t\ttogglePukiDragEvent(evt, 'drag')\n\t\t\t});\n\t\t\ttargetAnimate.addEventListener(\"pressmove\", function(evt) {\n\t\t\t\ttogglePukiDragEvent(evt, 'move')\n\t\t\t});\n\t\t\ttargetAnimate.addEventListener(\"pressup\", function(evt) {\n\t\t\t\ttogglePukiDragEvent(evt, 'release')\n\t\t\t});\n\t\t}\n\t}\n}", "pointerUp(pointer, event, eventTarget, curEventTarget) {\n let pointerIndex = this.getPointerIndex(pointer);\n\n if (pointerIndex === -1) {\n pointerIndex = this.updatePointer(pointer, event, eventTarget, false);\n }\n\n const type = /cancel$/i.test(event.type) ? 'cancel' : 'up';\n\n this._scopeFire(`interactions:${type}`, {\n pointer,\n pointerIndex,\n pointerInfo: this.pointers[pointerIndex],\n event,\n eventTarget,\n type: type,\n curEventTarget,\n interaction: this\n });\n\n if (!this.simulation) {\n this.end(event);\n }\n\n this.removePointer(pointer, event);\n }", "externalActiveMouseMove() {\n //TODO: check for mouse button active\n this._strikeActiveMouseMove();\n this._localPointer._mouseX = this.getPointer()._mouseX;\n this._localPointer._mouseY = this.getPointer()._mouseY;\n }", "@action setMoveTarget() {\n this.act = (nextLocation) => {\n this.clearHit()\n this.moveXAndY(nextLocation.x, nextLocation.y)\n this.handleEffects()\n }\n if (this.movementId) { // if already moving, continue in a new direction\n this.startMovement()\n }\n }", "down( event ) {\n sceneryLog && sceneryLog.InputListener && sceneryLog.InputListener( 'MultiListener down' );\n\n if ( event.pointer instanceof Mouse && event.domEvent.button !== this._mouseButton ) {\n sceneryLog && sceneryLog.InputListener && sceneryLog.InputListener( 'MultiListener abort: wrong mouse button' );\n return;\n }\n\n // clears the flag for MultiListener behavior\n this._interrupted = false;\n\n let pressTrail;\n if ( !_.includes( event.trail.nodes, this._targetNode ) ) {\n\n // if the target Node is not in the event trail, we assume that the event went to the\n // Display or the root Node of the scene graph - this will throw an assertion if\n // there are more than one trails found\n pressTrail = this._targetNode.getUniqueTrailTo( event.target );\n }\n else {\n pressTrail = event.trail.subtrailTo( this._targetNode, false );\n }\n assert && assert( _.includes( pressTrail.nodes, this._targetNode ), 'targetNode must be in the Trail for Press' );\n\n sceneryLog && sceneryLog.InputListener && sceneryLog.push();\n const press = new Press( event.pointer, pressTrail );\n\n if ( !this._allowMoveInterruption && !this._allowMultitouchInterruption ) {\n\n // most restrictive case, only allow presses if the pointer is not attached - Presses\n // are never added as background presses in this case because interruption is never allowed\n if ( !event.pointer.isAttached() ) {\n sceneryLog && sceneryLog.InputListener && sceneryLog.InputListener( 'MultiListener unattached, using press' );\n this.addPress( press );\n }\n }\n else {\n\n // we allow some form of interruption, add as background presses, and we will decide if they\n // should be converted to presses and interrupt other listeners on move event\n sceneryLog && sceneryLog.InputListener && sceneryLog.InputListener( 'MultiListener attached, adding background press' );\n this.addBackgroundPress( press );\n }\n\n sceneryLog && sceneryLog.InputListener && sceneryLog.pop();\n }", "pointerUp(pointer, event, eventTarget, curEventTarget) {\n let pointerIndex = this.getPointerIndex(pointer);\n\n if (pointerIndex === -1) {\n pointerIndex = this.updatePointer(pointer, event, eventTarget, false);\n }\n\n const type = /cancel$/i.test(event.type) ? 'cancel' : 'up';\n\n this._scopeFire(`interactions:${type}`, {\n pointer,\n pointerIndex,\n pointerInfo: this.pointers[pointerIndex],\n event,\n eventTarget,\n type: type,\n curEventTarget,\n interaction: this\n });\n\n if (!this.simulation) {\n this.end(event);\n }\n\n this.pointerIsDown = false;\n this.removePointer(pointer, event);\n }", "function f(e){if(e.target===Q.reference){if(Q.props.interactive){if(!e.relatedTarget)return;if(pt(e.relatedTarget,Me.POPPER))return}s()}}", "function dragStart(e) {\n //setting the initial position of our pointer\n if (e.type === \"touchstart\") { // is it a touch event?\n initialX = e.touches[0].clientX - xOffset;\n initialY = e.touches[0].clientY - yOffset;\n } else { // if not...\n initialX = e.clientX - xOffset;\n initialY = e.clientY - yOffset;\n }\n\n //check if the element we are clicking on is the element we would like to drag\n //Why? we are listening for our various mouse and touch events on the container, NOT the element we are dragging\n if (e.target === dragItem) {\n active = true;\n }\n }", "doForKey(helper) {\n if (helper.clicked === true) {\n //first if checks for click, ifs outside of that one are for hover elements\n if (this.interactionKey === \"boat\") {\n if (this.keyAction.interactedObject === \"none\") {\n this.keyAction.parameterNetwork.moved = true;\n this.moveCube();\n }\n this.keyAction.interactedObject = \"boat\";\n } else if (this.interactionKey === \"house\") {\n if (this.keyAction.interactedObject === \"none\") {\n this.keyAction.parameterNetwork.moved = true;\n this.moveCube();\n }\n this.keyAction.interactedObject = \"port\";\n } else if (this.interactionKey === \"net\") {\n if (this.keyAction.interactedObject === \"none\") {\n this.keyAction.parameterNetwork.moved = true;\n this.moveCube();\n }\n this.keyAction.interactedObject = \"nets\";\n } else if (this.interactionKey === \"startbutton\") {\n helper.screenState = \"game\";\n } else if (this.interactionKey === \"tutorialbutton\") {\n helper.screenState = \"tutorial\";\n } else if (this.interactionKey === \"exittutorialbutton\") {\n helper.screenState = \"start\";\n } else if (this.interactionKey === \"exitgamebutton\") {\n helper.screenState = \"exitPopUp\";\n } else if (this.interactionKey === \"homebutton\") {\n helper.screenState = \"start\";\n } else if (this.interactionKey === \"backtogamebutton\") {\n helper.screenState = \"game\";\n } else if (this.interactionKey === \"replaybutton\") {\n helper.screenState = \"start\";\n } else if (this.interactionKey === \"scrollupbutton\") {\n scroll(0, 0);\n } else if (this.interactionKey === \"scrolldownbutton\") {\n scroll(0, 1000);\n } else if (this.interactionKey === \"chooseParameterFishingQuote\") {\n this.keyAction.shownParameterScreen = \"fishingQuote\";\n } else if (this.interactionKey === \"chooseParameterSubsidies\") {\n this.keyAction.shownParameterScreen = \"subsidies\";\n } else if (this.interactionKey === \"chooseParameterPortControl\") {\n this.keyAction.shownParameterScreen = \"portControl\";\n } else if (this.interactionKey === \"chooseParameterPeriod\") {\n this.keyAction.shownParameterScreen = \"period\";\n } else if (this.interactionKey === \"chooseParameterNets\") {\n this.keyAction.shownParameterScreen = \"nets\";\n } else if (this.interactionKey === \"chooseParameterAntiBait\") {\n this.keyAction.shownParameterScreen = \"antiBait\";\n } else if (this.interactionKey === \"chooseParameterProtectionZone\") {\n this.keyAction.shownParameterScreen = \"protectionZone\";\n } else if (this.interactionKey === \"changeFangquote\") {\n if (\n this.keyAction.parameterBox.clickedFishingQuote ===\n this.keyAction.parameterBox.chosenIndex &&\n this.keyAction.parameterBox.clickedFishingQuote > 0\n ) {\n this.keyAction.parameterBox.clickedFishingQuote -= 1;\n } else {\n this.keyAction.parameterBox.clickedFishingQuote =\n this.keyAction.parameterBox.chosenIndex;\n }\n } else if (this.interactionKey === \"changePortControl\") {\n if (\n this.keyAction.parameterBox.clickedPortControl ===\n this.keyAction.parameterBox.chosenIndex &&\n this.keyAction.parameterBox.clickedPortControl > 0\n ) {\n this.keyAction.parameterBox.clickedPortControl -= 1;\n } else {\n this.keyAction.parameterBox.clickedPortControl =\n this.keyAction.parameterBox.chosenIndex;\n }\n } else if (this.interactionKey === \"changeSubsidies\") {\n if (\n this.keyAction.parameterBox.clickedSubsidies ===\n this.keyAction.parameterBox.chosenIndex &&\n this.keyAction.parameterBox.clickedSubsidies > 0\n ) {\n this.keyAction.parameterBox.clickedSubsidies -= 1;\n } else {\n this.keyAction.parameterBox.clickedSubsidies =\n this.keyAction.parameterBox.chosenIndex;\n }\n } else if (this.interactionKey === \"changeAntiBait\") {\n if (\n this.keyAction.parameterBox.clickedAntiBait ===\n this.keyAction.parameterBox.chosenIndex &&\n this.keyAction.parameterBox.clickedAntiBait > 0\n ) {\n this.keyAction.parameterBox.clickedAntiBait -= 1;\n } else {\n this.keyAction.parameterBox.clickedAntiBait =\n this.keyAction.parameterBox.chosenIndex;\n }\n } else if (this.interactionKey === \"changeNets\") {\n if (\n this.keyAction.parameterBox.clickedNets ===\n this.keyAction.parameterBox.chosenIndex &&\n this.keyAction.parameterBox.clickedNets > 0\n ) {\n this.keyAction.parameterBox.clickedNets -= 1;\n } else {\n this.keyAction.parameterBox.clickedNets =\n this.keyAction.parameterBox.chosenIndex;\n }\n } else if (this.interactionKey === \"changeProtectionZone\") {\n if (\n this.keyAction.parameterBox.clickedProtectionZone ===\n this.keyAction.parameterBox.chosenIndex &&\n this.keyAction.parameterBox.clickedProtectionZone > 0\n ) {\n this.keyAction.parameterBox.clickedProtectionZone -= 1;\n } else {\n this.keyAction.parameterBox.clickedProtectionZone =\n this.keyAction.parameterBox.chosenIndex;\n }\n } else if (this.interactionKey === \"periodUpButton\") {\n if (this.keyAction.parameterBox.clickedPeriod < 12) {\n this.keyAction.parameterBox.clickedPeriod += 1;\n } else {\n this.keyAction.parameterBox.clickedPeriod = 12;\n }\n } else if (this.interactionKey === \"periodDownButton\") {\n if (this.keyAction.parameterBox.clickedPeriod > 2) {\n this.keyAction.parameterBox.clickedPeriod -= 1;\n } else {\n this.keyAction.parameterBox.clickedPeriod = 1;\n }\n } else if (this.keyAction.interactedObject != \"none\") {\n this.keyAction.parameterNetwork.moved = false;\n this.moveCubeBack();\n this.keyAction.interactedObject = \"none\";\n }\n helper.clicked = false;\n }\n\n if (this.interactionKey === \"house\") {\n this.hover.house = true;\n } else {\n this.hover.house = false;\n }\n\n if (this.interactionKey === \"net\") {\n this.hover.nets = true;\n } else {\n this.hover.nets = false;\n }\n\n if (this.interactionKey === \"boat\") {\n this.hover.boat = true;\n } else {\n this.hover.boat = false;\n }\n }", "CheckPointerAction(pointerPos) {\n\n if (!this.isActionLocked) {\n this.isActionLocked = true;\n if (this.isPointerOver(pointerPos)) {\n this.isPushed = true;\n }\n }\n\n }", "interact() {\n if (this.previousCollision !== undefined)\n game.getPlayer.input.handleInteraction(this.previousCollision);\n this.previousCollision = undefined;\n }", "onTouchMove(e) {\n this.justMoved = true;\n this.lastMove = new Vector(e.pageX, e.pageY).subtract(this.offset).divide(this.resMult);\n }", "getMove() {\n return this.nextAction;\n }", "onMove (evt) {\n if (!this.target)\n return;\n\n this.currentX = evt.pageX || evt.touches[0].pageX;\n }", "attachPointerEvents() {\n var paneElement = this._pane.getContentElement();\n paneElement.addListener(\"pointerdown\", this.handlePointerDown, this);\n paneElement.addListener(\"tap\", this.handleTap, this);\n paneElement.addListener(\"pointerover\", this.handlePointerOver, this);\n paneElement.addListener(\"pointermove\", this.handlePointerMove, this);\n paneElement.addListener(\"losecapture\", this.handleLoseCapture, this);\n }", "onActivePointerMove(callback, isOnce = false) {\n if (this._hoverMode === HOVER_MODE_EXTERNAL) {\n this._pointerActiveMoveCallbacks.push([\n callback,\n isOnce\n ]);\n\n return;\n }\n\n this._landingFrame.onActivePointerMove((pointer) => {\n if ((pointer.x > this.getAbsCoordX() && pointer.x < this.getAbsCoordX() + this.getComponentWidth()) &&\n (pointer.y > this.getAbsCoordY() && pointer.y < this.getAbsCoordY() + this.getComponentHeight())\n ) {\n this._localPointer.x = -this.getAbsCoordX() + pointer.x;\n this._localPointer.y = -this.getAbsCoordY() + pointer.y;\n callback();\n }\n }, isOnce);\n }", "get isMovingUp () {\n return this.pointers.reduce((previous, pointer) => {return (previous || pointer.isMovingUp)}, false);\n }", "function makeMove(e) {\n if(e.target.id >= 1 && e.target.id <= 9 && !e.target.classList.contains('selected')) {\n //Increment selected fields counter\n logic.incrementCount();\n //Save selected field to data array\n logic.addField(e.target.id-1);\n //Update UI\n e.target.classList.add('selected');\n e.target.removeEventListener('click', e); \n logic.getActivePlayer() === 1 ? e.target.innerText = 'O' : e.target.innerText = 'X';\n afterMove();\n } \n }", "function activeMousemove(e) {\n\t\tvar timer = e.data.timer;\n\n\t\te.data.touch = e;\n\t\te.data.timeStamp = e.timeStamp;\n\t\ttimer.kick();\n\t}", "onPointerMove(e) {\n\t\tif (this.mouseMoved < dragThreshold) {\n\t\t\tthis.mouseMoved += 1;\n\t\t\treturn;\n\t\t}\n\n\t\tif (!draggingEl) {\n\t\t\temit(this.el, 'dragstart');\n\n\t\t\tdraggingEl = this.el;\n\t\t\tthis.$clonedEl = createDragShadow(this.el, this.shadowClass);\n\n\t\t\t// for auto-scroll\n\t\t\tthis.scrollParent.addEventListener(events.enter, this.onPointerEnter, { passive: true });\n\t\t\tthis.scrollParent.addEventListener(events.leave, this.onPointerLeave, { passive: true });\n\t\t\tthis.onPointerEnter();\n\t\t}\n\n\t\tthis.$clonedEl.moveTo(e);\n\t\temit(this.el, 'drag');\n\n\t\t// for auto-scroll\n\t\tconst scrollRect = this.scrollParent.getBoundingClientRect();\n\t\t// is the mouse closer to the top or bottom edge of the scroll parent?\n\t\tconst topDist = Math.abs(scrollRect.top - e.clientY);\n\t\tconst bottomDist = Math.abs(scrollRect.bottom - e.clientY);\n\t\t// should we scroll up, or down?\n\t\tconst speedDirection = topDist < bottomDist ? -1 : 1;\n\t\t// should we scroll at 3px per frame, or 0px per frame (i.e. pause auto-scroll)?\n\t\tconst speedMagnitude = Math.min(topDist, bottomDist) < 40 ? 3 : 0;\n\t\tthis.scrollSpeed = speedDirection * speedMagnitude;\n\t}", "clickablePressed(clickableName) {\n // this will be = the clickable pressed\n // go through each row, look for a match to the current state\n for (let i = 0; i < this.interactionTable.getRowCount(); i++) {\n\n // the .name property of a function will convert function to string for comparison\n if(this.currentStateName === this.interactionTable.getString(i, 'CurrentState') ) {\n // now, look for a match with the key typed, converting it to a string\n if( this.interactionTable.getString(i, 'ClickableName') === clickableName ) {\n // if a match, set the drawFunction to the next state, eval() converts\n // string to function\n this.changeState(this.interactionTable.getString(i, 'NextState') );\n break;\n }\n }\n }\n }", "onElementMouseMove(event) {}", "function cust_swipeEvent(evnt, swipedirection) {\n //f_log(evnt.clientX+\", \"+evnt.clientY)\n}", "handleSwipeInput(type, touch) {\n // If infinity mode is enabled:\n // Set flag that a tap was double pressed\n if (this.state.modeInfinity) { \n this.setState({infinityAction: true})\n }\n\n\n // clear touch list\n if (type === 'touchstart') {\n this.input.touches = [];\n }\n\n // add to touch list\n if (type === 'touchmove') {\n let { clientX, clientY } = touch;\n this.input.touches.push({ x: clientX, y: clientY });\n }\n\n // get user intention\n if (type === 'touchend') {\n let { touches } = this.input;\n let result = {};\n\n if (touches.length) {\n\n // get direction from touches\n result = this.input.touches\n .map((touch, idx, arr) => {\n // collect diffs\n let prev = arr[idx - 1] || arr[0];\n return {\n x: touch.x,\n y: touch.y,\n dx: touch.x - prev.x,\n dy: touch.y - prev.y\n }\n })\n .reduce((direction, diff) => {\n // sum the diffs\n direction.dx += diff.dx;\n direction.dy += diff.dy;\n\n return direction;\n });\n\n // get direction\n let swipesX = Math.abs(result.dx) > Math.abs(result.dy);\n let swipesY = Math.abs(result.dy) > Math.abs(result.dx);\n\n if (swipesX) {\n if (result.dx > 0) {\n // swipe right: shift right\n this.queueTick(0, () => this.shiftPieceRight());\n } else {\n // swipe left: shift left\n this.queueTick(0, () => this.shiftPieceLeft());\n }\n }\n\n if (swipesY) {\n if (result.dy > 0) {\n // swipe down: drop\n this.dropPiece();\n } else {\n // swipe up: rotate\n // this.queueTick(0, () => this.rotatePiece());\n }\n }\n }\n }\n }", "nextStep() {\n const me = this;\n\n // Only perform step if in view and not scrolling\n if (me.shouldPause) {\n return;\n }\n\n if (me.currentStep === me.steps.length) {\n if (me.repeat) {\n me.currentStep = 0;\n } else {\n return me.abort(true);\n }\n }\n\n // First step, signal to let demo initialize stuff\n if (me.currentStep === 0) {\n me.trigger('initialize');\n }\n\n const mouse = me.mouse,\n step = me.normalizeStep(me.steps[me.currentStep++]),\n target = me.getTarget(step),\n action = step.action;\n\n if (target && action) {\n mouse.className = 'simulated-mouse';\n\n if (action === 'mousemove') {\n me.handleMouseMove(step, target);\n } else {\n // First move mouse into position\n if (target !== me.prevTarget) {\n const rect = Rectangle.from(target, me.outerElement);\n mouse.style.left = rect.x + rect.width / 2 + 'px';\n mouse.style.top = rect.y + rect.height / 2 + 'px';\n }\n\n if (action === 'mousedown') {\n me.mouseDown = true;\n }\n\n if (action === 'mouseup') {\n me.mouseDown = false;\n }\n\n // Then trigger action\n me.timeoutId = me.setTimeout(\n () => {\n me.prevTarget = target;\n\n // Animate click etc.\n mouse.classList.add(action);\n\n if (action === 'type') {\n const field = IdHelper.fromElement(target),\n parts = step.text.split('|');\n\n field.value = parts[parts.length === 1 || field.value != parts[0] ? 0 : 1];\n } else {\n me.triggerEvent(target, action);\n }\n },\n action === 'type' ? 100 : 550\n );\n }\n }\n }", "function Interaction() {\n var _this = \n // Call super\n _super.call(this) || this;\n /**\n * An indicator of global events were already initialized.\n */\n _this._globalEventsAdded = false;\n /**\n * Holds which mouse event listeners to use.\n */\n _this._pointerEvents = {\n \"pointerdown\": \"mousedown\",\n \"pointerup\": \"mouseup\",\n \"pointermove\": \"mousemove\",\n \"pointercancel\": \"mouseup\",\n \"pointerover\": \"mouseover\",\n \"pointerout\": \"mouseout\",\n \"wheel\": \"wheel\"\n };\n /**\n * Indicates if Interaction should use only \"pointer\" type events, like\n * \"pointermove\", available in all modern browsers, ignoring \"legacy\"\n * events, like \"touchmove\".\n */\n _this._usePointerEventsOnly = false;\n /**\n * Use only touch events (for touch only devices such as tablets and phones)\n */\n _this._useTouchEventsOnly = false;\n /**\n * Add special hover events. Normally, touch device tap will also simulate\n * hover event. On some devices (ahem iOS) we want to prevent that so that\n * over/out events are not duplicated.\n */\n _this._addHoverEvents = true;\n /**\n * Indicates if passive mode options is supported by this browser.\n */\n _this._passiveSupported = false;\n /**\n * Holds list of delayed events\n */\n _this._delayedEvents = { out: [] };\n /**\n * List of objects that current have a pointer hovered over them.\n */\n _this.overObjects = new _utils_List__WEBPACK_IMPORTED_MODULE_2__[\"List\"]();\n /**\n * List of objects that currently has a pressed pointer.\n */\n _this.downObjects = new _utils_List__WEBPACK_IMPORTED_MODULE_2__[\"List\"]();\n /**\n * List of objects that need mouse position to be reported to them.\n */\n _this.trackedObjects = new _utils_List__WEBPACK_IMPORTED_MODULE_2__[\"List\"]();\n /**\n * List of objects that are currently being dragged.\n */\n _this.transformedObjects = new _utils_List__WEBPACK_IMPORTED_MODULE_2__[\"List\"]();\n /**\n * Holds all known pointers.\n */\n _this.pointers = new _utils_Dictionary__WEBPACK_IMPORTED_MODULE_7__[\"Dictionary\"]();\n /**\n * Inertia options that need to be applied to after element drag, if it's\n * `inert = true`.\n *\n * This is just a default, which can and probably will be overridden by\n * actual elements.\n */\n _this.inertiaOptions = new _utils_Dictionary__WEBPACK_IMPORTED_MODULE_7__[\"Dictionary\"]();\n /**\n * Default options for click events. These can be overridden in\n * [[InteractionObject]].\n */\n _this.hitOptions = {\n //\"holdTime\": 1000,\n \"doubleHitTime\": 300,\n //\"delayFirstHit\": false,\n \"hitTolerance\": 10,\n \"noFocus\": true\n };\n /**\n * Default options for hover events. These can be overridden in\n * [[InteractionObject]].\n */\n _this.hoverOptions = {\n \"touchOutBehavior\": \"leave\",\n \"touchOutDelay\": 1000\n };\n /**\n * Default options for detecting a swipe gesture. These can be overridden in\n * [[InteractionObject]].\n */\n _this.swipeOptions = {\n \"time\": 500,\n \"verticalThreshold\": 75,\n \"horizontalThreshold\": 30\n };\n /**\n * Default options for keyboard operations. These can be overridden in\n * [[InteractionObject]].\n */\n _this.keyboardOptions = {\n \"speed\": 0.1,\n \"accelleration\": 1.2,\n \"accellerationDelay\": 2000\n };\n /**\n * Default options for keyboard operations. These can be overridden in\n * [[InteractionObject]].\n *\n * @since 4.5.14\n */\n _this.mouseOptions = {\n \"sensitivity\": 1\n };\n // Set class name\n _this.className = \"Interaction\";\n // Create InteractionObject for <body>\n _this.body = _this.getInteraction(document.body);\n _this._disposers.push(_this.body);\n // Detect browser capabilities and determine what event listeners to use\n if (window.hasOwnProperty(\"PointerEvent\")) {\n // IE10+/Edge without touch controls enabled\n _this._pointerEvents.pointerdown = \"pointerdown\";\n _this._pointerEvents.pointerup = \"pointerup\";\n _this._pointerEvents.pointermove = \"pointermove\";\n _this._pointerEvents.pointercancel = \"pointercancel\";\n _this._pointerEvents.pointerover = \"pointerover\";\n _this._pointerEvents.pointerout = \"pointerout\";\n //this._usePointerEventsOnly = true;\n }\n else if (window.hasOwnProperty(\"MSPointerEvent\")) {\n // IE9\n _this._pointerEvents.pointerdown = \"MSPointerDown\";\n _this._pointerEvents.pointerup = \"MSPointerUp\";\n _this._pointerEvents.pointermove = \"MSPointerMove\";\n _this._pointerEvents.pointercancel = \"MSPointerUp\";\n _this._pointerEvents.pointerover = \"MSPointerOver\";\n _this._pointerEvents.pointerout = \"MSPointerOut\";\n //this._usePointerEventsOnly = true;\n }\n else if ((typeof matchMedia !== \"undefined\") && matchMedia('(pointer:fine)').matches) {\n // This is only for Safari as it does not support PointerEvent\n // Do nothing and let it use regular `mouse*` events\n // Hi Apple ;)\n // Additionally disable hover events for iOS devices\n if ('ontouchstart' in window) {\n _this._addHoverEvents = false;\n _this._useTouchEventsOnly = true;\n }\n }\n else if (window.navigator.userAgent.match(/MSIE /)) {\n // Oh looky, an MSIE that does not support PointerEvent. Hi granpa IE9!\n _this._usePointerEventsOnly = true;\n }\n else if (_this.fullFF()) {\n // Old FF, let's use regular events.\n // (Newer FFs would be detected by the PointerEvent availability check)\n _this._usePointerEventsOnly = true;\n }\n else {\n // Uses defaults for normal browsers\n // We also assume that this must be a touch device that does not have\n // any pointer events\n _this._useTouchEventsOnly = true;\n }\n // Detect if device has a mouse\n // This is turning out to be not reliable\n // @todo remove\n /*if (!window.navigator.msPointerEnabled && (typeof matchMedia !== \"undefined\") && !matchMedia('(pointer:fine)').matches && !this.fullFF()) {\n this._useTouchEventsOnly = true;\n }*/\n // Detect proper mouse wheel events\n if (\"onwheel\" in document.createElement(\"div\")) {\n // Modern browsers\n _this._pointerEvents.wheel = \"wheel\";\n }\n else if (_utils_Type__WEBPACK_IMPORTED_MODULE_16__[\"hasValue\"](document.onmousewheel)) {\n // Webkit and IE support at least \"mousewheel\"\n _this._pointerEvents.wheel = \"mousewheel\";\n }\n // Set up default inertia options\n _this.inertiaOptions.setKey(\"move\", {\n \"time\": 100,\n \"duration\": 500,\n \"factor\": 1,\n \"easing\": _utils_Ease__WEBPACK_IMPORTED_MODULE_12__[\"polyOut3\"]\n });\n _this.inertiaOptions.setKey(\"resize\", {\n \"time\": 100,\n \"duration\": 500,\n \"factor\": 1,\n \"easing\": _utils_Ease__WEBPACK_IMPORTED_MODULE_12__[\"polyOut3\"]\n });\n // Set the passive mode support\n _this._passiveSupported = Interaction.passiveSupported;\n // Apply theme\n _this.applyTheme();\n return _this;\n }", "function CALCULATE_TOUCH_DOWN_OR_MOUSE_DOWN() {\r\n \r\nif (GLOBAL_CLICK.CLICK_TYPE == \"right_button\") {\r\n \r\nfor (var x=0;x<HOLDER.length;x++){\r\n \r\n\tif (GET_DISTANCE_FROM_OBJECT.VALUE(x) < HOLDER[x].FI ) {\r\n\t\r\n\tHOLDER[x].FOKUS('R');\r\n HOLDER[x].SHOW_MENU();\r\n GLOBAL_CLICK.CLICK_PRESSED = true;\r\n \r\n E(\"NAME_OF_SELECTED\").value = HOLDER[x].NAME;\r\n E(\"NAME_OF_SELECTED\").dataset.index_ = x;\r\n \r\n VOICE.SPEAK(\"Object \" + HOLDER[x].NAME + \" SELECTED . \");\r\n \r\n }else {\r\n HOLDER[x].HIDE_MENU(x);\r\n }\r\n \r\n}\r\n/////////////\r\n//right\r\n//////////// \r\n}\r\nelse if (GLOBAL_CLICK.CLICK_TYPE == \"left_button\"){\r\n\r\nfor (var x=0;x<HOLDER.length;x++){\r\n if (GET_DISTANCE_FROM_OBJECT.VALUE(x) < HOLDER[x].FI ) {\r\n \r\n\t\r\n\tHOLDER[x].FOKUS('L');\r\n\t HOLDER[x].SHOW_MENU('L');\r\n HOLDER[x].SELECTED = true;\r\n \r\n \r\n \r\n \r\n GLOBAL_CLICK.CLICK_PRESSED = true;\r\n \r\n \r\n \r\n E(\"NAME_OF_SELECTED\").value = HOLDER[x].NAME;\r\n E(\"NAME_OF_SELECTED\").dataset.index_ = x;\r\n \r\n //VOICE.SPEAK(\"Object \" + HOLDER[x].NAME + \" SELECTED . \");\r\n \r\n }else {\r\n \r\n HOLDER[x].HIDE_MENU(x);\r\n \r\n \r\n }\r\n }\r\n}\r\n \r\n\r\n\r\n\r\n\r\n }", "function offensive_move() {\n \n if ($(cells[left_upper_cell]).hasClass(machine_clicked)) {\n if ($(cells[upper_center_cell]).hasClass(machine_clicked) && $(cells[right_upper_cell]).hasClass(empty_cell)) return right_upper_cell;\n if ($(cells[right_upper_cell]).hasClass(machine_clicked) && $(cells[upper_center_cell]).hasClass(empty_cell)) return upper_center_cell;\n if ($(cells[left_center_cell]).hasClass(machine_clicked) && $(cells[left_lower_cell]).hasClass(empty_cell)) return left_lower_cell;\n\n \n if ($(cells[left_lower_cell]).hasClass(machine_clicked) && $(cells[left_center_cell]).hasClass(empty_cell)) return left_center_cell;\n if ($(cells[center_cell]).hasClass(machine_clicked) && $(cells[right_lower_cell]).hasClass(empty_cell)) return right_lower_cell;\n if ($(cells[right_lower_cell]).hasClass(machine_clicked) && $(cells[center_cell]).hasClass(empty_cell)) return center_cell;\n }\n\n if ($(cells[upper_center_cell]).hasClass(machine_clicked)) {\n if ($(cells[center_cell]).hasClass(machine_clicked) && $(cells[lower_center_cell]).hasClass(empty_cell)) return lower_center_cell;\n if ($(cells[lower_center_cell]).hasClass(machine_clicked) && $(cells[center_cell]).hasClass(empty_cell)) return center_cell;\n }\n\n if ($(cells[left_center_cell]).hasClass(machine_clicked)) {\n if ($(cells[center_cell]).hasClass(machine_clicked) && $(cells[right_center_cell]).hasClass(empty_cell)) return right_center_cell;\n if ($(cells[right_center_cell]).hasClass(machine_clicked) && $(cells[center_cell]).hasClass(empty_cell)) return center_cell;\n }\n\n if ($(cells[right_upper_cell]).hasClass(machine_clicked)) {\n if ($(cells[center_cell]).hasClass(machine_clicked) && $(cells[left_lower_cell]).hasClass(empty_cell)) return left_lower_cell;\n if ($(cells[left_lower_cell]).hasClass(machine_clicked) && $(cells[center_cell]).hasClass(empty_cell)) return center_cell;\n if ($(cells[right_center_cell]).hasClass(machine_clicked) && $(cells[right_lower_cell]).hasClass(empty_cell)) return right_lower_cell;\n if ($(cells[right_lower_cell]).hasClass(machine_clicked) && $(cells[right_center_cell]).hasClass(empty_cell)) return right_center_cell;\n }\n\n if ($(cells[left_lower_cell]).hasClass(machine_clicked)) {\n if ($(cells[lower_center_cell]).hasClass(machine_clicked) && $(cells[right_lower_cell]).hasClass(empty_cell)) return right_lower_cell;\n if ($(cells[right_lower_cell]).hasClass(machine_clicked) && $(cells[lower_center_cell]).hasClass(empty_cell)) return lower_center_cell;\n }\n\n if ($(cells[left_upper_cell]).hasClass(empty_cell)) {\n if ($(cells[upper_center_cell]).hasClass(machine_clicked) && $(cells[right_upper_cell]).hasClass(machine_clicked)) return left_upper_cell;\n if ($(cells[center_cell]).hasClass(machine_clicked) && $(cells[right_lower_cell]).hasClass(machine_clicked)) return left_upper_cell;\n if ($(cells[left_center_cell]).hasClass(machine_clicked) && $(cells[left_lower_cell]).hasClass(machine_clicked)) return left_upper_cell;\n }\n\n if ($(cells[left_center_cell]).hasClass(empty_cell) &&\n $(cells[center_cell]).hasClass(machine_clicked) &&\n $(cells[right_center_cell]).hasClass(machine_clicked)) return left_center_cell;\n\n if ($(cells[upper_center_cell]).hasClass(empty_cell) &&\n $(cells[center_cell]).hasClass(machine_clicked) &&\n $(cells[lower_center_cell]).hasClass(machine_clicked)) return upper_center_cell;\n\n if ($(cells[left_lower_cell]).hasClass(empty_cell) &&\n $(cells[lower_center_cell]).hasClass(machine_clicked) &&\n $(cells[right_lower_cell]).hasClass(machine_clicked)) return left_lower_cell;\n\n if ($(cells[right_upper_cell]).hasClass(empty_cell)) {\n if ($(cells[right_center_cell]).hasClass(machine_clicked) && $(cells[right_lower_cell]).hasClass(machine_clicked)) return right_upper_cell;\n if ($(cells[center_cell]).hasClass(machine_clicked) && $(cells[left_lower_cell]).hasClass(machine_clicked)) return right_upper_cell;\n }\n }", "_handleClickOnSlide() {\n this.$slidesContainer.addEventListener(\"pointerup\", (e) => {\n for (let [i, $slide] of this.$slides.entries()) {\n if ($slide.contains(e.target) || $slide === e.target) {\n if (this.currentSlide !== $slide) {\n const slide = this.getSlide($slide);\n this.goTo(slide.idx);\n }\n }\n }\n });\n }", "externalTouchMove() {\n this._strikeTouchMove();\n }", "function setTouchEvents() {\n\n // If user starts touch event, disable draggign (anticipate tap)\n $(\"body\").on(\"touchstart\", function(){\n dragging = false;\n });\n // If user starts moving, enable dragging\n $(\"body\").on(\"touchmove\", function(){\n dragging = true;\n });\n\n // Click listener for users\n $(\"section#list ul.cards li\").on(\"click touchend\", function(e) {\n // Stop extra click event when tapping\n e.stopPropagation();\n e.preventDefault();\n\n // Do nothing if user is dragging\n if (dragging) {\n dragging = false; // Reset\n return;\n }\n if (!state.processing) { // If no transaction is processing\n closeMenu();\n state.current = $(this); // Set active element to tapped user\n\n // If tapped user is not the currently active\n if (state.current.attr(\"data-cid\")!=actionBar.attr(\"data-cid\")) {\n scrollToCurrent();\n $(\"div.action-bar li\").each(function(i,el){\n resetColor($(el));\n });\n // Move action bar\n ActionBar(1,{\n left:state.current[0].offsetLeft,\n top:state.current[0].offsetTop,\n width:state.current[0].offsetWidth,\n height:state.current[0].offsetHeight,\n cid:state.current.attr(\"data-cid\")\n });\n } else {\n ActionBar(0); // Hide action bar\n state.current = null; // Remove active user\n }\n }\n });\n\n // Click listener for action bar buttons\n $(\"div.action-bar li\").on(\"click touchend\", function(e) {\n e.stopPropagation();\n e.preventDefault();\n if (dragging) {\n dragging = false;\n return;\n }\n if (!state.processing) {\n\n // If user is active\n if ($(this).parent().parent().attr(\"data-cid\")!=\"\") {\n if ($(this).attr(\"data-action\") == \"pay\") { // If normal button\n pay($(this), parseInt($(this).attr(\"data-amount\")));\n } else if ($(this).attr(\"data-action\") == \"input\") { // If custom number input\n var amount = prompt(\"Antal kronor:\"); // Dialog box\n // Check number is ok\n if (amount != null) {\n amount = parseInt(amount);\n if (amount > 0) {\n pay($(this), amount);\n } else if (amount != null) {\n flashColor($(this),\"red\");\n $(this).removeClass(\"loading-ring-button\");\n }\n }\n }\n }\n }\n });\n\n // Hijack touch event if action bar is tapped (no button). Else \"body\" will be regarded as tapped\n $(\"div.action-bar\").on(\"click touchend\", function(e) {\n e.stopPropagation();\n e.preventDefault();\n });\n\n // Click listener for menu button (top right)\n $(\"div.menu-button\").on(\"click touchend\", function(e) {\n e.stopPropagation();\n e.preventDefault();\n if (dragging) {\n dragging = false;\n return;\n }\n if (!state.processing) {\n ActionBar(0); // Hide action bar\n if (state.menuIsOpen) {\n closeMenu();\n } else {\n openMenu();\n }\n }\n });\n\n // Click listener for menu item\n $(\"nav ul.menu li\").on(\"click touchend\",function(e) {\n e.stopPropagation();\n e.preventDefault();\n if (dragging) {\n dragging = false;\n return;\n }\n\n // Change page according to link\n var link = $(this).attr(\"data-link\");\n changePage(link);\n if (window.history.state != link) {\n window.history.pushState(link, \"\", \"\"); // If not same page, add to page navigation history\n }\n });\n\n // Favorite user dropdown is changed\n $(\"#favoriteUser\").on(\"change\",function(e) {\n var cid = $(this).val();\n if (cid != \"\") {\n createCookie(\"favorite\", cid);\n $(\"#plusUser\").val(cid); // Change plus user default to favorite\n console.log(cid + \" är satt som favorit.\");\n } else {\n eraseCookie(\"favorite\"); // Erase cookie if no favorite\n }\n $(\"#action-bar-top\").attr(\"data-cid\", cid);\n $(\"#action-bar-top > span\").text(\"Strecka på \"+$(\"#favoriteUser option:selected\").text());\n });\n\n // Click listener for body, used for closing menus and such\n $(document).on(\"click touchend\", function(e) {\n e.stopPropagation();\n //e.preventDefault(); // Don't enable this, no idea why\n closeMenu();\n if (dragging) {\n dragging = false;\n return;\n }\n if (!state.processing) {\n if (state.current != null) {\n ActionBar(0);\n state.current = null;\n }\n }\n });\n\n // On change of plus input update Swish-link\n $(\"section#plus input#amount\").on(\"input\", function(e){\n var amount = parseInt(this.value);\n if (isNaN(amount)) {\n this.value = \"\"; // Empty if not a Number\n } else if (amount < 1) {\n this.value = 1; // Min\n } else if (amount > 5000) {\n this.value = 5000; // Max\n } else {\n this.value = parseInt(this.value);\n }\n updateSwishLink(this.value, $(\"section#plus select#plusUser\").val());\n });\n\n // On change of user to plus on\n $(\"section#plus select#plusUser\").on(\"change\", function(e){\n updateSwishLink($(\"section#plus input#amount\").val(),this.value);\n });\n\n // Confirm plus button\n $(\"span#confirmPlus\").on(\"click touchend\",function(e) {\n e.stopPropagation();\n e.preventDefault();\n if (dragging) {\n dragging = false;\n return;\n }\n\n // If buttons are enabled\n if ($(\"#step3\").css(\"opacity\") == 1) {\n if (!state.processing) {\n $(this).css(\"color\",\"hsl(0, 0%, 0%)\");\n $(this).css(\"background-color\",\"hsl(0, 0%, 100%)\");\n state.processing = 1;\n var cid = $(\"section#plus select#plusUser\").val();\n var change = parseInt($(\"section#plus input#amount\").val());\n sendPayment(cid,change,'Plussning',$(\"a#swish-button\").attr(\"data-ref\"),$(this));\n }\n }\n });\n\n // Click listener for login button on admin page\n $(\"#loginBtn\").on(\"click touchend\",function(e) {\n e.stopPropagation();\n e.preventDefault();\n if (dragging) {\n dragging = false;\n return;\n }\n if ($(\"#loginBtn\").attr(\"disabled\") != \"disabled\") {\n adminLogin();\n }\n });\n}", "function findxy(res, e) {\n debug_update(prevX, prevY, currX, currY, e.clientX, e.clientY);\n if (res == 'down') {\n prevX = currX;\n prevY = currY;\n currX = e.clientX - canvas.offsetLeft + document.body.scrollLeft;\n currY = e.clientY - canvas.offsetTop + document.body.scrollTop;\n prevX = currX;\n prevY = currY;\n\t\t\n\t\tconsole.log(lastIter[currY-currY%pixelSize][currX-currX%pixelSize]);\n\t\tctx.fillRect(currX-currX%pixelSize,currY-currY%pixelSize,pixelSize,pixelSize);\n\t\tpixArr[currX-currX%pixelSize][currY-currY%pixelSize] = 1;\n\t\tlastIter[currY-currY%pixelSize][currX-currX%pixelSize] = 1;\n\t\tconsole.log(lastIter[currY-currY%pixelSize][currX-currX%pixelSize]);\n flag = true;\n }\n if (res == 'up' || res == \"out\") {\n flag = false;\n }\n if (res == 'move') {\n\t\tconsole.log(flag);\n if (flag) {\n currX = e.clientX - canvas.offsetLeft + document.body.scrollLeft;\n currY = e.clientY - canvas.offsetTop + document.body.scrollTop;\n prevX = currX;\n prevY = currY;\n\t\t\tctx.fillRect(currX-currX%pixelSize,currY-currY%pixelSize,pixelSize,pixelSize);\n\t\t\tpixArr[currY-currY%pixelSize][currX-currX%pixelSize] = 1;\n\t\t\tlastIter[currY-currY%pixelSize][currX-currX%pixelSize] = 1;\n }\n }\n}", "clicked(key, e){\r\n let k = this.keyToPoint(key)\r\n let j = this.state.prevClick\r\n let moved = false\r\n let cellClicked = this.state.rows[k.x][k.y]\r\n let prevClicked = j !== null ? this.state.rows[j.x][j.y] : null\r\n let nextTurn = this.state.turn\r\n\r\n if (this.sameCell(k, j))\r\n return\r\n \r\n //first click since last turn\r\n //Make sure white doesnt click black pieces and vice versa\r\n //Cells without pieces are not highlighted either\r\n if(prevClicked === null){\r\n if(!cellClicked.holdsPiece() || \r\n this.state.turn !== cellClicked.piece.player){\r\n return\r\n }\r\n else\r\n cellClicked.hl = \"true\"\r\n }\r\n else{\r\n if(cellClicked.holdsPiece() && \r\n prevClicked.piece.player === cellClicked.piece.player){\r\n cellClicked.hl = \"true\"\r\n prevClicked.hl = \"false\"\r\n }\r\n else{\r\n moved = prevClicked.piece.move(cellClicked, this.state.rows)\r\n if(moved){\r\n nextTurn = this.state.moveCount % 2 === 0 ? \"black\" : \"white\"\r\n prevClicked.hl = \"false\"\r\n }\r\n }\r\n }\r\n this.setState(prevState => ({\r\n rows : prevState.rows.map(row => ([...row])),\r\n prevClick : moved ? null : cellClicked.hl === \"true\" ? {...k} : prevState.prevClick,\r\n moveCount : moved ? prevState.moveCount + 1 : prevState.moveCount,\r\n turn : nextTurn\r\n }))\r\n\r\n if(moved){\r\n let mover = this.state.turn === \"white\" ? player1 : player2\r\n let moved = mover === player1 ? player2 : player1\r\n console.log(`${moved.name} is checked: ${mover.checkedOpponent(moved.kingLocation,\r\n this.state.rows)}`)\r\n }\r\n \r\n }", "function extractEvents(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget,eventSystemFlags,targetContainer){extractCompositionEvent(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget);extractBeforeInputEvent(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget);}", "function extractEvents(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget,eventSystemFlags,targetContainer){extractCompositionEvent(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget);extractBeforeInputEvent(dispatchQueue,domEventName,targetInst,nativeEvent,nativeEventTarget);}", "function newMove() {\n for (var i = 0; i < divInput.length; i++) {\n divInput[i].addEventListener('click', UserMove);\n }\n}", "clicked(mx,my){\n\n //if( (my == this.y) && (mx <= (this.begin+5)) && (mx >= this.begin) ){\n if( (my <= this.y) && (my >= (this.y)-8) && (mx <= (this.begin+8)) && (mx >= this.begin) ){\n if(this.pressed==0){\n this.pressed = 1;\n console.log(this.begin);\n console.log(this.mirna_sequence);\n console.log(this.mirna_id);\n }\n else{\n this.pressed = 0;\n console.log(this.end);\n }\n }\n }", "function Dragging_DetectActionStart(event)\n{\n\t//interactions blocked?\n\tif (__SIMULATOR.UserInteractionBlocked())\n\t{\n\t\t//block the event (will forward to designer, if possible)\n\t\tBrowser_BlockEvent(event);\n\t}\n\telse\n\t{\n\t\t//not during gestures\n\t\tif (!__GESTURES.IsBusy())\n\t\t{\n\t\t\t//get the source element\n\t\t\tvar srcElement = Browser_GetEventSourceElement(event);\n\t\t\t//get the html\n\t\t\tvar theHTML = Get_HTMLObject(srcElement);\n\t\t\t//valid?\n\t\t\tif (theHTML)\n\t\t\t{\n\t\t\t\t//the object we will drag\n\t\t\t\tvar intObject = null;\n\t\t\t\tvar data = null;\n\t\t\t\t//switch according to class\n\t\t\t\tswitch (theHTML.InterpreterObject.DataObject.Class)\n\t\t\t\t{\n\t\t\t\t\tcase __NEMESIS_CLASS_LINK:\n\t\t\t\t\tcase __NEMESIS_CLASS_LABEL:\n\t\t\t\t\tcase __NEMESIS_CLASS_UNKNOWN:\n\t\t\t\t\t\t//attempt to replace the object\n\t\t\t\t\t\tvar replacementObject = Label_ProcessEventForwarding(theHTML.InterpreterObject, __NEMESIS_EVENT_DRAGDROP);\n\t\t\t\t\t\t//found a link\n\t\t\t\t\t\tif (replacementObject)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//we use this\n\t\t\t\t\t\t\tintObject = replacementObject;\n\t\t\t\t\t\t\t//drag it directly\n\t\t\t\t\t\t\ttheHTML = intObject.HTML;\n\t\t\t\t\t\t\t//get data\n\t\t\t\t\t\t\tdata = intObject.GetData();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase __NEMESIS_CLASS_TREE_VIEW:\n\t\t\t\t\t\t//memorise the interpreter object\n\t\t\t\t\t\tintObject = theHTML.InterpreterObject;\n\t\t\t\t\t\t//ask for the html data\n\t\t\t\t\t\tvar treeViewDragData = Treeview_DraggingOverTree(srcElement);\n\t\t\t\t\t\t//valid?\n\t\t\t\t\t\tif (treeViewDragData)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//set it\n\t\t\t\t\t\t\ttheHTML = treeViewDragData.Branch;\n\t\t\t\t\t\t\tdata = treeViewDragData.Exception;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//ignore this\n\t\t\t\t\t\t\tintObject = null;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t//got element to drag?\n\t\t\t\tif (intObject)\n\t\t\t\t{\n\t\t\t\t\t//begin drag operation\n\t\t\t\t\tDragging_Start(event);\n\t\t\t\t\t//store clone our drag element\n\t\t\t\t\t__DRAG_DATA.DraggingClone = theHTML.cloneNode(true);\n\t\t\t\t\t//indicate that we currently arent visible\n\t\t\t\t\t__DRAG_DATA.IsShowing = false;\n\t\t\t\t\t//get its rect\n\t\t\t\t\tvar rect = Position_GetDisplayRect(theHTML);\n\t\t\t\t\t//set special properties\n\t\t\t\t\t__DRAG_DATA.DraggingClone.style.width = rect.width + \"px\";\n\t\t\t\t\t__DRAG_DATA.DraggingClone.style.height = rect.height + \"px\";\n\t\t\t\t\t__DRAG_DATA.DraggingClone_InitialPosition = { x: rect.left / __SIMULATOR.Scale + __SIMULATOR.Interpreter.DisplayPanel.scrollLeft, y: rect.top / __SIMULATOR.Scale + __SIMULATOR.Interpreter.DisplayPanel.scrollTop };\n\t\t\t\t\t__DRAG_DATA.DraggingClone.style.border = __DRAGGING_CLONE_BORDER;\n\t\t\t\t\t__DRAG_DATA.DraggingClone.style.position = \"absolute\";\n\t\t\t\t\t__DRAG_DATA.DraggingClone.style.zIndex = __ZINDEX_POPUP;\n\t\t\t\t\tBrowser_SetOpacity(__DRAG_DATA.DraggingClone, 50);\n\t\t\t\t\t//update its position\n\t\t\t\t\t__DRAG_DATA.DraggingClone.style.left = __DRAG_DATA.DraggingClone_InitialPosition.x + \"px\";\n\t\t\t\t\t__DRAG_DATA.DraggingClone.style.top = __DRAG_DATA.DraggingClone_InitialPosition.y + \"px\";\n\t\t\t\t\t//setup drag action\n\t\t\t\t\t__DRAG_DATA.DragActionSource = { InterpreterObject: intObject, Data: data };\n\t\t\t\t\t//setup start time\n\t\t\t\t\t__DRAG_DATA.StartTime = new Date().getTime();\n\t\t\t\t\t//set up listeners\n\t\t\t\t\t__DRAG_DATA.OnMove = Dragging_DetectActionMove;\n\t\t\t\t\t__DRAG_DATA.OnEnd = Dragging_DetectActionEnd;\n\t\t\t\t\t__DRAG_DATA.OnWheel = Dragging_DetectActionWheel;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", "_strikePointerMove() {\n for (let i = 0; i < this._pointerMoveCallbacks.length; i++) {\n let currentCallback = this._pointerMoveCallbacks[i][0];\n\n currentCallback(this, event);\n }\n\n for (let i = 0; i < this._pointerMoveCallbacks.length; i++) {\n if (this._pointerMoveCallbacks[i][1])\n this._pointerMoveCallbacks.splice(i--, 1);\n }\n }", "function obstacleEvents(){\n\t\t/** Listen to pan events */\n\t\tvar obstaclesList = document.querySelectorAll('.obstacle'),\n\t\t\tcanvas = document.getElementsByTagName('canvas'),\n\t\t\tstartMarginLeft = 0,\n\t startMarginTop = 0;\n\n\t\tfor (var i=0; i<obstaclesList.length; i++) {\n\t\t\tvar mcObstacle = new Hammer(obstaclesList[i]);\n\t\t\tmcObstacle.get('pan').set({\n\t\t\t\tdirection: Hammer.DIRECTION_ALL\n\t\t\t});\n\t\t\tmcObstacle.on('pan panstart panend', function(e){\n\t\t\t\tvar boundings = GameJam.canvasa.getBoundingClientRect(),\n\t\t\t\t\tboundingsMain = document.getElementsByTagName('main')[0].getBoundingClientRect(),\n\t \t\tobstacle = e.target.className.match(/obstacle/g) ? e.target : e.target.parentElement,\n \t\tobstacleId = obstacle.getAttribute('data-icon'),\n \t\titem = GameJam.levels[GameJam.currentLevel].items[obstacleId],\n \t\titemCount = item.count,\n\t \t\tx,\n\t \t\ty,\n \t\tpos = [],\n \t\tcellwidth,\n\t \tcellheight;\n\n\t\t\t\t// Grab html page coords\n\t\t\t\tx = e.center.x + document.body.scrollLeft + document.documentElement.scrollLeft;\n\t\t\t\ty = e.center.y + document.body.scrollTop + document.documentElement.scrollTop;\n\n\t\t\t\t// Make them relative to the canvas only\n\t\t\t\tx -= GameJam.canvasa.offsetLeft;\n\t\t\t\ty -= GameJam.canvasa.offsetTop;\n\n\t\t\t\t// Return tile x,y that we dragged\n\t\t\t\tvar cell = [\n\t\t\t\t\tMath.floor(x/(boundings.width / GameJam.worldWidth)),\n\t\t\t\t\tMath.floor(y/(boundings.height / GameJam.worldHeight))\n\t\t\t\t];\n\n\t\t\t\tcellwidth = cell[0] - Math.floor((item.width)/GameJam.tileWidth) + 1 ,\n\t cellheight = cell[1] - Math.floor((item.height)/GameJam.tileHeight) + 1;\n\n\t\t\t\tswitch(e.type) {\n\t\t case 'panstart':\n\t\t \tGameJam.sound.play('plop');\n\n\t\t \t// Show icon\n\t\t \tGameJam.draggedIcon.setAttribute('style', 'background-position: 0px -' + item.icon + 'px;');\n\t\t \tGameJam.draggedIcon.className = 'show';\n\n\t\t \t// Hide obstacles list\n\t\t \tcore.HideObstacles();\n\n\t\t \t// Get the starting margins\n\t\t\t\t\t\tstartMarginLeft = parseInt(window.getComputedStyle(canvas[0]).getPropertyValue('margin-left'));\n\t\t\t\t\t\tstartMarginTop = parseInt(window.getComputedStyle(canvas[0]).getPropertyValue('margin-top'));\n\n\t\t break;\n\n\t\t case 'pan':\n\n\t\t \t// Move icon\n\t\t \tGameJam.draggedIcon.style.left = x-25 + startMarginLeft + 'px';\n\t\t \tGameJam.draggedIcon.style.top = y-25 + startMarginTop + 'px';\n\t\t \t\n\t\t \tbreak;\n\n\t\t case 'panend':\n\t\t \tGameJam.sound.play('plop');\n\n\t\t \t// Hide icon\n\t\t \tGameJam.draggedIcon.className = '';\n\n\t\t \t// Add obstacle to item array\n\t \t\tpos.push(cellwidth * GameJam.tileWidth);\n\t \t\tpos.push(cellheight * GameJam.tileHeight);\n\n\t \t\t// Remove obstacle from obstacle window\n\t \t\titemCount = itemCount - 1;\n\t \t\tif (itemCount <= 0) {\n\t \t\t\tobstacle.remove();\n\t \t\t} else {\n\t \t\t\tobstacle.querySelectorAll('.count')[0].innerHTML = itemCount;\n\t \t\t}\n\t \t\titem.count = itemCount;\n\n\t \t\t// Create a new item and add it to the global items list\n\t\t \tvar newItem = {};\n\t\t \tnewItem.width = item.width;\n\t\t \tnewItem.height = item.height;\n\t\t \tnewItem.icon = item.icon;\n\t\t \tnewItem.id = GameJam.levels[GameJam.currentLevel].items.length;\n\t\t \tnewItem.pos = pos;\n\t\t \tnewItem.sprite = item.sprite;\n\t\t \tGameJam.items.push( newItem );\n\t\t \t\n\t\t \tbreak;\n\t\t }\n\t\t\t});\n\t\t}\n\t}", "function action(e){\n\n\t\t// get coordinates of point \t\t\n\t\tvar point = getCursorPosition(canvasElement, e);\n\n\t\t// check if clicked in any shape\n\t\t// traverse array in oposite order\n\t\tfor (var i = shapesList.length - 1; i >= 0; i--) {\n\t\t\tif (shapesList[i].isInPoint(point)){\n\t\t\t\treturn startMoving(i);\n\t\t\t}\n\t\t};\n\n\t\t// if something already selected \n\t\t// let endMoving() take over\n\t\tif (selected > 0){\n\t\t\treturn false;\n\t\t}\n\n\t\treturn newShape(point);\n\n\t}", "step(obs) {\n super.step(obs)\n if (obs.observation.available_actions.includes(FUNCTIONS.Attack_screen.id)) {\n const player_relative = obs.observation.feature_screen.player_relative\n const roaches = xy_locs(player_relative, _PLAYER_ENEMY)\n if (!roaches.length) {\n return FUNCTIONS.no_op()\n }\n //Find the roach with max y coord.\n const temp = []\n for (let i = 0; i < roaches.length; i++) {\n temp.push(roaches[i][1])\n }\n const target = roaches[numpy.argMax(temp).arraySync()]\n return FUNCTIONS.Attack_screen('now', target)\n }\n if (obs.observation.available_actions.includes(FUNCTIONS.select_army.id)) {\n return FUNCTIONS.select_army('select')\n }\n return FUNCTIONS.no_op()\n }", "updateButtons() {\n\n //Create a pointer if one doesn't already exist\n if (this.pointers.length === 0) {\n this.makePointer(this.element, this.scale);\n }\n\n //Loop through all of Tink's pointers (there will usually\n //just be one)\n this.pointers.forEach(pointer => {\n\n pointer.shouldBeHand = false;\n\n\n\n //Loop through all the button-like sprites that were created\n //using the `makeInteractive` method\n this.buttons.forEach(o => {\n\n //Only do this if the interactive object is enabled\n if (o.enabled) {\n\n //Figure out if the pointer is touching the sprite\n let hit = pointer.hitTestSprite(o);\n\n //1. Figure out the current state\n if (pointer.isUp) {\n\n //Up state\n o.state = \"up\";\n\n //Show the first image state frame, if this is a `Button` sprite\n if (o.tinkType === \"button\") o.gotoAndStop(0);\n }\n\n //If the pointer is touching the sprite, figure out\n //if the over or down state should be displayed\n if (hit) {\n\n //Over state\n o.state = \"over\";\n\n //Show the second image state frame if this sprite has\n //3 frames and it's a `Button` sprite\n if (o.totalFrames && o.totalFrames === 3 && o.tinkType === \"button\") {\n o.gotoAndStop(1);\n }\n\n //Down state\n if (pointer.isDown) {\n o.state = \"down\";\n\n //Show the third frame if this sprite is a `Button` sprite and it\n //has only three frames, or show the second frame if it\n //only has two frames\n if (o.tinkType === \"button\") {\n if (o.totalFrames === 3) {\n o.gotoAndStop(2);\n } else {\n o.gotoAndStop(1);\n }\n }\n }\n\n\n\n //Flag this pointer to be changed to a hand\n pointer.shouldBeHand = true;\n //if (pointer.visible) pointer.cursor = \"pointer\";\n // } else {\n // //Turn the pointer to an ordinary arrow icon if the\n // //pointer isn't touching a sprite\n // if (pointer.visible) pointer.cursor = \"auto\";\n\n //Change the pointer icon to a hand\n if (pointer.visible) pointer.cursor = \"pointer\";\n } else {\n //Turn the pointer to an ordinary arrow icon if the\n //pointer isn't touching a sprite\n if (pointer.visible) pointer.cursor = \"auto\";\n\n }\n\n //Perform the correct interactive action\n\n //a. Run the `press` method if the sprite state is \"down\" and\n //the sprite hasn't already been pressed\n if (o.state === \"down\") {\n if (!o.pressed) {\n if (o.press) o.press();\n o.pressed = true;\n o.action = \"pressed\";\n }\n }\n\n //b. Run the `release` method if the sprite state is \"over\" and\n //the sprite has been pressed\n if (o.state === \"over\") {\n if (o.pressed) {\n if (o.release) o.release();\n o.pressed = false;\n o.action = \"released\";\n //If the pointer was tapped and the user assigned a `tap`\n //method, call the `tap` method\n if (pointer.tapped && o.tap) o.tap();\n }\n\n //Run the `over` method if it has been assigned\n if (!o.hoverOver) {\n if (o.over) o.over();\n o.hoverOver = true;\n }\n }\n\n //c. Check whether the pointer has been released outside\n //the sprite's area. If the button state is \"up\" and it's\n //already been pressed, then run the `release` method.\n if (o.state === \"up\") {\n if (o.pressed) {\n if (o.release) o.release();\n o.pressed = false;\n o.action = \"released\";\n }\n\n //Run the `out` method if it has been assigned\n if (o.hoverOver) {\n if (o.out) o.out();\n o.hoverOver = false;\n }\n }\n }\n });\n\n if (pointer.shouldBeHand) {\n pointer.cursor = \"pointer\";\n } else {\n pointer.cursor = \"auto\";\n }\n\n\n });\n }", "function select() {\n let xPos = event.offsetX;\n let yPos = event.offsetY;\n player.cards.onHand.forEach(element => {\n if (\n yPos > element.y &&\n yPos < element.y + element.height &&\n xPos > element.x &&\n xPos < element.x + element.width\n ) {\n console.log(\"we got ya\");\n element.selected = true;\n element.degrees = 0;\n console.log(element);\n //than create event listener\n myDom.canvas3.addEventListener(\"mousemove\", getCurPos, false);\n }\n });\n}", "onMove() {\n }", "onPointerPressed(e)\n {\n let position = this.inverseTransformVector(e.position).trunc();\n let info = this.positionInfo(position);\n\n // Check if the tile is in the world\n if (!this.region.contains(position))\n return;\n\n // Check if the tile contains an entity and it is interactable\n if (typeof info.entity !== 'undefined' && typeof info.entity.canInteract !== 'undefined')\n {\n // Check if the player can interact with the entity\n if (info.entity.canInteract(this.player))\n info.entity.onInteract(this.player);\n }\n else\n {\n // Move the player to where he clicked\n if (!this.player.moveTo(position))\n console.warn(`${this.player} cannot move to ${position}`);\n }\n }", "function touchMoveCallback(e, eventData)\n {\n \n cornerstoneTools.activeToolcoordinate.setCoords(eventData);\n \n // if we have no tool data for this element, do nothing\n var toolData = cornerstoneTools.getToolState(eventData.element, touchToolInterface.toolType);\n if (toolData === undefined) {\n return;\n }\n\n // We have tool data, search through all data\n // and see if we can activate a handle\n var imageNeedsUpdate = false;\n for (var i = 0; i < toolData.data.length; i++) {\n // get the touch position in image coordinates\n var data = toolData.data[i];\n if (cornerstoneTools.handleActivator(data.handles, eventData.currentPoints.image, eventData.viewport.scale) === true)\n {\n imageNeedsUpdate = true;\n }\n }\n\n // Handle activation status changed, redraw the image\n if (imageNeedsUpdate === true) {\n cornerstone.updateImage(eventData.element);\n }\n }", "nextStep() {\n const me = this; // Only perform step if in view and not scrolling\n\n if (me.shouldPause) {\n return;\n }\n\n if (me.currentStep === me.steps.length) {\n if (me.repeat) {\n me.currentStep = 0;\n } else {\n return me.abort(true);\n }\n } // First step, signal to let demo initialize stuff\n\n if (me.currentStep === 0) {\n me.trigger('initialize');\n }\n\n const mouse = me.mouse,\n step = me.normalizeStep(me.steps[me.currentStep++]),\n target = me.getTarget(step),\n action = step.action;\n\n if (target && action) {\n mouse.className = 'simulated-mouse';\n\n if (action === 'mousemove') {\n me.handleMouseMove(step, target);\n } else {\n // First move mouse into position\n if (target !== me.prevTarget) {\n const rect = Rectangle.from(target, me.outerElement);\n mouse.style.left = rect.x + rect.width / 2 + 'px';\n mouse.style.top = rect.y + rect.height / 2 + 'px';\n }\n\n if (action === 'mousedown') {\n me.mouseDown = true;\n }\n\n if (action === 'mouseup') {\n me.mouseDown = false;\n } // Then trigger action\n\n me.timeoutId = me.setTimeout(() => {\n me.prevTarget = target; // Animate click etc.\n\n mouse.classList.add(action);\n\n if (action === 'type') {\n const field = Widget.fromElement(target),\n parts = step.text.split('|');\n field.value = parts[parts.length === 1 || field.value != parts[0] ? 0 : 1];\n } else {\n me.triggerEvent(target, action);\n }\n }, action === 'type' ? 100 : 550);\n }\n }\n }", "function q(){this.evTarget=tt,this.targetIds={},T.apply(this,arguments)}", "step(obs) {\n super.step(obs)\n if (obs.observation.available_actions.includes(FUNCTIONS.Move_screen.id)) {\n const player_relative = obs.observation.feature_screen.player_relative\n const beacon = xy_locs(player_relative, _PLAYER_NEUTRAL)\n if (!beacon) {\n return FUNCTIONS.no_op()\n }\n const axis = 0\n const beacon_center = numpy.round(numpy.mean(beacon, axis))\n return FUNCTIONS.Move_screen('now', beacon_center)\n }\n return FUNCTIONS.select_army('select')\n }", "function addInteraction(obj) {\n obj.interactive = true;\n obj\n .on('pointerdown', onDragStart)\n .on('pointerup', onDragEnd)\n .on('pointerupoutside', onDragEnd)\n .on('pointermove', onDragMove);\n }", "onBaseFramePreselection(params) {\n let siblingInteractables = [];\n let baseFrame = this.vLab.SceneDispatcher.currentVLabScene.interactables['baseFrame'];\n baseFrame.siblings.forEach((siblingInteractable) => {\n siblingInteractables.push(siblingInteractable);\n });\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['bodyFrame']);\n\n\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['torsoFrame']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['headYawLink']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['headTiltLink']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['headFrame']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['kinectHead']);\n\n\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['shoulderFrameR']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['armR']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['limbLinkR']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['forearmRollLinkR']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['forearmFrameR']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['palmTiltR']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['palmR']);\n\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['finger0P1R']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['finger0P2R']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['finger0P3R']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['finger1P1R']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['finger1P2R']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['finger1P3R']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['finger2P1R']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['finger2P2R']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['finger2P3R']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['finger3P1R']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['finger3P2R']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['finger3P3R']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['finger4P1R']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['finger4P2R']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['finger4P3R']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['finger5P1R']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['finger5P2R']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['finger5P3R']);\n\n\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['shoulderFrameL']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['armL']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['limbLinkL']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['forearmRollLinkL']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['forearmFrameL']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['palmTiltL']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['palmL']);\n\n\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['finger0P1L']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['finger0P2L']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['finger0P3L']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['finger1P1L']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['finger1P2L']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['finger1P3L']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['finger2P1L']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['finger2P2L']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['finger2P3L']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['finger3P1L']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['finger3P2L']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['finger3P3L']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['finger4P1L']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['finger4P2L']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['finger4P3L']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['finger5P1L']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['finger5P2L']);\n siblingInteractables.push(this.vLab.SceneDispatcher.currentVLabScene.interactables['finger5P3L']);\n\n siblingInteractables.forEach((siblingInteractable) => {\n siblingInteractable.keepPreselection = true;\n siblingInteractable.preselect(true);\n });\n }", "_onPostEqualized(e) {\n if(e.target !== this.$element[0]){ this._reflow(); }\n }", "canInteract(target)\n {\n return false;\n\n }", "handleInteraction(){\r\n for(let i = 0; i < keys.length; i++){\r\n keys[i].addEventListener(\"click\", (e)=>{\r\n target = e.target.textContent;\r\n e.target.disabled = true;\r\n if(activePhrase.checkLetter()){\r\n e.target.classList.add(\"chosen\");\r\n activePhrase.showMatchedLetter();\r\n this.checkForWin()\r\n } else {\r\n this.removeLife();\r\n e.target.classList.add(\"wrong\");\r\n this.checkForWin();\r\n };\r\n if(this.checkForWin() === true || this.missed === 5){\r\n this.gameOver(); \r\n };\r\n });\r\n }\r\n }", "function handleTouch(e) {\n var resetItem = true,\n parents = $(e.target).parents();\n\n for (var i = 0; i < parents.length; i++)\n if (parents[i] == curItem[0])\n resetItem = false;\n\n if (resetItem)\n curItem = false;\n }", "getNextNavigable(event) {\n // TODO: Figure out if this is necessary\n if (event.type == dvt.MouseEvent.CLICK) return this;\n\n var navigables = this._axis.__getKeyboardObjects();\n return dvt.KeyboardHandler.getNextNavigable(\n this,\n event,\n navigables,\n false,\n this._axis.getCtx().getStage()\n );\n }", "finishDrag() {\n //Use last loc_sim_ from last mouseDown or mouseMove event\n //because for touchEnd events there is no location.\n if (this.eventHandler_ != null) {\n this.eventHandler_.finishDrag(this.dragSimObj_, this.loc_sim_, this.dragOffset_);\n }\n}", "function pointerMoveFilter(event) {\n\n if (targets[event.pointerId] !== undefined) {\n pointerMoveHandler.call(targets[event.pointerId], event);\n }\n}", "function BeforeMoveActions() {\n EnableTrackBoard();\n EnableMineDrag();\n}", "function setupTouchEvents(){\n\t//events\n\tstage.on(\"stagemousedown\", function(evt) {\n\t\tgameData.stageX = evt.stageX\n\t\tgameData.stageY = evt.stageY;\n\t\tgameData.oldX = gameData.stageX;\n\t\tgameData.oldY = gameData.stageY;\n\t\tgameData.lastX = gameData.stageX;\n\t\tgameData.lastY = gameData.stageY;\n\t\tgameData.dotX = gameData.stageX;\n\t\tgameData.dotY = gameData.stageY;\n\t});\n\t\n\tstage.on(\"stagemousemove\", function(evt) {\n\t\tif(gameData.targetPlane != null){\n\t\t\tgameData.stageX = evt.stageX;\n\t\t\tgameData.stageY = evt.stageY;\n\t\t\titemSquare.x = gameData.stageX;\n\t\t\titemSquare.y = gameData.stageY;\n\t\t\t\n\t\t\tmoveAirplanePath();\n\t\t\t\n\t\t\tfor(var n=0;n<gameData.runway.length;n++){\n\t\t\t\tvar runwayType = gameData.runway[n].container.runwayType;\n\t\t\t\tif(levels_arr[gameData.levelNum].runway[n].planes.indexOf(gameData.targetPlane.planeType) != -1){\n\t\t\t\t\tif(runwayType == 0){\n\t\t\t\t\t\tvar guideStart = gameData.runway[n].guideStart;\n\t\t\t\t\t\tvar guideMiddle = gameData.runway[n].guideMiddle;\n\t\t\t\t\t\tvar guideAlpha = gameData.runway[n].guideAlpha;\n\t\t\t\t\t\tvar guideEnd = gameData.runway[n].guideEnd;\n\t\t\t\t\t\t\n\t\t\t\t\t\tvar intersection1 = collisionMethod(guideStart, itemSquare);\n\t\t\t\t\t\tvar intersection2 = collisionMethod(guideMiddle, itemSquare);\n\t\t\t\t\t\tvar intersection3 = collisionMethod(guideAlpha, itemSquare);\n\t\t\t\t\t\tvar intersection4 = collisionMethod(guideEnd, itemSquare);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(intersection1){\n\t\t\t\t\t\t\tif(gameData.targetPlane.runwayNum != n){\n\t\t\t\t\t\t\t\tgameData.targetPlane.runwayType = runwayType;\n\t\t\t\t\t\t\t\tgameData.targetPlane.runwayNum = n;\n\t\t\t\t\t\t\t\tgameData.targetPlane.runwayGuide = -1;\n\t\t\t\t\t\t\t\tgameData.targetPlane.runwayGuidePlane = -1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tgameData.targetPlane.runwayGuide = 0;\n\t\t\t\t\t\t}else if(intersection2 && gameData.targetPlane.runwayNum == n && gameData.targetPlane.runwayGuide == 0){\n\t\t\t\t\t\t\tgameData.targetPlane.runwayGuide = 1;\t\n\t\t\t\t\t\t}else if(intersection3 && gameData.targetPlane.runwayNum == n && gameData.targetPlane.runwayGuide == 1){\n\t\t\t\t\t\t\tgameData.targetPlane.runwayGuide = 2;\n\t\t\t\t\t\t}else if(intersection4 && gameData.targetPlane.runwayNum == n && gameData.targetPlane.runwayGuide == 2){\n\t\t\t\t\t\t\tgameData.targetPlane.runwayGuide = 3;\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tvar guideStart = gameData.runway[n].guideStart;\n\t\t\t\t\t\tvar intersection1 = collisionMethod(guideStart, itemSquare);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(intersection1){\n\t\t\t\t\t\t\tgameData.targetPlane.runwayType = runwayType;\n\t\t\t\t\t\t\tgameData.targetPlane.runwayNum = n;\n\t\t\t\t\t\t\tgameData.targetPlane.runwayGuide = 3;\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n\t\n\tstage.on(\"stagemouseup\", function(evt) {\n\t\tif(gameData.targetPlane != null){\n\t\t\tautoDrawLandPath();\n\t\t\tgameData.targetPlane = null;\n\t\t\tfor(var n=0;n<gameData.runway.length;n++){\n\t\t\t\tvar guideAnimate = gameData.runway[n].guideAnimate;\n\t\t\t\tguideAnimate.alpha = 0;\n\t\t\t}\n\t\t}\n\t});\n}", "isInteractionRequired() {\n return isInteractionRequired(this);\n }", "function trackButtons () {\n var gamepad = navigator.getGamepads()[ index ];\n var total = gamepad.buttons.length;\n var i, pressed;\n \n for (i = 0; i < total; i++) {\n pressed = self.isButtonPressed(gamepad.buttons[ i ]);\n \n if (pressed != self.isButtonPressed(buttonsLastState[ i ])) {\n if (pressed) {\n if (typeof buttonDownListener == 'function') {\n buttonDownListener(i);\n }\n } else {\n if (typeof buttonUpListener == 'function') {\n buttonUpListener(i);\n }\n }\n }\n }\n \n saveButtonsLastState();\n }", "function onBeginManipulation() {\r\n\r\n // services.debug.trace(\"Translate: onBeginManipulation()\"); \r\n\r\n undoableItem = null;\r\n\r\n //\r\n // Check the selection mode\r\n //\r\n var selectionMode = getSelectionMode();\r\n if (selectionMode == 0) {\r\n //\r\n // object selection\r\n //\r\n\r\n // services.debug.trace(\"onBeginManipulation - object selection\");\r\n\r\n var translationTraitId = getTranslationTraitId();\r\n\r\n function UndoableTranslation(trait, traitValues, initialValue) {\r\n this._traitArray = traitArray;\r\n this._traitValues = traitValues;\r\n this._initialValues = initialValue;\r\n }\r\n\r\n var traitArray = new Array();\r\n var traitValues = new Array();\r\n var initialValues = new Array();\r\n\r\n //\r\n // add the traits of selected items to the collections that we'll be operating on\r\n //\r\n var count = services.selection.count;\r\n for (i = 0; i < count; i++) {\r\n var currSelected = services.selection.getElement(i);\r\n\r\n //\r\n // don't operate on items whose parents (in scene) are ancestors\r\n // since this will double the amount of translation applied to those\r\n //\r\n var hasAncestor = false;\r\n for (var otherIndex = 0; otherIndex < count; otherIndex++) {\r\n if (otherIndex != i) {\r\n var ancestor = services.selection.getElement(otherIndex);\r\n if (currSelected.behavior.isAncestor(ancestor)) {\r\n hasAncestor = true;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n if (!hasAncestor) {\r\n\r\n var currTrait = currSelected.getTrait(translationTraitId);\r\n\r\n traitArray.push(currTrait);\r\n traitValues.push(currTrait.value);\r\n initialValues.push(currTrait.value);\r\n }\r\n }\r\n\r\n\r\n // create the undoable item\r\n undoableItem = new UndoableTranslation(traitArray, traitValues, initialValues);\r\n\r\n undoableItem.onDo = function () {\r\n\r\n var count = this._traitArray.length;\r\n\r\n // movement delta of all the selected is determined by delta of the first selected\r\n var delta = [0, 0, 0];\r\n if (count > 0) {\r\n delta[0] = this._lastValue[0] - this._initialValues[0][0];\r\n delta[1] = this._lastValue[1] - this._initialValues[0][1];\r\n delta[2] = this._lastValue[2] - this._initialValues[0][2];\r\n }\r\n\r\n for (i = 0; i < count; i++) {\r\n var currTrait = this._traitArray[i];\r\n this._traitValues[i][0] = this._initialValues[i][0] + delta[0];\r\n this._traitValues[i][1] = this._initialValues[i][1] + delta[1];\r\n this._traitValues[i][2] = this._initialValues[i][2] + delta[2];\r\n\r\n var theVal = this._traitArray[i].value;\r\n theVal[0] = this._traitValues[i][0];\r\n theVal[1] = this._traitValues[i][1];\r\n theVal[2] = this._traitValues[i][2];\r\n this._traitArray[i].value = theVal;\r\n }\r\n }\r\n\r\n undoableItem.onUndo = function () {\r\n var count = this._traitArray.length;\r\n for (i = 0; i < count; i++) {\r\n this._traitArray[i].value = this._initialValues[i];\r\n }\r\n }\r\n }\r\n else if (selectionMode == 1) {\r\n //\r\n // polygon selection mode\r\n //\r\n\r\n // services.debug.trace(\"onBeginManipulation - polygon selection\");\r\n\r\n function UndoablePolyTranslation(elem) {\r\n // services.debug.trace(\"UndoablePolyTranslation construct\");\r\n\r\n this._totalDelta = [0, 0, 0];\r\n this._currentDelta = [0, 0, 0];\r\n\r\n // find the mesh child\r\n this._meshElem = findFirstChildMesh(elem);\r\n if (this._meshElem == null) {\r\n return;\r\n }\r\n // services.debug.trace(\"UndoablePolyTranslation found mesh element\");\r\n\r\n this._mesh = this._meshElem.behavior;\r\n\r\n // loop over the elements in the polygon collection\r\n var collElem = this._mesh.selectedObjects;\r\n if (collElem == null) {\r\n return;\r\n }\r\n\r\n this._polyCollectionElem = collElem.clone();\r\n\r\n // services.debug.trace(\"UndoablePolyTranslation found _polyCollectionElem element\");\r\n\r\n // get the actual collection we can operate on\r\n this._polyCollection = this._polyCollectionElem.behavior;\r\n // services.debug.trace(\"assigned _polyCollection\");\r\n\r\n this._geom = this._meshElem.getTrait(\"Geometry\").value\r\n }\r\n\r\n //\r\n // do\r\n //\r\n UndoablePolyTranslation.prototype.onDo = function () {\r\n\r\n // array we will store indices in\r\n var polygonPoints = new Object();\r\n\r\n // loop over the point indices in the poly collection\r\n var polyCount = this._polyCollection.getPolygonCount();\r\n for (var i = 0; i < polyCount; i++) {\r\n var polyIndex = this._polyCollection.getPolygon(i);\r\n\r\n // get the point count and loop over polygon points\r\n var polygonPointCount = this._geom.getPolygonPointCount(polyIndex);\r\n for (var j = 0; j < polygonPointCount; j++) {\r\n\r\n // get the point index\r\n var pointIndex = this._geom.getPolygonPoint(polyIndex, j);\r\n polygonPoints[pointIndex] = pointIndex;\r\n }\r\n }\r\n\r\n // loop over the unique set of indices and transform the associated point\r\n for (var key in polygonPoints) {\r\n var ptIdx = polygonPoints[key];\r\n var pt = this._geom.getPointAt(ptIdx);\r\n pt[0] += this._currentDelta[0];\r\n pt[1] += this._currentDelta[1];\r\n pt[2] += this._currentDelta[2];\r\n this._geom.setPointAt(ptIdx, pt);\r\n }\r\n\r\n this._totalDelta[0] += this._currentDelta[0];\r\n this._totalDelta[1] += this._currentDelta[1];\r\n this._totalDelta[2] += this._currentDelta[2];\r\n\r\n // invalidate the mesh collision\r\n this._mesh.recomputeCachedGeometry();\r\n }\r\n\r\n //\r\n // undo\r\n //\r\n UndoablePolyTranslation.prototype.onUndo = function () {\r\n\r\n // array we will store indices in\r\n var polygonPoints = new Object();\r\n\r\n // loop over the point indices in the poly collection\r\n var polyCount = this._polyCollection.getPolygonCount();\r\n for (var i = 0; i < polyCount; i++) {\r\n var polyIndex = this._polyCollection.getPolygon(i);\r\n\r\n // get the point count and loop over polygon points\r\n var polygonPointCount = this._geom.getPolygonPointCount(polyIndex);\r\n for (var j = 0; j < polygonPointCount; j++) {\r\n\r\n // get the point index\r\n var pointIndex = this._geom.getPolygonPoint(polyIndex, j);\r\n polygonPoints[pointIndex] = pointIndex;\r\n }\r\n }\r\n\r\n // loop over the unique set of indices and transform the associated point\r\n for (var key in polygonPoints) {\r\n var ptIdx = polygonPoints[key];\r\n var pt = this._geom.getPointAt(ptIdx);\r\n pt[0] -= this._totalDelta[0];\r\n pt[1] -= this._totalDelta[1];\r\n pt[2] -= this._totalDelta[2];\r\n this._geom.setPointAt(ptIdx, pt);\r\n }\r\n\r\n this._currentDelta[0] = this._totalDelta[0];\r\n this._currentDelta[1] = this._totalDelta[1];\r\n this._currentDelta[2] = this._totalDelta[2];\r\n\r\n this._totalDelta[0] = 0;\r\n this._totalDelta[1] = 0;\r\n this._totalDelta[2] = 0;\r\n\r\n this._mesh.recomputeCachedGeometry();\r\n }\r\n\r\n // create the undoable item\r\n undoableItem = new UndoablePolyTranslation(document.selectedElement);\r\n }\r\n else if (selectionMode == 2) {\r\n //\r\n // edge selection\r\n //\r\n // services.debug.trace(\"onBeginManipulation - edge selection\");\r\n\r\n function UndoableEdgeTranslation(elem) {\r\n // services.debug.trace(\"UndoableEdgeTranslation construct\");\r\n\r\n this._totalDelta = [0, 0, 0];\r\n this._currentDelta = [0, 0, 0];\r\n\r\n // find the mesh child\r\n this._meshElem = findFirstChildMesh(elem);\r\n if (this._meshElem == null) {\r\n return;\r\n }\r\n // services.debug.trace(\"UndoableEdgeTranslation found mesh element\");\r\n\r\n this._mesh = this._meshElem.behavior;\r\n\r\n // loop over the elements in the polygon collection\r\n var collElem = this._mesh.selectedObjects;\r\n if (collElem == null) {\r\n return;\r\n }\r\n\r\n this._collectionElem = collElem.clone();\r\n\r\n // services.debug.trace(\"UndoableEdgeTranslation found _collectionElem element\");\r\n\r\n // get the actual collection we can operate on\r\n this._edgeCollection = this._collectionElem.behavior;\r\n // services.debug.trace(\"assigned _edgeCollection\");\r\n\r\n this._geom = this._meshElem.getTrait(\"Geometry\").value\r\n }\r\n\r\n //\r\n // do\r\n //\r\n UndoableEdgeTranslation.prototype.onDo = function () {\r\n\r\n // array we will store indices in\r\n var points = new Object();\r\n\r\n // loop over the edges\r\n var edgeCount = this._edgeCollection.getEdgeCount();\r\n for (var i = 0; i < edgeCount; i++) {\r\n var edge = this._edgeCollection.getEdge(i);\r\n\r\n points[edge[0]] = edge[0];\r\n points[edge[1]] = edge[1];\r\n }\r\n\r\n // loop over the unique set of indices and transform the associated point\r\n for (var key in points) {\r\n var ptIdx = points[key];\r\n var pt = this._geom.getPointAt(ptIdx);\r\n pt[0] += this._currentDelta[0];\r\n pt[1] += this._currentDelta[1];\r\n pt[2] += this._currentDelta[2];\r\n this._geom.setPointAt(ptIdx, pt);\r\n }\r\n\r\n this._totalDelta[0] += this._currentDelta[0];\r\n this._totalDelta[1] += this._currentDelta[1];\r\n this._totalDelta[2] += this._currentDelta[2];\r\n\r\n // invalidate the mesh collision\r\n this._mesh.recomputeCachedGeometry();\r\n }\r\n\r\n //\r\n // undo\r\n //\r\n UndoableEdgeTranslation.prototype.onUndo = function () {\r\n\r\n // array we will store indices in\r\n var points = new Object();\r\n\r\n // loop over the edges\r\n var edgeCount = this._edgeCollection.getEdgeCount();\r\n for (var i = 0; i < edgeCount; i++) {\r\n var edge = this._edgeCollection.getEdge(i);\r\n\r\n points[edge[0]] = edge[0];\r\n points[edge[1]] = edge[1];\r\n }\r\n\r\n // loop over the unique set of indices and transform the associated point\r\n for (var key in points) {\r\n var ptIdx = points[key];\r\n var pt = this._geom.getPointAt(ptIdx);\r\n pt[0] -= this._totalDelta[0];\r\n pt[1] -= this._totalDelta[1];\r\n pt[2] -= this._totalDelta[2];\r\n this._geom.setPointAt(ptIdx, pt);\r\n }\r\n\r\n this._currentDelta[0] = this._totalDelta[0];\r\n this._currentDelta[1] = this._totalDelta[1];\r\n this._currentDelta[2] = this._totalDelta[2];\r\n\r\n this._totalDelta[0] = 0;\r\n this._totalDelta[1] = 0;\r\n this._totalDelta[2] = 0;\r\n\r\n this._mesh.recomputeCachedGeometry();\r\n }\r\n\r\n // create the undoable item\r\n undoableItem = new UndoableEdgeTranslation(document.selectedElement);\r\n }\r\n else if (selectionMode == 3) {\r\n //\r\n // point selection\r\n //\r\n // services.debug.trace(\"onBeginManipulation - point selection\");\r\n\r\n function UndoablePointTranslation(elem) {\r\n // services.debug.trace(\"UndoablePointTranslation construct\");\r\n\r\n this._totalDelta = [0, 0, 0];\r\n this._currentDelta = [0, 0, 0];\r\n\r\n // find the mesh child\r\n this._meshElem = findFirstChildMesh(elem);\r\n if (this._meshElem == null) {\r\n return;\r\n }\r\n // services.debug.trace(\"UndoablePointTranslation found mesh element\");\r\n\r\n this._mesh = this._meshElem.behavior;\r\n\r\n // loop over the elements in the polygon collection\r\n var collElem = this._mesh.selectedObjects;\r\n if (collElem == null) {\r\n return;\r\n }\r\n\r\n this._collectionElem = collElem.clone();\r\n\r\n // services.debug.trace(\"UndoablePointTranslation found _collectionElem element\");\r\n\r\n // get the actual collection we can operate on\r\n this._pointCollection = this._collectionElem.behavior;\r\n // services.debug.trace(\"assigned _pointCollection\");\r\n\r\n this._geom = this._meshElem.getTrait(\"Geometry\").value\r\n }\r\n\r\n //\r\n // do\r\n //\r\n UndoablePointTranslation.prototype.onDo = function () {\r\n\r\n // array we will store indices in\r\n var points = new Object();\r\n\r\n // loop over the points\r\n var pointCount = this._pointCollection.getPointCount();\r\n for (var i = 0; i < pointCount; i++) {\r\n var pointIndex = this._pointCollection.getPoint(i);\r\n\r\n points[pointIndex] = pointIndex;\r\n }\r\n\r\n // loop over the unique set of indices and transform the associated point\r\n for (var key in points) {\r\n var ptIdx = points[key];\r\n var pt = this._geom.getPointAt(ptIdx);\r\n pt[0] += this._currentDelta[0];\r\n pt[1] += this._currentDelta[1];\r\n pt[2] += this._currentDelta[2];\r\n this._geom.setPointAt(ptIdx, pt);\r\n }\r\n\r\n this._totalDelta[0] += this._currentDelta[0];\r\n this._totalDelta[1] += this._currentDelta[1];\r\n this._totalDelta[2] += this._currentDelta[2];\r\n\r\n // invalidate the mesh collision\r\n this._mesh.recomputeCachedGeometry();\r\n }\r\n\r\n //\r\n // undo\r\n //\r\n UndoablePointTranslation.prototype.onUndo = function () {\r\n\r\n // array we will store indices in\r\n var points = new Object();\r\n\r\n // loop over the points\r\n var pointCount = this._pointCollection.getPointCount();\r\n for (var i = 0; i < pointCount; i++) {\r\n var pointIndex = this._pointCollection.getPoint(i);\r\n\r\n points[pointIndex] = pointIndex;\r\n }\r\n\r\n // loop over the unique set of indices and transform the associated point\r\n for (var key in points) {\r\n var ptIdx = points[key];\r\n var pt = this._geom.getPointAt(ptIdx);\r\n pt[0] -= this._totalDelta[0];\r\n pt[1] -= this._totalDelta[1];\r\n pt[2] -= this._totalDelta[2];\r\n this._geom.setPointAt(ptIdx, pt);\r\n }\r\n\r\n this._currentDelta[0] = this._totalDelta[0];\r\n this._currentDelta[1] = this._totalDelta[1];\r\n this._currentDelta[2] = this._totalDelta[2];\r\n\r\n this._totalDelta[0] = 0;\r\n this._totalDelta[1] = 0;\r\n this._totalDelta[2] = 0;\r\n\r\n this._mesh.recomputeCachedGeometry();\r\n }\r\n\r\n // create the undoable item\r\n undoableItem = new UndoablePointTranslation(document.selectedElement);\r\n }\r\n\r\n if (undoableItem != null) {\r\n undoableItem.getName = function () {\r\n var IDS_MreUndoTranslate = 143;\r\n return services.strings.getStringFromId(IDS_MreUndoTranslate);\r\n }\r\n services.undoService.addUndoableItem(undoableItem);\r\n }\r\n}", "function activeMousemove(e, data) {\n var timer = data.timer;\n\n data.touch = e;\n data.timeStamp = e.timeStamp;\n timer.kick();\n }", "function activeMousemove(e, data) {\n var timer = data.timer;\n\n data.touch = e;\n data.timeStamp = e.timeStamp;\n timer.kick();\n }", "function _pointerMoveHandler(e) {\n\t\t_lastPointerEvent = e;\n\n\t\tif (!_pendingPointerMoveHandlers) {\n\t\t\twindow.requestAnimationFrame(_callPointerMoveHandlers);\n\t\t}\n\t\t_pendingPointerMoveHandlers = true;\n\t}", "function eventStart(event, data) {\n\n var handle;\n if (data.handleNumbers.length === 1) {\n\n var handleOrigin = scope_Handles[data.handleNumbers[0]];\n\n // Ignore 'disabled' handles\n if (handleOrigin.hasAttribute('disabled')) {\n return false;\n }\n\n handle = handleOrigin.children[0];\n scope_ActiveHandlesCount += 1;\n\n // Mark the handle as 'active' so it can be styled.\n addClass(handle, options.cssClasses.active);\n }\n\n // A drag should never propagate up to the 'tap' event.\n event.stopPropagation();\n\n // Record the event listeners.\n var listeners = [];\n\n // Attach the move and end events.\n var moveEvent = attachEvent(actions.move, scope_DocumentElement, eventMove, {\n // The event target has changed so we need to propagate the original one so that we keep\n // relying on it to extract target touches.\n target: event.target,\n handle: handle,\n listeners: listeners,\n startCalcPoint: event.calcPoint,\n baseSize: baseSize(),\n pageOffset: event.pageOffset,\n handleNumbers: data.handleNumbers,\n buttonsProperty: event.buttons,\n locations: scope_Locations.slice()\n });\n\n var endEvent = attachEvent(actions.end, scope_DocumentElement, eventEnd, {\n target: event.target,\n handle: handle,\n listeners: listeners,\n handleNumbers: data.handleNumbers\n });\n\n var outEvent = attachEvent(\"mouseout\", scope_DocumentElement, documentLeave, {\n target: event.target,\n handle: handle,\n listeners: listeners,\n handleNumbers: data.handleNumbers\n });\n\n // We want to make sure we pushed the listeners in the listener list rather than creating\n // a new one as it has already been passed to the event handlers.\n listeners.push.apply(listeners, moveEvent.concat(endEvent, outEvent));\n\n // Text selection isn't an issue on touch devices,\n // so adding cursor styles can be skipped.\n if (event.cursor) {\n\n // Prevent the 'I' cursor and extend the range-drag cursor.\n scope_Body.style.cursor = getComputedStyle(event.target).cursor;\n\n // Mark the target with a dragging state.\n if (scope_Handles.length > 1) {\n addClass(scope_Target, options.cssClasses.drag);\n }\n\n // Prevent text selection when dragging the handles.\n // In noUiSlider <= 9.2.0, this was handled by calling preventDefault on mouse/touch start/move,\n // which is scroll blocking. The selectstart event is supported by FireFox starting from version 52,\n // meaning the only holdout is iOS Safari. This doesn't matter: text selection isn't triggered there.\n // The 'cursor' flag is false.\n // See: http://caniuse.com/#search=selectstart\n scope_Body.addEventListener('selectstart', preventDefault, false);\n }\n\n data.handleNumbers.forEach(function (handleNumber) {\n fireEvent('start', handleNumber);\n });\n }", "function activeMousemove(e, data) {\n\t\tvar timer = data.timer;\n\n\t\tdata.touch = e;\n\t\tdata.timeStamp = e.timeStamp;\n\t\ttimer.kick();\n\t}", "function touchMove(event)\n\t\t\t{\n\t\t\t\t//event.preventDefault();\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tfinalCoord.x = (settings.touch_capable) ? event.targetTouches[0].pageX : event.pageX;\n\t\t\t\tfinalCoord.y = (settings.touch_capable) ? event.targetTouches[0].pageY : event.pageY;\n\t\t\t\twindow.clearTimeout(settings.hold_timer);\n\t\t\t\t\n\t\t\t\tvar swipedir;\n\t\t\t\t\n\t\t\t\t// We need to check if the element to which the event was bound contains a data-xthreshold | data-vthreshold:\n\t\t\t\tvar ele_x_threshold = $this.attr('data-xthreshold'),\n\t\t\t\t ele_y_threshold = $this.attr('data-ythreshold'),\n\t\t\t\t\t h_threshold = (typeof ele_x_threshold !== 'undefined' && ele_x_threshold !== false && parseInt(ele_x_threshold)) ? parseInt(ele_x_threshold) : settings.swipe_h_threshold,\n\t\t\t\t\t\tv_threshold = (typeof ele_y_threshold !== 'undefined' && ele_y_threshold !== false && parseInt(ele_y_threshold)) ? parseInt(ele_y_threshold) : settings.swipe_v_threshold;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(originalCoord.y > finalCoord.y && (originalCoord.y - finalCoord.y > v_threshold)) { swipedir = 'swipeup'; }\n\t\t\t\tif(originalCoord.x < finalCoord.x && (finalCoord.x - originalCoord.x > h_threshold)) { swipedir = 'swiperight'; }\n\t\t\t\tif(originalCoord.y < finalCoord.y && (finalCoord.y - originalCoord.y > v_threshold)) { swipedir = 'swipedown'; }\n\t\t\t\tif(originalCoord.x > finalCoord.x && (originalCoord.x - finalCoord.x > h_threshold)) { swipedir = 'swipeleft'; }\n\t\t\t\tif(swipedir != undefined && started)\n\t\t\t\t{\n\t\t\t\t\toriginalCoord.x = 0;\n\t\t\t\t\toriginalCoord.y = 0;\n\t\t\t\t\tfinalCoord.x = 0;\n\t\t\t\t\tfinalCoord.y = 0;\n\t\t\t\t\t$this.trigger('swipe').trigger(swipedir);\n\t\t\t\t\tstarted = false;\n\t\t\t\t}\n\t\t\t}", "function character_movement(e){\n keyCode_right:\n if(e.keyCode === 68){ //keyCode_D Move_right \n //\n //keyCode_right original location\n //\n //keyCode_D find current container with red_background class.\n var find_location = document.getElementsByClassName(\"red_background\");\n var original_placement = find_location[0].id;\n console.log(\"Find originating character placement: \" + original_placement);//Display 2\n \n var split_original_placement = original_placement.split(\"_\");\n //Assign each part of the original placement id to separate parts.\n //Grid is unnecessary\n var sop_row = split_original_placement[1];//1, 2, 3, or 4...\n var sop_column = split_original_placement[2];//1, 2, 3, or 4...\n var sop_letter = split_original_placement[3];//A, B, C, or D\n //No_inner\n var original_character_placement_id = sop_row + sop_column + sop_letter;\n console.log(\"Original placement split: \" + split_original_placement);//Display 3\n console.log(\"Original placement reformed: \" + original_character_placement_id);\n //Original placement is now in impassable location form and ready to compare. Access original_placement for resetting character position.\n \n ///////////////////////////////////////////////////////////////////////////\n ///////////////////////////////////////////////////////////////////////////\n if(sop_letter === letter_indeces[0]){//Move Right A ===> B no column change \n //\n //keyCode_right impassable\n //\n var impassable_locations_array = [];\n var find_impassable = document.getElementsByClassName(\"impassable\");//This id will never equal that of character_placement id simply because of _inner\n \n var k;\n var l;\n var pseudo_array_length_01 = 17;\n for(k = 0, l = 0;k < find_impassable.length, l < pseudo_array_length_01; k++, l++){\n// console.log(find_impassable[k].id);\n var find_impassable_id = find_impassable[k].id;\n var stringify_find_impassable_id = find_impassable_id.toString();\n var sfi_id = stringify_find_impassable_id.split(\"_\");\n\n\n var impassable_row_initial = sfi_id[1];\n var impassable_cell_initial = sfi_id[2];\n var impassable_subset_array = sfi_id[3];\n \n var impassable_locations = impassable_row_initial + impassable_cell_initial + impassable_subset_array;\n var string_impassable_locations = impassable_locations.toString();//Ensure impassable locations typing is set to string\n impassable_locations_array.push(string_impassable_locations);\n console.log(\"Impassable location array \" + impassable_locations_array[l]);//Display 4\n //All impassable locations have been pulled successfully from this script. End for loop impassable\n //Format for impassable locations array = 14C, 14D, 24A, 24B, etc...\n \n var sop_row_parse = parseInt(sop_row); \n var sop_column_parse = parseInt(sop_column);\n \n var new_sop_row = sop_row_parse;\n var new_sop_column = sop_column_parse;\n var new_sop_letter = letter_indeces[1];\n \n var new_sop_row_string = new_sop_row.toString();\n var new_sop_column_string = new_sop_column.toString();\n \n var new_placement = new_sop_row_string + new_sop_column_string + new_sop_letter;\n var string_new_placement = new_placement.toString();\n \n var go_to_new_location = \"grid_\" + new_sop_row + \"_\" + new_sop_column + \"_\" + new_sop_letter;//ID for new location if permitted.\n var change_original = document.getElementById(original_placement);\n var change_new = document.getElementById(go_to_new_location);\n if(impassable_locations_array.indexOf(string_new_placement) > -1){\n \n change_original.className = \"character_placement red_background\";\n if(change_new === null){\n\n }\n else{\n change_new.className = \"character_placement\";\n }\n console.log(\"The conditional on D to C is stating that the impassable array has the value of the next coordinate somewhere.\");\n }\n else{\n \n if(change_new === null){\n \n change_new = change_original;\n change_original.className = \"character_placement red_background\";\n \n }else{\n change_original.className = \"character_placement\";\n change_new.className = \"character_placement red_background\";\n \n console.log(\"We are still waiting to see if impassable locations will be detected...\");\n }\n }\n \n }\n \n }//End letter_indeces[A] right movement to B\n \n /////////////////////////////////////////////////////////////////////////////\n /////////////////////////////////////////////////////////////////////////////\n else if(sop_letter === letter_indeces[1]){//Move Right B ===> A column change \n //\n //keyCode_right impassable\n //\n var impassable_locations_array = [];\n var find_impassable = document.getElementsByClassName(\"impassable\");//This id will never equal that of character_placement id simply because of _inner\n \n var k;\n var l;\n var pseudo_array_length_01 = 17;\n impassable_loop:\n for(k = 0, l = 0;k < find_impassable.length, l < pseudo_array_length_01; k++, l++){\n// console.log(find_impassable[k].id);\n var find_impassable_id = find_impassable[k].id;\n var stringify_find_impassable_id = find_impassable_id.toString();\n var sfi_id = stringify_find_impassable_id.split(\"_\");\n\n\n var impassable_row_initial = sfi_id[1];\n var impassable_cell_initial = sfi_id[2];\n var impassable_subset_array = sfi_id[3];\n \n var impassable_locations = impassable_row_initial + impassable_cell_initial + impassable_subset_array;\n var string_impassable_locations = impassable_locations.toString();//Ensure impassable locations typing is set to string\n impassable_locations_array.push(string_impassable_locations);\n \n var string_current_impassable_location = impassable_locations_array[l];\n console.log(\"Impassable location array \" + impassable_locations_array[l]);//Display 4\n //All impassable locations have been pulled successfully from this script. End for loop impassable\n //Format for impassable locations array = 14C, 14D, 24A, 24B, etc...\n \n var sop_row_parse = parseInt(sop_row); \n var sop_column_parse = parseInt(sop_column);\n \n var new_sop_row = sop_row_parse;\n var new_sop_column = sop_column_parse + 1;\n var new_sop_letter = letter_indeces[0];\n \n var new_sop_row_string = new_sop_row.toString();\n var new_sop_column_string = new_sop_column.toString();\n \n var new_placement = new_sop_row_string + new_sop_column_string + new_sop_letter;\n var string_new_placement = new_placement.toString();\n \n var go_to_new_location = \"grid_\" + new_sop_row + \"_\" + new_sop_column + \"_\" + new_sop_letter;//ID for new location if permitted.\n var change_original = document.getElementById(original_placement);\n var change_new = document.getElementById(go_to_new_location);\n \n change_new_classes = change_new.classList;\n console.log(\"The list of all classes in the supposed new placement: \" + change_new_classes);\n console.log(change_new_classes[0]);\n console.log(change_new_classes[1]);\n console.log(change_new_classes.length);\n \n console.log(\"Comparing. String_new_placement = \" + string_new_placement + \"String_current_impassable_location = \" + string_current_impassable_location);\n console.log(typeof(string_new_placement) + \" \" + typeof(string_current_impassable_location));\n var string_comparison = string_current_impassable_location.localeCompare(string_new_placement);\n console.log(string_comparison);\n\n if(impassable_locations_array.indexOf(string_new_placement) > -1){\n \n change_original.className = \"character_placement red_background\";\n if(change_new === null){\n\n }\n else{\n\n /*\n * If new location has more than one class find out what those classes are and then set new location to those classes\n * \n * change_new_classes = change_new.classList;\n * console.log(change_new_classes);\n * console.log(change_new_classes.length);\n * \n * change_new.className = change_new_classes;\n * \n * \n */\n //Instead of hard coding the new class we need the program to decide to keep this coordinate's class how it oringially was\n\n \n change_new.className = \"character_placement\";\n }\n console.log(\"The conditional on D to C is stating that the impassable array has the value of the next coordinate somewhere.\");\n }\n else{\n if(change_new === null){\n \n change_new = change_original;\n change_original.className = \"character_placement red_background\";\n \n }else{\n //Instead of hard coding the new class we need the program to decide to keep this coordinate's class how it oringially was\n change_original.className = \"character_placement\";\n \n change_new.className = \"character_placement red_background\"; \n console.log(\"We are still waiting to see if impassable locations will be detected...\");\n }\n }\n \n }\n\n \n }//End letter_indeces[B] right movement to A\n \n \n else if(sop_letter === letter_indeces[3]){//Move Right D ===> C column change \n //\n //keyCode_right impassable\n //\n var impassable_locations_array = [];\n var find_impassable = document.getElementsByClassName(\"impassable\");//This id will never equal that of character_placement id simply because of _inner\n \n var k;\n var l;\n var pseudo_array_length_01 = 17;\n impassable_loop:\n for(k = 0, l = 0;k < find_impassable.length, l < pseudo_array_length_01; k++, l++){\n// console.log(find_impassable[k].id);\n var find_impassable_id = find_impassable[k].id;\n var stringify_find_impassable_id = find_impassable_id.toString();\n var sfi_id = stringify_find_impassable_id.split(\"_\");\n\n\n var impassable_row_initial = sfi_id[1];\n var impassable_cell_initial = sfi_id[2];\n var impassable_subset_array = sfi_id[3];\n \n var impassable_locations = impassable_row_initial + impassable_cell_initial + impassable_subset_array;\n var string_impassable_locations = impassable_locations.toString();//Ensure impassable locations typing is set to string\n impassable_locations_array.push(string_impassable_locations);\n \n var string_current_impassable_location = impassable_locations_array[l];\n console.log(\"Impassable location array \" + impassable_locations_array[l]);//Display 4\n //All impassable locations have been pulled successfully from this script. End for loop impassable\n //Format for impassable locations array = 14C, 14D, 24A, 24B, etc...\n \n var sop_row_parse = parseInt(sop_row); \n var sop_column_parse = parseInt(sop_column);\n \n var new_sop_row = sop_row_parse;\n var new_sop_column = sop_column_parse + 1;\n var new_sop_letter = letter_indeces[2];\n \n var new_sop_row_string = new_sop_row.toString();\n var new_sop_column_string = new_sop_column.toString();\n \n var new_placement = new_sop_row_string + new_sop_column_string + new_sop_letter;\n var string_new_placement = new_placement.toString();\n \n var go_to_new_location = \"grid_\" + new_sop_row + \"_\" + new_sop_column + \"_\" + new_sop_letter;//ID for new location if permitted.\n var change_original = document.getElementById(original_placement);\n var change_new = document.getElementById(go_to_new_location);\n \n console.log(\"Comparing. String_new_placement = \" + string_new_placement + \"String_current_impassable_location = \" + string_current_impassable_location);\n console.log(typeof(string_new_placement) + \" \" + typeof(string_current_impassable_location));\n var string_comparison = string_current_impassable_location.localeCompare(string_new_placement);\n console.log(string_comparison);\n\n if(impassable_locations_array.indexOf(string_new_placement) > -1){\n \n change_original.className = \"character_placement red_background\";\n if(change_new === null){\n\n }\n else{\n change_new.className = \"character_placement\";\n }\n console.log(\"The conditional on D to C is stating that the impassable array has the value of the next coordinate somewhere.\");\n }\n else{\n if(change_new === null){\n \n change_new = change_original;\n change_original.className = \"character_placement red_background\";\n \n }\n change_original.className = \"character_placement\";\n change_new.className = \"character_placement red_background\";\n \n console.log(\"We are still waiting to see if impassable locations will be detected...\");\n }\n }\n\n \n }//End letter_indeces[D] right movement to C\n \n \n \n if(sop_letter === letter_indeces[2]){//Move Right C ===> D no column change \n //\n //keyCode_right impassable\n //\n var impassable_locations_array = [];\n var find_impassable = document.getElementsByClassName(\"impassable\");//This id will never equal that of character_placement id simply because of _inner\n \n var k;\n var l;\n var pseudo_array_length_01 = 17;\n for(k = 0, l = 0;k < find_impassable.length, l < pseudo_array_length_01; k++, l++){\n// console.log(find_impassable[k].id);\n var find_impassable_id = find_impassable[k].id;\n var stringify_find_impassable_id = find_impassable_id.toString();\n var sfi_id = stringify_find_impassable_id.split(\"_\");\n\n\n var impassable_row_initial = sfi_id[1];\n var impassable_cell_initial = sfi_id[2];\n var impassable_subset_array = sfi_id[3];\n \n var impassable_locations = impassable_row_initial + impassable_cell_initial + impassable_subset_array;\n var string_impassable_locations = impassable_locations.toString();//Ensure impassable locations typing is set to string\n impassable_locations_array.push(string_impassable_locations);\n console.log(\"Impassable location array \" + impassable_locations_array[l]);//Display 4\n //All impassable locations have been pulled successfully from this script. End for loop impassable\n //Format for impassable locations array = 14C, 14D, 24A, 24B, etc...\n \n var sop_row_parse = parseInt(sop_row); \n var sop_column_parse = parseInt(sop_column);\n \n var new_sop_row = sop_row_parse;\n var new_sop_column = sop_column_parse;\n var new_sop_letter = letter_indeces[3];\n \n var new_sop_row_string = new_sop_row.toString();\n var new_sop_column_string = new_sop_column.toString();\n \n var new_placement = new_sop_row_string + new_sop_column_string + new_sop_letter;\n var string_new_placement = new_placement.toString();\n \n var go_to_new_location = \"grid_\" + new_sop_row + \"_\" + new_sop_column + \"_\" + new_sop_letter;//ID for new location if permitted.\n var change_original = document.getElementById(original_placement);\n var change_new = document.getElementById(go_to_new_location);\n if(impassable_locations_array.indexOf(string_new_placement) > -1){\n \n change_original.className = \"character_placement red_background\";\n if(change_new === null){\n\n }\n else{\n change_new.className = \"character_placement\";\n }\n console.log(\"The conditional on D to C is stating that the impassable array has the value of the next coordinate somewhere.\");\n }\n else{\n \n if(change_new === null){\n \n change_new = change_original;\n change_original.className = \"character_placement red_background\";\n \n }else{\n change_original.className = \"character_placement\";\n change_new.className = \"character_placement red_background\";\n \n console.log(\"We are still waiting to see if impassable locations will be detected...\");\n }\n }\n \n }\n \n }//End letter_indeces[C] right movement to D\n \n }//End keyCode D right movement\n \n \n \n \n keyCode_left:\n if(e.keyCode === 65){ //keyCode_D Move_left \n //\n //keyCode_left original location\n //\n //keyCode_A find current container with red_background class.\n var find_location = document.getElementsByClassName(\"red_background\");\n var original_placement = find_location[0].id;\n console.log(\"Find originating character placement: \" + original_placement);//Display 2\n \n var split_original_placement = original_placement.split(\"_\");\n //Assign each part of the original placement id to separate parts.\n //Grid is unnecessary\n var sop_row = split_original_placement[1];//1, 2, 3, or 4\n var sop_column = split_original_placement[2];//1, 2, 3, or 4\n var sop_letter = split_original_placement[3];//A, B, C, or D\n //No_inner\n var original_character_placement_id = sop_row + sop_column + sop_letter;\n console.log(\"Original placement split: \" + split_original_placement);//Display 3\n console.log(\"Original placement reformed: \" + original_character_placement_id);\n //Original placement is now in impassable location form and ready to compare. Access original_placement for resetting character position.\n \n ///////////////////////////////////////////////////////////////////////////\n ///////////////////////////////////////////////////////////////////////////\n if(sop_letter === letter_indeces[0]){//Move Left A ===> B column change \n //\n //keyCode_left impassable\n //\n var impassable_locations_array = [];\n var find_impassable = document.getElementsByClassName(\"impassable\");//This id will never equal that of character_placement id simply because of _inner\n \n var k;\n var l;\n var pseudo_array_length_01 = 17;\n for(k = 0, l = 0;k < find_impassable.length, l < pseudo_array_length_01; k++, l++){\n// console.log(find_impassable[k].id);\n var find_impassable_id = find_impassable[k].id;\n var stringify_find_impassable_id = find_impassable_id.toString();\n var sfi_id = stringify_find_impassable_id.split(\"_\");\n\n\n var impassable_row_initial = sfi_id[1];\n var impassable_cell_initial = sfi_id[2];\n var impassable_subset_array = sfi_id[3];\n \n var impassable_locations = impassable_row_initial + impassable_cell_initial + impassable_subset_array;\n var string_impassable_locations = impassable_locations.toString();//Ensure impassable locations typing is set to string\n impassable_locations_array.push(string_impassable_locations);\n console.log(\"Impassable location array \" + impassable_locations_array[l]);//Display 4\n //All impassable locations have been pulled successfully from this script. End for loop impassable\n //Format for impassable locations array = 14C, 14D, 24A, 24B, etc...\n \n var sop_row_parse = parseInt(sop_row); \n var sop_column_parse = parseInt(sop_column);\n \n var new_sop_row = sop_row_parse;\n var new_sop_column = sop_column_parse - 1;\n var new_sop_letter = letter_indeces[1];\n \n var new_sop_row_string = new_sop_row.toString();\n var new_sop_column_string = new_sop_column.toString();\n \n var new_placement = new_sop_row_string + new_sop_column_string + new_sop_letter;\n var string_new_placement = new_placement.toString();\n \n var go_to_new_location = \"grid_\" + new_sop_row + \"_\" + new_sop_column + \"_\" + new_sop_letter;//ID for new location if permitted.\n var change_original = document.getElementById(original_placement);\n var change_new = document.getElementById(go_to_new_location);\n if(impassable_locations_array.indexOf(string_new_placement) > -1){\n \n change_original.className = \"character_placement red_background\";\n if(change_new === null){\n\n }\n else{\n change_new.className = \"character_placement\";\n }\n console.log(\"The conditional on D to C is stating that the impassable array has the value of the next coordinate somewhere.\");\n }\n else{\n \n if(change_new === null){\n \n change_new = change_original;\n change_original.className = \"character_placement red_background\";\n \n }else{\n change_original.className = \"character_placement\";\n change_new.className = \"character_placement red_background\";\n \n console.log(\"We are still waiting to see if impassable locations will be detected...\");\n }\n }\n \n }\n \n }//End letter_indeces[A] left movement to B\n \n /////////////////////////////////////////////////////////////////////////////\n /////////////////////////////////////////////////////////////////////////////\n else if(sop_letter === letter_indeces[1]){//Move Left B ===> A no column change \n //\n //keyCode_right impassable\n //\n var impassable_locations_array = [];\n var find_impassable = document.getElementsByClassName(\"impassable\");//This id will never equal that of character_placement id simply because of _inner\n \n var k;\n var l;\n var pseudo_array_length_01 = 17;\n impassable_loop:\n for(k = 0, l = 0;k < find_impassable.length, l < pseudo_array_length_01; k++, l++){\n// console.log(find_impassable[k].id);\n var find_impassable_id = find_impassable[k].id;\n var stringify_find_impassable_id = find_impassable_id.toString();\n var sfi_id = stringify_find_impassable_id.split(\"_\");\n\n\n var impassable_row_initial = sfi_id[1];\n var impassable_cell_initial = sfi_id[2];\n var impassable_subset_array = sfi_id[3];\n \n var impassable_locations = impassable_row_initial + impassable_cell_initial + impassable_subset_array;\n var string_impassable_locations = impassable_locations.toString();//Ensure impassable locations typing is set to string\n impassable_locations_array.push(string_impassable_locations);\n \n var string_current_impassable_location = impassable_locations_array[l];\n console.log(\"Impassable location array \" + impassable_locations_array[l]);//Display 4\n //All impassable locations have been pulled successfully from this script. End for loop impassable\n //Format for impassable locations array = 14C, 14D, 24A, 24B, etc...\n \n var sop_row_parse = parseInt(sop_row); \n var sop_column_parse = parseInt(sop_column);\n \n var new_sop_row = sop_row_parse;\n var new_sop_column = sop_column_parse;\n var new_sop_letter = letter_indeces[0];\n \n var new_sop_row_string = new_sop_row.toString();\n var new_sop_column_string = new_sop_column.toString();\n \n var new_placement = new_sop_row_string + new_sop_column_string + new_sop_letter;\n var string_new_placement = new_placement.toString();\n \n var go_to_new_location = \"grid_\" + new_sop_row + \"_\" + new_sop_column + \"_\" + new_sop_letter;//ID for new location if permitted.\n var change_original = document.getElementById(original_placement);\n var change_new = document.getElementById(go_to_new_location);\n \n console.log(\"Comparing. String_new_placement = \" + string_new_placement + \"String_current_impassable_location = \" + string_current_impassable_location);\n console.log(typeof(string_new_placement) + \" \" + typeof(string_current_impassable_location));\n var string_comparison = string_current_impassable_location.localeCompare(string_new_placement);\n console.log(string_comparison);\n\n if(impassable_locations_array.indexOf(string_new_placement) > -1){\n \n change_original.className = \"character_placement red_background\";\n if(change_new === null){\n\n }\n else{\n change_new.className = \"character_placement\";\n }\n console.log(\"The conditional on D to C is stating that the impassable array has the value of the next coordinate somewhere.\");\n }\n else{\n if(change_new === null){\n \n change_new = change_original;\n change_original.className = \"character_placement red_background\";\n \n }else{\n change_original.className = \"character_placement\";\n change_new.className = \"character_placement red_background\";\n \n console.log(\"We are still waiting to see if impassable locations will be detected...\");\n }\n }\n \n }\n\n \n }//End letter_indeces[B] right movement to A\n \n \n else if(sop_letter === letter_indeces[3]){//Move Left D ===> C no column change \n //\n //keyCode_right impassable\n //\n var impassable_locations_array = [];\n var find_impassable = document.getElementsByClassName(\"impassable\");//This id will never equal that of character_placement id simply because of _inner\n \n var k;\n var l;\n var pseudo_array_length_01 = 17;\n impassable_loop:\n for(k = 0, l = 0;k < find_impassable.length, l < pseudo_array_length_01; k++, l++){\n// console.log(find_impassable[k].id);\n var find_impassable_id = find_impassable[k].id;\n var stringify_find_impassable_id = find_impassable_id.toString();\n var sfi_id = stringify_find_impassable_id.split(\"_\");\n\n\n var impassable_row_initial = sfi_id[1];\n var impassable_cell_initial = sfi_id[2];\n var impassable_subset_array = sfi_id[3];\n \n var impassable_locations = impassable_row_initial + impassable_cell_initial + impassable_subset_array;\n var string_impassable_locations = impassable_locations.toString();//Ensure impassable locations typing is set to string\n impassable_locations_array.push(string_impassable_locations);\n \n var string_current_impassable_location = impassable_locations_array[l];\n console.log(\"Impassable location array \" + impassable_locations_array[l]);//Display 4\n //All impassable locations have been pulled successfully from this script. End for loop impassable\n //Format for impassable locations array = 14C, 14D, 24A, 24B, etc...\n \n var sop_row_parse = parseInt(sop_row); \n var sop_column_parse = parseInt(sop_column);\n \n var new_sop_row = sop_row_parse;\n var new_sop_column = sop_column_parse;\n var new_sop_letter = letter_indeces[2];\n \n var new_sop_row_string = new_sop_row.toString();\n var new_sop_column_string = new_sop_column.toString();\n \n var new_placement = new_sop_row_string + new_sop_column_string + new_sop_letter;\n var string_new_placement = new_placement.toString();\n \n var go_to_new_location = \"grid_\" + new_sop_row + \"_\" + new_sop_column + \"_\" + new_sop_letter;//ID for new location if permitted.\n var change_original = document.getElementById(original_placement);\n var change_new = document.getElementById(go_to_new_location);\n \n console.log(\"Comparing. String_new_placement = \" + string_new_placement + \"String_current_impassable_location = \" + string_current_impassable_location);\n console.log(typeof(string_new_placement) + \" \" + typeof(string_current_impassable_location));\n var string_comparison = string_current_impassable_location.localeCompare(string_new_placement);\n console.log(string_comparison);\n\n if(impassable_locations_array.indexOf(string_new_placement) > -1){\n \n change_original.className = \"character_placement red_background\";\n if(change_new === null){\n\n }\n else{\n change_new.className = \"character_placement\";\n }\n console.log(\"The conditional on D to C is stating that the impassable array has the value of the next coordinate somewhere.\");\n }\n else{\n if(change_new === null){\n \n change_new = change_original;\n change_original.className = \"character_placement red_background\";\n \n }\n change_original.className = \"character_placement\";\n change_new.className = \"character_placement red_background\";\n \n console.log(\"We are still waiting to see if impassable locations will be detected...\");\n }\n }\n\n \n }//End letter_indeces[D] left movement to C\n \n \n \n if(sop_letter === letter_indeces[2]){//Move Left C ===> D column change \n //\n //keyCode_left impassable\n //\n var impassable_locations_array = [];\n var find_impassable = document.getElementsByClassName(\"impassable\");//This id will never equal that of character_placement id simply because of _inner\n \n var k;\n var l;\n var pseudo_array_length_01 = 17;\n for(k = 0, l = 0;k < find_impassable.length, l < pseudo_array_length_01; k++, l++){\n// console.log(find_impassable[k].id);\n var find_impassable_id = find_impassable[k].id;\n var stringify_find_impassable_id = find_impassable_id.toString();\n var sfi_id = stringify_find_impassable_id.split(\"_\");\n\n\n var impassable_row_initial = sfi_id[1];\n var impassable_cell_initial = sfi_id[2];\n var impassable_subset_array = sfi_id[3];\n \n var impassable_locations = impassable_row_initial + impassable_cell_initial + impassable_subset_array;\n var string_impassable_locations = impassable_locations.toString();//Ensure impassable locations typing is set to string\n impassable_locations_array.push(string_impassable_locations);\n console.log(\"Impassable location array \" + impassable_locations_array[l]);//Display 4\n //All impassable locations have been pulled successfully from this script. End for loop impassable\n //Format for impassable locations array = 14C, 14D, 24A, 24B, etc...\n \n var sop_row_parse = parseInt(sop_row); \n var sop_column_parse = parseInt(sop_column);\n \n var new_sop_row = sop_row_parse;\n var new_sop_column = sop_column_parse - 1;\n var new_sop_letter = letter_indeces[3];\n \n var new_sop_row_string = new_sop_row.toString();\n var new_sop_column_string = new_sop_column.toString();\n \n var new_placement = new_sop_row_string + new_sop_column_string + new_sop_letter;\n var string_new_placement = new_placement.toString();\n \n var go_to_new_location = \"grid_\" + new_sop_row + \"_\" + new_sop_column + \"_\" + new_sop_letter;//ID for new location if permitted.\n var change_original = document.getElementById(original_placement);\n var change_new = document.getElementById(go_to_new_location);\n if(impassable_locations_array.indexOf(string_new_placement) > -1){\n \n change_original.className = \"character_placement red_background\";\n if(change_new === null){\n\n }\n else{\n change_new.className = \"character_placement\";\n }\n console.log(\"The conditional on D to C is stating that the impassable array has the value of the next coordinate somewhere.\");\n }\n else{\n \n if(change_new === null){\n \n change_new = change_original;\n change_original.className = \"character_placement red_background\";\n \n }else{\n change_original.className = \"character_placement\";\n change_new.className = \"character_placement red_background\";\n \n console.log(\"We are still waiting to see if impassable locations will be detected...\");\n }\n }\n \n }\n \n }//End letter_indeces[C] left movement to D\n \n }//End keyCode A left movement\n \n \n keyCode_down:\n if(e.keyCode === 83){ //keyCode_S Move_down\n //if(e.keyCode === 83)\n //keyCode_down original location\n //\n //keyCode_A find current container with red_background class.\n var find_location = document.getElementsByClassName(\"red_background\");\n var original_placement = find_location[0].id;\n console.log(\"Find originating character placement: \" + original_placement);//Display 2\n \n var split_original_placement = original_placement.split(\"_\");\n //Assign each part of the original placement id to separate parts.\n //Grid is unnecessary\n var sop_row = split_original_placement[1];//1, 2, 3, or 4\n var sop_column = split_original_placement[2];//1, 2, 3, or 4\n var sop_letter = split_original_placement[3];//A, B, C, or D\n //No_inner\n var original_character_placement_id = sop_row + sop_column + sop_letter;\n console.log(\"Original placement split: \" + split_original_placement);//Display 3\n console.log(\"Original placement reformed: \" + original_character_placement_id);\n //Original placement is now in impassable location form and ready to compare. Access original_placement for resetting character position.\n \n ///////////////////////////////////////////////////////////////////////////\n ///////////////////////////////////////////////////////////////////////////\n if(sop_letter === letter_indeces[0]){//Move Down A ===> C no row change \n //\n //keyCode_down impassable\n //\n var impassable_locations_array = [];\n var find_impassable = document.getElementsByClassName(\"impassable\");//This id will never equal that of character_placement id simply because of _inner\n \n var k;\n var l;\n var pseudo_array_length_01 = 17;\n for(k = 0, l = 0;k < find_impassable.length, l < pseudo_array_length_01; k++, l++){\n// console.log(find_impassable[k].id);\n var find_impassable_id = find_impassable[k].id;\n var stringify_find_impassable_id = find_impassable_id.toString();\n var sfi_id = stringify_find_impassable_id.split(\"_\");\n\n\n var impassable_row_initial = sfi_id[1];\n var impassable_cell_initial = sfi_id[2];\n var impassable_subset_array = sfi_id[3];\n \n var impassable_locations = impassable_row_initial + impassable_cell_initial + impassable_subset_array;\n var string_impassable_locations = impassable_locations.toString();//Ensure impassable locations typing is set to string\n impassable_locations_array.push(string_impassable_locations);\n console.log(\"Impassable location array \" + impassable_locations_array[l]);//Display 4\n //All impassable locations have been pulled successfully from this script. End for loop impassable\n //Format for impassable locations array = 14C, 14D, 24A, 24B, etc...\n \n var sop_row_parse = parseInt(sop_row); \n var sop_column_parse = parseInt(sop_column);\n \n var new_sop_row = sop_row_parse;\n var new_sop_column = sop_column_parse;\n var new_sop_letter = letter_indeces[2];\n \n var new_sop_row_string = new_sop_row.toString();\n var new_sop_column_string = new_sop_column.toString();\n \n var new_placement = new_sop_row_string + new_sop_column_string + new_sop_letter;\n var string_new_placement = new_placement.toString();\n \n var go_to_new_location = \"grid_\" + new_sop_row + \"_\" + new_sop_column + \"_\" + new_sop_letter;//ID for new location if permitted.\n var change_original = document.getElementById(original_placement);\n var change_new = document.getElementById(go_to_new_location);\n if(impassable_locations_array.indexOf(string_new_placement) > -1){\n \n change_original.className = \"character_placement red_background\";\n if(change_new === null){\n\n }\n else{\n change_new.className = \"character_placement\";\n }\n console.log(\"The conditional on D to C is stating that the impassable array has the value of the next coordinate somewhere.\");\n }\n else{\n \n if(change_new === null){\n \n change_new = change_original;\n change_original.className = \"character_placement red_background\";\n \n }else{\n change_original.className = \"character_placement\";\n change_new.className = \"character_placement red_background\";\n \n console.log(\"We are still waiting to see if impassable locations will be detected...\");\n }\n }\n \n }\n \n }//End letter_indeces[A] down movement to C\n \n /////////////////////////////////////////////////////////////////////////////\n /////////////////////////////////////////////////////////////////////////////\n \n ///////////////////////////////////////////////////////////////////////////\n ///////////////////////////////////////////////////////////////////////////\n if(sop_letter === letter_indeces[2]){//Move Down C ===> A row change \n //\n //keyCode_down impassable\n //\n var impassable_locations_array = [];\n var find_impassable = document.getElementsByClassName(\"impassable\");//This id will never equal that of character_placement id simply because of _inner\n \n var k;\n var l;\n var pseudo_array_length_01 = 17;\n for(k = 0, l = 0;k < find_impassable.length, l < pseudo_array_length_01; k++, l++){\n// console.log(find_impassable[k].id);\n var find_impassable_id = find_impassable[k].id;\n var stringify_find_impassable_id = find_impassable_id.toString();\n var sfi_id = stringify_find_impassable_id.split(\"_\");\n\n\n var impassable_row_initial = sfi_id[1];\n var impassable_cell_initial = sfi_id[2];\n var impassable_subset_array = sfi_id[3];\n \n var impassable_locations = impassable_row_initial + impassable_cell_initial + impassable_subset_array;\n var string_impassable_locations = impassable_locations.toString();//Ensure impassable locations typing is set to string\n impassable_locations_array.push(string_impassable_locations);\n console.log(\"Impassable location array \" + impassable_locations_array[l]);//Display 4\n //All impassable locations have been pulled successfully from this script. End for loop impassable\n //Format for impassable locations array = 14C, 14D, 24A, 24B, etc...\n \n var sop_row_parse = parseInt(sop_row); \n var sop_column_parse = parseInt(sop_column);\n \n var new_sop_row = sop_row_parse + 1;\n var new_sop_column = sop_column_parse;\n var new_sop_letter = letter_indeces[0];\n \n var new_sop_row_string = new_sop_row.toString();\n var new_sop_column_string = new_sop_column.toString();\n \n var new_placement = new_sop_row_string + new_sop_column_string + new_sop_letter;\n var string_new_placement = new_placement.toString();\n \n var go_to_new_location = \"grid_\" + new_sop_row + \"_\" + new_sop_column + \"_\" + new_sop_letter;//ID for new location if permitted.\n var change_original = document.getElementById(original_placement);\n var change_new = document.getElementById(go_to_new_location);\n if(impassable_locations_array.indexOf(string_new_placement) > -1){\n \n change_original.className = \"character_placement red_background\";\n if(change_new === null){\n\n }\n else{\n change_new.className = \"character_placement\";\n }\n console.log(\"The conditional on D to C is stating that the impassable array has the value of the next coordinate somewhere.\");\n }\n else{\n \n if(change_new === null){\n \n change_new = change_original;\n change_original.className = \"character_placement red_background\";\n \n }else{\n change_original.className = \"character_placement\";\n change_new.className = \"character_placement red_background\";\n \n console.log(\"We are still waiting to see if impassable locations will be detected...\");\n }\n }\n \n }\n \n }//End letter_indeces[C] down movement to A\n \n /////////////////////////////////////////////////////////////////////////////\n /////////////////////////////////////////////////////////////////////////////\n \n if(sop_letter === letter_indeces[1]){//Move Down B ===> D no row change \n //\n //keyCode_down impassable\n //\n var impassable_locations_array = [];\n var find_impassable = document.getElementsByClassName(\"impassable\");//This id will never equal that of character_placement id simply because of _inner\n \n var k;\n var l;\n var pseudo_array_length_01 = 17;\n for(k = 0, l = 0;k < find_impassable.length, l < pseudo_array_length_01; k++, l++){\n// console.log(find_impassable[k].id);\n var find_impassable_id = find_impassable[k].id;\n var stringify_find_impassable_id = find_impassable_id.toString();\n var sfi_id = stringify_find_impassable_id.split(\"_\");\n\n\n var impassable_row_initial = sfi_id[1];\n var impassable_cell_initial = sfi_id[2];\n var impassable_subset_array = sfi_id[3];\n \n var impassable_locations = impassable_row_initial + impassable_cell_initial + impassable_subset_array;\n var string_impassable_locations = impassable_locations.toString();//Ensure impassable locations typing is set to string\n impassable_locations_array.push(string_impassable_locations);\n console.log(\"Impassable location array \" + impassable_locations_array[l]);//Display 4\n //All impassable locations have been pulled successfully from this script. End for loop impassable\n //Format for impassable locations array = 14C, 14D, 24A, 24B, etc...\n \n var sop_row_parse = parseInt(sop_row); \n var sop_column_parse = parseInt(sop_column);\n \n var new_sop_row = sop_row_parse;\n var new_sop_column = sop_column_parse;\n var new_sop_letter = letter_indeces[3];\n \n var new_sop_row_string = new_sop_row.toString();\n var new_sop_column_string = new_sop_column.toString();\n \n var new_placement = new_sop_row_string + new_sop_column_string + new_sop_letter;\n var string_new_placement = new_placement.toString();\n \n var go_to_new_location = \"grid_\" + new_sop_row + \"_\" + new_sop_column + \"_\" + new_sop_letter;//ID for new location if permitted.\n var change_original = document.getElementById(original_placement);\n var change_new = document.getElementById(go_to_new_location);\n if(impassable_locations_array.indexOf(string_new_placement) > -1){\n \n change_original.className = \"character_placement red_background\";\n if(change_new === null){\n\n }\n else{\n change_new.className = \"character_placement\";\n }\n console.log(\"The conditional on D to C is stating that the impassable array has the value of the next coordinate somewhere.\");\n }\n else{\n \n if(change_new === null){\n \n change_new = change_original;\n change_original.className = \"character_placement red_background\";\n \n }else{\n change_original.className = \"character_placement\";\n change_new.className = \"character_placement red_background\";\n \n console.log(\"We are still waiting to see if impassable locations will be detected...\");\n }\n }\n \n }\n \n }//End letter_indeces[B] down movement to D\n \n /////////////////////////////////////////////////////////////////////////////\n /////////////////////////////////////////////////////////////////////////////\n \n \n ///////////////////////////////////////////////////////////////////////////\n ///////////////////////////////////////////////////////////////////////////\n if(sop_letter === letter_indeces[3]){//Move Down D ===> B row change \n //\n //keyCode_down impassable\n //\n var impassable_locations_array = [];\n var find_impassable = document.getElementsByClassName(\"impassable\");//This id will never equal that of character_placement id simply because of _inner\n \n var k;\n var l;\n var pseudo_array_length_01 = 17;\n for(k = 0, l = 0;k < find_impassable.length, l < pseudo_array_length_01; k++, l++){\n// console.log(find_impassable[k].id);\n var find_impassable_id = find_impassable[k].id;\n var stringify_find_impassable_id = find_impassable_id.toString();\n var sfi_id = stringify_find_impassable_id.split(\"_\");\n\n\n var impassable_row_initial = sfi_id[1];\n var impassable_cell_initial = sfi_id[2];\n var impassable_subset_array = sfi_id[3];\n \n var impassable_locations = impassable_row_initial + impassable_cell_initial + impassable_subset_array;\n var string_impassable_locations = impassable_locations.toString();//Ensure impassable locations typing is set to string\n impassable_locations_array.push(string_impassable_locations);\n console.log(\"Impassable location array \" + impassable_locations_array[l]);//Display 4\n //All impassable locations have been pulled successfully from this script. End for loop impassable\n //Format for impassable locations array = 14C, 14D, 24A, 24B, etc...\n \n var sop_row_parse = parseInt(sop_row); \n var sop_column_parse = parseInt(sop_column);\n \n var new_sop_row = sop_row_parse + 1;\n var new_sop_column = sop_column_parse;\n var new_sop_letter = letter_indeces[1];\n \n var new_sop_row_string = new_sop_row.toString();\n var new_sop_column_string = new_sop_column.toString();\n \n var new_placement = new_sop_row_string + new_sop_column_string + new_sop_letter;\n var string_new_placement = new_placement.toString();\n \n var go_to_new_location = \"grid_\" + new_sop_row + \"_\" + new_sop_column + \"_\" + new_sop_letter;//ID for new location if permitted.\n var change_original = document.getElementById(original_placement);\n var change_new = document.getElementById(go_to_new_location);\n if(impassable_locations_array.indexOf(string_new_placement) > -1){\n \n change_original.className = \"character_placement red_background\";\n if(change_new === null){\n\n }\n else{\n change_new.className = \"character_placement\";\n }\n console.log(\"The conditional on D to C is stating that the impassable array has the value of the next coordinate somewhere.\");\n }\n else{\n \n if(change_new === null){\n \n change_new = change_original;\n change_original.className = \"character_placement red_background\";\n \n }else{\n change_original.className = \"character_placement\";\n change_new.className = \"character_placement red_background\";\n \n console.log(\"We are still waiting to see if impassable locations will be detected...\");\n }\n }\n \n }\n \n }//End letter_indeces[D] down movement to B\n \n }//End keyCode S down movement\n keyCode_up:\n if(e.keyCode === 87){ //keyCode_W Move_up\n //\n //keyCode_up original location\n //\n //keyCode_A find current container with red_background class.\n var find_location = document.getElementsByClassName(\"red_background\");\n var original_placement = find_location[0].id;\n console.log(\"Find originating character placement: \" + original_placement);//Display 2\n\n var split_original_placement = original_placement.split(\"_\");\n //Assign each part of the original placement id to separate parts.\n //Grid is unnecessary\n var sop_row = split_original_placement[1];//1, 2, 3, or 4\n var sop_column = split_original_placement[2];//1, 2, 3, or 4\n var sop_letter = split_original_placement[3];//A, B, C, or D\n //No_inner\n var original_character_placement_id = sop_row + sop_column + sop_letter;\n console.log(\"Original placement split: \" + split_original_placement);//Display 3\n console.log(\"Original placement reformed: \" + original_character_placement_id);\n //Original placement is now in impassable location form and ready to compare. Access original_placement for resetting character position.\n\n ///////////////////////////////////////////////////////////////////////////\n ///////////////////////////////////////////////////////////////////////////\n \n \n \n ///////////////////////////////////////////////////////////////////////////\n ///////////////////////////////////////////////////////////////////////////\n if(sop_letter === letter_indeces[0]){//Move Up A ===> C row change \n //\n //keyCode_down impassable\n //\n var impassable_locations_array = [];\n var find_impassable = document.getElementsByClassName(\"impassable\");//This id will never equal that of character_placement id simply because of _inner\n \n var k;\n var l;\n var pseudo_array_length_01 = 17;\n for(k = 0, l = 0;k < find_impassable.length, l < pseudo_array_length_01; k++, l++){\n// console.log(find_impassable[k].id);\n var find_impassable_id = find_impassable[k].id;\n var stringify_find_impassable_id = find_impassable_id.toString();\n var sfi_id = stringify_find_impassable_id.split(\"_\");\n\n\n var impassable_row_initial = sfi_id[1];\n var impassable_cell_initial = sfi_id[2];\n var impassable_subset_array = sfi_id[3];\n \n var impassable_locations = impassable_row_initial + impassable_cell_initial + impassable_subset_array;\n var string_impassable_locations = impassable_locations.toString();//Ensure impassable locations typing is set to string\n impassable_locations_array.push(string_impassable_locations);\n console.log(\"Impassable location array \" + impassable_locations_array[l]);//Display 4\n //All impassable locations have been pulled successfully from this script. End for loop impassable\n //Format for impassable locations array = 14C, 14D, 24A, 24B, etc...\n \n var sop_row_parse = parseInt(sop_row); \n var sop_column_parse = parseInt(sop_column);\n \n var new_sop_row = sop_row_parse - 1;\n var new_sop_column = sop_column_parse;\n var new_sop_letter = letter_indeces[2];\n \n var new_sop_row_string = new_sop_row.toString();\n var new_sop_column_string = new_sop_column.toString();\n \n var new_placement = new_sop_row_string + new_sop_column_string + new_sop_letter;\n var string_new_placement = new_placement.toString();\n \n var go_to_new_location = \"grid_\" + new_sop_row + \"_\" + new_sop_column + \"_\" + new_sop_letter;//ID for new location if permitted.\n var change_original = document.getElementById(original_placement);\n var change_new = document.getElementById(go_to_new_location);\n if(impassable_locations_array.indexOf(string_new_placement) > -1){\n \n change_original.className = \"character_placement red_background\";\n if(change_new === null){\n\n }\n else{\n change_new.className = \"character_placement\";\n }\n console.log(\"The conditional on D to C is stating that the impassable array has the value of the next coordinate somewhere.\");\n }\n else{\n \n if(change_new === null){\n \n change_new = change_original;\n change_original.className = \"character_placement red_background\";\n \n }else{\n change_original.className = \"character_placement\";\n change_new.className = \"character_placement red_background\";\n \n console.log(\"We are still waiting to see if impassable locations will be detected...\");\n }\n }\n \n }\n \n }//End letter_indeces[A] up movement to C\n \n /////////////////////////////////////////////////////////////////////////////\n /////////////////////////////////////////////////////////////////////////////\n \n \n \n \n ///////////////////////////////////////////////////////////////////////////\n ///////////////////////////////////////////////////////////////////////////\n if(sop_letter === letter_indeces[2]){//Move Up C ===> A no row change \n //\n //keyCode_down impassable\n //\n var impassable_locations_array = [];\n var find_impassable = document.getElementsByClassName(\"impassable\");//This id will never equal that of character_placement id simply because of _inner\n \n var k;\n var l;\n var pseudo_array_length_01 = 17;\n for(k = 0, l = 0;k < find_impassable.length, l < pseudo_array_length_01; k++, l++){\n// console.log(find_impassable[k].id);\n var find_impassable_id = find_impassable[k].id;\n var stringify_find_impassable_id = find_impassable_id.toString();\n var sfi_id = stringify_find_impassable_id.split(\"_\");\n\n\n var impassable_row_initial = sfi_id[1];\n var impassable_cell_initial = sfi_id[2];\n var impassable_subset_array = sfi_id[3];\n \n var impassable_locations = impassable_row_initial + impassable_cell_initial + impassable_subset_array;\n var string_impassable_locations = impassable_locations.toString();//Ensure impassable locations typing is set to string\n impassable_locations_array.push(string_impassable_locations);\n console.log(\"Impassable location array \" + impassable_locations_array[l]);//Display 4\n //All impassable locations have been pulled successfully from this script. End for loop impassable\n //Format for impassable locations array = 14C, 14D, 24A, 24B, etc...\n \n var sop_row_parse = parseInt(sop_row); \n var sop_column_parse = parseInt(sop_column);\n \n var new_sop_row = sop_row_parse;\n var new_sop_column = sop_column_parse;\n var new_sop_letter = letter_indeces[0];\n \n var new_sop_row_string = new_sop_row.toString();\n var new_sop_column_string = new_sop_column.toString();\n \n var new_placement = new_sop_row_string + new_sop_column_string + new_sop_letter;\n var string_new_placement = new_placement.toString();\n \n var go_to_new_location = \"grid_\" + new_sop_row + \"_\" + new_sop_column + \"_\" + new_sop_letter;//ID for new location if permitted.\n var change_original = document.getElementById(original_placement);\n var change_new = document.getElementById(go_to_new_location);\n if(impassable_locations_array.indexOf(string_new_placement) > -1){\n \n change_original.className = \"character_placement red_background\";\n if(change_new === null){\n\n }\n else{\n change_new.className = \"character_placement\";\n }\n console.log(\"The conditional on D to C is stating that the impassable array has the value of the next coordinate somewhere.\");\n }\n else{\n \n if(change_new === null){\n \n change_new = change_original;\n change_original.className = \"character_placement red_background\";\n \n }else{\n change_original.className = \"character_placement\";\n change_new.className = \"character_placement red_background\";\n \n console.log(\"We are still waiting to see if impassable locations will be detected...\");\n }\n }\n \n }\n \n }//End letter_indeces[C] up movement to A\n \n /////////////////////////////////////////////////////////////////////////////\n /////////////////////////////////////////////////////////////////////////////\n \n \n ///////////////////////////////////////////////////////////////////////////\n ///////////////////////////////////////////////////////////////////////////\n if(sop_letter === letter_indeces[3]){//Move Up D ===> B no row change \n //\n //keyCode_down impassable\n //\n var impassable_locations_array = [];\n var find_impassable = document.getElementsByClassName(\"impassable\");//This id will never equal that of character_placement id simply because of _inner\n \n var k;\n var l;\n var pseudo_array_length_01 = 17;\n for(k = 0, l = 0;k < find_impassable.length, l < pseudo_array_length_01; k++, l++){\n// console.log(find_impassable[k].id);\n var find_impassable_id = find_impassable[k].id;\n var stringify_find_impassable_id = find_impassable_id.toString();\n var sfi_id = stringify_find_impassable_id.split(\"_\");\n\n\n var impassable_row_initial = sfi_id[1];\n var impassable_cell_initial = sfi_id[2];\n var impassable_subset_array = sfi_id[3];\n \n var impassable_locations = impassable_row_initial + impassable_cell_initial + impassable_subset_array;\n var string_impassable_locations = impassable_locations.toString();//Ensure impassable locations typing is set to string\n impassable_locations_array.push(string_impassable_locations);\n console.log(\"Impassable location array \" + impassable_locations_array[l]);//Display 4\n //All impassable locations have been pulled successfully from this script. End for loop impassable\n //Format for impassable locations array = 14C, 14D, 24A, 24B, etc...\n \n var sop_row_parse = parseInt(sop_row); \n var sop_column_parse = parseInt(sop_column);\n \n var new_sop_row = sop_row_parse;\n var new_sop_column = sop_column_parse;\n var new_sop_letter = letter_indeces[1];\n \n var new_sop_row_string = new_sop_row.toString();\n var new_sop_column_string = new_sop_column.toString();\n \n var new_placement = new_sop_row_string + new_sop_column_string + new_sop_letter;\n var string_new_placement = new_placement.toString();\n \n var go_to_new_location = \"grid_\" + new_sop_row + \"_\" + new_sop_column + \"_\" + new_sop_letter;//ID for new location if permitted.\n var change_original = document.getElementById(original_placement);\n var change_new = document.getElementById(go_to_new_location);\n if(impassable_locations_array.indexOf(string_new_placement) > -1){\n \n change_original.className = \"character_placement red_background\";\n if(change_new === null){\n\n }\n else{\n change_new.className = \"character_placement\";\n }\n console.log(\"The conditional on D to C is stating that the impassable array has the value of the next coordinate somewhere.\");\n }\n else{\n \n if(change_new === null){\n \n change_new = change_original;\n change_original.className = \"character_placement red_background\";\n \n }else{\n change_original.className = \"character_placement\";\n change_new.className = \"character_placement red_background\";\n \n console.log(\"We are still waiting to see if impassable locations will be detected...\");\n }\n }\n \n }\n \n }//End letter_indeces[D] up movement to B\n \n /////////////////////////////////////////////////////////////////////////////\n /////////////////////////////////////////////////////////////////////////////\n \n \n ///////////////////////////////////////////////////////////////////////////\n ///////////////////////////////////////////////////////////////////////////\n if(sop_letter === letter_indeces[1]){//Move Up B ===> D row change \n //\n //keyCode_down impassable\n //\n var impassable_locations_array = [];\n var find_impassable = document.getElementsByClassName(\"impassable\");//This id will never equal that of character_placement id simply because of _inner\n \n var k;\n var l;\n var pseudo_array_length_01 = 17;\n for(k = 0, l = 0;k < find_impassable.length, l < pseudo_array_length_01; k++, l++){\n// console.log(find_impassable[k].id);\n var find_impassable_id = find_impassable[k].id;\n var stringify_find_impassable_id = find_impassable_id.toString();\n var sfi_id = stringify_find_impassable_id.split(\"_\");\n\n\n var impassable_row_initial = sfi_id[1];\n var impassable_cell_initial = sfi_id[2];\n var impassable_subset_array = sfi_id[3];\n \n var impassable_locations = impassable_row_initial + impassable_cell_initial + impassable_subset_array;\n var string_impassable_locations = impassable_locations.toString();//Ensure impassable locations typing is set to string\n impassable_locations_array.push(string_impassable_locations);\n console.log(\"Impassable location array \" + impassable_locations_array[l]);//Display 4\n //All impassable locations have been pulled successfully from this script. End for loop impassable\n //Format for impassable locations array = 14C, 14D, 24A, 24B, etc...\n \n var sop_row_parse = parseInt(sop_row); \n var sop_column_parse = parseInt(sop_column);\n \n var new_sop_row = sop_row_parse - 1;\n var new_sop_column = sop_column_parse;\n var new_sop_letter = letter_indeces[3];\n \n var new_sop_row_string = new_sop_row.toString();\n var new_sop_column_string = new_sop_column.toString();\n \n var new_placement = new_sop_row_string + new_sop_column_string + new_sop_letter;\n var string_new_placement = new_placement.toString();\n \n var go_to_new_location = \"grid_\" + new_sop_row + \"_\" + new_sop_column + \"_\" + new_sop_letter;//ID for new location if permitted.\n var change_original = document.getElementById(original_placement);\n var change_new = document.getElementById(go_to_new_location);\n if(impassable_locations_array.indexOf(string_new_placement) > -1){\n \n change_original.className = \"character_placement red_background\";\n if(change_new === null){\n\n }\n else{\n change_new.className = \"character_placement\";\n }\n console.log(\"The conditional on D to C is stating that the impassable array has the value of the next coordinate somewhere.\");\n }\n else{\n \n if(change_new === null){\n \n change_new = change_original;\n change_original.className = \"character_placement red_background\";\n \n }else{\n change_original.className = \"character_placement\";\n change_new.className = \"character_placement red_background\";\n \n console.log(\"We are still waiting to see if impassable locations will be detected...\");\n }\n }\n \n }\n \n }//End letter_indeces[B] up movement to D\n \n /////////////////////////////////////////////////////////////////////////////\n /////////////////////////////////////////////////////////////////////////////\n \n }//End keyCode W up movement \n }//End function for input", "proceedMove() {\n // Proceed move\n this.PENDING.MOVE.forEach(( item ) => {\n this._move(item)\n })\n }", "registerMoving() {\n\n // window.addEventListener(\"keydown\", (e) => {\n // if (e.key === \"keydown\") {\n // return true;\n // } else {\n // return false;\n // }\n // })\n window.addEventListener(\"keydown\", (e) => {\n let playerDom = this.gameContainer.children[0];\n let x = parseInt(playerDom.style.left);\n let y = parseInt(playerDom.style.top);\n let modifier = 20;\n switch (e.key) {\n\n case \"ArrowUp\":\n console.log(\"move up\")\n y = y - modifier;\n break\n case \"ArrowDown\":\n console.log(\"move down\");\n y = y + modifier;\n break\n case \"ArrowLeft\":\n console.log(\"move left\")\n x = x - modifier;\n break\n case \"ArrowRight\":\n console.log(\"move right\")\n x = x + modifier;\n break\n }\n\n if (this.checkIfPlayerIsOutsideOfContainer(x, y) === true) {\n this.movePlayerHtml(e.key)\n }\n })\n\n }", "function gesture (elm) {\n /*\n * 0000 0000: idle\n * 0000 0001: start\n * 0000 0010: swipe\n * 0000 0100: vertical scrolling\n * 0000 1000: pinch (two fingers)\n * 0001 0000: pan (one fingers move)\n */\n // var phase = 0\n // TODO: rm window.phase\n var phase = window.phase = enumFactory().add('start', 'move', 'end', 'scroll', 'pinch', 'pan', 'swipe')\n var freeze = false\n var ismoving = false\n var tapTimes = 0, tapStart = -1, tapLast = -1\n\n var target\n var points = {\n start: [],\n last: [],\n current: []\n }\n\n var eventArg\n // const trigger = evt => handlers[evt].forEach(fn => fn(points, target, phase, eventArg))\n var instance = Object.create(hook())\n var trigger = evt => instance.trigger(evt, points, target, phase, eventArg)\n\n const loop = () => { if (ismoving) { raf(loop); render() }}\n\n const setTouchPoints = (evt, item) => {\n // if (!evt.touches || !evt.touches.length) return\n if (isArray(item)) return item.forEach(i => setTouchPoints(evt, i))\n points[item] = []\n if (isString(item)) points[item][0] = touch2point(evt.touches[0])\n if (evt.touches.length > 1) points[item][1] = touch2point(evt.touches[1])\n // else points[item].splice(1, 10)\n }\n\n const onstart = evt => {\n eventArg = evt\n // if (freeze) return\n // ga('gesture.start')\n setTouchPoints(evt, ['start', 'last', 'current'])\n // points.start[0] = points.last[0] = points.current[0] = touch2point(evt.touches[0])\n // if (evt.touches.length > 1) points.start[1] = points.last[1] = points.current[1] = touch2point(evt.touches[1])\n\n target = evt.target\n\n // phase = evt.touches.length > 1 ? 8 : 1\n phase.set('start')\n if (evt.touches.length > 1) phase.or('pinch')\n\n // ismoving = true\n\n trigger('start')\n if (phase.is('pinch')) trigger('pinchstart')\n else trigger('panstart') // one touch point trigger pan\n\n // loop()\n if (!phase.is('pinch')) tapStart = Date.now()\n }\n\n /// TODO: check pinch every time, if one point, switch behavior\n /// TODO: pinch / scroll: change status in onmove or trigger loop in onmove\n const onmove = evt => {\n eventArg = evt\n // console.log('gesture.onmove')\n // if (freeze) return\n // ga('gesture.onmove')\n\n points.last = points.current\n setTouchPoints(evt, 'current')\n\n // evt.touches.length === 1 && phase.rm('pinch')\n // evt.touches.length > 1 && phase.or('pinch')\n if (evt.touches.length > 1) phase.rm('pan').or('pinch')\n else {\n if (phase.is('pinch')) {\n // console.log('pinch ===> start')\n setTouchPoints(evt, 'start')\n // ga('move.trigger.start')\n trigger('start')\n }\n phase.rm('pinch').or('pan')\n // ga('xxxxxxxxxxx: ', phase.is('pan'))\n }\n // phase[evt.touches.length > 1 ? 'or' : 'rm']('pinch')\n\n if (phase.is('start') && !phase.is('pinch')) {\n Math.abs(points.current[0].x - points.start[0].x) < Math.abs(points.current[0].y - points.start[0].y) && phase.or('scroll')\n // phase.or('pan')\n }\n\n if (phase.is('pan') && !phase.is('scroll')) phase.or('swipe')\n\n phase.rm('start').or('move')\n //\n // if (evt.touches.length === 1) phase = 16\n\n if (!ismoving) {\n // TODO: change from two points to one points\n ismoving = true\n loop()\n }\n }\n\n const onend = evt => {\n eventArg = evt\n // console.log('end...')\n // console.log('end.touches:', evt.touches)\n // if (freeze) return\n phase.rm('start', 'move').or('end')\n\n // ga('gesture.end')\n\n phase.is('scroll') && trigger('scrollend')\n phase.is('pinch') && trigger('pinchend')\n phase.is('pan') && trigger('panend')\n ismoving = false\n // phase.set(0)\n\n // TODO: learn single / double logic\n if (!phase.is('pinch') && !phase.is('pan')) {\n var now = Date.now()\n if (now - tapStart <= 200) {\n trigger('tap')\n // if (now - tapLastTimestamp <= 200) tapTimes++\n // else tapTimes = 0\n\n tapTimes = now - tapLast <= 300 ? tapTimes + 1 : 1\n tapLast = now\n\n if (tapTimes === 1) setTimeout(() => tapTimes === 1 && trigger('single'), 300)\n else if (tapTimes === 2) trigger('double')\n }\n }\n\n trigger('end')\n }\n\n var offs = [ on(elm, 'touchstart', onstart), on(elm, 'touchmove', onmove), on(elm, 'touchend', onend) ]\n\n // return {\n // on: _on, off: _off, phase: () => phase,\n // destroy: () => offs.forEach(h => h())\n // }\n instance.phase = () => phase\n instance.destroy = () => {\n instance.$destroy()\n offs.forEach(h => h())\n }\n return instance\n\n function render () {\n trigger('move')\n\n // ga('yyyyyyyyyyyyy: ', phase.is('pan'))\n // ga(phase)\n\n // var _map = arr => JSON.stringify(arr.map(a => ({x: a.x.toFixed(0), y: a.y.toFixed(0)})))\n // console.log('current:', _map(points.current), 'start:', _map(points.start))\n\n phase.is('scroll') && trigger('scroll')\n phase.is('swipe') && trigger('swipe')\n phase.is('pinch') && trigger('pinch')\n phase.is('pan') && trigger('pan')\n\n // (phase.is('pan') && !phase.is('scroll')) && trigger('swipe')\n }\n}", "interactStart(event){\n\t\tthis.canvas.style.cursor = 'move';\n\t\tthis.setState({swiping: true});\n\n\t\tlet pos = this.calculatePosition(event);\n\t\t\n\t\tthis.commands.push(`d 0 ${pos.x} ${pos.y} ${this.pressure}`);\n\t\tthis.commands.push(`c`);\n\t}", "function getDraggingElement() {\n $(\".dragger\").on(\"dragstart\", function (e) {\n\n //when the current dragging element is \"input\"\n //or it is the list that has parent of \"drag-list\"\n if (\n document.activeElement.tagName === \"INPUT\"\n || $(e.target.parentNode).hasClass(\"drag-list\")\n ) {\n //if input has value\n if ($(e.target).children(\"input\")[0].value) {\n nowCopying = e.target;\n //console.log(nowCopying);\n }\n //otherwise, make the dragging target as empty string\n else {\n nowCopying = \"\";\n }\n }\n //otherwise, make the dragging target as empty string\n else {\n nowCopying = \"\";\n }\n\n });\n}", "function showTiles(char, index) {\n me.input.registerPointerEvent('click', char.collisionBox, function() {\n var menuing = game.data.moved.indexOf(true) >= 0;\n var isTargeted = (me.game.currentLevel.getLayerByName(\"map_layer\").getTileId(char.pos.x,char.pos.y) == 2);\n if (game.data.attacking && game.data.turn != game.data.teams[index] && isTargeted) {\n var i = game.data.moved.indexOf(true);\n game.data.moved[i] = false;\n game.data.waited[i] = true;\n game.data.attacking = false;\n for (m in game.data.buttons) {\n me.game.remove(game.data.buttons[m]);\n }\n while (game.data.highlight_x.length > 0) {\n me.game.currentLevel.getLayerByName(\"map_layer\").setTile(game.data.highlight_x.pop(),game.data.highlight_y.pop(), 1);\n }\n game.data.buttons = [];\n game.data.update_plz[i] = true;\n game.data.show_menu = false;\n console.log(\"simulating battle\");\n game.data.battle.simulate();\n game.data.battle.reset();\n } else if ((game.data.moving.indexOf(true) < 0) && !game.data.waited[index] && !menuing && (game.data.teams[index] === game.data.turn)) {\n //game.data.battle.init(char);\n game.data.back_x = game.data.location_x[index];\n game.data.back_y = game.data.location_y[index];\n\n for (var i = -(game.data.movement[index]); i <= game.data.movement[index]; i++) {\n\n var k = Math.abs(i);\n var cx = game.data.location_x[index]/32;\n var cy = game.data.location_y[index]/32;\n\n for (var j = k - game.data.movement[index]; j <= game.data.movement[index] - k; j++) {\n\n var hx = cx + i;\n var hy = cy + j;\n\n if ((hx >= 0)&&(hx <= 19)&&(hy >= 0)&&(hy <= 14)) {\n\n var corner = (Math.abs(i) + Math.abs(j)) == game.data.movement[index];\n\n if (corner) {\n for (m in game.data.range[index]) {\n\n var l = game.data.range[index][m];\n\n if (i <= 0 && j <= 0) {\n for (var n = 0; n <= l; n++) {\n if ((hx - n) >= 0 && (hy - (l - n)) >= 0) {\n game.data.highlight_x.push(hx - n);\n game.data.highlight_y.push(hy - l + n);\n me.game.currentLevel.getLayerByName(\"map_layer\").setTile(hx-n,hy-l+n,2);\n }\n }\n } \n\n else if (i <= 0 && j >= 0) {\n for (var n = 0; n <= l; n++) {\n if ((hx - n) >= 0 && (hy + (l - n)) <= 14) {\n game.data.highlight_x.push(hx - n);\n game.data.highlight_y.push(hy + l - n);\n me.game.currentLevel.getLayerByName(\"map_layer\").setTile(hx-n,hy+l-n,2);\n }\n }\n } \n\n else if (i >= 0 && j <= 0) {\n for (var n = 0; n <= l; n++) {\n if ((hx + n) <= 19 && (hy - (l - n)) >= 0) {\n game.data.highlight_x.push(hx + n);\n game.data.highlight_y.push(hy - l+ n);\n me.game.currentLevel.getLayerByName(\"map_layer\").setTile(hx+n,hy-l+n,2);\n }\n }\n } \n\n else if (i >= 0 && j >= 0) {\n for (var n = 0; n <= l; n++) {\n if ((hx + n) <= 19 && (hy + (l - n)) <= 14) {\n game.data.highlight_x.push(hx + n);\n game.data.highlight_y.push(hy + l - n);\n me.game.currentLevel.getLayerByName(\"map_layer\").setTile(hx+n,hy+l-n,2);\n }\n }\n }\n }\n }\n game.data.highlight_x.push(hx);\n game.data.highlight_y.push(hy);\n me.game.currentLevel.getLayerByName(\"map_layer\").setTile(hx,hy,3);\n }\n }\n }\n game.data.moving[index] = true;\n char.off_x = 0;\n char.off_y = 0;\n game.data.update_plz[index] = true;\n } \n\n else if (game.data.moving[index]) {\n while (game.data.highlight_x.length > 0) {\n me.game.currentLevel.getLayerByName(\"map_layer\").setTile(game.data.highlight_x.pop(),game.data.highlight_y.pop(), 1);\n }\n\n game.data.moving[index] = false;\n game.data.moved[index] = true;\n game.data.show_menu = true;\n menu(index);\n game.data.update_plz[index] = true;\n }\n });\n}", "input (event) {\n if (this.handlers.keypress(event)) {\n return;\n }\n // if\n\n var target = event.target;\n\n var nav_key, nav_keys = this.nav_keys;\n nav_key = nav_keys[event.which];\n\n var nav_event = {\n Up: {\n key: 'Up',\n dir: 'prev',\n sibling_offset: 1,\n },\n Left: {\n key: 'Left',\n dir: 'prev',\n sibling_offset: 0,\n },\n Down: {\n key: 'Down',\n dir: 'next',\n sibling_offset: 1,\n },\n Right: {\n key: 'Right',\n dir: 'next',\n sibling_offset: 0,\n },\n Tab: {\n key: 'Tab',\n dir: (event.shiftKey ? 'prev' : 'next'),\n sibling_offset: 0,\n }\n }[nav_key];\n\n var new_active_element;\n\n // Navigation event properties.\n var cfg = {\n event,\n nav_key,\n nav_event,\n target,\n current_dialog: target.closest(\".dialog\"),\n };\n\n // One of the directional navigation events has occured.\n if (nav_event) {\n // The target is a button, so run the button navigation routine.\n if (isButton(target)) {\n new_active_element = this.handlers.button(cfg);\n }\n\n // Previous processing did not select a new active element, and the\n // current dialog has a method to perform further searching.\n if (\n ! new_active_element &&\n this.handlers.get_new_el\n ) {\n new_active_element = this.handlers.get_new_el(cfg);\n if (new_active_element === false) return;\n }\n // if\n\n // Previous logic did not select a new active element and the event target\n // is not a button.\n if (! (new_active_element || isButton(target))) {\n // Default buttons to navigate to. This is mostly to process the initial\n // keyboard navigation after a dialog has been opened and the dialog has\n // the focus.\n var selectors = [\n \"button.skip\",\n \"button\",\n ];\n\n selectors.some(function (selector) {\n new_active_element = qs(\".dialog \" + selector);\n return !!new_active_element;\n });\n }\n // if\n\n if (new_active_element) {\n new_active_element.focus();\n }\n // if\n\n event.stopPropagation();\n event.preventDefault();\n }\n // if\n\n // An activation event has occured.\n else if ([\"Enter\", \"Spacebar\"].some(\n key => this.key_values[key] === event.which\n )) {\n // Prevent default to prevent behavior like scrolling the viewport when\n // pressing Spacebar, and fire click to activate the target.\n event.stopPropagation();\n event.preventDefault();\n\n target.click();\n\n if (isButton(target)) target.blur();\n }\n // else if\n }", "handleMouseMove(step, target) {\n const me = this,\n mouse = me.mouse;\n mouse.classList.add('quick');\n if (me.mouseDown) mouse.classList.add('drag');\n const mouseBox = Rectangle.from(mouse, me.outerElement),\n x = mouseBox.x,\n y = mouseBox.y;\n let deltaX = 0,\n deltaY = 0;\n\n if (step.to) {\n if (typeof step.to === 'string') {\n const toElement = me.outerElement.querySelector(step.to);\n\n if (toElement) {\n const rect = Rectangle.from(toElement, me.outerElement),\n toX = rect.x + rect.width / 2,\n toY = rect.y + rect.height / 2;\n deltaX = (toX - x) / 10;\n deltaY = (toY - y) / 10;\n }\n } else if (step.to.x) {\n deltaX = (step.to.x - x) / 10;\n } else {\n deltaX = step.to[0] / 10;\n deltaY = step.to[1] / 10;\n }\n } else if (step.deltaX) {\n deltaX = step.deltaX / 10;\n } else if (step.x) {\n deltaX = (step.x - x) / 10;\n }\n\n if (step.deltaY) {\n deltaY = step.deltaY / 10;\n }\n\n let i = 0;\n me.innerIntervalId = me.setInterval(() => {\n // Only move mouse if in view and not scrolling\n if (me.shouldPause) {\n return;\n }\n\n if (i++ === 9) {\n clearInterval(me.innerIntervalId);\n\n if (step.then) {\n step.then();\n }\n }\n\n const mouseX = x + deltaX * i,\n mouseY = y + deltaY * i; // Move mouse there also\n\n mouse.style.left = mouseX + 'px';\n mouse.style.top = mouseY + 'px';\n const mouseBounds = mouse.getBoundingClientRect(),\n clientX = mouseBounds.left,\n clientY = mouseBounds.top,\n eventTarget = document.elementFromPoint(clientX, clientY);\n\n if (eventTarget !== me.prevTarget) {\n if (me.prevTarget) {\n me.mouseOutElements.push(me.prevTarget);\n\n if (!DomHelper.isDescendant(me.mouseOutElements[0], eventTarget)) {\n me.mouseOutElements.forEach(element => me.triggerEvent(element, 'mouseout'));\n me.mouseOutElements.length = 0;\n }\n }\n\n me.prevTarget = eventTarget;\n me.triggerEvent(eventTarget, 'mouseover');\n }\n\n me.triggerEvent(eventTarget, step.action, {\n clientX,\n clientY\n });\n }, 50);\n }", "function updatePointerState(ev, pointer) {\n var point = getEventPoint(ev);\n var x = pointer.x = point.pageX;\n var y = pointer.y = point.pageY;\n\n pointer.distanceX = x - pointer.startX;\n pointer.distanceY = y - pointer.startY;\n pointer.distance = Math.sqrt(\n pointer.distanceX * pointer.distanceX + pointer.distanceY * pointer.distanceY\n );\n\n pointer.directionX = pointer.distanceX > 0 ? 'right' : pointer.distanceX < 0 ? 'left' : '';\n pointer.directionY = pointer.distanceY > 0 ? 'down' : pointer.distanceY < 0 ? 'up' : '';\n\n pointer.duration = +Date.now() - pointer.startTime;\n pointer.velocityX = pointer.distanceX / pointer.duration;\n pointer.velocityY = pointer.distanceY / pointer.duration;\n }", "function stillMoving(){\n if(!moving) return false;\n tap = TAP_DEFAULT;\n return true;\n }", "handleMouseMove(step, target) {\n const me = this,\n mouse = me.mouse;\n\n mouse.classList.add('quick');\n if (me.mouseDown) mouse.classList.add('drag');\n\n let mouseBox = Rectangle.from(mouse, me.outerElement),\n x = mouseBox.x,\n y = mouseBox.y,\n deltaX = 0,\n deltaY = 0;\n\n if (step.to) {\n if (typeof step.to === 'string') {\n const toElement = me.outerElement.querySelector(step.to);\n if (toElement) {\n const rect = Rectangle.from(toElement, me.outerElement),\n toX = rect.x + rect.width / 2,\n toY = rect.y + rect.height / 2;\n deltaX = (toX - x) / 10;\n deltaY = (toY - y) / 10;\n }\n } else if (step.to.x) {\n deltaX = (step.to.x - x) / 10;\n } else {\n deltaX = step.to[0] / 10;\n deltaY = step.to[1] / 10;\n }\n } else if (step.deltaX) {\n deltaX = step.deltaX / 10;\n } else if (step.x) {\n deltaX = (step.x - x) / 10;\n }\n\n if (step.deltaY) {\n deltaY = step.deltaY / 10;\n }\n\n let i = 0;\n\n me.innerIntervalId = me.setInterval(() => {\n // Only move mouse if in view and not scrolling\n if (me.shouldPause) {\n return;\n }\n\n if (i++ === 9) {\n clearInterval(me.innerIntervalId);\n if (step.then) {\n step.then();\n }\n }\n\n const mouseX = x + deltaX * i,\n mouseY = y + deltaY * i;\n\n // Move mouse there also\n mouse.style.left = mouseX + 'px';\n mouse.style.top = mouseY + 'px';\n\n const mouseBounds = mouse.getBoundingClientRect(),\n clientX = mouseBounds.left,\n clientY = mouseBounds.top,\n eventTarget = document.elementFromPoint(clientX, clientY);\n\n if (eventTarget !== me.prevTarget) {\n if (me.prevTarget) {\n me.mouseOutElements.push(me.prevTarget);\n if (!DomHelper.isDescendant(me.mouseOutElements[0], eventTarget)) {\n me.mouseOutElements.forEach((element) => me.triggerEvent(element, 'mouseout'));\n me.mouseOutElements.length = 0;\n }\n }\n me.prevTarget = eventTarget;\n me.triggerEvent(eventTarget, 'mouseover');\n }\n\n me.triggerEvent(eventTarget, step.action, {\n clientX,\n clientY\n });\n }, 50);\n }", "function updatePointerState(ev, pointer) {\n var point = getEventPoint(ev);\n var x = pointer.x = point.pageX;\n var y = pointer.y = point.pageY;\n\n pointer.distanceX = x - pointer.startX;\n pointer.distanceY = y - pointer.startY;\n pointer.distance = Math.sqrt(\n pointer.distanceX * pointer.distanceX + pointer.distanceY * pointer.distanceY\n );\n\n pointer.directionX = pointer.distanceX > 0 ? 'right' : pointer.distanceX < 0 ? 'left' : '';\n pointer.directionY = pointer.distanceY > 0 ? 'up' : pointer.distanceY < 0 ? 'down' : '';\n\n pointer.duration = +Date.now() - pointer.startTime;\n pointer.velocityX = pointer.distanceX / pointer.duration;\n pointer.velocityY = pointer.distanceY / pointer.duration;\n }", "function drag(e) {\n if (active) { //check whether the drag is active\n \n //tell the user agent that if the event does not get explicitly handled, its default action should not be taken as it normally would be (MDN)\n e.preventDefault();\n \n //set the value of currentX and currentY to the result of the current pointer position with an adjustment from initialX and initialY\n if (e.type === \"touchmove\") {\n currentX = e.touches[0].clientX - initialX;\n currentY = e.touches[0].clientY - initialY;\n } else {\n currentX = e.clientX - initialX;\n currentY = e.clientY - initialY;\n }\n\n //set the new Offset\n xOffset = currentX;\n yOffset = currentY;\n\n //set the new position for our dragged element\n setTranslate(currentX, currentY, dragItem);\n }\n }", "function mousePressed() {\r\n target.position.x = mouseX;\r\n target.position.y = mouseY;\r\n recordtime = lifetime;\r\n}", "externalTouchUp() {\n this._strikeTouchUp();\n }" ]
[ "0.5791472", "0.57093066", "0.568867", "0.5663701", "0.56410915", "0.56410915", "0.56216997", "0.5593309", "0.55707467", "0.55111164", "0.54097223", "0.5368448", "0.535868", "0.53511286", "0.53463584", "0.53431356", "0.5328726", "0.5306402", "0.5305406", "0.52978545", "0.529101", "0.52507424", "0.52161765", "0.5209053", "0.5171299", "0.51606226", "0.5150224", "0.5147984", "0.5146227", "0.5145839", "0.51443136", "0.5140326", "0.5134194", "0.5116697", "0.5107966", "0.50978184", "0.5095793", "0.509271", "0.50852597", "0.5081514", "0.50740576", "0.5074027", "0.5054245", "0.5053493", "0.50505996", "0.50488037", "0.5042708", "0.50254637", "0.5019624", "0.5019624", "0.50157917", "0.5014386", "0.5013755", "0.5013137", "0.5011186", "0.5010358", "0.5010336", "0.50091654", "0.5005254", "0.5001918", "0.50012964", "0.5000755", "0.49991235", "0.4996577", "0.4993806", "0.49907917", "0.4988666", "0.49882334", "0.4984257", "0.49828687", "0.4982192", "0.4979195", "0.49785", "0.4969686", "0.4967801", "0.4966842", "0.49656874", "0.49649283", "0.4962159", "0.49564353", "0.49564353", "0.49554664", "0.49527532", "0.49484548", "0.49457377", "0.49445978", "0.49432436", "0.4938806", "0.49368674", "0.4935568", "0.4933914", "0.4929514", "0.4928535", "0.49256054", "0.49171495", "0.491611", "0.49098316", "0.49055392", "0.4902521", "0.49020725", "0.490185" ]
0.0
-1
End interact move events and stop autoscroll unless simulation is running
pointerUp(pointer, event, eventTarget, curEventTarget) { let pointerIndex = this.getPointerIndex(pointer); if (pointerIndex === -1) { pointerIndex = this.updatePointer(pointer, event, eventTarget, false); } const type = /cancel$/i.test(event.type) ? 'cancel' : 'up'; this._scopeFire(`interactions:${type}`, { pointer, pointerIndex, pointerInfo: this.pointers[pointerIndex], event, eventTarget, type: type, curEventTarget, interaction: this }); if (!this.simulation) { this.end(event); } this.removePointer(pointer, event); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function disableInteraction() {\n moving = true;\n setTimeout(function () {\n moving = false;\n }, 500);\n }", "function end(event) {\n\t\t\t_moving = false;\n\t\t}", "function move(e) {\n if (!cancel) {\n var coords = getCoords(e);\n if (coords && (Math.abs(startY - coords[1]) > scrollTolerance || Math.abs(startX - coords[0]) > scrollTolerance)) {\n cancel = true;\n }\n }\n }", "function move( e ){\n if( !cancel ){\n var coords = getCoords( e );\n if( coords && ( Math.abs( startY - coords[ 1 ] ) > scrollTolerance || Math.abs( startX - coords[ 0 ] ) > scrollTolerance ) ){\n cancel = true;\n }\n }\n }", "function move( e ){\r\n if( !cancel ){\r\n var coords = getCoords( e );\r\n if( coords && ( Math.abs( startY - coords[ 1 ] ) > scrollTolerance || Math.abs( startX - coords[ 0 ] ) > scrollTolerance ) ){\r\n cancel = true;\r\n }\r\n }\r\n }", "function startInteraction(ev) {\n app.ui.moveOutput.clear();\n ev.preventDefault();\n }", "onResponderTerminate() {\n this.resetMovingItem();\n // console.log(\"responder terminated\");\n }", "function endMove() {\n window.removeEventListener(\"mousemove\", moveBubble);\n }", "_stopScrolling(event) {\n return false;\n }", "function finishMove(){\n //Cambiar estado hotspot\n $(\".hots\"+id).find(\".in\").removeClass(\"move\");\n $(\".hots\"+id).find(\".out\").removeClass(\"moveOut\");\n $(\".hotspotElement\").removeClass('active');\n $(\".hotspotElement\").css(\"pointer-events\", \"all\");\n \n //Volver a desactivar las acciones de doble click\n $(\"#pano\").off( \"dblclick\");\n //Quitar el cursor de tipo cell\n $(\"#pano\").removeClass(\"cursorAddHotspot\");\n //Mostrar el menu inicial\n showMain();\n }", "function handleScrollStop() {\n scrollEngaged = false;\n}", "end() {\n if (this.mode !== mode.move) return;\n\n let bbox = this.bbox();\n let x = Box.snap(bbox.x);\n let y = Box.snap(bbox.y);\n this.setPosition(x, y);\n this.moveEndEvent.trigger();\n }", "function _scrollbarMoveStop() {\n\t\t\t\t\tthis._isDraggingChange = false;\n\t\t\t\t\t_moveStop.call(this._timetable._view);\n\t\t\t\t\t_moved.call(this._timetable._view);\n\t\t\t\t}", "_stopMovement() {\n for (const boundAction in this.boundFunctions) {\n if (\n Object.prototype.hasOwnProperty.call(this.boundFunctions, boundAction)\n ) {\n this.body.emitter.off(\"initRedraw\", this.boundFunctions[boundAction]);\n this.body.emitter.emit(\"_stopRendering\");\n }\n }\n this.boundFunctions = {};\n }", "_stopInterval() {\n this._stopScrolling.next();\n }", "stop() {\n\t\tthis.scroll.stop();\n\t}", "function moveDown() {\n\tconsole.log(\"Scroll down\");\n\trobot.scrollMouse(0, -20);\n}", "function ScrollStop() {\r\n return false;\r\n}", "function CastleAxeContinues(mario) {\n map.canscroll = true;\n startWalking(mario);\n}", "function handleInteruption() {\n // Remove animate in instance\n anime.remove(scrollToObject);\n\n // Remove the events\n dettachEvents();\n}", "endTracking_() {\n this.tracking_ = false;\n this.dragging_ = false;\n this.totalMoveY_ = 0;\n this.totalMoveX_ = 0;\n }", "pause () {\n this.el.sceneEl.removeEventListener('jump', this.jump)\n this.el.sceneEl.removeEventListener('arc-cursor-secondary-click', this.jump)\n }", "function autoScrollShapeDown()\n {\n undrawShape();\n currentPosition += GRID_WIDTH; // baja 1 linea cada x tiempo\n drawShape();\n\n // constantly checked methods\n freezeShape();\n addScore();\n gameOver();\n\n if(isGameOver)\n {\n StartBtn.textContent = \"Try Again ? \";\n }\n }", "function Interpreter_OnDisplayScroll(event)\n{\n\t//then forward to simulator\n\tSimulator_OnScroll(event);\n}", "onElementTouchEnd(event) {\n if (this.dragContext) {\n this.endMove();\n event.preventDefault();\n }\n }", "onElementTouchEnd(event) {\n if (this.dragContext) {\n this.endMove();\n event.preventDefault();\n }\n }", "function end(event) {\r\n\t\tvar el = event.target\r\n\t\tel.blur();\r\n\t\tself.endScroll();\r\n\t\tevent.stopPropagation();\r\n\t}", "function stopMoving() {\n glob.finishState(\"move\")\n Following = false;\n RandomWalking = false;\n targetEntity = null;\n\n if (chaser && !chaser._destroyed) {\n if (flag.logMove) bot.log(\"[move] Chase Stop \");\n }\n clearInterval(chaser)\n\n if (mover && !mover._destroyed) {\n if (flag.logMove) bot.log(\"[move] Move Stop \");\n }\n clearInterval(mover);\n bot.clearControlStates();\n}", "function wheelEvt(evt) {\n if (configs.force)\n evt.preventDefault();\n else\n youScrollInstance.end();\n }", "function eventEnd(event, data) {\n // The handle is no longer active, so remove the class.\n if (data.handle) {\n removeClass(data.handle, options.cssClasses.active);\n scope_ActiveHandlesCount -= 1;\n }\n // Unbind the move and end events, which are added on 'start'.\n data.listeners.forEach(function (c) {\n scope_DocumentElement.removeEventListener(c[0], c[1]);\n });\n if (scope_ActiveHandlesCount === 0) {\n // Remove dragging class.\n removeClass(scope_Target, options.cssClasses.drag);\n setZindex();\n // Remove cursor styles and text-selection events bound to the body.\n if (event.cursor) {\n scope_Body.style.cursor = \"\";\n scope_Body.removeEventListener(\"selectstart\", preventDefault);\n }\n }\n if (options.events.smoothSteps) {\n data.handleNumbers.forEach(function (handleNumber) {\n setHandle(handleNumber, scope_Locations[handleNumber], true, true, false, false);\n });\n data.handleNumbers.forEach(function (handleNumber) {\n fireEvent(\"update\", handleNumber);\n });\n }\n data.handleNumbers.forEach(function (handleNumber) {\n fireEvent(\"change\", handleNumber);\n fireEvent(\"set\", handleNumber);\n fireEvent(\"end\", handleNumber);\n });\n }", "function onEnd() {\n\n // reset the offsets\n stickyOffsetLow = 0;\n stickyOffsetHigh = 0;\n\n if(pointer) {\n // if we have a pointer reference\n\n // update all the elements in the DOM\n setPointers();\n adjustBubbles();\n\n // the pointer is no longer active\n pointer.removeClass('active');\n }\n\n // reset the references\n pointer = null;\n ref = null;\n dragRange = false;\n }", "function endMove() {\n moveMode = 0;\n drawMethod();\n}", "_preventUserScrollForDefaultBehavior() {\n return;\n }", "function touchEnd() {\n isDragging = false\n\n const movedBy = currentTranslate - prevTranslate\n if (movedBy < -100 && currentInd < sliderData.length - 1) {\n currentInd++\n }\n if (movedBy > 100 && currentInd > 0) {\n currentInd--\n }\n\n setPositionByInd()\n slider.current.classList.remove('grabbing')\n\n changeActiveDot(currentInd)\n }", "function end() {\n focusInput();\n updateInput = true;\n move(); up();\n }", "function end() {\n focusInput();\n updateInput = true;\n move(); up();\n }", "interact() {\n if (this.previousCollision !== undefined)\n game.getPlayer.input.handleInteraction(this.previousCollision);\n this.previousCollision = undefined;\n }", "function cancelScroll() {\n\tif (!o3_followscroll || typeof over.scroller == 'undefined') return;\n\tover.scroller.canScroll = 1;\n\t\n\tif (over.scroller.timer) {\n\t\tclearTimeout(over.scroller.timer);\n\t\tover.scroller.timer=null;\n\t}\n}", "function stop() {\n\n\t\ttry {\n\t\t // Pass in the movement to the game.\n\t\t animation.move(\"x\", moveTypes.none);\n\t\t}\n\t\tcatch (err) {\n\t\t\tconsole.log(err);\n\t\t}\n\t}", "function touchEnd(e) {\n\t\t\t\t\tif (!scrolling) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tscrolling = false;\n\t\t\t\t\t\n\t\t\t\t\tif (moved) {\n\t\t\t\t\t\t// Ease back to within boundaries\n\t\t\t\t\t\tif (scrollY > 0 || scrollY < maxHeight) {\n\t\t\t\t\t\t\treboundScroll();\n\t\t\t\t\t\t} else if (o.momentum) {\n\t\t\t\t\t\t\t// Free scroll with momentum\n\t\t\t\t\t\t\tmomentumScroll(movedY, isiPad ? o.iPadMomentumDamp : o.momentumDamp, 40, 2000, isiPad ? o.iPadMomentumTime : o.momentumTime);\n\t\t\t\t\t\t}\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\tvar touch = getTouches(e)[0],\n\t\t\t\t\t\t\ttarget = getRootNode(touch.target);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Dispatch fake mouse up and click events if this touch event did not move\n\t\t\t\t\t\tdispatchMouseEvent('mouseup', touch, target);\n\t\t\t\t\t\tdispatchMouseEvent('click', touch, target);\n\t\t\t\t\t}\n\t\t\t\t}", "function stillMoving(){\n if(!moving) return false;\n tap = TAP_DEFAULT;\n return true;\n }", "function endMove(event) {\n current.win.style.opacity = 1;\n }", "function actualScrollHandler () {\n\t\t_direction = latestKnownScroll.top < _prevTop? \"up\" : \"down\";\n\t\t_prevTop = latestKnownScroll.top;\n\n\t\t$(window).trigger({\n\t\t\ttype: \"Katoen:ScrollEvent\",\n\t\t\tlatestKnownScroll: latestKnownScroll,\n\t\t\tdirection: _direction\n\t\t});\n\t\t_animRunning = false;\n\t}", "onElementTouchEnd(event) {\n if (this.dragContext) {\n this.endMove();\n event.preventDefault();\n }\n }", "function stop() {\n view.root.removeEventListener(\"mouseup\", stop);\n view.root.removeEventListener(\"dragstart\", stop);\n view.root.removeEventListener(\"mousemove\", move);\n if (key.getState(view.state) != null) { view.dispatch(view.state.tr.setMeta(key, -1)); }\n }", "stop() {\n dataMap.get(this).moveX = 0;\n dataMap.get(this).moveY = 0;\n }", "finishDrag() {\n //Use last loc_sim_ from last mouseDown or mouseMove event\n //because for touchEnd events there is no location.\n if (this.eventHandler_ != null) {\n this.eventHandler_.finishDrag(this.dragSimObj_, this.loc_sim_, this.dragOffset_);\n }\n}", "endDraggingAnchors() {}", "function scriptEnding() {\n // re-enabled the standard application for touch events\n Controller.releaseJoystick(THRUST_CONTROLLER);\n Controller.releaseJoystick(VIEW_CONTROLLER);\n}", "function mouse_move()\n{\n if(timeoutID == null) {\n console.log('tracking mouse movements');\n timeoutID = window.setTimeout(user_idle, delay);\n return;\n }\n\tif(flag === 0 /* && Detect Time is not up*/)\n\t{\n\t\t// call function to do modifications on first mouse move\n\t}\n\telse\n\t{\n\t\tflag = 0;\n\t\tmodifyPage();\n window.removeEventListener('mousemove', mouse_move);\n\t}\n\t\n\tresetTimer();\n\t\n}", "_onMoveEnd() {\n this._map.locate({\n 'watch': true,\n 'setView': false,\n 'enableHighAccuracy': true,\n });\n }", "async mouseAway() {\n await this._actions().mouseMove(this.element(), { x: -1, y: -1 }).perform();\n await this._stabilize();\n }", "function stillHandler() { \n Options.scenes.forEach(function(scene) {\n \tif ( pageYOffset > scene.offset) {\n \t\tscene.action(scene.target);\n \t}\n });\n }", "function slideStop()\n{\n\t\n\tcontinueFollow='stop';\n\tsliderDrag();\n}", "function TouchEnd(evt) { // Scroll to next (prior) menu item on page\n var pageY2go = Math.max(0, window.pageYOffset + xDiff); // give it a start\n \n // \"sim\" Still In Motion is only needed for mouse, set it to 0 to avoid stuck mobile\n sim = 0;\n var Dheader = document.querySelectorAll('header')[0];\n var menuElements = Dheader.getElementsByClassName(\"button\"); // Menu elements, determine which (page content) to scroll to\n \n // HEADER .button elements need same order as content on page:\n if (Math.abs(xDiff) > 120) /* significant */\n for (var i = 0; i < menuElements.length; i++) {\n var x = document.getElementById(menuElements[i].hash.substr(1)); // x is the page content (hash) for this nemu menuElements[i]\n if (!x) console.info(menuElements[i].hash.substr(1) + ' not found TouchEnd');\n else {\n var Taget_idY = x.offsetTop; // Content Top, the anchor Y position\n var nextTaget_idY = (i < menuElements.length - 1 ? document.getElementById(menuElements[i + 1].hash.substr(1)).offsetTop : dH(true));\n if (pageY2go + wH() <= Taget_idY) {// this menu item's page content is below the viewport\n } else if (pageY2go + hH >= nextTaget_idY) {// Already scrolled past the content\n } else // Got It, either Taget_idY or nextTaget_idY\n {\n if (xDiff > 0) // left swipe, scroll down, Y increasing\n pageY2go = nextTaget_idY;\n else // right swipe ...\n pageY2go = Taget_idY;\n \n scrollIt(null, pageY2go);\n return;\n }\n}\n}\n\n/* reset */\nxDown = null; \n}", "function cancelScrolling(event) {\n event.preventDefault();\n }", "nextStep() {\n const me = this; // Only perform step if in view and not scrolling\n\n if (me.shouldPause) {\n return;\n }\n\n if (me.currentStep === me.steps.length) {\n if (me.repeat) {\n me.currentStep = 0;\n } else {\n return me.abort(true);\n }\n } // First step, signal to let demo initialize stuff\n\n if (me.currentStep === 0) {\n me.trigger('initialize');\n }\n\n const mouse = me.mouse,\n step = me.normalizeStep(me.steps[me.currentStep++]),\n target = me.getTarget(step),\n action = step.action;\n\n if (target && action) {\n mouse.className = 'simulated-mouse';\n\n if (action === 'mousemove') {\n me.handleMouseMove(step, target);\n } else {\n // First move mouse into position\n if (target !== me.prevTarget) {\n const rect = Rectangle.from(target, me.outerElement);\n mouse.style.left = rect.x + rect.width / 2 + 'px';\n mouse.style.top = rect.y + rect.height / 2 + 'px';\n }\n\n if (action === 'mousedown') {\n me.mouseDown = true;\n }\n\n if (action === 'mouseup') {\n me.mouseDown = false;\n } // Then trigger action\n\n me.timeoutId = me.setTimeout(() => {\n me.prevTarget = target; // Animate click etc.\n\n mouse.classList.add(action);\n\n if (action === 'type') {\n const field = Widget.fromElement(target),\n parts = step.text.split('|');\n field.value = parts[parts.length === 1 || field.value != parts[0] ? 0 : 1];\n } else {\n me.triggerEvent(target, action);\n }\n }, action === 'type' ? 100 : 550);\n }\n }\n }", "_resetPosition() {\n let {startY, movedY} = this.state;\n let _maxScrollY = this._maxScrollY;\n let distY = startY + movedY;\n if (distY > 0) {\n // console.log(`Reset To Top: ${distY}, ${startY}, ${movedY}`);\n this._scrollTo(0, 0, 400, 0, distY);\n return true;\n }\n if (!this.locked && distY < _maxScrollY) {\n // console.log('Reset To Bottom');\n this._scrollTo(0, _maxScrollY, 400, 0, _maxScrollY - distY);\n return true;\n }\n\n return false;\n }", "stopExecute() {\n if (this.doneBehavior){\n if (this.config.rollback){\n this.config.rollback();\n this.doneBehavior = false;\n } \n }\n window.removeEventListener(\"resize\", () => {\n this._doRwdBehavior();\n });\n }", "function touchMoved() {\n // do some stuff\n return false;\n }", "end(event) {\n //var textEl = event.target.querySelector('p')\n\n // textEl && (textEl.textContent =\n // 'moved a distance of ' +\n // (Math.sqrt(Math.pow(event.pageX - event.x0, 2) +\n // Math.pow(event.pageY - event.y0, 2) | 0))\n // .toFixed(2) + 'px')\n }", "function end_gesture() {\n window.clearTimeout(click_release_timeout);\n window.clearTimeout(long_press_timeout);\n gesture_in_progress = false;\n }", "function inertia_scroll() {\n\t\tmove_delta = start_velocity * (1 - Math.exp(-(Date.now() - inertia_starts) / options.inertion ));\n\t\tvelocity = start_velocity - move_delta;\n\t\tif ( hand_control ) {\n\t\t\tstarted_animation = false;\n\t\t\treturn;\n\t\t}\n\t\tif ( velocity < -0.5 || velocity > 0.5 ) {\n\t\t\trequestAnimationFrame( inertia_scroll );\n\t\t\tscroll_content( start_pos + move_delta );\n\t\t} else {\n\t\t\tscroll_content( start_pos + start_velocity );\n\t\t\tstarted_animation = false;\n\t\t}\n\t}", "jump () {\n if (this.isJumping === false && this.bodyPosition.y - this.targetHeight < this.data.tolerance) {\n this.el.emit('do-jump')\n this.isJumping = true\n }\n }", "function disarmWindowScroller() {\n window.removeEventListener('mousemove', updateMousePosition);\n window.removeEventListener('touchmove', updateMousePosition);\n mousePosition = undefined;\n window.clearTimeout(next$1);\n resetScrolling$1();\n }", "changeSlideOnEnd(){\n if(this.dist.movement > 120 && this.index.next !== undefined){\n this.activeNextSlider();\n }else if(this.dist.movement < -120 && this.index.prev !== undefined){\n this.activePrevSlider();\n }else{\n this.changeSlide(this.index.active)\n }\n }", "function Interaction() {\n //increases speed\n if (keyIsDown(UP_ARROW)) {\n y = y - 1\n };\n //decreases speed\n if (keyIsDown(DOWN_ARROW)) {\n y = y + 1\n };\n}", "nextStep() {\n const me = this;\n\n // Only perform step if in view and not scrolling\n if (me.shouldPause) {\n return;\n }\n\n if (me.currentStep === me.steps.length) {\n if (me.repeat) {\n me.currentStep = 0;\n } else {\n return me.abort(true);\n }\n }\n\n // First step, signal to let demo initialize stuff\n if (me.currentStep === 0) {\n me.trigger('initialize');\n }\n\n const mouse = me.mouse,\n step = me.normalizeStep(me.steps[me.currentStep++]),\n target = me.getTarget(step),\n action = step.action;\n\n if (target && action) {\n mouse.className = 'simulated-mouse';\n\n if (action === 'mousemove') {\n me.handleMouseMove(step, target);\n } else {\n // First move mouse into position\n if (target !== me.prevTarget) {\n const rect = Rectangle.from(target, me.outerElement);\n mouse.style.left = rect.x + rect.width / 2 + 'px';\n mouse.style.top = rect.y + rect.height / 2 + 'px';\n }\n\n if (action === 'mousedown') {\n me.mouseDown = true;\n }\n\n if (action === 'mouseup') {\n me.mouseDown = false;\n }\n\n // Then trigger action\n me.timeoutId = me.setTimeout(\n () => {\n me.prevTarget = target;\n\n // Animate click etc.\n mouse.classList.add(action);\n\n if (action === 'type') {\n const field = IdHelper.fromElement(target),\n parts = step.text.split('|');\n\n field.value = parts[parts.length === 1 || field.value != parts[0] ? 0 : 1];\n } else {\n me.triggerEvent(target, action);\n }\n },\n action === 'type' ? 100 : 550\n );\n }\n }\n }", "function scroll() {\n var myElement = $(\"#heede_wrapper\");\n\n var interactiveWatcher = scrollMonitor.create(myElement, {\n top: -RH,\n bottom: -0.5 * RH\n });\n\n interactiveWatcher.enterViewport(function() {\n setTimeout(function(){\n if (playing === false) {\n playing = true;\n $(\"#play\").addClass(\"active\");\n // console.log(\"playing on scroll\");\n play();\n };\n }, 3000);\n\n });\n interactiveWatcher.exitViewport(function() {\n playing = false;\n $(\"#play\").removeClass(\"active\");\n play();\n });\n }", "function _touchEnd(event) {\n\t\n\t // Remove touch\n\t var primaryTouch = this._scroll.activeTouches.length ? this._scroll.activeTouches[0] : undefined;\n\t for (var i = 0; i < event.changedTouches.length; i++) {\n\t var changedTouch = event.changedTouches[i];\n\t for (var j = 0; j < this._scroll.activeTouches.length; j++) {\n\t var touch = this._scroll.activeTouches[j];\n\t if (touch.id === changedTouch.identifier) {\n\t\n\t // Remove touch from active-touches\n\t this._scroll.activeTouches.splice(j, 1);\n\t\n\t // When a different touch now becomes the primary touch, update\n\t // its start position to match the current move offset.\n\t if ((j === 0) && this._scroll.activeTouches.length) {\n\t var newPrimaryTouch = this._scroll.activeTouches[0];\n\t newPrimaryTouch.start[0] = newPrimaryTouch.current[0] - (touch.current[0] - touch.start[0]);\n\t newPrimaryTouch.start[1] = newPrimaryTouch.current[1] - (touch.current[1] - touch.start[1]);\n\t }\n\t break;\n\t }\n\t }\n\t }\n\t\n\t // Wait for all fingers to be released from the screen before resetting the move-spring\n\t if (!primaryTouch || this._scroll.activeTouches.length) {\n\t return;\n\t }\n\t\n\t // Determine velocity and add to particle\n\t var velocity = 0;\n\t var diffTime = primaryTouch.time - primaryTouch.prevTime;\n\t if ((diffTime > 0) && ((_getEventTimestamp(event) - primaryTouch.time) <= this.options.touchMoveNoVelocityDuration)) {\n\t var diffOffset = primaryTouch.current[this._direction] - primaryTouch.prev[this._direction];\n\t velocity = diffOffset / diffTime;\n\t }\n\t\n\t // Release scroll force\n\t var delta = this._scroll.touchDelta;\n\t this.releaseScrollForce(delta, velocity);\n\t this._scroll.touchDelta = 0;\n\t }", "function _touchEnd(event) {\n\n\t // Remove touch\n\t var primaryTouch = this._scroll.activeTouches.length ? this._scroll.activeTouches[0] : undefined;\n\t for (var i = 0; i < event.changedTouches.length; i++) {\n\t var changedTouch = event.changedTouches[i];\n\t for (var j = 0; j < this._scroll.activeTouches.length; j++) {\n\t var touch = this._scroll.activeTouches[j];\n\t if (touch.id === changedTouch.identifier) {\n\n\t // Remove touch from active-touches\n\t this._scroll.activeTouches.splice(j, 1);\n\n\t // When a different touch now becomes the primary touch, update\n\t // its start position to match the current move offset.\n\t if ((j === 0) && this._scroll.activeTouches.length) {\n\t var newPrimaryTouch = this._scroll.activeTouches[0];\n\t newPrimaryTouch.start[0] = newPrimaryTouch.current[0] - (touch.current[0] - touch.start[0]);\n\t newPrimaryTouch.start[1] = newPrimaryTouch.current[1] - (touch.current[1] - touch.start[1]);\n\t }\n\t break;\n\t }\n\t }\n\t }\n\n\t // Wait for all fingers to be released from the screen before resetting the move-spring\n\t if (!primaryTouch || this._scroll.activeTouches.length) {\n\t return;\n\t }\n\n\t // Determine velocity and add to particle\n\t var velocity = 0;\n\t var diffTime = primaryTouch.time - primaryTouch.prevTime;\n\t if (diffTime > 0) {\n\t var diffOffset = primaryTouch.current[this._direction] - primaryTouch.prev[this._direction];\n\t velocity = diffOffset / diffTime;\n\t }\n\n\t // Release scroll force\n\t var delta = this._scroll.touchDelta;\n\t this.releaseScrollForce(delta, velocity);\n\t this._scroll.touchDelta = 0;\n\t }", "function stopMoveBoardManager() {\n if(boardManagerIsMoved) {\n boardManagerIsMoved = false;\n if($(__BOARD_MANAGER__).hasClass(__BOARD_MANAGER_MOVED_CLASS__))\n $(__BOARD_MANAGER__).removeClass(__BOARD_MANAGER_MOVED_CLASS__);\n currentMouseXPosition = -1;\n currentMouseYPosition = -1;\n }\n}", "function overEnd() {\n if(!loser){\n $('status').innerHTML = 'You win! :)';\n [].forEach.call($$('.boundary'), function(element){\n element.stopObserving();\n });\n $('maze').removeEventListener('mouseleave', overBody);\n }\n}", "_onScrollEnd() {\n\n // Enable the animation class\n this._enableAnimation();\n\n // Stop after one frame so that animation is fully reenabled\n window.setTimeout(function() {\n this.stop({\n type: 'scroll'\n });\n }.bind(this), 1);\n }", "_scrollButtonNearClickHandler() {\n const that = this;\n\n if (that.$.scrollButtonNear.disabled) {\n return;\n }\n\n that._scroll(-1);\n }", "function quitDemoMode() {\n window.clearInterval(fakePointerTimer);\n demoMode = false;\n }", "function Dragging_DetectActionEnd(event)\n{\n\t//trigger final move\n\t__DRAG_DATA.OnMove(event);\n\t//are we showing?\n\tif (__DRAG_DATA.IsShowing)\n\t{\n\t\t//remove it from the body\n\t\t__DRAG_DATA.DraggingClone.parentNode.removeChild(__DRAG_DATA.DraggingClone);\n\t}\n\t//has target?\n\tif (__DRAG_DATA.DragActionDestiny && __DRAG_DATA.DragActionDestiny.HTMLBorder && __DRAG_DATA.DragActionDestiny.HTMLBorder.parentNode)\n\t{\n\t\t//remove this\n\t\t__DRAG_DATA.DragActionDestiny.HTMLBorder.parentNode.removeChild(__DRAG_DATA.DragActionDestiny.HTMLBorder);\n\t\t__DRAG_DATA.DragActionDestiny.HTMLBorder = null;\n\t\t//we have a drag action destiny so trigger the action\n\t\t__SIMULATOR.ProcessEvent(new Event_Event(__DRAG_DATA.DragActionDestiny.InterpreterObject, __NEMESIS_EVENT_DRAGDROP, __DRAG_DATA.DragActionDestiny.Data, __DRAG_DATA.DragActionSource.InterpreterObject, 0, __DRAG_DATA.DragActionSource.Data));\n\t}\n\t//no target, are we in touch mode?\n\telse if (__BROWSER_IS_TOUCH_ENABLED)\n\t{\n\t\t//no drag destiny, check the time between clicks\n\t\tvar elapsedTime = new Date().getTime() - __DRAG_DATA.StartTime;\n\t\t//less 250ms?\n\t\tif (elapsedTime < 250)\n\t\t{\n\t\t\t//switch according to class\n\t\t\tswitch (__DRAG_DATA.DragActionSource.InterpreterObject.DataObject.Class)\n\t\t\t{\n\t\t\t\tcase __NEMESIS_CLASS_LINK:\n\t\t\t\tcase __NEMESIS_CLASS_LABEL:\n\t\t\t\tcase __NEMESIS_CLASS_UNKNOWN:\n\t\t\t\t\t//click on this\n\t\t\t\t\tBrowser_FireEvent(__DRAG_DATA.DragActionSource.InterpreterObject.HTML, __BROWSER_EVENT_CLICK);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n}", "stop() {\n\t\tclearTimeout(this.scrollTimeout_);\n\t}", "function stopScrolling (e) {\n e.preventDefault();\n e.stopPropagation();\n return false;\n}", "blockEvents() {\n\t\tthis.detachInputHandler();\n\t\tthis.canScroll = false;\n\n\t\tclearTimeout((this.scrollTimeout));\n\n\t\t// start timeout for attaching the handler\n\t\tthis.scrollTimeout = setTimeout(() => {\n\t\t\tthis.canScroll = true;\n\t\t\tthis.attachInputHandler();\n\t\t}, this.options.transitionDuration)\n\t}", "function endTurnUI (update) {\n // debugmsg(\"In endTurnUI\");\n if (settings.panes !== 'None' && update) {\n // set the lang.exit_list\n for (const exit of lang.exit_list) {\n if (game.room.hasExit(exit.name, { excludeScenery: true }) || exit.nocmd) {\n $('#exit' + exit.name).show();\n } else {\n $('#exit' + exit.name).hide();\n }\n }\n io.updateStatus();\n if (typeof ioUpdateCustom === 'function') ioUpdateCustom();\n io.updateUIItems();\n }\n\n // scroll to end\n setTimeout(io.scrollToEnd, 1);\n // give focus to command bar\n if (settings.textInput) { $('#textbox').focus(); }\n }", "function endDrag () {\n $element.parents().off( \"mousemove\", handleDrag );\n $element.parents().off( \"mouseup\", endDrag );\n $element[0].dispatchEvent( new CustomEvent(\n ( $element[0].dragType == 4 ) ? 'moved' : 'resized',\n { bubbles : true } ) );\n }", "function end ( event ) {\n\n\t\t// The handle is no longer active, so remove the class.\n\t\t$('.' + Classes[15]).removeClass(Classes[15]);\n\n\t\t// Remove cursor styles and text-selection events bound to the body.\n\t\tif ( event.cursor ) {\n\t\t\t$('body').css('cursor', '').off( namespace );\n\t\t}\n\n\t\t// Unbind the move and end events, which are added on 'start'.\n\t\tdoc.off( namespace );\n\n\t\t// Remove dragging class.\n\t\t$Target.removeClass(Classes[12]);\n\n\t\t// Fire the change and set events.\n\t\tfireEvents(['set', 'change']);\n\t}", "function scrollHandler() { \n\t\tif ( isNextSceneReached(true) ) {\n runNextScene();\n\t\t} else if ( isPrevSceneReached(true) ) {\n runPrevScene();\n\t\t}\n }", "function moveOn() {\r\n stop = true;\r\n}", "finishTheGame () {\n // Disable pointer events for the tic toc board\n this._tictocPlayground.style.pointerEvents = 'none'\n }", "preventMove() {\n this.currentMovePrevented = true;\n }", "function stopEvents(e){ \n items.classList.remove(\"active\"); \n this.removeEventListener('mousemove', scrollPosition); \n}", "function scroll_hand()\n{\n var e = window.event;\n var buttom = window.scrollY + window.innerHeight;\n //console.log(\"Window top = \" + window.scrollY + \"; Window buttom = \" + buttom);\n if((y1 > window.scrollY ) && ( y2 < (window.scrollY + window.innerHeight)))\n {\n if(flag === 0)\n {\n flag = 1;\n \n // Call function to react to being in the zone\n inZone();\n \n }\n else\n {\n //console.log(\"You are still in zone and flag = \" + flag);\n \n };\n }\n else\n {\n flag = 0;\n \n // Call function to react to leaving the zone.\n outZone();\n //console.log(\"You are out of zone and flag = \" + flag);\n };\n\n \n}", "function touch_end_handler(e) {\n if (!e.touches) mouse.down = false; //If there are no more touches on the screen, sets \"down\" to false.\n }", "function disarmWindowScroller() {\n console.debug('disarming window scroller');\n window.removeEventListener('mousemove', updateMousePosition);\n window.removeEventListener('touchmove', updateMousePosition);\n mousePosition = undefined;\n window.clearTimeout(next$1);\n resetScrolling$1();\n}", "function gameEnd() {\n clearTimeout(timeoutID)\n clearTimeout(autoTimeOutID)\n removeEventListener('keydown', keydown_fn)\n endScreen()\n end = true\n}", "function moveClickable() {\n // Move\n clickable.x += clickable.vx;\n clickable.y += clickable.vy;\n\n // Check if off screen and just kill the program if so\n if (clickable.x < 0 || clickable.x > width || clickable.y < 0 || clickable.y > height) {\n noLoop();\n }\n}", "onElementMouseUp(event) {\n if (this.dragContext) {\n this.endMove();\n event.preventDefault();\n }\n }", "onElementMouseUp(event) {\n if (this.dragContext) {\n this.endMove();\n event.preventDefault();\n }\n }", "function step () {\n // Check for scroll interference before continuing animation\n if (lastX === container.scrollLeft && lastY === container.scrollTop) {\n const elapsed = Date.now() - startTime\n lastX = container.scrollLeft = position(startX, targetX, elapsed, duration)\n lastY = container.scrollTop = position(startY, targetY, elapsed, duration)\n if (elapsed > duration && typeof options.onArrive === 'function') options.onArrive()\n else window.requestAnimationFrame(step)\n } else {\n typeof options.onInterrupt === 'function' && options.onInterrupt()\n }\n }", "jumpToEnd() {\n this.simulateKeyPress_(SAConstants.KeyCode.END, {ctrl: true});\n }", "_endSwiping(event, now, noBounce) {\n const that = this;\n\n if (!that._dragStartDetails) {\n return;\n }\n\n const mainContainer = that.$.mainContainer,\n timeDifference = Math.abs(that._dragStartDetails.startTime - now),\n speed = 300 / timeDifference,\n distanceDifference = (that._dragStartDetails.startY - event.pageY) * speed;\n let remaining = Math.abs(distanceDifference);\n\n const scrollable = function () {\n if (distanceDifference > 0 &&\n mainContainer.scrollTop === mainContainer.scrollHeight - mainContainer.offsetHeight ||\n distanceDifference < 0 && mainContainer.scrollTop === 0) {\n return false;\n }\n\n return true;\n }\n\n let scrollStep = 0.03 * Math.abs(distanceDifference) * speed;\n\n const kineticScrolling = function () {\n if (scrollStep > 5) {\n const remainingPart = (remaining - scrollStep) / Math.abs(distanceDifference);\n\n if (remainingPart < 0.1) {\n scrollStep /= 1.25;\n }\n else if (remainingPart < 0.15) {\n scrollStep /= 1.2;\n }\n else if (remainingPart < 0.2) {\n scrollStep /= 1.15;\n }\n else if (remainingPart < 0.25) {\n scrollStep /= 1.1;\n }\n else if (remainingPart < 0.3) {\n scrollStep /= 1.05;\n }\n }\n\n const oldScrollTop = mainContainer.scrollTop;\n\n if (distanceDifference > 0) {\n mainContainer.scrollTop = Math.min(oldScrollTop + scrollStep, mainContainer.scrollHeight - mainContainer.offsetHeight);\n }\n else {\n mainContainer.scrollTop = Math.max(oldScrollTop - scrollStep, 0);\n }\n\n remaining -= scrollStep;\n\n that._updateScrollButtonVisibility(that.$.mainContainer, that.mode === 'horizontal', [that.$.scrollButtonNear, that.$.scrollButtonFar]);\n\n const canBeScrolled = scrollable();\n\n if (remaining > 0 && canBeScrolled) {\n that._scrollingAnimationFrame = window.requestAnimationFrame(kineticScrolling);\n }\n else {\n that._wheelInProgress = false;\n\n if (!canBeScrolled) {\n if (that._fireScrollBottomReachedEvent) {\n that._fireScrollBottomReachedEvent(oldScrollTop);\n }\n\n if (noBounce !== true) {\n const initialScrollTop = that.$.mainContainer.scrollTop;\n\n if (initialScrollTop === 0) {\n that._bounceTop();\n }\n else {\n that._bounceBottom(initialScrollTop);\n }\n }\n }\n }\n };\n\n if (that._scrollingAnimationFrame) {\n cancelAnimationFrame(that._scrollingAnimationFrame);\n }\n\n if (timeDifference < 1000 && scrollable()) {\n that._scrollingAnimationFrame = window.requestAnimationFrame(kineticScrolling);\n }\n else {\n that._wheelInProgress = false;\n }\n\n delete that._dragStartDetails;\n }", "end() {\n //for (let [, arr] of this.arrangements.filter(a => a.at === this.iterations && a.when === \"end\")) arr.exe();\n this.iterations++;\n this.engine.events.emit(`${this.name}-End`, this);\n if (this.engine.jumpingTo) return;\n this.engine.phases.current = this.engine.phases.get(this.next);\n this.engine.timer.reset();\n }", "function end(event, data) {\n // The handle is no longer active, so remove the class.\n var active = scope_Base.querySelector('.' + cssClasses[15]),\n handleNumber = data.handles[0] === scope_Handles[0] ? 0 : 1;\n if (active !== null) {\n removeClass(active, cssClasses[15]);\n }\n // Remove cursor styles and text-selection events bound to the body.\n if (event.cursor) {\n document.body.style.cursor = '';\n document.body.removeEventListener('selectstart', document.body.noUiListener);\n }\n var d = document.documentElement;\n // Unbind the move and end events, which are added on 'start'.\n d.noUiListeners.forEach(function(c) {\n d.removeEventListener(c[0], c[1]);\n });\n // Remove dragging class.\n removeClass(scope_Target, cssClasses[12]);\n // Fire the change and set events.\n fireEvent('set', handleNumber);\n fireEvent('change', handleNumber);\n // If this is a standard handle movement, fire the end event.\n if (data.handleNumber !== undefined) {\n fireEvent('end', data.handleNumber);\n }\n }", "function endScroll($el) {\n if (interval) {\n window.clearInterval(interval);\n interval = undefined;\n }\n }" ]
[ "0.6462806", "0.643455", "0.6312569", "0.6301088", "0.6256901", "0.62047046", "0.61674607", "0.6155931", "0.60806483", "0.6072541", "0.60485476", "0.6006821", "0.59595", "0.59070104", "0.5893689", "0.5879238", "0.58686316", "0.58670074", "0.5828615", "0.5811299", "0.58063793", "0.57901925", "0.57679373", "0.5763819", "0.5738223", "0.5738223", "0.57154584", "0.57005334", "0.5699143", "0.56961185", "0.5692015", "0.56862944", "0.56835145", "0.5677077", "0.56710833", "0.56710833", "0.5665237", "0.5656136", "0.5654906", "0.5637151", "0.5617897", "0.5607823", "0.56009716", "0.5594365", "0.5587771", "0.5580019", "0.55747586", "0.55611765", "0.5560645", "0.55555445", "0.5547075", "0.5543079", "0.5536267", "0.55203444", "0.5513139", "0.5496048", "0.5492655", "0.54893434", "0.5487728", "0.5484774", "0.5481158", "0.54791856", "0.54656494", "0.5461527", "0.5457385", "0.5448982", "0.54454035", "0.5438926", "0.5437997", "0.5437126", "0.5436125", "0.54345584", "0.54274577", "0.5410226", "0.5402602", "0.5402421", "0.54008687", "0.5393524", "0.5380543", "0.53771335", "0.53740233", "0.53715825", "0.5361179", "0.5360377", "0.5354874", "0.5349223", "0.5345974", "0.5342433", "0.5337498", "0.5320479", "0.53157026", "0.53150916", "0.5310024", "0.53092843", "0.53092843", "0.5300376", "0.5299076", "0.529612", "0.5294139", "0.5291728", "0.52864766" ]
0.0
-1
try to resume simulation with a new pointer
simulationResume({ pointerType, eventType, eventTarget, scope }) { if (!/down|start/i.test(eventType)) { return null; } for (const interaction of scope.interactions.list) { let element = eventTarget; if (interaction.simulation && interaction.simulation.allowResume && interaction.pointerType === pointerType) { while (element) { // if the element is the interaction element if (element === interaction.element) { return interaction; } element = parentNode(element); } } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function resume() {\n paused = false;\n timeout = setTimeout(executeNext, stepDelay);\n }", "function newGeneration(){\n firstTime = 1;\n newGen === true ? step() : null\n}", "resume() {\r\n if(this._endScript) {\r\n this._resetStates();\r\n } else {\r\n this._wait = false;\r\n }\r\n this._next();\r\n }", "function Resume() {}", "function resume(){\r\n\tstopped = 0;\r\n\tcircles();\r\n}", "function continueExecution() {\n clearBoard();\n hero.positionAtHome();\n hero.setImage('normal');\n hero.setLives(hero.getLives()-1);\n hero.draw();\n isNextLife = true;\n }", "function step() {\n paused = true;\n executeNext(true);\n }", "function resume(){\n\tfor( let i = 0; i < subplanes.length ; i++ ){\n\t\tsubplanes[i].resume();\n\t}\n\tpaused = false;\n}", "resume() {\n this.source.attach();\n }", "resume() {\n this.paused = false;\n this.flush();\n }", "resume() { this.setPaused(false); }", "resume() {\n\t\tthis._context.resume();\n\t}", "function enterModificationReal() {\n suspendEvents += 1;\n }", "function enterModificationReal() {\n suspendEvents += 1;\n }", "resume() {\n this.context.resume();\n }", "function resumeGame() {\r\n\tif (!gameOn && result == false && allowResume == true) {\r\n\t\t// console.log(\"resume game\");\r\n\t\tgameOn = true;\r\n\t\t\r\n\t\tanimateEnemy(animateBoxes,locationOfEnemy,currentDirection);\r\n\r\n\t} // if\r\n\r\n\r\n} // resumeGame", "function launch() {\n\tcont=1;\n\tt1=setInterval(\"beginp()\",iter);\n}", "function restart() {}", "resume() {this.paused = false;}", "function resumeGame() {\n\tpause = false;\n\tstart = true;\n}", "__init8() {this._isPaused = false;}", "resume() {\n this._isSuspended = false;\n }", "resumeMovement() {\n // this.xspeed = 0.01;\n // this.xspeed = 0.01;\n // console.log(\"resuming \" + this.lastXSpeed);\n // this.xspeed = this.lastXSpeed;\n // this.yspeed = this.lastYSpeed;\n }", "function enterModificationReal() {\n\t suspendEvents += 1;\n\t }", "function enterModificationReal() {\n\t suspendEvents += 1;\n\t }", "resume () {\n\t\t\tif (this.runOnResume !== false) {\n\t\t\t\tthis.run();\n\t\t\t}\n\n\t\t\tdelete this.runOnResume;\n\t\t}", "resume() {\n this.element.resume();\n }", "function incrementPointer() {\t\t\t\n\t\t\tpointerAddress += 1;\n\t\t\tif(pointerAddress >= instructions.length) {\t\t\t\n\t\t\t\twindow.console.log('Brainfuck program finished.');\n\t\t\t\tstatus = STATUSES['STOPPED'];\n\t\t\t}\n\t\t}", "resume() {\n // override to add custom forces before World step\n }", "resume() {\n this.isStopped = false;\n }", "function retry(){\r\n\t\tpartie = 0;\r\n\tstart();\r\n}", "function restartSimulation() {\n\tif (isLearning) {\n\t\tDebug.Log(\"Current chromosome: \" + geneticComponent.population.GetCurrentChromosomeID() \n\t\t\t+ \" with fitness \" + geneticComponent.population.GetCurrentCromosomeFitness());\n\t\t\n\t\t// go throught the next chromosome\n\t\tgeneticComponent.population.SetNextChromosome();\n\t\t\n\t\tif(geneticComponent.population.IsLastChromosome())\t{\n\t\t\t// tried all the chromosomes, start a new generation.\n\t\t\tDebug.Log(\"Generation tested, start new one\");\n\t\t\tgeneticComponent.population.NewGeneration();\n\t\t}\n\t}\n\tstartSimulation();\n}", "function ResumeSpeed(){\n\tyield WaitForSeconds(Indicator.startLifetime);\n\tIndicator.startSpeed=2;\n}", "relaunch() {}", "async runv() {\n // Add one to the start address for Thumb mode\n await this._client.writeWord(this._reset, this._start + 1);\n\n // The stack is the first reset vector\n await this._client.go(this._stack);\n }", "function restart() {\n a=0; //reset dei contatori\n end=0;\n get_karma();\n }", "function resume() {\n paused = false; // Set paused to true\n ctx.clearRect(0,0,canvas.width, canvas.height); // Clear the entire canvas\n drawTopData(); // Redraw the top data bar\n drawGameArea(); // Redraw the game board/blocks\n mainInterval = setInterval(dropBlock, dropDelay); // restart the main game loop, automatically dropping the block\n}", "launch() {\n this.planet = null;\n return new Promise((resolve, reject) => {\n this.moveTo(addPos(this.pos, { x:0, y:-20 }), 1000).then(resolve);\n });\n }", "pause () {}", "pause () {}", "pause () {}", "function UnpausedSentinel() {\n\n}", "pauseResume() {\n this.pauseResume().bind(timer);\n }", "pause () {\n\t\t\tthis.runOnResume = this.running;\n\t\t\tthis.stop();\n\t\t}", "function loadSimon() {\n if(!activeArray[enlarged].data) {\n playSequence();\n }\n}", "fullResume(kont, arg) {\n // throw new Error('MAKE A CONSTRUCTOR SOMEHOW');\n const [hash, number, frames, final_idx] = kont;\n\n arg = arg != null ? arg : unit_value();\n\n this.idx = final_idx;\n this.stack = Stack.fromFrames(frames);\n this.stack.push(arg);\n // console.log('pushed', state.stack, arg);\n this.cmds = this.env.cmds(this.stack._frames[0].source);\n }", "pause() { this._pause$.next(true); }", "resume() {\n window.annyang.resume();\n }", "continueGame () {\n if (this.pauseTimer > 0) return\n if (this.lives > 0) {\n this.startGame(false)\n }\n }", "step() { }", "cycle() { this._pause$.next(false); }", "_autobegin(){\r\n if(!this._started)\r\n this.begin(false);\r\n }", "rewind() {\r\n\t\t\tthis.looping = false;\r\n\t\t\tthis.goToFrame(0);\r\n\t\t}", "function restartGame() {\n //Clear the CPU sequence\n cpuSequence = [];\n //Reset count\n count = 0;\n startCpuSequence();\n }", "function RunPauseTest(scope_number, expected_old_result, variable_name,\n new_value, expected_new_result, fun) {\n var actual_old_result = fun();\n assertEquals(expected_old_result, actual_old_result);\n\n var listener_delegate;\n var listener_called = false;\n var exception = null;\n\n function listener_delegate(exec_state) {\n var scope = exec_state.frame(0).scope(scope_number);\n scope.setVariableValue(variable_name, new_value);\n }\n\n function listener(event, exec_state, event_data, data) {\n try {\n if (event == Debug.DebugEvent.Break) {\n listener_called = true;\n listener_delegate(exec_state);\n }\n } catch (e) {\n exception = e;\n }\n }\n\n // Add the debug event listener.\n Debug.setListener(listener);\n\n var actual_new_result;\n try {\n actual_new_result = fun();\n } finally {\n Debug.setListener(null);\n }\n\n if (exception != null) {\n assertUnreachable(\"Exception in listener\\n\" + exception.stack);\n }\n assertTrue(listener_called);\n\n assertEquals(expected_new_result, actual_new_result);\n}", "function resumeGame() {\n pauseBoard.kill();\n pauseBoardText.kill();\n resumeButton.kill();\n restartLevelButton.kill();\n mainMenuButton.kill();\n this.deerTimer = 0;\n this.cowTimer = 1200;\n this.rockTimer = 2300;\n game.pause = false;\n}", "function pause_resume() {\r\n if (gameState == \"run\") {\r\n gameLoop.stop();\r\n gameState = \"stop\";\r\n }\r\n else if (gameState == \"stop\") {\r\n gameLoop.start();\r\n gameState = \"run\";\r\n }\r\n}", "function gotoNext() {\n\tif(typeof nextInventory !== 'undefined') {\n\t\tpreviousInventory = currentInventory;\n\t\tcurrentInventory = nextInventory;\n\t\tnextInventory = undefined;\n\t}\n}", "begin() {\n //for (let [, arr] of this.arrangements.filter(a => a.at === this.iterations && a.when === \"start\")) arr.exe();\n this.engine.phases.current = this;\n this.engine.events.emit(this.name, this);\n }", "function stepInto() {\n\t\tInspector.Debugger.stepInto();\n\t}", "suspend() {\n\t\tthis._context.suspend();\n\t}", "function continueGame() {\n //game active\n isGameReady = true;\n //increment new level\n currentLevel += 1;\n //reset objects\n resetObjects();\n //check missiles\n GameLogic.equipMissiles(currentLevel, missileList, browserWidth, browserHeight);\n //check ship health\n GameLogic.checkRebelShipHealth(rebelShip, currentLevel);\n //create enemies\n loadEnemies();\n //reset time var\n timePrevious = Date.now();\n}", "function runTest(state, robot, memory) {\n for (let turn = 0;; turn++) {\n if (state.parcels.length == 0) {\n //console.log(`Done in ${turn} turns`);\n return turn;\n //break;\n }\n let action = robot(state, memory);\n state = state.move(action.direction);\n memory = action.memory;\n //console.log(\"turn = \", turn)\n //console.log(`Moved to ${action.direction}`); \n }\n}", "function step()\n{\n\tif (!paused)\n\t{\n\t\trunning = true;\n\t\twhile (running)\n\t\t{\n\t\t\tworkspace.highlightBlock(lastBlockToHighlight);\n\t\t\tif (!interpreter.step())\n\t\t\t{\n\t\t\t\tclearInterval(interval);\n\t\t\t\tstopped = true;\n\t\t\t\tdocument.getElementById(\"pause\").disabled = true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n}", "static get PAUSE() { return 4; }", "replay(){\n\n }", "setSimulationStep(step, auto) {\n var s = this.solutions.find(x => x.id == this.solutionFlag);\n var instance = this;\n for (var index in this.sim.tempElements) {\n scene.remove(this.sim.tempElements[index]);\n };\n if (auto !== true) {\n if (this.sim.o != null && step != \"play\") {\n clearInterval(this.sim.o);\n this.sim.o = null;\n }\n }\n switch (step) {\n case \"stop\":\n this.sim.step = null;\n $(\"#simulation .simulation-field .icon[data-action='play']\").text(\"play_arrow\");\n break;\n case \"play\":\n if (this.sim.o == null) {\n if (this.sim.step == null) {\n this.sim.step = 1;\n }\n this.sim.o = setInterval(function () {\n instance.setSimulationStep(\"forward\", true);\n }, 1000);\n $(\"#simulation .simulation-field .icon[data-action='play']\").text(\"pause\");\n } else {\n clearInterval(this.sim.o);\n this.sim.o = null;\n $(\"#simulation .simulation-field .icon[data-action='play']\").text(\"play_arrow\");\n }\n break;\n case \"back\":\n if (this.sim.step == 1 || this.sim.step == null) {\n this.sim.step = s.sequence;\n } else {\n this.sim.step--;\n }\n break;\n case \"forward\":\n if (this.sim.step == s.sequence || this.sim.step == null) {\n this.sim.step = 1;\n } else {\n this.sim.step++;\n }\n break;\n }\n this.doSimulation();\n }", "function addAnother() {console.log(\"things getting harder\")\n\t\t\t\t\t\t\t\t\t\t\t stepCounter = 0; Limit ++; // it adds a note to the sequence to repeat\n\t\t\t\t\t\t\t\t\t\t\t thePlayerSequence = []; // it resets the sequence to repeat to zero \n\t\t\t\t\t\t\t\t\t\t\t displayVar(); // check html\n\t\t\t\t\t\t\t\t\t\t\t tryToFollowMe(); // calls try to follow me function\n\t\t\t\t\t\t\t\t\t\t\t }", "async next() {\n this._executing = false;\n await this._execute();\n }", "resumeCalled() {\n return new Promise((resolve, reject) => {\n this.resume_called_ = resolve;\n });\n }", "function step(){\n let newCells = createCells();\n let cellsAlive = 0\n for (let y = 0; y < resolution; y++){\n for (let x = 0; x < resolution; x++){\n const neighbours = getNeightbourCount(x,y);\n if (cells[x][y] && neighbours >= 2 && neighbours <= 3) \n newCells[x][y] = true; //if the cell in cells array that is the las generation can live, the nextgen cell in 'newCell' array will be true\n else if (!cells[x][y] && neighbours === 3) \n newCells[x][y] = true; //a cell that in the canva is death can live if the neighbours are equals to 3\n cellsAlive += cells[x][y] ? 1 : 0 //cellsalive count\n }\n }\n setRetults(generation++,cellsAlive)\n cells = newCells;\n drawCells();\n}", "once() {\n this.stop()\n this.step()\n }", "function internalRecover(test) {\n \ttest.semaphore = 0;\n \tinternalStart(test);\n }", "function step() {\n\tfunction nicemod(n, m) {\n\t return ((n % m) + m) % m;\n\t}\n\tvar newData = new Uint8ClampedArray(data);\n\tvar alive;\n\tfor (n = 0; n < canvas.width*canvas.height; n++) {\n\t var count = 0;\n\t var c = cartesian(n);\n\t isDead = data[n*4] == 255;\n\t for (i = -1; i < 2; i++) {\n\t\tfor (j = -1; j < 2; j++) {\n\t\t let neighborPos =\n\t\t\t4 * linear\n\t\t (nicemod((c.x+i), canvas.width),\n\t\t nicemod ((c.y+j), canvas.height));\n\t\t if (data[neighborPos] == 0 && !(i == 0 && j == 0)) {\n\t\t\tcount++ ;\n\t\t };\n\t\t}\n\t }\n\t if (!(isDead) && survival.includes(count)) {\n\t }\n\t else if (isDead && birth.includes(count)) {\n\t\tmark(newData, n, 0);\n\t }\n\t else {\n\t\tmark(newData, n, 255);\n\t }\n\t}\n\tctx.putImageData(new ImageData(newData, canvas.width), 0, 0);\n\tdata = newData;\n\tupdateGeneration(generation + 1);\n }", "resume() {\n if (!this._loadAndCheckSession()) {\n return;\n }\n\n this._isPaused = false;\n this.startRecording();\n }", "function restart() {\n grid = createGrid(currentLevel);\n stepCount = 0;\n requestAnimationFrame(drawCanvas);\n win = false;\n scoreSet = false; //Set boolean to false\n}", "function simulationStep() {\n if (curGameState.simulationAlive && curGameState.simulationAlive()) {\n forceSimulationStep();\n }\n}", "function reset() {\n\nstart();\n\n}", "function resumeAnimation() {\n startAnimation()\n}", "function resumeWithCursor(newCursor) {\n changeStream.cursor = newCursor;\n processResumeQueue(changeStream);\n }", "Rewind() {}", "function runSequence() {\n\n pagePositions = [];\n setTargeting();\n setPagePositions();\n defineSlotsForPagePositions();\n\n }", "resume() {\n if (this.pausePoints.pop() === undefined)\n throw new Error('Was not paused');\n return this;\n }", "function pauseGameOfLifeDev()\n{\n console.log(\"pausing game of life\");\n // TELL JavaScript TO STOP RUNNING THE LOOP\n clearInterval(timerDev);\n clearInterval(shipTimerDev);\n clearTimeout(slowTimerDev);\n\n // AND THIS IS HOW WE'LL KEEP TRACK OF WHETHER\n // THE SIMULATION IS RUNNING OR NOT\n timerDev = null;\n shipTimerDev = null;\n slowTimerDev = null;\n}", "function resumeCapture () {\n state.paused = false\n log.debug('resuming capture')\n}", "restart() {\n this.y = this.startY;\n this.x = this.startX;\n }", "function restart() {\r\n correct = 0;\r\n incorrect = 0;\r\n iterQuestion = questions.entries();\r\n iterAns = answers.entries();\r\n selectLock = false;\r\n}", "previousstep(step) {}", "resume() {\n if (overrides.requestCount > 0) {\n overrides.requestCount -= 1;\n }\n\n if (overrides.requestCount === 0) {\n paused = false;\n overrides = $copy(overrideDefaults);\n }\n }", "function continueRehomingTabs() {\n // Make each tab get displayed in the correct window.\n for (var t = tbr.context_; t < loc.tabs.length; t++) {\n var lwid = locIdByRemId[rem.tabs[t].windowId];\n if (typeof lwid == 'undefined') {\n // set re-entrant position\n tbr.context_ = t + 1;\n consoleDebugLog('No lwid found for rwid ' + rem.tabs[t].windowId);\n // create new window, then continue\n chrome.windows.create({tabId: loc.tabs[t].id}, acceptNewWindow);\n // stop here and let async continuation resume the loop\n return;\n } else if (loc.tabs[t].windowId != lwid) {\n // Move this tab to correct window (indexes are adjusted in next phase)\n consoleDebugLog(\n 'Moving tab ' + loc.tabs[t].id + ' from window ' +\n loc.tabs[t].windowId + ' to ' + lwid);\n // Update local session data.\n loc.tabs[t].windowId = lwid;\n // Tell chrome to do the move.\n chrome.tabs.move(loc.tabs[t].id, {windowId: Number(lwid), index: 0});\n }\n }\n // Done with this phase.\n tbr.syncBrowserChromeMove_();\n }", "function restart() {\n // update entries and exits values\n computeIO();\n\n // -----Paths-----\n drawPaths();\n\n // -----Nodes-----\n createNodes();\n updateNodePositions();\n\n // update the distance of every link\n updateDistances();\n\n // set the graph in motion\n force.start();\n}", "function restartSimulation() {\n PLAY_STATUS = PlayStatus.INITAL_STATE_PAUSED\n CODE_MIRROR_BOX.setOption(\"theme\", NORMAL_CODE_THEME)\n\n pausePlay.innerHTML = 'Run!'\n d3.select(\"#messageBoxDiv\")\n .attr(\"class\", \"alert alert-block alert-success\")\n d3.select(\"#messageBoxHeader\")\n .text(\"Tip:\")\n d3.select(\"#messageBox\").html(\"<h3>Click the 'Run!' button to run your program</h3>\")\n d3.select(\"#restart\").attr(\"class\", \"btn menu-button\")\n\n cleanUpVisualization()\n\n BOARD = loadBoard(PUZZLE_CAMPAIGN, PUZZLE_CAMPAIGN_STATE)\n\n var program = compile()\n setBotProgram(BOARD, PROGRAMING_BOT_INDEX, program)\n\n initializeVisualization(PUZZLE_CAMPAIGN, PUZZLE_CAMPAIGN_STATE, BOARD)\n\n}", "execute_program(){\n\t// execution loop\n\twhile(!this.step()){}\n}", "function incrementPointer() {\n\t\t\tpointerAddress += 1;\n\t\t\tif(pointerAddress >= ram.length) {\n\t\t\t\tpointerAddress = 0;\n\t\t\t} \n\t\t}", "createResult() {\n this.scene.launch(\"End\", [count, t]);\n this.scene.pause();\n console.log(\"pausiert\");\n }", "function playOrReset() {\n setTimeout(function () {\n level = 0;\n computerArray = [];\n console.log(\"reset sequence\");\n addToSequence();\n },2000)\n}", "pause() {\n // override to add custom forces before World step\n }", "function resume() {\n\n var wasPaused = dom.wrapper.classList.contains('paused');\n dom.wrapper.classList.remove('paused');\n\n cueAutoSlide();\n\n if (wasPaused) {\n dispatchEvent('resumed');\n }\n\n }", "function resumeAutoAdvance () {\n /* Important to clear the flag if the user opens and closes a modal during \n game activity. */\n autoAdvancePaused = false;\n if (!actualMainButtonState) {\n allowProgression();\n }\n}" ]
[ "0.66943306", "0.61422473", "0.61142546", "0.6099164", "0.6023769", "0.5997409", "0.5993845", "0.589602", "0.58885205", "0.5863108", "0.5861327", "0.58201593", "0.5777836", "0.5777836", "0.5761508", "0.5757017", "0.5727721", "0.5694979", "0.5691681", "0.5677588", "0.56734776", "0.5657587", "0.56466466", "0.5634796", "0.5634796", "0.5617151", "0.5609691", "0.5596275", "0.55937856", "0.5584934", "0.5557236", "0.55166876", "0.55009353", "0.54937804", "0.54651916", "0.54193515", "0.54141545", "0.5393067", "0.53650826", "0.53650826", "0.53650826", "0.5364125", "0.53378046", "0.53220576", "0.53063655", "0.5298603", "0.5283304", "0.5279368", "0.5273066", "0.527186", "0.52695626", "0.5266559", "0.5226417", "0.5221227", "0.5213929", "0.5209524", "0.52032596", "0.5200473", "0.51943403", "0.5192012", "0.5191168", "0.5187015", "0.51794976", "0.5179134", "0.5178337", "0.51764137", "0.5172823", "0.5163223", "0.5149287", "0.5147992", "0.5143771", "0.51436234", "0.51363796", "0.51327515", "0.51259476", "0.5125063", "0.51235753", "0.5118311", "0.511742", "0.51162183", "0.51107943", "0.510709", "0.5093102", "0.5092598", "0.50878865", "0.5084858", "0.5082092", "0.5079683", "0.507515", "0.5069131", "0.5066766", "0.5066375", "0.50647295", "0.5062706", "0.5049545", "0.5048953", "0.50488126", "0.50445944", "0.50425065" ]
0.5355798
43
if it's a mouse or pen interaction
mouseOrPen({ pointerId, pointerType, eventType, scope }) { if (pointerType !== 'mouse' && pointerType !== 'pen') { return null; } let firstNonActive; for (const interaction of scope.interactions.list) { if (interaction.pointerType === pointerType) { // if it's a down event, skip interactions with running simulations if (interaction.simulation && !hasPointerId(interaction, pointerId)) { continue; } // if the interaction is active, return it immediately if (interaction.interacting()) { return interaction; } // otherwise save it and look for another active interaction else if (!firstNonActive) { firstNonActive = interaction; } } } // if no active mouse interaction was found use the first inactive mouse // interaction if (firstNonActive) { return firstNonActive; } // find any mouse or pen interaction. // ignore the interaction if the eventType is a *down, and a simulation // is active for (const interaction of scope.interactions.list) { if (interaction.pointerType === pointerType && !(/down/i.test(eventType) && interaction.simulation)) { return interaction; } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "mouseOn() {\n if (mouseX > this.x && mouseX < this.x + this.w\n && mouseY > this.y && mouseY < this.y + this.h) {\n this.stroke = 2;\n this.mouseover = true;\n }\n else {\n this.stroke = 1;\n this.mouseover = false;\n }\n }", "mouseOn() {\n if (mouseX > this.x && mouseX < this.x + this.w\n && mouseY > this.y && mouseY < this.y + this.h) {\n this.mouseover = true;\n this.stroke = 3;\n }\n else {\n this.mouseover = false;\n this.stroke = 2;\n }\n }", "function mouse(kind, pt, id) {\n \n}", "function p(t) {\n return \"mouse\" === t;\n }", "function mouseReleased(){\n\tdrawing = false;\n}", "mouseDown(pt) {}", "mouseDown(pt) {}", "function isPrimaryMouseButton(ev) {\n\treturn ev.which == 1 && !ev.ctrlKey;\n}", "function isPrimaryMouseButton(ev) {\n\treturn ev.which == 1 && !ev.ctrlKey;\n}", "function isPrimaryMouseButton(ev) {\n\treturn ev.which == 1 && !ev.ctrlKey;\n}", "function isPrimaryMouseButton(ev) {\n\treturn ev.which == 1 && !ev.ctrlKey;\n}", "function isPrimaryMouseButton(ev) {\n\treturn ev.which == 1 && !ev.ctrlKey;\n}", "function isPrimaryMouseButton(ev) {\n\treturn ev.which == 1 && !ev.ctrlKey;\n}", "function isPrimaryMouseButton(ev) {\n\treturn ev.which == 1 && !ev.ctrlKey;\n}", "function isPrimaryMouseButton(ev) {\n\treturn ev.which == 1 && !ev.ctrlKey;\n}", "function isPrimaryMouseButton(ev) {\n return ev.button === 0 && !ev.ctrlKey;\n } // Ignoring fake mouse events generated by touch", "function isPrimaryMouseButton(ev) {\n return ev.which === 1 && !ev.ctrlKey;\n}", "function isPrimaryMouseButton(ev) {\n return ev.which === 1 && !ev.ctrlKey;\n}", "function isPrimaryMouseButton(ev) {\n return ev.which === 1 && !ev.ctrlKey;\n}", "function isPrimaryMouseButton(ev) {\n return ev.which === 1 && !ev.ctrlKey;\n}", "function mousePressed() {\r\n mouseIsDown = true;\r\n}", "function mouseReleased() {\n stamped =false;\n}", "function mousePressed() {\n if(mouseOnButton) {\n on = !on\n }\n}", "hovered(){\n //if mouse is over butotn\n if (mouse.x > this.x1 && mouse.x < this.x2 && mouse.y > this.y1 && mouse.y < this.y2){\n //return that button is being hovered over\n return true;\n }\n }", "function isPrimaryMouseButton(ev) {\n return ev.button === 0 && !ev.ctrlKey;\n}", "function isPrimaryMouseButton(ev) {\n\t\treturn ev.which == 1 && !ev.ctrlKey;\n\t}", "function isPrimaryMouseButton(ev) {\n return ev.which == 1 && !ev.ctrlKey;\n }", "mouseOn() {\n if (mouseX > this.x && mouseX < this.x + this.w\n && mouseY > this.y && mouseY < this.y + this.h) {\n this.mouseover = true;\n }\n else {\n this.mouseover = false;\n }\n }", "function onClick(ev) {\n var coords = getCanvasXY(ev);\n var x = coords[0];\n var y = coords[1];\n\n//here is the problem....how do we know we clicked on canvas\n /*var fig=STACK.figures[STACK.figureGetMouseOver(x,y,null)];\n if(CNTRL_PRESSED && fig!=null){\n TEMPORARY_GROUP.addPrimitive();\n STACK.figureRemove(fig);\n STACK.figureAdd(TEMPORARY_GROUP);\n }\n else if(STACK.figureGetMouseOver(x,y,null)!=null){\n TEMPORARY_GROUP.primitives=[];\n TEMPORARY_GROUP.addPrimitive(fig);\n STACK.figureRemove(fig);\n }*/\n//draw();\n}", "function mouseClicked() {\n if (start.start === false) {\n start.mouseClicked();\n } else {\n handler.mouseClicked();\n }\n if (handler.active === handler.warning && trigger.warning === false) {\n trigger.mouseClicked();\n }\n if (\n handler.active === handler.nameplate &&\n doorbell.ok === false &&\n doorbell.name.length >= 1\n ) {\n doorbell.mouseClicked();\n }\n if (\n handler.active === handler.decisionC1 ||\n handler.active === handler.decisionH3 ||\n handler.active === handler.decisionF1 ||\n handler.active === handler.decisionF3\n ) {\n decision1.mouseClicked();\n decision2.mouseClicked();\n }\n // red flags buttons\n if (handler.active === handler.annegretC1) {\n control.mouseClicked();\n }\n if (handler.active === handler.frankE6) {\n lie.mouseClicked();\n }\n if (handler.active === handler.monologueE3) {\n arm.mouseClicked();\n }\n if (handler.active === handler.annegretF8) {\n victim.mouseClicked();\n }\n if (handler.active === handler.monologueG2) {\n noise.mouseClicked();\n }\n if (handler.active === handler.monologueH8) {\n phone.mouseClicked();\n }\n\n if (handler.active === handler.end) {\n end.mouseClicked();\n }\n}", "mouseUp(pt) {}", "mouseUp(pt) {}", "mouseDown(x, y, _isLeftButton) {}", "externalMouseDown() {\n this._strikeMouseDown();\n this._localPointer._mouseIsActive = true;\n }", "function checkMouse() {\n var holdBat = false;\n holdBat = collidePointRect(\n mouseX,\n mouseY,\n batX - 100,\n batY,\n bat.width + 260,\n bat.height\n );\n if (holdBat && gameIsOver == false) {\n batX = mouseX - bat.width / 2;\n batY = mouseY - bat.height / 2;\n }\n}", "isMouseOver(){\n let x = this.position.x + this._width/2;\n let y = this.position.y + this._height/2;\n let h = mouseX;\n let k = mouseY;\n let ry = this._height/2;\n let rx = this._width/2;\n\n let ry2 = ry*ry;\n let rx2 = rx*rx;\n\n return ry2*(x-h)*(x-h) + rx2*(y-k)*(y-k) <= ry2*rx2; \n }", "onIntersectedByMouse(){\n }", "mouseMoved(e){\n //Construct a very small rectangle on the mouse position\n var mouseRect = {x: e.clientX - 5, y: e.clientY - 5, width: 2, height: 2};\n\n //Check if the mouse rect collides with our button rectangle\n //And assign the bool that returns from the function\n this.highlighted = this.collides(this.rect, mouseRect);\n }", "isMouseOver() {\n return mouseX > this.x - this.w / 2 && mouseX < this.x + this.w / 2\n && mouseY > this.y - this.h / 2 && mouseY < this.y + this.h / 2;\n }", "function sketchpad_mouseDown() {\n g_mouseDown = 1;\n drawDot(g_ctx, g_mouseX, g_mouseY, 12);\n}", "isPenDown() {\n return this._penDown;\n }", "function isMouseOverSymbol(pointX, pointY, rect) {\n\t\t\t if(rect.left <= pointX && pointX <= rect.left + rect.width)\n\t\t\t if(rect.top <= pointY && pointY <= rect.top + rect.height)\n\t\t\t return true;\n\t\t\t \n\t\t\t return false;\n\t\t\t}", "function mousePressed() {\n session.mousePressed();\n}", "sketchpad_mouseUp() {\n this.mouseDown = 0\n }", "function sketchpad_mouseDown() {\n mouseDown=1;\n drawDot(ctx,mouseX,mouseY,6);\n }", "function isPrimaryMouseButton(ev) {\n return ev.button === 0 && !ev.ctrlKey;\n }", "function isPrimaryMouseButton(ev) {\n return ev.button === 0 && !ev.ctrlKey;\n }", "function isPrimaryMouseButton(ev) {\n return ev.button === 0 && !ev.ctrlKey;\n }", "function mousePressed() {\r\n\tstartPosX = mouseX;\r\n\tstartPosY = mouseY;\r\n\tif (positionMatchesOverlay(startPosX, startPosY)) {\r\n\t\tblockDrawing = true;\r\n\t} else {\r\n\t\tblockDrawing = false;\r\n\t}\r\n}", "function isInside() {\n //mouseX, mouseY\n\n\n\n return bool\n}", "function sketchpad_mouseDown() {\n mouseDown=1;\n // checkCoordinates(mouseX,mouseY);\n drawDot(ctx,mouseX,mouseY,12);\n}", "function sketchpad_mouseDown() {\n mouseDown=1;\n drawDot(ctx,mouseX,mouseY,1);\n}", "function isHovering(mouse) {\n var cursorHover = false;\n for(var i=0;i<Object.keys(icons).length;i++) {\n curr_x = icons[Object.keys(icons)[i]][1];\n curr_y = icons[Object.keys(icons)[i]][2];\n curr_height = icons[Object.keys(icons)[i]][3];\n curr_width = icons[Object.keys(icons)[i]][4];\n if (!cursorHover) {\n if (mouse[0] < curr_x + curr_width && mouse[0] > curr_x - curr_width) {\n if (mouse[1] < curr_y + curr_height && mouse[1] > curr_y - curr_height) {\n cursorHover = true;\n }\n else {\n cursorHover = false;\n canvas.style.cursor = \"default\";\n }\n }\n else {\n cursorHover = false;\n canvas.style.cursor = \"default\";\n }\n }\n else {\n canvas.style.cursor = \"pointer\"\n }\n }\n }", "function mouse_clicked(){\n\t\treturn M.mouse_clicked;\n\t}", "function mouseInteraction(event) {\r\n if(event.hasOwnProperty(\"type\")) {\r\n if(event.type === 'mouseup') {\r\n current_button = null;\r\n if (vp.getSelectionMode() === true) {\r\n clearOverlay();\r\n }\r\n renderersContainer.trigger($.extend(event, {\r\n type: 'mouse',\r\n action: 'up',\r\n current_button: current_button\r\n }));\r\n extractCoordinates(event, false, true);\r\n renderersContainer.trigger({\r\n type: 'endInteraction',\r\n area: area\r\n });\r\n } else if(event.type === 'mousedown') {\r\n current_button = event.which;\r\n // Override button if modifier is used\r\n // Middle: Alt - Right: Shift\r\n if(event.shiftKey) {\r\n current_button = 3;\r\n event.shiftKey = false;\r\n } else if(event.altKey) {\r\n current_button = 2;\r\n event.altKey = false;\r\n }\r\n extractCoordinates(event, true, false);\r\n renderersContainer.trigger('startInteraction');\r\n renderersContainer.trigger($.extend(event, {\r\n type: 'mouse',\r\n action: 'down',\r\n current_button: current_button\r\n }));\r\n\r\n } else if(event.type === 'mousemove' && current_button != null) {\r\n if (vp.getSelectionMode() === true) {\r\n extractCoordinates(event, false, false);\r\n redrawSelection();\r\n }\r\n renderersContainer.trigger($.extend(event, {\r\n type: 'mouse',\r\n action: 'move',\r\n current_button: current_button\r\n }));\r\n }\r\n }\r\n }", "function sketchpad_mouseUp() {\n mouseDown=0;\n }", "function drawing(){\n\t\treturn M.status == 'drawing';\n\t}", "function y(){return Q.props.followCursor&&!Mt&&\"focus\"!==M.type}", "function detectionOfMenu(){\n if (mouseIsPressed){\n //checks if click is in hitbox\n if (mouseX > width/2 - 200 && mouseX < width/2 + 200 &&\n mouseY > height/2 - 100 - 75 && mouseY < height/2 - 100 + 75){\n state = 'piano';\n }\n if (mouseX > width/2 - 200 && mouseX < width/2 + 200 &&\n mouseY > height/2 + 100 - 75 && mouseY < height/2 + 100 + 75){\n state = 'guitar';\n }\n }\n }", "function sketchpad_mouseUp() {\n mouseDown=0;\n}", "function sketchpad_mouseUp() {\n mouseDown=0;\n}", "function sketchpad_mouseUp() {\n mouseDown=0;\n}", "function OnMouseOver(buttonRect : Rect):boolean{\n\tif(buttonRect.Contains(Event.current.mousePosition)){\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\t\t\n}", "function sketchpad_mouseUp () {\n mouseDown = 0\n}", "function mousePressed() {\n\n CheckButtons(Buttons);\n CheckHover(Buttons);\n\n}", "isCursorOverInterface() {\r\n\t\treturn intersectTest(_mouse.x, _mouse.y, 0, 0, this.interfaceRect.x,\r\n\t\t\tthis.interfaceRect.y, this.interfaceRect.width, this.interfaceRect.height);\r\n\t}", "function mouseSeeker() {\n\tstroke(230);\n\tline(mouseX, 0, mouseX, height);\n\tline(0, mouseY, width, mouseY);\n\t//color(0,0);\n\t//rect(0,0,959,383);\n}", "function mousePressed() {\n return false;\n}", "function mouseClicked(){\n mouse_bool = true; \n music_bool = true; \n\n}", "isMouseOver() {\n return this.square.isMouseOver()\n }", "function mouseClicked() {\n // If it has been clicked return true\n return true;\n }", "function mouseUp() { }", "function onDrawingBoard() {\n return (pmouseX > 0 && pmouseX < 400 && mouseX > 0 && mouseX < 400 &&\n pmouseY > 0 && pmouseY < 400 && mouseY > 0 && mouseY < 400);\n}", "function isReallyTouch(e){\r\n //if is not IE || IE is detecting `touch` or `pen`\r\n return typeof e.pointerType === 'undefined' || e.pointerType != 'mouse';\r\n }", "function isReallyTouch(e){\r\n //if is not IE || IE is detecting `touch` or `pen`\r\n return typeof e.pointerType === 'undefined' || e.pointerType != 'mouse';\r\n }", "function isReallyTouch(e){\r\n //if is not IE || IE is detecting `touch` or `pen`\r\n return typeof e.pointerType === 'undefined' || e.pointerType != 'mouse';\r\n }", "function isReallyTouch(e){\r\n //if is not IE || IE is detecting `touch` or `pen`\r\n return typeof e.pointerType === 'undefined' || e.pointerType != 'mouse';\r\n }", "function isReallyTouch(e){\r\n //if is not IE || IE is detecting `touch` or `pen`\r\n return typeof e.pointerType === 'undefined' || e.pointerType != 'mouse';\r\n }", "function mouseStatus(res, e) {\n let mousePos = getMousePos(canvas,e)\n if (res == 'down') {\n flag = true;\n xSrc = mousePos.x;\n ySrc = mousePos.y;\n draw(mousePos.x,mousePos.y,e);\n }\n if (res == 'up' || res == \"out\") {\n flag = false;\n }\n if (res == 'move') {\n if (flag) {\n draw(mousePos.x,mousePos.y,e);\n }\n }\n}", "function enableMouse() {\n\tnoMouse = false;\n}", "function isReallyTouch(e){\n //if is not IE || IE is detecting `touch` or `pen`\n return typeof e.pointerType === 'undefined' || e.pointerType != 'mouse';\n }", "function isReallyTouch(e){\n //if is not IE || IE is detecting `touch` or `pen`\n return typeof e.pointerType === 'undefined' || e.pointerType != 'mouse';\n }", "function isReallyTouch(e){\n //if is not IE || IE is detecting `touch` or `pen`\n return typeof e.pointerType === 'undefined' || e.pointerType != 'mouse';\n }", "function isReallyTouch(e){\n //if is not IE || IE is detecting `touch` or `pen`\n return typeof e.pointerType === 'undefined' || e.pointerType != 'mouse';\n }", "function isReallyTouch(e){\n //if is not IE || IE is detecting `touch` or `pen`\n return typeof e.pointerType === 'undefined' || e.pointerType != 'mouse';\n }", "function isReallyTouch(e){\n //if is not IE || IE is detecting `touch` or `pen`\n return typeof e.pointerType === 'undefined' || e.pointerType != 'mouse';\n }", "function isReallyTouch(e){\n //if is not IE || IE is detecting `touch` or `pen`\n return typeof e.pointerType === 'undefined' || e.pointerType != 'mouse';\n }", "function isReallyTouch(e){\n //if is not IE || IE is detecting `touch` or `pen`\n return typeof e.pointerType === 'undefined' || e.pointerType != 'mouse';\n }", "get trackMouse(){\n // getter\n return this.__trackMouseHandler ? true : false;\n }", "function isReallyTouch(e) {\n //if is not IE || IE is detecting `touch` or `pen`\n return typeof e.pointerType === 'undefined' || e.pointerType != 'mouse';\n }", "function isFakeMousedownFromScreenReader(event) {\n return event.buttons === 0;\n}", "function mouseDragged() {\r\n\tif (!blockDrawing) {\r\n\t\tswitch (state) {\r\n\t\t\tcase 'pencil':\r\n\t\t\t\tvar newObject = new PencilObj(mouseX, mouseY, document.getElementById(\"slid\").value, pmouseX, pmouseY, myCol, 0, fileName); //0 ist hinten\r\n\t\t\t\tdrawObject(newObject);\r\n\t\t\t\tpencilObj.push(newObject);\r\n\t\t\t\tstroke = true;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'rect':\r\n\t\t\t\tactiveObj = new RectObj(startPosX, startPosY, document.getElementById(\"slid\").value, mouseX - startPosX, mouseY - startPosY, myCol, filled, 1, fileName);\r\n\t\t\t\tdrawObject(activeObj);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'circle':\r\n\t\t\t\tactiveObj = new CircleObj(startPosX, startPosY, document.getElementById(\"slid\").value, mouseX - startPosX, mouseY - startPosY, myCol, filled, 1, fileName);\r\n\t\t\t\tdrawObject(activeObj);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'line':\r\n\t\t\t\tactiveObj = new LineObj(startPosX, startPosY, document.getElementById(\"slid\").value, mouseX, mouseY, myCol, 1, fileName);\r\n\t\t\t\tdrawObject(activeObj);\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n}", "function mousedown() {\n \"use strict\";\n mouseclicked = !mouseclicked;\n}", "function mouseReleased() {\r\n mouseIsDown = false;\r\n}", "function mousemove(e) {\n\tif (!e) var e = event;\n\t\tstate.canvasX = e.pageX - state.canvas.offsetLeft;\n state.canvasY = e.pageY - state.canvas.offsetTop;\n state.context.strokeStyle = state.penColor;\n state.context.lineWidth = state.penWidth;\n if (isDrawing) {\n state.context.lineTo(state.canvasX, state.canvasY);\n state.context.stroke();\n console.log(isDrawing);\n }\n}", "function mouseIsInCanvas(p) {\n if (p.mouseX < 0)\n return false;\n if (p.mouseX > p.width)\n return false;\n if (p.mouseY < 0)\n return false;\n if (p.mouseY > p.height)\n return false;\n return true;\n }", "mouseClicked(){\n //If we are highlighted and we clicked, return true\n if(this.highlighted){\n return true\n }\n //Else return false\n return false;\n }", "mouseUp(x, y, _isLeftButton) {}", "e_mouseOver(e)\n\t{\n\n\t}" ]
[ "0.6727132", "0.6714015", "0.66242015", "0.6460124", "0.64475673", "0.6410219", "0.6410219", "0.63878095", "0.63878095", "0.63878095", "0.63878095", "0.63878095", "0.63878095", "0.63878095", "0.63878095", "0.6369918", "0.6338624", "0.6338624", "0.6338624", "0.6338624", "0.63219905", "0.63088197", "0.6305834", "0.62946564", "0.628878", "0.6285681", "0.62765735", "0.62581044", "0.62528074", "0.62423766", "0.62200844", "0.62200844", "0.6206624", "0.6202015", "0.61992794", "0.6191188", "0.6185611", "0.61836183", "0.6180521", "0.617676", "0.61612344", "0.6160615", "0.6150219", "0.614099", "0.61304224", "0.6126205", "0.6126205", "0.6126205", "0.6120661", "0.61117303", "0.6110157", "0.61052805", "0.6095715", "0.6094903", "0.6078433", "0.6068966", "0.6065445", "0.6065009", "0.6063437", "0.6039639", "0.6039639", "0.6039639", "0.6033952", "0.6023223", "0.60229546", "0.6021358", "0.60173243", "0.6016552", "0.6014243", "0.6014167", "0.60132", "0.6010228", "0.6005097", "0.600502", "0.600502", "0.600502", "0.600502", "0.600502", "0.60035557", "0.60003406", "0.5984621", "0.5984621", "0.5984621", "0.5984621", "0.5984621", "0.5984621", "0.5984621", "0.5984621", "0.59767544", "0.59737533", "0.5967857", "0.5966756", "0.596572", "0.59616864", "0.5960566", "0.5960269", "0.5959072", "0.595851", "0.59573776" ]
0.6834145
1
get interaction that has this pointer
hasPointer({ pointerId, scope }) { for (const interaction of scope.interactions.list) { if (hasPointerId(interaction, pointerId)) { return interaction; } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get interaction () {\n\t\treturn this._interaction;\n\t}", "function getInteraction() {\n if (interaction == null) {\n interaction = new Interaction();\n }\n return interaction;\n}", "getMediaInteraction(){ return this.media_interaction; }", "isInteractionRequired() {\n return isInteractionRequired(this);\n }", "function Interaction() {\n\t\tthis.name = 'Interaction';\n\t\tthis.type = 'interaction';\n\t\tthis.state = {\n\t\t\tlatestInteraction:\tnull,\n\t\t\tspeedYaw:\t\t\t0,\n\t\t\tspeedPitch:\t\t0,\n\t\t\tspeedZoom:\t\t0,\n\t\t\tspeedMin:\t\t\t0.01,\n\t\t\tspeedMax:\t\t\t5,\n\t\t\tinteracting:\tfalse\n\t\t};\n\t}", "get currentCommand () {\n return this._currentCommand;\n }", "get command() {\n return this.i.command;\n }", "get selectionBehavior () {\n\t\treturn this._selectionBehavior;\n\t}", "function getSelection(){\n return selection;\n }", "getCommandInput() {\n return this.commandInput;\n }", "interact(){}", "get Mouse0() {}", "get eventTarget() {\n return this.input;\n }", "get intent() {\n\t\treturn this.__intent;\n\t}", "function getWindowWithInteraction() {\n\t\t\tvar $windowDragging = $(\n\t\t\t\t\t\".\" + self.classes.window +\n\t\t\t\t\t\".\" + self.classes.uiDraggableDragging\n\t\t\t\t),\n\t\t\t $windowResizing = $(\n\t\t\t \t\".\" + self.classes.window +\n\t\t\t \t\".\" + self.classes.uiResizableResizing\n\t\t\t ),\n\t\t\t windowInstance;\n\n\t\t\tif ( $windowDragging.length || $windowResizing.length ) {\n\t\t\t\tvar $elem = ( $windowDragging.length\n\t\t\t\t\t? $windowDragging\n\t\t\t\t\t: $windowResizing )\n\t\t\t\t\t.children( \".\" + self.classes.windowContent );\n\n\t\t\t\tif ( $elem.is( self.windows() ) ) {\n\t\t\t\t\treturn $elem;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $();\n\t\t}", "target() {\n return internal(this).target;\n }", "mouseOrPen({\n pointerId,\n pointerType,\n eventType,\n scope\n }) {\n if (pointerType !== 'mouse' && pointerType !== 'pen') {\n return null;\n }\n\n let firstNonActive;\n\n for (const interaction of scope.interactions.list) {\n if (interaction.pointerType === pointerType) {\n // if it's a down event, skip interactions with running simulations\n if (interaction.simulation && !hasPointerId(interaction, pointerId)) {\n continue;\n } // if the interaction is active, return it immediately\n\n\n if (interaction.interacting()) {\n return interaction;\n } // otherwise save it and look for another active interaction\n else if (!firstNonActive) {\n firstNonActive = interaction;\n }\n }\n } // if no active mouse interaction was found use the first inactive mouse\n // interaction\n\n\n if (firstNonActive) {\n return firstNonActive;\n } // find any mouse or pen interaction.\n // ignore the interaction if the eventType is a *down, and a simulation\n // is active\n\n\n for (const interaction of scope.interactions.list) {\n if (interaction.pointerType === pointerType && !(/down/i.test(eventType) && interaction.simulation)) {\n return interaction;\n }\n }\n\n return null;\n }", "mouseOrPen({\n pointerId,\n pointerType,\n eventType,\n scope\n }) {\n if (pointerType !== 'mouse' && pointerType !== 'pen') {\n return null;\n }\n\n let firstNonActive;\n\n for (const interaction of scope.interactions.list) {\n if (interaction.pointerType === pointerType) {\n // if it's a down event, skip interactions with running simulations\n if (interaction.simulation && !hasPointerId(interaction, pointerId)) {\n continue;\n } // if the interaction is active, return it immediately\n\n\n if (interaction.interacting()) {\n return interaction;\n } // otherwise save it and look for another active interaction\n else if (!firstNonActive) {\n firstNonActive = interaction;\n }\n }\n } // if no active mouse interaction was found use the first inactive mouse\n // interaction\n\n\n if (firstNonActive) {\n return firstNonActive;\n } // find any mouse or pen interaction.\n // ignore the interaction if the eventType is a *down, and a simulation\n // is active\n\n\n for (const interaction of scope.interactions.list) {\n if (interaction.pointerType === pointerType && !(/down/i.test(eventType) && interaction.simulation)) {\n return interaction;\n }\n }\n\n return null;\n }", "function MouseInteraction() {\n\t\tMouseInteraction.superclass.constructor.apply(this, arguments);\n\t\tvar CurPos = null;\n\t\tthis.name = 'MouseInteraction';\n\t\tthis.type = 'interaction';\n\t\tthis.state.interacting = false;\n\t\tthis.state.lastPosX = 0;\n\t\tthis.state.lastPosY = 0;\n\t\tthis.state.lastPosYaw = 0;\n\t\tthis.state.lastPosPitch = 0;\n\t\tthis.state.canvas = {width: null, height: null };\n\t\tthis.setPos = function(pos) {\n\t\t\tCurPos = pos;\n\t\t}\n\t\tthis.getPos = function() {\n\t\t\treturn CurPos;\n\t\t}\n\t}", "function whatisthis() {\n return this;\n }", "function get_selection()\n {\n return selection;\n }", "get Mouse1() {}", "getSelection(){\n return this.element;\n }", "_handleMouseInteraction() {\n const that = this;\n\n that._handleTextSelection();\n\n that._changeCheckState('pointer');\n that.focus();\n that._updateHidenInputNameAndValue();\n }", "_handleMouseInteraction() {\n const that = this;\n\n that._handleTextSelection();\n\n that._changeCheckState('pointer');\n that.focus();\n that._updateHidenInputNameAndValue();\n }", "get focusElement(){return this._input()||this}", "function whatObjClick() {\n\tfor (var key in objects) {\n\t\tif (checkClick(objects[key])) {\n\t\t\treturn objects[key];\n\t\t}\n\t}\n\treturn null;\n}", "function VirtualInteraction() {\n\t\tVirtualInteraction.superclass.constructor.apply(this, arguments);\n\t\tthis.name = 'VirtualInteraction';\n\t\tthis.type = 'interaction';\n\t\tthis.getDir = function() {return null;}\n\t}", "get_intent() {\n var action;\n let btn_clicked = null;\n let my_intent = null;\n\n let btn_list = this.element.find('li'); //find all navigation buttons\n\n let clicked_button = event.currentTarget; //get the clicked element\n\n $.each(btn_list, function(index, button) {\n var clicked_button_txt = $(clicked_button).find(\"p\").text();\n var button_txt = $(button).find(\"p\").text();\n\n if (clicked_button_txt === button_txt) { //confirm the button clicked is in list and get its intent\n btn_clicked = $(button);\n this.btn_clicked = btn_clicked;\n my_intent = btn_clicked.find(\"p\").text(); //find the text in paragraph\n\n action = {\n btn_clicked: btn_clicked,\n my_intent: my_intent\n };\n return false;\n }\n });\n this.init_by_click = true;\n this.action = action;\n return this;\n }", "interact() {\n if (this.previousCollision !== undefined)\n game.getPlayer.input.handleInteraction(this.previousCollision);\n this.previousCollision = undefined;\n }", "get target(){ return this.__target; }", "idle({\n pointerType,\n scope\n }) {\n for (const interaction of scope.interactions.list) {\n // if there's already a pointer held down\n if (interaction.pointers.length === 1) {\n const target = interaction.interactable; // don't add this pointer if there is a target interactable and it\n // isn't gesturable\n\n if (target && !(target.options.gesture && target.options.gesture.enabled)) {\n continue;\n }\n } // maximum of 2 pointers per interaction\n else if (interaction.pointers.length >= 2) {\n continue;\n }\n\n if (!interaction.interacting() && pointerType === interaction.pointerType) {\n return interaction;\n }\n }\n\n return null;\n }", "idle({\n pointerType,\n scope\n }) {\n for (const interaction of scope.interactions.list) {\n // if there's already a pointer held down\n if (interaction.pointers.length === 1) {\n const target = interaction.interactable; // don't add this pointer if there is a target interactable and it\n // isn't gesturable\n\n if (target && !(target.options.gesture && target.options.gesture.enabled)) {\n continue;\n }\n } // maximum of 2 pointers per interaction\n else if (interaction.pointers.length >= 2) {\n continue;\n }\n\n if (!interaction.interacting() && pointerType === interaction.pointerType) {\n return interaction;\n }\n }\n\n return null;\n }", "get selfAttributeInput() {\n return this._self;\n }", "get thingInput() {\n return this._thing;\n }", "access() {\n this.emit(\"Player.Environment.Interacted\", \"You opened the \"+this.Target.name+\".\");\n this.Target = this.Target.Item;\n this.emit(\"Player.Environment.Updated\", this.Target.Item);\n }", "get action() { return this.actionIn; }", "function Interaction() {\n var _this = \n // Call super\n _super.call(this) || this;\n /**\n * An indicator of global events were already initialized.\n */\n _this._globalEventsAdded = false;\n /**\n * Holds which mouse event listeners to use.\n */\n _this._pointerEvents = {\n \"pointerdown\": \"mousedown\",\n \"pointerup\": \"mouseup\",\n \"pointermove\": \"mousemove\",\n \"pointercancel\": \"mouseup\",\n \"pointerover\": \"mouseover\",\n \"pointerout\": \"mouseout\",\n \"wheel\": \"wheel\"\n };\n /**\n * Indicates if Interaction should use only \"pointer\" type events, like\n * \"pointermove\", available in all modern browsers, ignoring \"legacy\"\n * events, like \"touchmove\".\n */\n _this._usePointerEventsOnly = false;\n /**\n * Use only touch events (for touch only devices such as tablets and phones)\n */\n _this._useTouchEventsOnly = false;\n /**\n * Add special hover events. Normally, touch device tap will also simulate\n * hover event. On some devices (ahem iOS) we want to prevent that so that\n * over/out events are not duplicated.\n */\n _this._addHoverEvents = true;\n /**\n * Indicates if passive mode options is supported by this browser.\n */\n _this._passiveSupported = false;\n /**\n * Holds list of delayed events\n */\n _this._delayedEvents = { out: [] };\n /**\n * List of objects that current have a pointer hovered over them.\n */\n _this.overObjects = new _utils_List__WEBPACK_IMPORTED_MODULE_2__[\"List\"]();\n /**\n * List of objects that currently has a pressed pointer.\n */\n _this.downObjects = new _utils_List__WEBPACK_IMPORTED_MODULE_2__[\"List\"]();\n /**\n * List of objects that need mouse position to be reported to them.\n */\n _this.trackedObjects = new _utils_List__WEBPACK_IMPORTED_MODULE_2__[\"List\"]();\n /**\n * List of objects that are currently being dragged.\n */\n _this.transformedObjects = new _utils_List__WEBPACK_IMPORTED_MODULE_2__[\"List\"]();\n /**\n * Holds all known pointers.\n */\n _this.pointers = new _utils_Dictionary__WEBPACK_IMPORTED_MODULE_7__[\"Dictionary\"]();\n /**\n * Inertia options that need to be applied to after element drag, if it's\n * `inert = true`.\n *\n * This is just a default, which can and probably will be overridden by\n * actual elements.\n */\n _this.inertiaOptions = new _utils_Dictionary__WEBPACK_IMPORTED_MODULE_7__[\"Dictionary\"]();\n /**\n * Default options for click events. These can be overridden in\n * [[InteractionObject]].\n */\n _this.hitOptions = {\n //\"holdTime\": 1000,\n \"doubleHitTime\": 300,\n //\"delayFirstHit\": false,\n \"hitTolerance\": 10,\n \"noFocus\": true\n };\n /**\n * Default options for hover events. These can be overridden in\n * [[InteractionObject]].\n */\n _this.hoverOptions = {\n \"touchOutBehavior\": \"leave\",\n \"touchOutDelay\": 1000\n };\n /**\n * Default options for detecting a swipe gesture. These can be overridden in\n * [[InteractionObject]].\n */\n _this.swipeOptions = {\n \"time\": 500,\n \"verticalThreshold\": 75,\n \"horizontalThreshold\": 30\n };\n /**\n * Default options for keyboard operations. These can be overridden in\n * [[InteractionObject]].\n */\n _this.keyboardOptions = {\n \"speed\": 0.1,\n \"accelleration\": 1.2,\n \"accellerationDelay\": 2000\n };\n /**\n * Default options for keyboard operations. These can be overridden in\n * [[InteractionObject]].\n *\n * @since 4.5.14\n */\n _this.mouseOptions = {\n \"sensitivity\": 1\n };\n // Set class name\n _this.className = \"Interaction\";\n // Create InteractionObject for <body>\n _this.body = _this.getInteraction(document.body);\n _this._disposers.push(_this.body);\n // Detect browser capabilities and determine what event listeners to use\n if (window.hasOwnProperty(\"PointerEvent\")) {\n // IE10+/Edge without touch controls enabled\n _this._pointerEvents.pointerdown = \"pointerdown\";\n _this._pointerEvents.pointerup = \"pointerup\";\n _this._pointerEvents.pointermove = \"pointermove\";\n _this._pointerEvents.pointercancel = \"pointercancel\";\n _this._pointerEvents.pointerover = \"pointerover\";\n _this._pointerEvents.pointerout = \"pointerout\";\n //this._usePointerEventsOnly = true;\n }\n else if (window.hasOwnProperty(\"MSPointerEvent\")) {\n // IE9\n _this._pointerEvents.pointerdown = \"MSPointerDown\";\n _this._pointerEvents.pointerup = \"MSPointerUp\";\n _this._pointerEvents.pointermove = \"MSPointerMove\";\n _this._pointerEvents.pointercancel = \"MSPointerUp\";\n _this._pointerEvents.pointerover = \"MSPointerOver\";\n _this._pointerEvents.pointerout = \"MSPointerOut\";\n //this._usePointerEventsOnly = true;\n }\n else if ((typeof matchMedia !== \"undefined\") && matchMedia('(pointer:fine)').matches) {\n // This is only for Safari as it does not support PointerEvent\n // Do nothing and let it use regular `mouse*` events\n // Hi Apple ;)\n // Additionally disable hover events for iOS devices\n if ('ontouchstart' in window) {\n _this._addHoverEvents = false;\n _this._useTouchEventsOnly = true;\n }\n }\n else if (window.navigator.userAgent.match(/MSIE /)) {\n // Oh looky, an MSIE that does not support PointerEvent. Hi granpa IE9!\n _this._usePointerEventsOnly = true;\n }\n else if (_this.fullFF()) {\n // Old FF, let's use regular events.\n // (Newer FFs would be detected by the PointerEvent availability check)\n _this._usePointerEventsOnly = true;\n }\n else {\n // Uses defaults for normal browsers\n // We also assume that this must be a touch device that does not have\n // any pointer events\n _this._useTouchEventsOnly = true;\n }\n // Detect if device has a mouse\n // This is turning out to be not reliable\n // @todo remove\n /*if (!window.navigator.msPointerEnabled && (typeof matchMedia !== \"undefined\") && !matchMedia('(pointer:fine)').matches && !this.fullFF()) {\n this._useTouchEventsOnly = true;\n }*/\n // Detect proper mouse wheel events\n if (\"onwheel\" in document.createElement(\"div\")) {\n // Modern browsers\n _this._pointerEvents.wheel = \"wheel\";\n }\n else if (_utils_Type__WEBPACK_IMPORTED_MODULE_16__[\"hasValue\"](document.onmousewheel)) {\n // Webkit and IE support at least \"mousewheel\"\n _this._pointerEvents.wheel = \"mousewheel\";\n }\n // Set up default inertia options\n _this.inertiaOptions.setKey(\"move\", {\n \"time\": 100,\n \"duration\": 500,\n \"factor\": 1,\n \"easing\": _utils_Ease__WEBPACK_IMPORTED_MODULE_12__[\"polyOut3\"]\n });\n _this.inertiaOptions.setKey(\"resize\", {\n \"time\": 100,\n \"duration\": 500,\n \"factor\": 1,\n \"easing\": _utils_Ease__WEBPACK_IMPORTED_MODULE_12__[\"polyOut3\"]\n });\n // Set the passive mode support\n _this._passiveSupported = Interaction.passiveSupported;\n // Apply theme\n _this.applyTheme();\n return _this;\n }", "get intent () {\n\t\treturn this._intent;\n\t}", "get intent () {\n\t\treturn this._intent;\n\t}", "getElement() { return this.input; }", "getSelection(){\n return this.win.getSelection();\n }", "get widget() {\n return this._content instanceof PointDecoration ? this._content.widget : null;\n }", "get instanceInterruptionBehaviourInput() {\n return this._instanceInterruptionBehaviour;\n }", "function interactiveFlag(model) {\n if (!model.component.selection) return null;\n var unitCount = keys(model.component.selection).length;\n var parentCount = unitCount;\n var parent = model.parent;\n\n while (parent && parentCount === 0) {\n parentCount = keys(parent.component.selection).length;\n parent = parent.parent;\n }\n\n return parentCount ? {\n interactive: unitCount > 0\n } : null;\n }", "get chipInteractionChanges() {\n return merge(...this._chips.map(chip => chip.interaction));\n }", "function mouse_clicked(){\n\t\treturn M.mouse_clicked;\n\t}", "function isBaseInteraction(interaction) {\n // console.log(interaction.type + \" \" + interaction.operator);\n switch (interaction.type) {\n case 'InteractionNative':\n {\n return true;\n }\n case 'InteractionSimple':\n {\n var theOperator;\n // try {\n theOperator = operator.parse(interaction.operator);\n// console.log(interaction.operator + \" is \"+theOperator);\n // interaction.operatorType = theOperator;\n // } catch (e) {\n // console.log(\"Error on operator \" + interaction.operator + \" \" + interaction.formating);\n // }\n switch (theOperator) {\n // case \"Composition\":\n // case \"Behaviour\":\n // case \"Previous\":\n // case \"FunctionApplication\":\n // case \"Identifier\":\n // case \"Function\":\n // case \"Void\":\n // return true;\n // case \"Affectation\":\n // console.log(\"============================found it !\")\n // break;\n case \"Custom\":\n // console.log(interaction.operator + \" is custom\");\n return false;\n default:\n // console.log(interaction.operator + \" is not custom\");\n // console.log(theOperator)\n return true;\n // throw new Error('problem parsing interaction operator ' + theOperator);\n }\n }\n break;\n default:\n throw new Error('invalid interaction type ' + interaction.type);\n }\n}", "getInput() {\n return this.input;\n }", "getPoint() {\n return this;\n }", "function getWindow(){\n return this;\n}", "function mouseInteraction(event) {\r\n if(event.hasOwnProperty(\"type\")) {\r\n if(event.type === 'mouseup') {\r\n current_button = null;\r\n if (vp.getSelectionMode() === true) {\r\n clearOverlay();\r\n }\r\n renderersContainer.trigger($.extend(event, {\r\n type: 'mouse',\r\n action: 'up',\r\n current_button: current_button\r\n }));\r\n extractCoordinates(event, false, true);\r\n renderersContainer.trigger({\r\n type: 'endInteraction',\r\n area: area\r\n });\r\n } else if(event.type === 'mousedown') {\r\n current_button = event.which;\r\n // Override button if modifier is used\r\n // Middle: Alt - Right: Shift\r\n if(event.shiftKey) {\r\n current_button = 3;\r\n event.shiftKey = false;\r\n } else if(event.altKey) {\r\n current_button = 2;\r\n event.altKey = false;\r\n }\r\n extractCoordinates(event, true, false);\r\n renderersContainer.trigger('startInteraction');\r\n renderersContainer.trigger($.extend(event, {\r\n type: 'mouse',\r\n action: 'down',\r\n current_button: current_button\r\n }));\r\n\r\n } else if(event.type === 'mousemove' && current_button != null) {\r\n if (vp.getSelectionMode() === true) {\r\n extractCoordinates(event, false, false);\r\n redrawSelection();\r\n }\r\n renderersContainer.trigger($.extend(event, {\r\n type: 'mouse',\r\n action: 'move',\r\n current_button: current_button\r\n }));\r\n }\r\n }\r\n }", "get CursorElement() { return this.cursorElement; }", "get selectable() { return this._selectable; }", "get selectable() { return this._selectable; }", "get modality() {\n\t\treturn this.__modality;\n\t}", "function addInteraction(obj) {\n obj.interactive = true;\n obj\n .on('pointerdown', onDragStart)\n .on('pointerup', onDragEnd)\n .on('pointerupoutside', onDragEnd)\n .on('pointermove', onDragMove);\n }", "function getFocusEntity()\n\t{\n\t\treturn _focus;\n\t}", "get target() {\n\t\treturn this.__target;\n\t}", "get target() {\n\t\treturn this.__target;\n\t}", "function getTriggeredBy() {\n return 'focus-outline-none' === $rootScope.focusClass ? 'mouse' : 'keyboard';\n }", "get target () {\n\t\treturn this._target;\n\t}", "get target () {\n\t\treturn this._target;\n\t}", "get target () {\n\t\treturn this._target;\n\t}", "canInteract(target)\n {\n return false;\n\n }", "function f(e){if(e.target===Q.reference){if(Q.props.interactive){if(!e.relatedTarget)return;if(pt(e.relatedTarget,Me.POPPER))return}s()}}", "function getWindowThis() {\n console.log(this)\n}", "get signal() {\n return getSignal(this);\n }", "get signal() {\n return getSignal(this);\n }", "get target() {}", "get actionInput() {\n return this._action;\n }", "function getActiveTool(element, buttons) {\n\t var interactionType = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'mouse';\n\t var tools;\n\n\t if (interactionType === 'touch') {\n\t tools = Object(_store_getActiveToolsForElement__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(element, _store__WEBPACK_IMPORTED_MODULE_0__[\"getters\"].touchTools());\n\t tools = tools.filter(function (tool) {\n\t return tool.options.isTouchActive;\n\t });\n\t } else {\n\t // Filter out disabled, enabled, and passive\n\t tools = Object(_store_getActiveToolsForElement__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(element, _store__WEBPACK_IMPORTED_MODULE_0__[\"getters\"].mouseTools()); // Filter out tools that do not match mouseButtonMask\n\n\t tools = tools.filter(function (tool) {\n\t return Array.isArray(tool.options.mouseButtonMask) && buttons && tool.options.mouseButtonMask.includes(buttons) && tool.options.isMouseActive;\n\t });\n\n\t if (_store__WEBPACK_IMPORTED_MODULE_0__[\"state\"].isMultiPartToolActive) {\n\t tools = Object(_store_filterToolsUsableWithMultiPartTools__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(tools);\n\t }\n\t }\n\n\t if (tools.length === 0) {\n\t return;\n\t }\n\n\t return tools[0];\n\t}", "get communication() {\n\t\treturn this.__communication;\n\t}", "get button () {return this._p.button;}", "get current() {\n return this.strand.at(this.cursor);\n }", "get clickAction() {\n return this._data.click_action;\n }", "_onInteraction(type) {\n return (e) => {\n e.preventDefault();\n e.stopPropagation();\n\n const noSleep = new NoSleep();\n noSleep.enable();\n\n client.platform.interaction = type;\n // execute interaction hooks from the platform\n const interactionPromises = this._getHooks('interactionHook');\n\n Promise.all(interactionPromises).then((results) => {\n let resolved = true;\n results.forEach(bool => resolved = resolved && bool);\n\n if (resolved) {\n this.ready();\n } else {\n this.view.updateHasAuthorizationsStatus(resolved);\n }\n }).catch(err => console.error(err.stack));\n }\n }", "get input() {\n\t\treturn this.__input;\n\t}", "get Input() {\n return this._input;\n }", "get pointer() { return this._pointer; }", "_getCommandParams() {\n let documentSession = this.context.documentSession\n let selectionState = documentSession.getSelectionState()\n let sel = selectionState.getSelection()\n let surface = this.context.surfaceManager.getFocusedSurface()\n return {\n documentSession: documentSession,\n selectionState: selectionState,\n surface: surface,\n selection: sel\n }\n }", "get selection() {\n return this.$.selection.getSelection();\n }", "getAnsBtnID(){\n let choise = event.srcElement.id\n this.answer(choise)\n }", "function clickedThing(e, type)\n {\n var el = e.target;\n if(!el.is(type))\n {\n el = el.parents(type).slice(0,1);\n }\n \n return el;\n }", "function px(){var t=this;ze(this);var e=ki(this.$interaction,[\"modifystart\",\"modifyend\"]);this.subscribeTo(e,function(e){++t.rev,t.$emit(e.type,e)})}", "getOriginalSemanticAction() {\n return this._orginialSemanticAction;\n }", "get selectionDirection() {\n return this.getInput().selectionDirection;\n }", "function GetPersonTrackingCommand(input) {\n var _this = \n // Start section: command_constructor\n _super.call(this) || this;\n _this.input = input;\n return _this;\n // End section: command_constructor\n }", "function GetPersonTrackingCommand(input) {\n var _this = \n // Start section: command_constructor\n _super.call(this) || this;\n _this.input = input;\n return _this;\n // End section: command_constructor\n }", "get target() {\n\t\treturn this._t;\n\t}", "function getActivatedObject(e)\n{\n\tvar obj;\n\tif(!e)\n\t{\n\t\tobj = window.event.srcElement; //old explorer\n\t}\n\telse if(e.srcElement)\n\t{\n\t\tobj = e.srcElement; //ie7 or later\n\t}\n\telse\n\t{\n\t\tobj = e.target; //dom level 2\n\t}\n\n\treturn obj;\n}", "_getCommandParams() {\n let editorSession = this.context.editorSession\n let selectionState = editorSession.getSelectionState()\n let sel = selectionState.getSelection()\n let surface = this.context.surfaceManager.getFocusedSurface()\n return {\n editorSession: editorSession,\n selectionState: selectionState,\n surface: surface,\n selection: sel,\n }\n }", "get focusElement() {\n return this.input;\n }", "function InteractionContext () {\n this.entities = []; // array of interactable entities in this context, sorted from back to front\n }", "getCommand() {\n return this.args[2];\n }", "get relatedAction () {\n\t\treturn this._relatedAction;\n\t}", "function getClickPoint() {\n var mousePos = kineticCanvas.getPointerPosition();\n var x = mousePos.x;\n var y = mousePos.y;\n var kineticPoint = getKineticPoint(x, y);\n return kineticPoint\n}", "getTarget() {\n if (cacheTarget) {\n return cacheTarget;\n }\n return (cacheTarget =\n (opt.picking && scene.pick(origPos.x - pos.x, origPos.y - pos.y)) || true);\n }", "function getThis(){\n // console.log(this);\n}" ]
[ "0.78138894", "0.7106153", "0.60903966", "0.6050588", "0.56917924", "0.56639695", "0.5594364", "0.55575544", "0.5549056", "0.5547932", "0.55209243", "0.5514455", "0.5512436", "0.5496909", "0.5454336", "0.54530656", "0.5444438", "0.5444438", "0.5438656", "0.5437565", "0.5436171", "0.5433774", "0.5428362", "0.54261935", "0.54261935", "0.54007417", "0.5365485", "0.5361057", "0.53584576", "0.5348311", "0.53454447", "0.5345051", "0.5345051", "0.53408676", "0.5335571", "0.5332205", "0.5323051", "0.53180116", "0.5274465", "0.5274465", "0.5270033", "0.52374405", "0.52355397", "0.52327496", "0.5228826", "0.5227011", "0.5216659", "0.5206656", "0.52056974", "0.5201645", "0.5200324", "0.5194947", "0.5186587", "0.51703286", "0.51703286", "0.51367706", "0.51317966", "0.51306885", "0.51286745", "0.51286745", "0.51267713", "0.5124902", "0.5124902", "0.5124902", "0.51230085", "0.5117575", "0.5114967", "0.51092166", "0.51092166", "0.5098937", "0.5096006", "0.5095757", "0.50879717", "0.5084163", "0.5081826", "0.508154", "0.5073113", "0.50725824", "0.5067232", "0.5059466", "0.50582194", "0.5057274", "0.50551254", "0.50516135", "0.50196", "0.50169736", "0.50111866", "0.50107324", "0.50107324", "0.5005599", "0.50030506", "0.5002765", "0.50015974", "0.5000106", "0.49606332", "0.49544004", "0.4951527", "0.4948975", "0.49455425" ]
0.53691983
27
get first idle interaction with a matching pointerType
idle({ pointerType, scope }) { for (const interaction of scope.interactions.list) { // if there's already a pointer held down if (interaction.pointers.length === 1) { const target = interaction.interactable; // don't add this pointer if there is a target interactable and it // isn't gesturable if (target && !(target.options.gesture && target.options.gesture.enabled)) { continue; } } // maximum of 2 pointers per interaction else if (interaction.pointers.length >= 2) { continue; } if (!interaction.interacting() && pointerType === interaction.pointerType) { return interaction; } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "mouseOrPen({\n pointerId,\n pointerType,\n eventType,\n scope\n }) {\n if (pointerType !== 'mouse' && pointerType !== 'pen') {\n return null;\n }\n\n let firstNonActive;\n\n for (const interaction of scope.interactions.list) {\n if (interaction.pointerType === pointerType) {\n // if it's a down event, skip interactions with running simulations\n if (interaction.simulation && !hasPointerId(interaction, pointerId)) {\n continue;\n } // if the interaction is active, return it immediately\n\n\n if (interaction.interacting()) {\n return interaction;\n } // otherwise save it and look for another active interaction\n else if (!firstNonActive) {\n firstNonActive = interaction;\n }\n }\n } // if no active mouse interaction was found use the first inactive mouse\n // interaction\n\n\n if (firstNonActive) {\n return firstNonActive;\n } // find any mouse or pen interaction.\n // ignore the interaction if the eventType is a *down, and a simulation\n // is active\n\n\n for (const interaction of scope.interactions.list) {\n if (interaction.pointerType === pointerType && !(/down/i.test(eventType) && interaction.simulation)) {\n return interaction;\n }\n }\n\n return null;\n }", "mouseOrPen({\n pointerId,\n pointerType,\n eventType,\n scope\n }) {\n if (pointerType !== 'mouse' && pointerType !== 'pen') {\n return null;\n }\n\n let firstNonActive;\n\n for (const interaction of scope.interactions.list) {\n if (interaction.pointerType === pointerType) {\n // if it's a down event, skip interactions with running simulations\n if (interaction.simulation && !hasPointerId(interaction, pointerId)) {\n continue;\n } // if the interaction is active, return it immediately\n\n\n if (interaction.interacting()) {\n return interaction;\n } // otherwise save it and look for another active interaction\n else if (!firstNonActive) {\n firstNonActive = interaction;\n }\n }\n } // if no active mouse interaction was found use the first inactive mouse\n // interaction\n\n\n if (firstNonActive) {\n return firstNonActive;\n } // find any mouse or pen interaction.\n // ignore the interaction if the eventType is a *down, and a simulation\n // is active\n\n\n for (const interaction of scope.interactions.list) {\n if (interaction.pointerType === pointerType && !(/down/i.test(eventType) && interaction.simulation)) {\n return interaction;\n }\n }\n\n return null;\n }", "hasPointer({\n pointerId,\n scope\n }) {\n for (const interaction of scope.interactions.list) {\n if (hasPointerId(interaction, pointerId)) {\n return interaction;\n }\n }\n\n return null;\n }", "hasPointer({\n pointerId,\n scope\n }) {\n for (const interaction of scope.interactions.list) {\n if (hasPointerId(interaction, pointerId)) {\n return interaction;\n }\n }\n\n return null;\n }", "simulationResume({\n pointerType,\n eventType,\n eventTarget,\n scope\n }) {\n if (!/down|start/i.test(eventType)) {\n return null;\n }\n\n for (const interaction of scope.interactions.list) {\n let element = eventTarget;\n\n if (interaction.simulation && interaction.simulation.allowResume && interaction.pointerType === pointerType) {\n while (element) {\n // if the element is the interaction element\n if (element === interaction.element) {\n return interaction;\n }\n\n element = parentNode(element);\n }\n }\n }\n\n return null;\n }", "simulationResume({\n pointerType,\n eventType,\n eventTarget,\n scope\n }) {\n if (!/down|start/i.test(eventType)) {\n return null;\n }\n\n for (const interaction of scope.interactions.list) {\n let element = eventTarget;\n\n if (interaction.simulation && interaction.simulation.allowResume && interaction.pointerType === pointerType) {\n while (element) {\n // if the element is the interaction element\n if (element === interaction.element) {\n return interaction;\n }\n\n element = parentNode(element);\n }\n }\n }\n\n return null;\n }", "getActiveContextOfType(contextType) {\r\n let context = Collection.find(this.activeContexts, (item) => {\r\n return (item.getShortcutType() === contextType);\r\n });\r\n\r\n return context;\r\n }", "interact(obj, type) {\n if (obj.object.state !== 'idle') return; // Can only activate objects that are idle\n\n if ((obj.object.interactId === 'Water1' && type === 'water') || (CONFIG.DEBUG && obj.object.interactId === 'Water1' && type === 'click')) {\n obj.object.state = 'activated';\n\n this.eeEmit('scene-speech-helper-close');\n this.eeEmit('play-random-action-sound');\n\n obj.object.interactCallback(false);\n this.interactPlank();\n \n this._step++\n\n //this.endAnimation();\n }\n if ((obj.object.interactId === 'Rock' && type === 'wind') || (CONFIG.DEBUG && obj.object.interactId === 'Rock' && type === 'click')) {\n obj.object.state = 'activated';\n\n this.eeEmit('scene-speech-helper-close');\n this.eeEmit('play-random-action-sound');\n\n obj.object.interactCallback();\n this.interactPlank(true);\n this.objects.water.interactCallback(true);\n \n this._step++;\n\n //this.endAnimation();\n }\n if(this._step >= 2) this.endAnimation();\n }", "function map_pointer_switch(id){\n \t if (point_location==0){\n\t\tpoint_location=1;\n\t\tpoint_location_result_id=id;\n\t } else {\n\t\tpoint_location=0;\n\t\tpoint_location_result_id=\"\";\n\t }\n\t}", "function y(){return Q.props.followCursor&&!Mt&&\"focus\"!==M.type}", "function focusIn(element, type){\n let clicked = d3.select(element);\n if (type == \"plot\") d3.activeGraph.activePlot = clicked;\n else if (type == \"cursor\") {\n d3.activeGraph.activeCursor = clicked;\n\n }\n }", "function makeStartPointer(ev){var point=getEventPoint(ev);var startPointer={startTime:+Date.now(),target:ev.target,// 'p' for pointer events, 'm' for mouse, 't' for touch\n\ttype:ev.type.charAt(0)};startPointer.startX=startPointer.x=point.pageX;startPointer.startY=startPointer.y=point.pageY;return startPointer;}", "function focusIn(element, type){\n let clicked = d3.select(element);\n if (type == \"plot\") d3.activeGraph.activePlot = clicked;\n else if (type == \"cursor\") d3.activeGraph.activeCursor = clicked;\n }", "get pointer() { return this._pointer; }", "function typesMatch(ev, pointer) {\n return ev && pointer && ev.type.charAt(0) === pointer.type;\n }", "function typesMatch(ev, pointer) {\n return ev && pointer && ev.type.charAt(0) === pointer.type;\n}", "function typesMatch(ev, pointer) {\n return ev && pointer && ev.type.charAt(0) === pointer.type;\n}", "function typesMatch(ev, pointer) {\n return ev && pointer && ev.type.charAt(0) === pointer.type;\n}", "function typesMatch(ev,pointer){return ev&&pointer&&ev.type.charAt(0)===pointer.type;}", "gotoFirstHit() {\n this.gotoHit(0);\n }", "gotoFirstHit() {\n this.gotoHit(0);\n }", "gotoFirstHit() {\n this.gotoHit(0);\n }", "gotoFirstHit() {\n this.gotoHit(0);\n }", "function typesMatch(ev, pointer) {\n return ev && pointer && ev.type.charAt(0) === pointer.type;\n }", "currentPointerPosition(e) {\n const [x, y] = Mouse.rel(e);\n return this.positionToSequence({\n xPos: x,\n yPos: y,\n });\n }", "function selectState(type) {\n if (type === \"promoters\") {\n return state.promoters;\n } else if (type === \"passives\") {\n return state.passives;\n } else if (type === \"detractors\") {\n return state.detractors;\n }\n }", "get Mouse0() {}", "function getMostPowerful(state) {\n var context = state.cmdState;\n for (var i = context.length - 1; i >= 0; i--) {\n var plug = context[i];\n if (plug.name == \"DEFAULT\") {\n continue;\n }\n return plug;\n }\n return { styleIdentifier: function() { return null; } };\n }", "function setEventType() {\n\t\t\t\tif (window.navigator.pointerEnabled) return msIEElevenPointerEvents;\n\t\t\t\treturn window.navigator.msPointerEnabled ? msPointerEvents : mouseEvents;\n\t\t\t}", "_onInteraction(type) {\n return (e) => {\n e.preventDefault();\n e.stopPropagation();\n\n const noSleep = new NoSleep();\n noSleep.enable();\n\n client.platform.interaction = type;\n // execute interaction hooks from the platform\n const interactionPromises = this._getHooks('interactionHook');\n\n Promise.all(interactionPromises).then((results) => {\n let resolved = true;\n results.forEach(bool => resolved = resolved && bool);\n\n if (resolved) {\n this.ready();\n } else {\n this.view.updateHasAuthorizationsStatus(resolved);\n }\n }).catch(err => console.error(err.stack));\n }\n }", "function getMSPointer(){\r\n var pointer;\r\n\r\n //IE >= 11 & rest of browsers\r\n if(window.PointerEvent){\r\n pointer = { down: 'pointerdown', move: 'pointermove'};\r\n }\r\n\r\n //IE < 11\r\n else{\r\n pointer = { down: 'MSPointerDown', move: 'MSPointerMove'};\r\n }\r\n\r\n return pointer;\r\n }", "function getMSPointer(){\r\n var pointer;\r\n\r\n //IE >= 11 & rest of browsers\r\n if(window.PointerEvent){\r\n pointer = { down: 'pointerdown', move: 'pointermove'};\r\n }\r\n\r\n //IE < 11\r\n else{\r\n pointer = { down: 'MSPointerDown', move: 'MSPointerMove'};\r\n }\r\n\r\n return pointer;\r\n }", "function getMSPointer(){\r\n var pointer;\r\n\r\n //IE >= 11 & rest of browsers\r\n if(window.PointerEvent){\r\n pointer = { down: 'pointerdown', move: 'pointermove'};\r\n }\r\n\r\n //IE < 11\r\n else{\r\n pointer = { down: 'MSPointerDown', move: 'MSPointerMove'};\r\n }\r\n\r\n return pointer;\r\n }", "function getMSPointer(){\r\n var pointer;\r\n\r\n //IE >= 11 & rest of browsers\r\n if(window.PointerEvent){\r\n pointer = { down: 'pointerdown', move: 'pointermove'};\r\n }\r\n\r\n //IE < 11\r\n else{\r\n pointer = { down: 'MSPointerDown', move: 'MSPointerMove'};\r\n }\r\n\r\n return pointer;\r\n }", "function getMSPointer(){\r\n var pointer;\r\n\r\n //IE >= 11 & rest of browsers\r\n if(window.PointerEvent){\r\n pointer = { down: 'pointerdown', move: 'pointermove'};\r\n }\r\n\r\n //IE < 11\r\n else{\r\n pointer = { down: 'MSPointerDown', move: 'MSPointerMove'};\r\n }\r\n\r\n return pointer;\r\n }", "function getMSPointer(){\n var pointer;\n\n //IE >= 11 & rest of browsers\n if(window.PointerEvent){\n pointer = { down: 'pointerdown', move: 'pointermove'};\n }\n\n //IE < 11\n else{\n pointer = { down: 'MSPointerDown', move: 'MSPointerMove'};\n }\n\n return pointer;\n }", "function getMSPointer(){\n var pointer;\n\n //IE >= 11 & rest of browsers\n if(window.PointerEvent){\n pointer = { down: 'pointerdown', move: 'pointermove'};\n }\n\n //IE < 11\n else{\n pointer = { down: 'MSPointerDown', move: 'MSPointerMove'};\n }\n\n return pointer;\n }", "function getMSPointer(){\n var pointer;\n\n //IE >= 11 & rest of browsers\n if(window.PointerEvent){\n pointer = { down: 'pointerdown', move: 'pointermove'};\n }\n\n //IE < 11\n else{\n pointer = { down: 'MSPointerDown', move: 'MSPointerMove'};\n }\n\n return pointer;\n }", "function getMSPointer(){\n var pointer;\n\n //IE >= 11 & rest of browsers\n if(window.PointerEvent){\n pointer = { down: 'pointerdown', move: 'pointermove'};\n }\n\n //IE < 11\n else{\n pointer = { down: 'MSPointerDown', move: 'MSPointerMove'};\n }\n\n return pointer;\n }", "function getMSPointer(){\n var pointer;\n\n //IE >= 11 & rest of browsers\n if(window.PointerEvent){\n pointer = { down: 'pointerdown', move: 'pointermove'};\n }\n\n //IE < 11\n else{\n pointer = { down: 'MSPointerDown', move: 'MSPointerMove'};\n }\n\n return pointer;\n }", "function getMSPointer(){\n var pointer;\n\n //IE >= 11 & rest of browsers\n if(window.PointerEvent){\n pointer = { down: 'pointerdown', move: 'pointermove'};\n }\n\n //IE < 11\n else{\n pointer = { down: 'MSPointerDown', move: 'MSPointerMove'};\n }\n\n return pointer;\n }", "function getMSPointer(){\n var pointer;\n\n //IE >= 11 & rest of browsers\n if(window.PointerEvent){\n pointer = { down: 'pointerdown', move: 'pointermove'};\n }\n\n //IE < 11\n else{\n pointer = { down: 'MSPointerDown', move: 'MSPointerMove'};\n }\n\n return pointer;\n }", "function AttackSelected() {\n Orion.Attack(\"lasttarget\");\n}", "_selectActive() {\r\n let shape = null;\r\n if (this._activeAAMShape) {\r\n shape = this._activeAAMShape;\r\n }\r\n else {\r\n this.selectShape(this._lastPos, false);\r\n if (this._activeShape) {\r\n shape = this._activeShape;\r\n }\r\n }\r\n\r\n return shape;\r\n }", "function getMSPointer(){\n \t\t\tvar pointer;\n\n \t\t\t//IE >= 11 & rest of browsers\n \t\t\tif(window.PointerEvent){\n \t\t\t\tpointer = { down: \"pointerdown\", move: \"pointermove\"};\n \t\t\t}\n\n \t\t\t//IE < 11\n \t\t\telse{\n \t\t\t\tpointer = { down: \"MSPointerDown\", move: \"MSPointerMove\"};\n \t\t\t}\n\n \t\t\treturn pointer;\n \t\t}", "function generalType(type) {\n if(\n type === \"GetControlGroupEvent\"\n || type === \"SelectionEvent\"\n || type === \"SetControlGroupEvent\"\n || type === \"AddToControlGroupEvent\"\n ) {\n return \"selection\";\n } else if(\n type === \"TargetPointCommandEvent\"\n || type === \"TargetUnitCommandEvent\"\n || type === \"BasicCommandEvent\"\n || type === \"DataCommandEvent\"\n ) {\n return \"commands\";\n }\n return \"camera\";\n \n}", "function getMSPointer(){\n var pointer;\n\n //IE >= 11 & rest of browsers\n if(window.PointerEvent){\n pointer = { down: 'pointerdown', move: 'pointermove', up: 'pointerup'};\n }\n\n //IE < 11\n else{\n pointer = { down: 'MSPointerDown', move: 'MSPointerMove', up: 'MSPointerUp'};\n }\n\n return pointer;\n }", "function getMSPointer() {\n var pointer; //IE >= 11 & rest of browsers\n\n if (window.PointerEvent) {\n pointer = {\n down: 'pointerdown',\n move: 'pointermove'\n };\n } //IE < 11\n else {\n pointer = {\n down: 'MSPointerDown',\n move: 'MSPointerMove'\n };\n }\n\n return pointer;\n }", "function getCursorMode() {\n cursorMode = {\n brush: $('#brushRadio').is(':checked'),\n select: $('#selectRadio').is(':checked'),\n };\n}", "function getMSPointer() {\n var pointer;\n\n //IE >= 11 & rest of browsers\n if (window.PointerEvent) {\n pointer = { down: 'pointerdown', move: 'pointermove' };\n }\n\n //IE < 11\n else {\n pointer = { down: 'MSPointerDown', move: 'MSPointerMove' };\n }\n\n return pointer;\n }", "function firstSelectedAnnotation() {\n if (annotationUI.selectedAnnotationMap) {\n var id = Object.keys(annotationUI.selectedAnnotationMap)[0];\n return threading.idTable[id] && threading.idTable[id].message;\n } else {\n return null;\n }\n }", "pollInput() {\n this.Mouse.poll();\n this.Keyboard.poll();\n }", "function pointerdown(evt) \n {\n // no tool selected -> return\n if (!tool) return;\n\n switch(evt.pointerType)\n {\n case \"pen\":\n case \"mouse\":\n switch(tool)\n {\n case ToolType.PEN:\n case ToolType.ERASER:\n startStroke(evt);\n break;\n }\n break;\n\n case \"touch\":\n showCursor(laserCursor);\n triggerHideCursor();\n break;\n }\n }", "function cursorFirst() {\n disabledWithLazyLoading('Cursoring first task', () => {\n setCursorToFirstTask('scroll');\n });\n }", "function makeStartPointer(ev) {\n var point = getEventPoint(ev);\n var startPointer = {\n startTime: +Date.now(),\n target: ev.target,\n // 'p' for pointer events, 'm' for mouse, 't' for touch\n type: ev.type.charAt(0)\n };\n startPointer.startX = startPointer.x = point.pageX;\n startPointer.startY = startPointer.y = point.pageY;\n return startPointer;\n }", "getFirstEvent(eventTypeMask) {\n for (const event of this.events) {\n if (event.matchesEventTypeMask(eventTypeMask)) {\n return event;\n }\n }\n return undefined;\n }", "onActivePointerMove(callback, isOnce = false) {\n if (this._hoverMode === HOVER_MODE_EXTERNAL) {\n this._pointerActiveMoveCallbacks.push([\n callback,\n isOnce\n ]);\n\n return;\n }\n\n this._landingFrame.onActivePointerMove((pointer) => {\n if ((pointer.x > this.getAbsCoordX() && pointer.x < this.getAbsCoordX() + this.getComponentWidth()) &&\n (pointer.y > this.getAbsCoordY() && pointer.y < this.getAbsCoordY() + this.getComponentHeight())\n ) {\n this._localPointer.x = -this.getAbsCoordX() + pointer.x;\n this._localPointer.y = -this.getAbsCoordY() + pointer.y;\n callback();\n }\n }, isOnce);\n }", "function getMouse(selector)\n {\n var selector = selector;\n var input = document.getElementById(selector);\n var startPosition = input.selectionStart;\n var endPosition = input.selectionEnd;\n return {start: startPosition, end: endPosition};\n }", "function makeStartPointer(ev) {\n var point = getEventPoint(ev);\n var startPointer = {\n startTime: +Date.now(),\n target: ev.target,\n // 'p' for pointer events, 'm' for mouse, 't' for touch\n type: ev.type.charAt(0)\n };\n startPointer.startX = startPointer.x = point.pageX;\n startPointer.startY = startPointer.y = point.pageY;\n return startPointer;\n }", "pointerhover(payload) {\n domEventSequences.pointerhover(node, payload);\n }", "renderPointer(event) {\n this.setState({\n x: event.clientX,\n y: event.clientY,\n hovertype: (event.target.getAttribute('data-hovertype')),\n })\n }", "function GetBehavior(inst, behaviorName)\n\t{\n\t\tvar behaviors = inst.behavior_insts;\n\t\t\n\t\tfor (var i=0; i<behaviors.length; i++)\n\t\t{\n\t\t\tif (behaviors[i].type.name === behaviorName)\n\t\t\t{\n\t\t\t\treturn behaviors[i];\n\t\t\t}\n\t\t}\n\t\t\n\t\t//console.log(\"Can't find behavior \" + behaviorName);\n\t\t\n\t\treturn null;\n\t}", "_pointerLock() {\n if (document.pointerLockElement) {\n this.send(\"p,1\");\n } else {\n this.send(\"p,0\");\n }\n }", "function mouse(kind, pt, id) {\n \n}", "getCurrentShortcut() /*virtual*/ {\n\t\t\treturn this.getShortcutFrom({});\n\t\t}", "function getNextSlideType() {\n //update sequence counter\n sequenceCounter = ++sequenceCounter % contentSequence.length;\n var nextType = contentSequence[sequenceCounter];\n if (previouslyShownIndicies[nextType].length == data[nextType].length) {\n previouslyShownIndicies[nextType] = []; //start again if we've seen everything for this type\n data[dataType] = shuffle(data[dataType])\n }\n var index = 0;\n while (isInArray(previouslyShownIndicies[nextType],index) ) {\n index = determineRand(nextType);\n }\n dataEntry = data[nextType][index]\n previouslyShownIndicies[nextType].push(index)\n }", "function findTarget()\r\n {\r\n if (!active)\r\n {\r\n return;\r\n }\r\n var targetType = componentType.duck;\r\n target = grid.getActorsInRadius(duckling.position, callRadius, targetType)[0];\r\n }", "function getNextIdleItem() {\n var nextItem;\n this.forEachItem(function(item) {\n if (item.state === Queueable.IDLE || item.state === Queueable.RESUMED) {\n nextItem = item;\n return false;\n }\n });\n return nextItem ? nextItem : null;\n }", "function PKAttackNextPlayer() {\n Orion.Ignore(self);\n var target = Orion.FindType(\"-1\", \"-1\", \"ground\", \"human|near|live|ignorefriends\", 18, \"gray|criminal|orange|red|innocent|blue\");\n if (target.length != 0) {\n Orion.Attack(target[0]);\n Orion.Ignore(target[0]);\n } else {\n Orion.IgnoreReset();\n Orion.Ignore(self);\n target = Orion.FindType(\"-1\", \"-1\", \"ground\", \"human|near|live|ignorefriends\", 18, \"gray|criminal|orange|red|innocent|blue\");\n if (target.length != 0) {\n Orion.Attack(target[0]);\n Orion.Ignore(target[0]);\n }\n }\n}", "function first(selector, context) {return (context || document).querySelector(selector);}", "function interactOrSelect() {\n var item = null;\n var targetSquare = null;\n switch (playerDirection) {\n case \"up\":\n targetSquare = mapLocations[currentLocation][0][playerY - 1][playerX];\n break;\n case \"down\":\n targetSquare = mapLocations[currentLocation][0][playerY + 1][playerX];\n break;\n case \"left\":\n targetSquare = mapLocations[currentLocation][0][playerY][playerX - 1];\n break;\n case \"right\":\n targetSquare = mapLocations[currentLocation][0][playerY][playerX + 1];\n break;\n default:\n }\n if (targetSquare.toString()[0] === \"2\") { \n // Static, interactive objects\n item = staticObjects[currentLocation][parseInt(targetSquare.toString()[1])];\n showText(item.text);\n playerState = \"locked\"\n clearInterval(moveInterval);\n walkingAnimation(playerDirection);\n } else if (targetSquare.toString()[0] === \"6\") {\n // NPCs\n playerState = \"locked\"\n clearInterval(moveInterval);\n walkingAnimation(playerDirection);\n item = allNPCs[currentLocation][parseInt(targetSquare.toString()[1])];\n if (item.healer && myPokemon.currentHP < myPokemon.maxHP) {\n myPokemon.currentHP = myPokemon.maxHP;\n showText(item.name + \": Here's some chocolate for your injured Pokemon. There you go, all better!\");\n } else if (item.trainer) {\n enemyTrainer = item;\n showText(enemyTrainer.dialog);\n var trainerType = (enemyTrainer.finalFour) ? \"finalFourFight\" : \"normalTrainerFight\";\n changeMusic(\"\", trainerType);\n $(document).off();\n setTimeout(function() { enterFightMode(\"trainer\"); }, 1000);\n } else {\n showText(item.dialog);\n }\n } else if (targetSquare.toString()[0] === \"7\") {\n // Claimable items. Only pokemon at this point.\n var itemId = parseInt(targetSquare.toString()[1]);\n item = claimableObjects[currentLocation][itemId];\n if (item.status === \"locked\") {\n showText(\"You already took a Pokemon.\");\n } else if (item.confirmText) {\n // This item requires confirmation before being taken\n showText(item.confirmText);\n $(\"#confirm-box\").show();\n $(\"#yes\").attr(\"data-value\", itemId);\n chooseMenuItem(document.getElementById(\"confirm-options\").children, takeItem);\n } else {\n // No confirmation needed, so pass the item ID to takeItem()\n takeItem(itemId); \n }\n }\n}", "function makeStartPointer(ev) {\n var point = getEventPoint(ev);\n var startPointer = {\n startTime: +Date.now(),\n target: ev.target,\n // 'p' for pointer events, 'm' for mouse, 't' for touch\n type: ev.type.charAt(0)\n };\n startPointer.startX = startPointer.x = point.pageX;\n startPointer.startY = startPointer.y = point.pageY;\n return startPointer;\n}", "function makeStartPointer(ev) {\n var point = getEventPoint(ev);\n var startPointer = {\n startTime: +Date.now(),\n target: ev.target,\n // 'p' for pointer events, 'm' for mouse, 't' for touch\n type: ev.type.charAt(0)\n };\n startPointer.startX = startPointer.x = point.pageX;\n startPointer.startY = startPointer.y = point.pageY;\n return startPointer;\n}", "function makeStartPointer(ev) {\n var point = getEventPoint(ev);\n var startPointer = {\n startTime: +Date.now(),\n target: ev.target,\n // 'p' for pointer events, 'm' for mouse, 't' for touch\n type: ev.type.charAt(0)\n };\n startPointer.startX = startPointer.x = point.pageX;\n startPointer.startY = startPointer.y = point.pageY;\n return startPointer;\n}", "function getInteraction() {\n if (interaction == null) {\n interaction = new Interaction();\n }\n return interaction;\n}", "function YAccelerometer_FirstAccelerometer()\n {\n var next_hwid = YAPI.getFirstHardwareId('Accelerometer');\n if(next_hwid == null) return null;\n return YAccelerometer.FindAccelerometer(next_hwid);\n }", "pointerenter(payload) {\n domEventSequences.pointerenter(node, payload);\n }", "function getLocationDetails(pointer) {\n\treturn () => (viewActions.fetchLocationTeaser(pointer));\n}", "get firstRaceTile() {return browser.element(\"//android.widget.ScrollView/android.view.ViewGroup/android.widget.ScrollView/android.view.ViewGroup/android.view.ViewGroup[2]\");}", "pointerInput() {\n this.input.on('pointerdown', function(pointer) {\n var structureInfo;\n x = pointer.worldX;\n y = pointer.worldY;\n\n //check if we were selecting a game object, not doing pointer Input\n //basically setting the input for gameObjectDown also calls this input function...even if we don't want it Called\n //so this is a check to ignore this function if gameObject is really what we were calling\n if(gameObjectClicked){\n gameObjectClicked = false;\n }\n\n else{\n if(selectedUnit){\n //if there is a build signa; and a unit selected is villager, build the structure\n if(build_signal > 0 && selectedUnit.type === \"Villager\"){\n\n if (build_signal === 1) {\n structureInfo = \"Archery Range\";\n build_signal = 0;\n }\n else if (build_signal === 2) {\n structureInfo = \"Barracks\";\n build_signal = 0;\n }\n else if (build_signal === 3) {\n structureInfo = \"Castle\";\n build_signal = 0;\n }\n else if (build_signal === 4) {\n structureInfo = \"Machinery\";\n build_signal = 0;\n }\n else if (build_signal === 5) {\n structureInfo = \"Mine\";\n build_signal = 0;\n }\n else if (build_signal === 6) {\n structureInfo = \"Temple\";\n build_signal = 0;\n }\n else if (build_signal === 7) {\n structureInfo = \"Town Center\";\n build_signal = 0;\n }\n selectedUnit.startBuildStructure(structureInfo, player, this);\n }\n\n /*\n //move the unit to the location\n else if (build_signal <= 0){\n selectedUnit.move(x, y, this);\n }\n */\n }\n }\n },this);\n }", "function cursorForHandle(handle) {\r\n return handle ? cursorMap[handle.type] : '';\r\n }", "eatToken(type) {\n\t\t\tconst token = this.getToken();\n\t\t\tif (token.type === type) {\n\t\t\t\tthis.nextToken();\n\t\t\t\t// @ts-ignore\n\t\t\t\treturn token;\n\t\t\t} else {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t}", "function getBindPointForSamplerType(gl, type) {\n return typeMap[type].bindPoint;\n }", "showPointer(receivedPointer = \"home-pointer\") {\n for (let pointer in this.pointers) {\n this.pointers[pointer].classList.add(\"hidden\");\n if (receivedPointer === `${pointer}-pointer`) {\n this.pointers[pointer].classList.remove(\"hidden\");\n }\n }\n }", "function getBindPointForSamplerType(gl, type) {\n\t return typeMap[type].bindPoint;\n\t }", "function simpleReadValueFromPointer(pointer) {\n return this['fromWireType'](HEAPU32[pointer >> 2]);\n}", "function createPointerObject(event) {\n //console.log('pointer event!!', event);\n var type, color;\n\n switch (event.pointerType) {\n case event.POINTER_TYPE_MOUSE || 'mouse':\n type = 'MOUSE';\n color = 'red';\n break;\n case event.POINTER_TYPE_PEN || 'pen':\n type = 'PEN';\n color = 'lime';\n break;\n case event.POINTER_TYPE_TOUCH || 'touch':\n type = 'TOUCH';\n color = 'cyan';\n break;\n }\n\n return {\n id: event.pointerId,\n x: event.clientX,\n y: event.clientY,\n type: type,\n color: color,\n start: {\n x: event.clientX,\n y: event.clientY\n },\n delta: {\n x: 0,\n y: 0,\n vx: 0,\n vy: 0\n }\n };\n }", "get Mouse1() {}", "function clickInRect(x, y, p, type) {\n var types = Object.entries(type);\n var ps = Object.entries(p);\n // for each entry in p (each p is a button/screen element)\n for (var i = 0; i < ps.length; i++) {\n if (isIn(x, y, ps[i][1])) {\n // yes, clicked in this element, return element type\n return types[i][0];\n }\n }\n return type.NONE;\n }", "function getSingleCallSignature(type) {\n if (type.flags & 2588672 /* ObjectType */) {\n var resolved = resolveStructuredTypeMembers(type);\n if (resolved.callSignatures.length === 1 && resolved.constructSignatures.length === 0 &&\n resolved.properties.length === 0 && !resolved.stringIndexInfo && !resolved.numberIndexInfo) {\n return resolved.callSignatures[0];\n }\n }\n return undefined;\n }", "async pseudoType () {\n const pseudoFn = `${this.currentAstNode.value.slice(1)}Pseudo`\n if (!this[pseudoFn]) {\n throw Object.assign(\n new Error(`\\`${this.currentAstNode.value\n }\\` is not a supported pseudo selector.`),\n { code: 'EQUERYNOPSEUDO' }\n )\n }\n const nextResults = await this[pseudoFn]()\n this.processPendingCombinator(nextResults)\n }", "function updatePointerState(ev,pointer){var point=getEventPoint(ev);var x=pointer.x=point.pageX;var y=pointer.y=point.pageY;pointer.distanceX=x-pointer.startX;pointer.distanceY=y-pointer.startY;pointer.distance=Math.sqrt(pointer.distanceX*pointer.distanceX+pointer.distanceY*pointer.distanceY);pointer.directionX=pointer.distanceX>0?'right':pointer.distanceX<0?'left':'';pointer.directionY=pointer.distanceY>0?'down':pointer.distanceY<0?'up':'';pointer.duration=+Date.now()-pointer.startTime;pointer.velocityX=pointer.distanceX/pointer.duration;pointer.velocityY=pointer.distanceY/pointer.duration;}", "onPointerHoverBegin(callback, isOnce = false) {\n this._pointerOnHoverBeginCallbacks.push([\n callback,\n isOnce\n ]);\n }", "function getTargetInstForInputEvent(topLevelType,targetInst){if(topLevelType==='topInput'){// In modern browsers (i.e., not IE8 or IE9), the input event is exactly\n// what we want so fall through here and trigger an abstract event\nreturn targetInst;}}", "get type() {\n\t\treturn wm.get(this).type;\n\t}", "function getFirst(x){\n for (item in x) {\n if (actions[x[item]]){\n \t y.actions = actions[x[item]]\n \t }\n }\n return x}", "function isIdle(request) {\n return request.kind === \"idle\";\n}", "function SearchForFirstSensor( ValueType ){\n\n var mBus = 0\n var mChannel = 0\n var mValueType = 0;\n var found = false;\n\n var mMappedChannel = 0;\n\n for (var i = 0; i < mapping.Mapping.length ; i++) {\n if( mapping.Mapping[i].ValueType===ValueType ){\n //We have a connected sensor all good......\n mBus = mapping.Mapping[i].Bus;\n mChannel = mapping.Mapping[i].Channel;\n mValueType = mapping.Mapping[i].ValueType;\n mMappedChannel = i;\n found = true;\n break;\n\n }\n }\n\n return { found, mMappedChannel ,mBus, mChannel, mValueType };\n}", "function AttackNextPlayer() {\n Orion.Ignore(self);\n var target = Orion.FindType(\"-1\", \"-1\", \"ground\", \"human|near|live|ignorefriends\", 18, \"gray|criminal|orange|red\");\n if (target.length != 0) {\n Orion.Attack(target[0]);\n Orion.Ignore(target[0]);\n } else {\n Orion.IgnoreReset();\n Orion.Ignore(self);\n target = Orion.FindType(\"-1\", \"-1\", \"ground\", \"human|near|live|ignorefriends\", 18, \"gray|criminal|orange|red\");\n if (target.length != 0) {\n Orion.Attack(target[0]);\n Orion.Ignore(target[0]);\n }\n }\n}" ]
[ "0.67520434", "0.67520434", "0.5989933", "0.5989933", "0.5301036", "0.5301036", "0.5068599", "0.5056619", "0.50430375", "0.4985964", "0.4950116", "0.4919418", "0.49161735", "0.49059975", "0.4843693", "0.4842414", "0.4842414", "0.4842414", "0.4832512", "0.48218998", "0.48218998", "0.48218998", "0.48218998", "0.48130393", "0.47875175", "0.4762009", "0.47488743", "0.4680511", "0.46696377", "0.46662048", "0.46641275", "0.46641275", "0.46641275", "0.46641275", "0.46641275", "0.46638313", "0.46638313", "0.46638313", "0.46638313", "0.46638313", "0.46638313", "0.46638313", "0.46508846", "0.4647073", "0.46233347", "0.46178707", "0.4606743", "0.4601011", "0.4596215", "0.45888752", "0.45602006", "0.45514274", "0.45227134", "0.45225918", "0.45124203", "0.4504885", "0.44947353", "0.44890237", "0.44837666", "0.44771552", "0.44681546", "0.4467545", "0.44626158", "0.4444822", "0.4435206", "0.44320458", "0.44307297", "0.44235688", "0.44180635", "0.44141817", "0.44100982", "0.4405713", "0.4405713", "0.4405713", "0.4389114", "0.43847266", "0.43828878", "0.43817538", "0.43798468", "0.43752095", "0.4374578", "0.43740442", "0.4367942", "0.43629748", "0.43613368", "0.43608868", "0.4355681", "0.43549362", "0.4354334", "0.43505806", "0.43496633", "0.43490055", "0.43443164", "0.43418914", "0.4338665", "0.43386066", "0.43287343", "0.43262392", "0.43170118" ]
0.78445756
1
main window main document main window all documents being listened to
constructor() { this.id = `__interact_scope_${Math.floor(Math.random() * 100)}`; this.isInitialized = false; this.listenerMaps = []; this.browser = utils_browser; this.defaults = clone(defaultOptions_defaults); this.Eventable = Eventable_Eventable; this.actions = { map: {}, phases: { start: true, move: true, end: true }, methodDict: {}, phaselessTypes: {} }; this.interactStatic = createInteractStatic(this); this.InteractEvent = InteractEvent_InteractEvent; this.Interactable = void 0; this.interactables = new InteractableSet_InteractableSet(this); this._win = void 0; this.document = void 0; this.window = void 0; this.documents = []; this._plugins = { list: [], map: {} }; this.onWindowUnload = event => this.removeDocument(event.target); const scope = this; this.Interactable = class extends Interactable_Interactable { get _defaults() { return scope.defaults; } set(options) { super.set(options); scope.fire('interactable:set', { options, interactable: this }); return this; } unset() { super.unset(); scope.interactables.list.splice(scope.interactables.list.indexOf(this), 1); scope.fire('interactable:unset', { interactable: this }); } }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "listenWindow() {\n this.initDefaultUI();\n this.initFastClick();\n this.setMoblie();\n }", "function main(){\r\t//Make certain that user interaction (display of dialogs, etc.) is turned on.\r\tapp.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;\r\tif (app.documents.length != 0){\r\t\tif (app.selection.length != 0){\r\t\t\tfor(var myCounter = 0;myCounter < app.selection.length; myCounter++){\r\t\t\t\tswitch (app.selection[myCounter].constructor.name){\r\t\t\t\t\tcase \"Rectangle\":\r\t\t\t\t\tcase \"TextFrame\":\r\t\t\t\t\tcase \"Oval\":\r\t\t\t\t\tcase \"Polygon\":\r\t\t\t\t\tcase \"GraphicLine\":\r\t\t\t\t\tcase \"Group\":\r\t\t\t\t\tcase \"PageItem\":\r\t\t\t\t\tmyObjectList.push(app.selection[myCounter]);\r\t\t\t\t\tbreak;\r\t\t\t\t}\r\t\t\t}\r if (myObjectList.length != 0){\r\t\t\t\tdisplayDialog(myObjectList);\r }\r else{\r\t\t\t\talert (\"Select a rectangle or text frame and try again.\");\r\t\t\t}\r\t\t}\r\t\telse{\r\t\t\talert (\"Select a frame and try again.\");\r\t\t}\r\t}\r\telse{\r\t\talert (\"Open a document, select a frame and try again.\");\r\t}\r}", "function onMain() {\n //get a reference to the current Application.\n const app = fin.desktop.Application.getCurrent();\n const win = fin.desktop.Window.getCurrent();\n\n //we get the current OpenFin version\n fin.desktop.System.getVersion(version => {\n const ofVersion = document.querySelector('#of-version');\n ofVersion.innerText = version;\n });\n\n let counter = 0;\n\n const counterP = document.querySelector('#counter');\n\n setInterval(() => {\n counterP.innerText = counter++;\n }, 500);\n\n const childWinBtn = document.querySelector('#child-win');\n\n childWinBtn.addEventListener('click', () => {\n new fin.desktop.Window({\n name: `${Math.random() * 99999}`,\n url: 'http://localhost:5555/index.html',\n autoShow: true\n });\n });\n\n const contextMenu = new fin.desktop.Window({\n name: 'context-menu: ' + Math.random() * 9999999,\n url: 'http://localhost:5555/context-menu.html',\n frame: false,\n defaultHeight: 140,\n defaultWidth: 200,\n saveWindowState: false,\n alwaysOnTop: true,\n customData: win.name,\n shadow: true\n });\n\n window.addEventListener('contextmenu', (e) => {\n e.preventDefault();\n contextMenu.setBounds(e.screenX, e.screenY, null, null, () => {\n contextMenu.show(() => {\n contextMenu.focus();\n });\n });\n });\n}", "function main(){\r\n\tif(app.documents.length != 0){\r\n\t\tmyDoc = app.activeDocument;\r\n\t\tif(app.selection.length != 0){\r\n\t\t\tif (myDoc.selection[0].constructor.name != \"Text\") {\r\n\t\t\t\talert (\"This is a \"+app.activeDocument.selection[0].constructor.name+\"\\nPlease select some text\");\r\n\t\t\t\texit(0);\r\n\t\t\t}else{\r\n\t\t\t\t//save measurements units\r\n\t\t\t\tmyOldXUnits = myDoc.viewPreferences.horizontalMeasurementUnits;\r\n\t\t\t\tmyOldYUnits = myDoc.viewPreferences.verticalMeasurementUnits;\r\n\t\t\t\t//set measurements units to points\r\n\t\t\t\tsetRulerUnits(myDoc, MeasurementUnits.points, MeasurementUnits.points);\r\n\t\t\t\t\r\n\t\t\t\t//get data\r\n\t\t\t\tvar myLeading = myDoc.selection[0].leading;\r\n\t\t\t\tif(myLeading == 1635019116){\r\n\t\t\t\t\t//myLeading is set to auto\r\n\t\t\t\t\tmyLeading = (myDoc.selection[0].pointSize/100)*myDoc.selection[0].autoLeading;\r\n\t\t\t\t}\r\n\t\t\t\tmyPageHeight = myDoc.documentPreferences.pageHeight;\r\n\t\t\t\tmyPageWidth = myDoc.documentPreferences.pageWidth;\r\n\t\t\t\t\r\n\t\t\t\t//calculate ideal leading\r\n\t\t\t\tmyLines = doRound(myPageHeight/myLeading, 0);\r\n\t\t\t\t\r\n\t\t\t\tmyIdealLeading = doRound(myPageHeight/myLines,3);\r\n\t\t\t\tShowDialog(myDoc,myIdealLeading);\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\talert(\"Nothing selected\\nPlease select some text\");\r\n\t\t}\r\n\t}else{\r\n\t\talert(\"Please open a document and try again.\");\r\n\t}\r\n}", "function onMain() {\n //get a reference to the current Application.\n const app = fin.desktop.Application.getCurrent();\n\n //we will increment on child window creation.\n let winNumber = 0;\n\n //we get the current OpenFin version\n fin.desktop.System.getVersion(version => {\n const ofVersion = document.querySelector('#of-version');\n ofVersion.innerText = version;\n });\n\n //subscribing to the run-requested events will allow us to react to secondary launches, clicking on the icon once the Application is running for example.\n //for this app we will launch child windows everytime the user clicks on the desktop.\n app.addEventListener('run-requested', () => {\n const win = fin.desktop.Window.getCurrent();\n //Only launch new windows from the main window.\n if (win.name === app.uuid) {\n var cWin = new fin.desktop.Window({\n name: `childWindow_${++winNumber}`,\n url: location.href,\n defaultWidth: 320,\n defaultHeight: 320,\n defaultTop: 10,\n defaultLeft: 300,\n autoShow: true\n }, function () {\n console.log('Child Window created');\n }, function (error) {\n console.log(error);\n });\n }\n });\n}", "function onDocumentRedy() {\n\t//Init\n\tinitWS();\n\t\n//\tinitButtons();\n//\tupdateButtons();\n//\tsetInterval(updateButtons, 3000);\n\n}", "function ui_window(){\n init();\n\tvar args = arrayfromargs(arguments);\n\tif(args[0] == 'mouse'){\n\t\targs.splice(0, 1);\n\t\tuiEvent.mouse(args[0],args[1],args[2],args[3],args[4],args[5],args[6],args[7], 0.);\n\t} else if(args[0] == 'mouseidle'){\n\t\targs.splice(0, 1);\n\t\tuiEvent.mouse(args[0],args[1],args[2],args[3],args[4],args[5],args[6],args[7], 0.);\n\t} else if(args[0] == 'mouseidleout'){\n outlet(OUTLET_WINDOW, \"getsize\");\n\t} else if(args[0] == 'mousewheel'){\n\t\targs.splice(0, 1);\n\t\tuiEvent.mouse(args[0],args[1],args[2],args[3],args[4],args[5],args[6],args[7],args[8]);\n\t} else if(args[0] == 'pickray'){\n\t\targs.splice(0, 1);\n if(cameraObj.enable == 1){\n args = cameraObj.getviewportray(uiEvent.currentPosX, uiEvent.currentPosY);\n if(args != null)\n uiEvent.pickray(args[0],args[1],args[2],args[3],args[4],args[5]);\n }\n\t} else if(args[0] == 'size'){\n\t\targs.splice(0, 1);\n\t\tuiEvent.windowSize(args[0],args[1]);\n\t}\n}", "function main() {\n if (debug) console.log(`Main ran in ${window.name}`)\n // Whenever this is ran, an unload event (i.e. when the user loads a whatIf report)\n // triggers the collection of data needed to do a query for course information.\n // This isn't a listener because getting listeners to work inside iframes is hard.\n function setupWhatIfDataListener() {\n $(getWindow('frSelection')).on(\"unload\", fetchWhatIfData)\n }\n\n // It's ran 10 times per second because again, listeners on iframes are hard.\n // This means the app would break if the user managed to get through the\n // DegreeWorks WhatIf form in a 10th of a second.\n setInterval(setupWhatIfDataListener, 100);\n console.log(window.name)\n if (window.name === \"frBody\") {\n addModal();\n }\n if (window.name === \"frLeft\") {\n let button = addButton(`DegweeWorks Planner`, getDegreeInfo, null, \"genPossible\")\n // addNumberField('Min courses/semester', 'minCourses', 4)\n // addNumberField('Max courses/semester', 'maxCourses', 4);\n }\n }", "subwindowInit() {}", "function applicationDocuments() {\n\tUser = getURLParameter(\"User\");\n\tAid = getURLParameter(\"AID\");\n\tselectedItem = null;\n\tselectedDocument = null;\n\tconnect(\"/hiwi/Clerk/js/applicationDocuments\", \"User=\" + User + \"&AID=\"\n\t\t\t+ Aid, handleApplicationDocumentsResponse);\n}", "function index() {\n mainWin.open();\n }", "function startWatchingWindow() {\n\t\t\tisWatchingWindow = true;\n\n\t\t\t// Listen for window changes.\n\t\t\twin.on(\"resize.bnLazySrc\", windowChanged);\n\t\t\twin.on(\"scroll.bnLazySrc\", windowChanged);\n\n\t\t\t// Set up a timer to watch for document-height changes.\n\t\t\tdocumentTimer = setInterval(checkDocumentHeight, documentDelay);\n\n\t\t}", "setWindowMain() {\r\n this.mainWindow = new BrowserWindow({\r\n width: settings.size.width || 1800,\r\n height: settings.size.height || 1020,\r\n webPreferences: {\r\n nodeIntegration: true,\r\n spellcheck: true,\r\n enableRemoteModule: true,\r\n contextIsolation: false\r\n }\r\n });\r\n this.mainWindow.hide();\r\n this.mainWindow.loadURL(path.join(__dirname, \"/public/index.html\"));\r\n this.mainWindow.removeMenu();\r\n\r\n const webContents = this.mainWindow.webContents;\r\n\r\n webContents.once(\"dom-ready\", () => {\r\n this.mainWindow.show();\r\n this.loadingWindow.close();\r\n this.showUpdateMessage();\r\n this.autoupdate();\r\n this.registerAutoShortcut();\r\n this.setSpellChecking();\r\n });\r\n\r\n webContents.on(\"dom-ready\", () => {\r\n this.mainWindow.webContents.send(\r\n \"isReadOnly:response\",\r\n this.isReadOnly\r\n );\r\n });\r\n\r\n /**\r\n * Where the controllers get initialized\r\n */\r\n this.notesController = new NotesController(\r\n ipcMain,\r\n this.mainWindow,\r\n storage,\r\n settings\r\n );\r\n this.classController = new ClassController(\r\n ipcMain,\r\n this.mainWindow,\r\n storage,\r\n settings\r\n );\r\n this.settingsController = new SettingsController(\r\n ipcMain,\r\n this.mainWindow,\r\n settings\r\n );\r\n\r\n /**\r\n * Sets all of the controller listeners\r\n */\r\n this.notesController.setAll();\r\n this.classController.setAll();\r\n this.settingsController.setAll();\r\n\r\n this.registerUtilityListners();\r\n }", "function createUI(){\n /**\n * @class DocumentApp\n */\n enyo.kind(\n /** @lends DocumentApp.prototype */\n {\n name: 'DocumentApp',\n kind: enyo.Control,\n\n /**\n * When the component is being created it renders the\n\t\t\t\t * template for the document preview, and calling functions\n\t\t\t\t * that process cookie and GET parameters.\n\t\t\t\t * @method create\n */\n create: function(){\n this.inherited(arguments);\n renderTemplateDiv();\n\t\t\t\t\tthis.processCookieValues();\n this.processGETParameters();\n },\n\n /**\n * After the rendering the program calculates and sets the\n * position of the bookmark popup and the size of the preview box.\n\t\t\t\t * @method rendered\n */\n rendered: function(){\n this.inherited(arguments);\n this.previewOriginHeight = jQuery('#' + this.$.previewBox.getOpenDocId()).height();\n this.changeBMPopupPosition();\n\t\t\t\t\tthis.initDraggers();\n },\n\n published: {\n searchWord: '',\n checkedEntities: [],\n lang: 'en'\n },\n\n components: [\n {\n kind: 'TopMessageBox',\n name: 'topMessageBox',\n classes: 'topMessageBox'\n },\n {\n tag: 'div',\n classes: 'docApp',\n name: 'docApp',\n components: [\n { name: 'Toolbar', classes: 'toolbar', components: [\n { name: 'ToolbarCenter', classes: 'toolbarCenter', components: [\n {\n\t\t\t\t\t\t\t\t\t\t\tname: 'mainLogo',\n\t\t\t\t\t\t\t\t\t\t\tclasses: 'mainLogo',\n\t\t\t\t\t\t\t\t\t\t\tontap: 'clickLogo'\n },\n {\n\t\t\t\t\t\t\t\t\t\t\tkind: 'SearchBox',\n\t\t\t\t\t\t\t\t\t\t\tname: 'searchBox',\n\t\t\t\t\t\t\t\t\t\t\tplaceholder: 'Search in documents',\n\t\t\t\t\t\t\t\t\t\t\tbuttonClass: 'searchButton',\n\t\t\t\t\t\t\t\t\t\t\tbuttonContent: 'OK',\n\t\t\t\t\t\t\t\t\t\t\tsearchIconClass: 'searchImage',\n\t\t\t\t\t\t\t\t\t\t\tparentSeachFunction: 'search'\n },\n\t\t\t\t\t\t\t\t\t\t{ \n\t\t\t\t\t\t\t\t\t\t\tname: 'toolbarIcons',\n\t\t\t\t\t\t\t\t\t\t\tclasses: 'toolbarIcons',\n\t\t\t\t\t\t\t\t\t\t\tcomponents: [\n\t\t\t\t\t\t\t\t\t\t\t\t{kind: 'Group', classes: 'viewTypeToggleButtons', onActivate: \"onViewTypeToggle\", components: [\n\t\t\t\t\t\t\t\t\t\t\t\t\t{kind: \"onyx.TooltipDecorator\", components: [\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{kind: \"onyx.IconButton\", name: 'docListViewButton', classes: 'docListViewButton' },\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{kind: \"onyx.Tooltip\", content: \"Document list view\", classes: 'menuItemTooltip', active: false }\n\t\t\t\t\t\t\t\t\t\t\t\t\t]},\n\t\t\t\t\t\t\t\t\t\t\t\t\t{kind: \"onyx.TooltipDecorator\", components: [\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{kind: \"onyx.IconButton\", name: 'entityListViewButton', classes: 'entityListViewButton'},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{kind: \"onyx.Tooltip\", content: \"Entity list view\", classes: 'menuItemTooltip', active: false }\n\t\t\t\t\t\t\t\t\t\t\t\t\t]},\n\t\t\t\t\t\t\t\t\t\t\t\t\t{kind: \"onyx.TooltipDecorator\", components: [\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{kind: \"onyx.IconButton\", name: 'locationViewButton', classes: 'locationViewButton'},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{kind: \"onyx.Tooltip\", content: \"LocationMapper\", classes: 'menuItemTooltip', active: false }\n\t\t\t\t\t\t\t\t\t\t\t\t\t]},\n\t\t\t\t\t\t\t\t\t\t\t\t\t{kind: \"onyx.TooltipDecorator\", components: [\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{kind: \"onyx.IconButton\", name: 'landscapeViewButton', classes: 'landscapeViewButton'},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{kind: \"onyx.Tooltip\", content: \"Landscape view\", classes: 'menuItemTooltip', active: false }\n\t\t\t\t\t\t\t\t\t\t\t\t\t]},\n\t\t\t\t\t\t\t\t\t\t\t\t\t{kind: \"onyx.TooltipDecorator\", components: [\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{kind: \"onyx.IconButton\", name: 'nGraphViewButton', classes: 'nGraphViewButton'},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{kind: \"onyx.Tooltip\", content: \"Network graph view\", classes: 'menuItemTooltip', active: false }\n\t\t\t\t\t\t\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t\t\t\t\t\t\t]},\n\t\t\t\t\t\t\t\t\t\t\t\t{kind: 'onyx.MenuDecorator', name: 'styleSettingsSelect', classes: 'styleSettingsSelect', onSelect: 'selectCss', components: [\n\t\t\t\t\t\t\t\t\t\t\t\t\t{kind: \"onyx.IconButton\", name: 'brushButton', classes: 'brushButton' },\n\t\t\t\t\t\t\t\t\t\t\t\t\t{kind: \"onyx.Tooltip\", content: \"Style settings\", classes: 'menuItemTooltip', active: false },\n\t\t\t\t\t\t\t\t\t\t\t\t\t{kind: \"onyx.Menu\", name: 'styleSettingsMenu', classes: 'styleSettingsMenu', components: [\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{content: \"Default\", name: \"firstswim\", classes: \"stylePickerItem\", value: 'firstswim'},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{content: \"High contrast\", name: \"contrast\", classes: \"stylePickerItem\", value: 'contrast'},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{content: \"Orange\", name: \"beer\", classes: \"stylePickerItem\", value: 'beer'},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{content: \"Clear\", name: \"clear\", classes: \"stylePickerItem\", value: 'clear'}\n\t\t\t\t\t\t\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t\t\t\t\t\t\t]},\n\t\t\t\t\t\t\t\t\t\t\t\t{kind: \"onyx.TooltipDecorator\", components: [\n\t\t\t\t\t\t\t\t\t\t\t\t\t{kind: \"onyx.IconButton\", ontap: 'login', name: 'loginButton', classes: 'loginButton loggedOut' },\n\t\t\t\t\t\t\t\t\t\t\t\t\t{kind: \"onyx.Tooltip\", content: \"Login\", classes: 'menuItemTooltip', active: false }\n\t\t\t\t\t\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t\t\t\t\t\t\t/*,\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\tname: 'bookmark',\n\t\t\t\t\t\t\t\t\t\t\t\t\tkind: 'Bookmark',\n\t\t\t\t\t\t\t\t\t\t\t\t\tbuttonClass: 'bookmarkButton',\n\t\t\t\t\t\t\t\t\t\t\t\t\tparentTapFunction: 'createBookmark',\n\t\t\t\t\t\t\t\t\t\t\t\t\tparentPopupFunction: 'popupBookmark',\n\t\t\t\t\t\t\t\t\t\t\t\t\twarningPopupClass: 'bookmarkPopup',\n\t\t\t\t\t\t\t\t\t\t\t\t\twarningPopupContent: '<br/>Your browser doesn\\'t support add bookmark via Javascript.<br/><br/>Please insert this URL manually:<br/><br/>'\n\t\t\t\t\t\t\t\t\t\t\t\t} */\n\t\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tkind: 'LoginPopup',\n\t\t\t\t\t\t\t\t\t\t\tname: 'loginPopup',\n\t\t\t\t\t\t\t\t\t\t\tclasses: 'loginPopup'\n\t\t\t\t\t\t\t\t\t\t}\n ]}\n ]},\n { kind: 'ClosablePopup', name: 'bookmarkPopup', classes: 'bookmarkPopup', popupClasses: 'bookmarkPopupDiv', closeButtonClasses: 'popupCloseButton' },\n {\n kind: 'PreviewBox',\n name: 'previewBox',\n classes: 'previewBox',\n previewBoxMainTitle: 'Preview',\n previewBoxMainTitleClass: 'previewBoxMainTitle'\n }\n ]\n }\n ],\n\t\t\t\t\n\t\t\t\t/**\n\t\t\t\t * This function calls the 'initViewType' function which\n\t\t\t\t * sets the view type based on cookie values and calls the\n\t\t\t\t * 'setCss' function too.\n\t\t\t\t * @method processCookieValues\n\t\t\t\t */\n\t\t\t\tprocessCookieValues: function() {\n\t\t\t\t\tthis.initViewType();\n\t\t\t\t\tthis.setCss(readCookie('css'));\n\t\t\t\t},\n\t\t\t\t\n\t\t\t\t/**\n\t\t\t\t * This function runs when the user selects a stylesheet.\n\t\t\t\t * It calls the 'setCss' function with the proper value.\n\t\t\t\t * @method selectCss\n\t\t\t\t */\n\t\t\t\tselectCss: function(inSender, inEvent) {\n\t\t\t\t\tthis.setCss(inEvent.originator.value);\n\t\t\t\t},\n\t\t\t\t\n\t\t\t\t/**\n\t\t\t\t * This function changes the stylesheet behind the page and \n\t\t\t\t * places a cookie.\n\t\t\t\t * @method setCss\n\t\t\t\t */\n\t\t\t\tsetCss: function(cssName) {\n\t\t\t\t\t$(\"#mainCss\").attr(\"href\", CONSTANTS.STYLE_PATH + cssName + \".css\");\n\t\t\t\t\tcreateCookie('css', cssName, 30);\n\t\t\t\t},\n\t\t\t\t\n\t\t\t\t/**\n\t\t\t\t * This function initializes the view type at the beginning\n\t\t\t\t * using the 'viewType' cookie value by setting up the toggle \n\t\t\t\t * buttons and calling the 'createViewType' function with the\n\t\t\t\t * proper parameter value.\n\t\t\t\t * @method initViewType\n\t\t\t\t */\n\t\t\t\tinitViewType: function() {\n\t\t\t\t\tswitch(readCookie('viewType')) {\n\t\t\t\t\t\tcase 'documentList':\n\t\t\t\t\t\t\tthis.$.docListViewButton.setActive(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'entityList':\n\t\t\t\t\t\t\tthis.$.entityListViewButton.setActive(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'locationViewer':\n\t\t\t\t\t\t\tthis.$.locationViewButton.setActive(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'landscape':\n\t\t\t\t\t\t\tthis.$.landscapeViewButton.setActive(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'nGraph':\n\t\t\t\t\t\t\tthis.$.nGraphViewButton.setActive(true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tthis.$.docListViewButton.setActive(true);\n\t\t\t\t\t}\n\t\t\t\t\tthis.createViewType(readCookie('viewType'));\n\t\t\t\t},\n\t\t\t\t\n\t\t\t\t/**\n\t\t\t\t * This function runs after changing the view type.\n\t\t\t\t * First, it checks whether it is really a change or\n\t\t\t\t * the same as the current one. If it has to be changed,\n\t\t\t\t * it calls the toggle functions, sets the cookie value\n\t\t\t\t * and fires a search using the current search term.\n\t\t\t\t * @method toggleViewType\n\t\t\t\t */\n\t\t\t\ttoggleViewType: function(viewType) {\n\t\t\t\t\tif(readCookie('viewType') != viewType) {\n\t\t\t\t\t\tthis.destroyCurrentViewType(viewType);\n\t\t\t\t\t\tcreateCookie('viewType', viewType, 30);\n\t\t\t\t\t\tthis.createViewType(viewType);\n\t\t\t\t\t\tthis.search(this.searchWord);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\n\t\t\t\t/**\n\t\t\t\t * This function initializes every components after changing \n\t\t\t\t * view type. It creates both panels and draggers.\n\t\t\t\t * @method createViewType\n\t\t\t\t */\n\t\t\t\tcreateViewType: function(viewType) {\n\t\t\t\t\tswitch(viewType) {\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\tcase 'documentList':\n\t\t\t\t\t\t\tthis.createComponent({\tname: 'leftDesktopCol',\n\t\t\t\t\t\t\t\t\t\t\t\t\tclasses: 'leftDesktopCol',\n\t\t\t\t\t\t\t\t\t\t\t\t\tcomponents: [\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkind: 'DictionaryController',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topenClasses: 'dictionaryListOpen',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcloseClasses: 'dictionaryListClose',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topenScrollerClass: 'dictionaryListScrollOpen',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcloseScrollerClass: 'dictionaryListScrollClose',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tentityCheckboxClass: 'dictionaryCheckbox',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsearchFunction: 'search',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tname: 'dictionaries',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdictionaryTitle: 'Entities',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitleClass: 'dictionariesMainTitle',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tshowDetailsFunction: 'displayDetails'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkind: 'DetailsBox',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tname: 'detailsBox',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclasses: 'detailsBox enyo-unselectable',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdetailsMainTitle: 'Details',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmainTitleClass: 'detailsMainTitle',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tscrollerClass: 'detailsScroll',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitleClass: 'detailsTitle'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tthis.createComponent({\tname: 'firstDocDragger', classes: 'firstDocDragger verticalDragger' });\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tthis.createComponent({\tkind: 'DocumentList',\n\t\t\t\t\t\t\t\t\t\t\t\t\tname: 'documents',\n\t\t\t\t\t\t\t\t\t\t\t\t\topenDocFunction: 'openDoc',\n\t\t\t\t\t\t\t\t\t\t\t\t\topenDocEvent: 'ontap',\n\t\t\t\t\t\t\t\t\t\t\t\t\tclasses: 'documentList',\n\t\t\t\t\t\t\t\t\t\t\t\t\tloaderClass: 'loader',\n\t\t\t\t\t\t\t\t\t\t\t\t\tscrollerClass: 'documentListScroll',\n\t\t\t\t\t\t\t\t\t\t\t\t\ttitleClass: 'documentsMainTitle',\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassifyFinishFunction: 'processClassifyResponse',\n\t\t\t\t\t\t\t\t\t\t\t\t\ttitleContent: 'Documents ',\n\t\t\t\t\t\t\t\t\t\t\t\t\tdocumentsCountClass: 'documentsCount',\n\t\t\t\t\t\t\t\t\t\t\t\t\tnoDataLabel: 'No data available',\n\t\t\t\t\t\t\t\t\t\t\t\t\tmoreButtonClass: 'moreButton',\n\t\t\t\t\t\t\t\t\t\t\t\t\tmoreDocumentsFunction: 'moreDocuments'\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tthis.createComponent({\tname: 'secondDocDragger', classes: 'secondDocDragger verticalDragger' });\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tthis.render();\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'entityList':\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tthis.createComponent({\tname: 'leftDesktopCol',\n\t\t\t\t\t\t\t\t\t\t\t\t\tclasses: 'leftDesktopCol',\n\t\t\t\t\t\t\t\t\t\t\t\t\tcomponents: [\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkind: 'DictionaryController',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topenClasses: 'dictionaryListOpen',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcloseClasses: 'dictionaryListClose',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\topenScrollerClass: 'dictionaryListScrollOpen',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcloseScrollerClass: 'dictionaryListScrollClose',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tentityCheckboxClass: 'dictionaryCheckbox',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tsearchFunction: 'search',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tname: 'dictionaries',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdictionaryTitle: 'Organizations',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitleClass: 'dictionariesMainTitle',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tshowDetailsFunction: 'displayDetails'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tkind: 'DetailsBox',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tname: 'detailsBox',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclasses: 'detailsBox enyo-unselectable',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdetailsMainTitle: 'Details',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmainTitleClass: 'detailsMainTitle',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tscrollerClass: 'detailsScroll',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitleClass: 'detailsTitle'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tthis.createComponent({\tname: 'firstDocDragger', classes: 'firstDocDragger verticalDragger' });\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tthis.createComponent({\tkind: 'DocumentList',\n\t\t\t\t\t\t\t\t\t\t\t\t\tname: 'documents',\n\t\t\t\t\t\t\t\t\t\t\t\t\topenDocFunction: 'openDoc',\n\t\t\t\t\t\t\t\t\t\t\t\t\topenDocEvent: 'ontap',\n\t\t\t\t\t\t\t\t\t\t\t\t\tclasses: 'documentList',\n\t\t\t\t\t\t\t\t\t\t\t\t\tloaderClass: 'loader',\n\t\t\t\t\t\t\t\t\t\t\t\t\tscrollerClass: 'documentListScroll',\n\t\t\t\t\t\t\t\t\t\t\t\t\ttitleClass: 'documentsMainTitle',\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassifyFinishFunction: 'processClassifyResponse',\n\t\t\t\t\t\t\t\t\t\t\t\t\ttitleContent: 'People ',\n\t\t\t\t\t\t\t\t\t\t\t\t\tdocumentsCountClass: 'documentsCount',\n\t\t\t\t\t\t\t\t\t\t\t\t\tnoDataLabel: 'No data available',\n\t\t\t\t\t\t\t\t\t\t\t\t\tmoreButtonClass: 'moreButton',\n\t\t\t\t\t\t\t\t\t\t\t\t\tmoreDocumentsFunction: 'moreDocuments'\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tthis.createComponent({\tname: 'secondDocDragger', classes: 'secondDocDragger verticalDragger' });\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tthis.render();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'locationViewer':\n\t\t\t\t\t\t\tthis.createComponent({\n\t\t\t\t\t\t\t\tkind: 'LocationViewer',\n\t\t\t\t\t\t\t\tname: 'locationViewer',\n\t\t\t\t\t\t\t\tclasses: 'locationViewerPanel',\n\t\t\t\t\t\t\t\tloaderClass: 'loader',\n\t\t\t\t\t\t\t\ttitleClass: 'locationViewerMainTitle',\n\t\t\t\t\t\t\t\ttitleContent: 'Location viewer ',\n\t\t\t\t\t\t\t\tnoDataLabel: 'No data available'\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tthis.render();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'landscape':\t\t\t\t\t\t\n\t\t\t\t\t\t\tthis.createComponent({\n\t\t\t\t\t\t\t\t\tkind: 'Landscape',\n\t\t\t\t\t\t\t\t\tname: 'landscape',\n\t\t\t\t\t\t\t\t\tclasses: 'landscapePanel',\n\t\t\t\t\t\t\t\t\tloaderClass: 'loader',\n\t\t\t\t\t\t\t\t\ttitleClass: 'landscapeMainTitle',\n\t\t\t\t\t\t\t\t\ttitleContent: 'Landscape '\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tthis.render();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'nGraph':\n\t\t\t\t\t\t\tthis.createComponent({\n\t\t\t\t\t\t\t\tkind: 'NGraph',\n\t\t\t\t\t\t\t\tname: 'nGraph',\n\t\t\t\t\t\t\t\topenDocFunction: 'openDoc',\n\t\t\t\t\t\t\t\topenDocEvent: 'ontap',\n\t\t\t\t\t\t\t\tclasses: 'nGraphPanel',\n\t\t\t\t\t\t\t\tloaderClass: 'loader',\n\t\t\t\t\t\t\t\ttitleClass: 'nGraphMainTitle',\n\t\t\t\t\t\t\t\ttitleContent: 'Network graph ',\n\t\t\t\t\t\t\t\tnoDataLabel: 'No data available'\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tthis.createComponent({\tname: 'nGraphDragger', classes: 'nGraphDragger verticalDragger' });\n\t\t\t\t\t\t\tthis.render();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\n\t\t\t\t/**\n\t\t\t\t * This function handles view type toggling by calling the\n\t\t\t\t * toggle function with the proper parameter.\n\t\t\t\t * @method onViewTypeToggle\n\t\t\t\t */\n\t\t\t\tonViewTypeToggle: function(inSender, inEvent) {\n\t\t\t\t\tif (inEvent.originator.getActive()) {\n\t\t\t\t\t\t//var selected = inEvent.originator.indexInContainer();\n\t\t\t\t\t\tswitch(inEvent.originator.name) {\n\t\t\t\t\t\t\tcase 'docListViewButton':\n\t\t\t\t\t\t\t\tthis.toggleViewType('documentList');\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'entityListViewButton':\n\t\t\t\t\t\t\t\tthis.toggleViewType('entityList');\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'locationViewButton':\n\t\t\t\t\t\t\t\tthis.toggleViewType('locationViewer');\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'landscapeViewButton':\n\t\t\t\t\t\t\t\tthis.toggleViewType('landscape');\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'nGraphViewButton':\n\t\t\t\t\t\t\t\tthis.toggleViewType('nGraph');\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\n\t\t\t\t/**\n\t\t\t\t * This function destroys every components of the current view type\n\t\t\t\t * in case it's not the same as the new view type.\n\t\t\t\t * @method destroyCurrentViewType\n\t\t\t\t */\n\t\t\t\tdestroyCurrentViewType: function(newType) {\n\t\t\t\t\tswitch (readCookie('viewType')) {\n\t\t\t\t\t\tcase 'nGraph':\n\t\t\t\t\t\t\tthis.$.nGraph.destroy();\n\t\t\t\t\t\t\tthis.$.nGraphDragger.destroy();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'documentList':\t\n\t\t\t\t\t\tcase 'entityList':\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tthis.$.leftDesktopCol.destroy();\n\t\t\t\t\t\t\tthis.$.firstDocDragger.destroy();\n\t\t\t\t\t\t\tthis.$.documents.destroy();\n\t\t\t\t\t\t\tthis.$.secondDocDragger.destroy();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'landscape':\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tthis.$.landscape.destroy();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'locationViewer':\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tthis.$.locationViewer.destroy();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\n\t\t\t\t/**\n\t\t\t\t * This function initializes all the draggers that the page contains.\n\t\t\t\t * It uses jQuery 'draggable'.\n\t\t\t\t * @method initDraggers\n\t\t\t\t */\n\t\t\t\tinitDraggers: function() {\n\t\t\t\t\tif($('.firstDocDragger').length > 0) {\n\t\t\t\t\t\t$('.firstDocDragger').draggable({\n\t\t\t\t\t\t\taxis: \"x\",\n\t\t\t\t\t\t\tdrag: function( event, ui ) {\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tvar docListCalcWidth = parseInt($('.previewBox').css('left'), 10) - ((ui.position.left - 10 ) + 30);\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif( ui.position.left > 80 && docListCalcWidth > 160 ) {\n\t\t\t\t\t\t\t\t\t$('.leftDesktopCol').css('width', ( ui.position.left - 10 )+'px');\n\t\t\t\t\t\t\t\t\t$('.documentList').css('left', ( ui.position.left + 10 )+'px');\n\t\t\t\t\t\t\t\t\t$('.documentList').css('width', docListCalcWidth+'px');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tevent.type = 'mouseup';\n\t\t\t\t\t\t\t\t\t$('.firstDocDragger').trigger(event);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tif($('.secondDocDragger').length > 0) {\n\t\t\t\t\t\t$('.secondDocDragger').draggable({\n\t\t\t\t\t\t\taxis: \"x\",\n\t\t\t\t\t\t\tdrag: function( event, ui ) {\n\t\t\t\t\t\t\t\tvar docListCalcWidth = ui.position.left - ($('.leftDesktopCol').width() + 20);\n\t\t\t\t\t\t\t\tif( ($(document).width() - ui.position.left ) > 80 && docListCalcWidth > 160 ) {\n\t\t\t\t\t\t\t\t\t$('.documentList').css('width', docListCalcWidth + 'px');\n\t\t\t\t\t\t\t\t\t$('.previewBox').css('left', ( ui.position.left + 10 )+'px');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tevent.type = 'mouseup';\n\t\t\t\t\t\t\t\t\t$('.secondDocDragger').trigger(event);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tif($('.nGraphDragger').length > 0) {\n\t\t\t\t\t\tvar main = this;\n\t\t\t\t\t\t$('.nGraphDragger').draggable({\n\t\t\t\t\t\t\taxis: \"x\",\n\t\t\t\t\t\t\tdrag: function( event, ui ) {\n\t\t\t\t\t\t\t\tvar nGraphCalcWidth = ui.position.left - 10;\n\t\t\t\t\t\t\t\tif( ($(document).width() - ui.position.left ) > 80 && nGraphCalcWidth > 160 ) {\n\t\t\t\t\t\t\t\t\t$('.nGraphDiv').css('width', nGraphCalcWidth + 'px');\n\t\t\t\t\t\t\t\t\t$('.previewBox').css('left', ( ui.position.left + 10 )+'px');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tevent.type = 'mouseup';\n\t\t\t\t\t\t\t\t\t$('.nGraphDragger').trigger(event);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tmain.$.nGraph.onDivResize();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\n /**\n * This function is called, when the user clicks on the login button.\n * It displays the login popup window.\n\t\t\t\t * @method login\n */\n login: function(){\n this.$.loginPopup.showLogin();\n },\n\n /**\n * This function is called when the user clicks on the logo.\n * It navigates to the Fusepool main site.\n\t\t\t\t * @method clickLogo\n */\n clickLogo: function(){\n window.open(CONSTANTS.FUSEPOOL_MAIN_URL);\n },\n\n /**\n * This function processes GET parameters. If it finds 'search' or\n * 'entity', it fires a search and open the document if there is the\n * 'openPreview' parameter.\n\t\t\t\t * @method processGETParameters\n */\n processGETParameters: function(){\n // Search\n this.search(GetURLParameter('search')[0], GetURLParameter('entity'));\n // Open Document\n var openPreview = GetURLParameter('openPreview')[0];\n if(!isEmpty(openPreview)){\n this.openDoc(openPreview);\n }\n },\n\n /**\n * This function calculates the position of the previewed document\n * and opens the document on the right.\n\t\t\t\t * @method openDoc\n * @param {String} docURI the URI of the clicked document\n * @param {Object} inEvent mouse over on a short document event\n */\n openDoc: function(docURI, inEvent){\n if(!isEmpty(inEvent)){\n var topMessage = jQuery('#' + this.$.topMessageBox.getId());\n var topMessageVisible = topMessage.is(':visible');\n var topMessageHeight = 0;\n if(topMessageVisible){\n topMessageHeight = topMessage.outerHeight();\n alert(topMessageHeight);\n }\n }\n this.$.previewBox.openDoc(docURI);\n },\n\t\t\t\t\n /**\n * This function queries the Annostore for a single annotation - only for testing purposes.\n\t\t\t\t * @method getAnnotation\n * @param {String} annotationIRI identifier of the annotation\n */\n\t\t\t\tgetAnnotation: function(annotationIRI){\n\t\t\t\t\tvar request = new enyo.Ajax({\n\t\t\t\t\t\tmethod: 'GET',\n\t\t\t\t\t\turl: CONSTANTS.ANNOTATION_URL+'?iri='+annotationIRI,\n\t\t\t\t\t\thandleAs: 'text',\n\t\t\t\t\t\theaders: { Accept : 'application/rdf+xml', 'Content-Type' : 'application/x-www-form-urlencoded'},\n\t\t\t\t\t\tpublished: { timeout: 60000 }\n\t\t\t\t\t});\n\t\t\t\t\trequest.go();\n\t\t\t\t\trequest.error(this, function(){\n\t\t\t\t\t\tconsole.log(\"error\");\n\t\t\t\t\t});\n\t\t\t\t\trequest.response(this, function(inSender, inResponse) {\n\t\t\t\t\t\t// console.log(\"success: \"+inResponse);\n\t\t\t\t\t});\n },\n\n /**\n * This function creates and saves a bookmark, which contains the\n * search word, the unchecked entities and the opened document.\n\t\t\t\t * @method createBookmark\n */\n createBookmark: function(){\n if(!isEmpty(this.searchWord)){\n // Cut characters after '?'\n var location = window.location.href;\n var parametersIndex = location.indexOf('?');\n if(parametersIndex !== -1){\n location = location.substr(0, parametersIndex);\n }\n // Search word\n var url = location + '?search=' + this.searchWord;\n // Unchecked entities\n var entities = this.getCheckedEntities();\n for(var i=0;i<entities.length;i++){\n if(!isEmpty(entities[i].id)){\n url += '&entity=' + entities[i].id;\n } else {\n url += '&entity=' + entities[i];\n }\n }\n // Preview document\n var documentURL = this.$.previewBox.getDocumentURI();\n if(!isEmpty(documentURL)){\n url += '&openPreview=' + documentURL;\n }\n\n var title = 'Fusepool';\n this.$.bookmark.saveBookmark(url, title);\n } else {\n this.$.bookmark.saveBookmark(url, title);\n }\n },\n\n /**\n * This function shows a message in a popup.\n\t\t\t\t * @method popupBookmark\n * @param {String} message the message\n */\n popupBookmark: function(message){\n this.$.bookmarkPopup.show();\n this.$.bookmarkPopup.setContent(message);\n this.changeBMPopupPosition();\n },\n\n /**\n * This function calculates the position of the popup to be \n * displayed horizontally in the center, vertically on the top.\n\t\t\t\t * @method changeBMPopupPosition\n */\n changeBMPopupPosition: function(){\n if(!isEmpty(this.$.bookmarkPopup.getContent())){\n var jQBookmark = jQuery('#' + this.$.bookmarkPopup.getId());\n var popupWidth = jQBookmark.outerWidth();\n var windowWidth = jQuery('#' + this.getId()).width();\n var newLeft = (windowWidth - popupWidth) / 2;\n this.$.bookmarkPopup.applyStyle('left', newLeft + 'px');\n }\n },\n\n /**\n * This function is called when the screen size is changing.\n * This function calls the bookmark popup changer function and the\n * preview box size changer function.\n\t\t\t\t * @method resizeHandler\n */\n resizeHandler: function() {\n this.inherited(arguments);\n this.changeBMPopupPosition();\n },\n\n /**\n * This function reduces the preview box height if there isn't enough\n * place for that. It sets the default height for the box otherwise.\n\t\t\t\t * @method changePreviewBoxSize\n */\n changePreviewBoxSize: function(){\n var windowHeight = jQuery(window).height();\n var newHeight = windowHeight - 110;\n\n if(newHeight < this.previewOriginHeight){\n this.$.previewBox.changeHeight(newHeight);\n } else {\n this.$.previewBox.changeHeight(this.previewOriginHeight);\n }\n },\n\n /**\n * This function calls the ajax search if the search word is not empty.\n\t\t\t\t * @method search\n * @param {String} searchWord the search word\n * @param {Array} checkedEntities the checked entities on the left side\n */\n search: function(searchWord, checkedEntities){\n\t\t\t\t\tcheckedEntities = typeof checkedEntities !== 'undefined' ? checkedEntities : [];\n this.searchWord = searchWord;\n\t\t\t\t\tcreateCookie('lastSearch',searchWord,30);\n this.checkedEntities = checkedEntities;\n if(!isEmpty(searchWord)){\n\t\t\t\t\t\tthis.cleanPreviewBox();\n\t\t\t\t\t\tswitch(readCookie('viewType')) {\n\t\t\t\t\t\t\tcase 'entityList':\n\t\t\t\t\t\t\tcase 'documentList':\n\t\t\t\t\t\t\t\tthis.$.documents.startLoading();\n\t\t\t\t\t\t\t\tthis.sendSearchRequest(searchWord, checkedEntities, 'processSearchResponse');\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'nGraph':\n\t\t\t\t\t\t\t\tthis.$.nGraph.newGraph();\t\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'landscape':\n\t\t\t\t\t\t\t\tthis.$.landscape.startLoading();\n\t\t\t\t\t\t\t\tthis.sendSearchRequest(searchWord, [], 'processSearchResponse');\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'locationViewer':\n\t\t\t\t\t\t\t\tthis.$.locationViewer.search(searchWord);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n this.$.searchBox.updateInput(this.searchWord);\n }\n },\n\n /**\n * This function sends an ajax request for searching.\n\t\t\t\t * @method sendSearchRequest\n * @param {String} searchWord the search word\n * @param {String} checkedEntities the checked entities on the left side\n * @param {String} responseFunction the name of the response function\n * @param {Number} offset the offset of the documents (e.g. offset = 10 --> documents in 10-20)\n */\n sendSearchRequest: function(searchWord, checkedEntities, responseFunction, offset){\n var main = this;\n var url = this.createSearchURL(searchWord, checkedEntities, offset);\n var store = rdfstore.create();\n store.load('remote', url, function(success) {\n main[responseFunction](success, store);\n });\n },\n\n /**\n * This function creates the search URL for the query.\n\t\t\t\t * @method createSearchURL\n * @param {String} searchWord the search word\n * @param {Array} checkedEntities the checked entities\n * @param {Number} offset offset of the query\n * @return {String} the search url\n */\n createSearchURL: function(searchWord, checkedEntities, offset){\n\t\t\t\t\t\n\t\t\t\t\t// var labelPattern = /^.*'label:'.*$/;\n\t\t\t\t\t// if(labelPattern.test(searchWord)) {\n\t\t\t\t\t\n\t\t\t\t\t// }\n\t\t\t\t\t// var predictedLabelPattern = /^.*'predicted label:'.*$/;\n\t\t\t\t\t// if(predictedLabelPattern.test(searchWord)) {\n\t\t\t\t\t\n\t\t\t\t\t// }\n\t\t\t\t\t\n\t\t\t\t\tif(readCookie('viewType') == \"entityList\") {\n\t\t\t\t\t\tvar url = CONSTANTS.ENTITY_SEARCH_URL;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tvar url = CONSTANTS.SEARCH_URL;\n\t\t\t\t\t}\n if(isEmpty(offset)){\n offset = 0;\n }\n url += '?search='+searchWord;\n if(checkedEntities.length > 0){\n url += this.getCheckedEntitiesURL(checkedEntities);\n }\n url += '&offset='+offset+'&maxFacets='+readCookie('maxFacets')+'&items='+readCookie('items');\n return url;\n },\n\n /**\n * This function sends a request for more documents.\n\t\t\t\t * @method moreDocuments\n * @param {Number} offset the offset of the document (e.g. offset = 10 -> documents 10-20)\n */\n moreDocuments: function(offset){\n this.sendSearchRequest(this.searchWord, this.checkedEntities, 'processMoreResponse', offset);\n },\n\n /**\n * This function runs after the ajax more search is done.\n * This function calls the document updater function.\n\t\t\t\t * @method processMoreResponse\n * @param {Boolean} success status of the search query\n * @param {Object} rdf the response rdf object\n */\n processMoreResponse: function(success, rdf){\n var documents = this.createDocumentList(rdf);\n this.$.documents.addMoreDocuments(documents);\n },\n\n /**\n * This function creates a URL fraction that represents\n\t\t\t\t * the checked entities.\n\t\t\t\t * @method getCheckedEntitiesURL\n * @param {Array} checkedEntities the original checked entities\n * @return {String} built URL fraction\n */\n getCheckedEntitiesURL: function(checkedEntities){\n var result = '';\n for(var i=0;i<checkedEntities.length;i++){\n if(checkedEntities[i].typeFacet){ \n result += '&type=' + replaceAll(checkedEntities[i].id, '#', '%23');\n } else {\n result += '&subject=' + checkedEntities[i].id;\n }\n }\n return result;\n },\n\n /**\n * This function runs after the ajax search is done. It calls\n * the entity list updater and the document updater functions.\n\t\t\t\t * @method processSearchResponse\n * @param {Boolean} success status of the search query\n * @param {Object} rdf the response rdf object\n */\n processSearchResponse: function(success, rdf){\n if(success) {\n\t\t\t\t\t\tswitch(readCookie('viewType')) {\n\t\t\t\t\t\t\tcase 'documentList':\n\t\t\t\t\t\t\tcase 'entityList':\n\t\t\t\t\t\t\t\tthis.updateEntityList(rdf, this.searchWord);\n\t\t\t\t\t\t\t\tthis.updateDocumentList(rdf);\n\t\t\t\t\t\t\t\tthis.cleanDetailsBox();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'landscape':\n\t\t\t\t\t\t\t\tFusePool.Landscaping.doSearch();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis.$.documents.updateList([], this.searchWord, this.checkedEntities);\n\t\t\t\t\t\tthis.$.documents.documentsCount = 0;\n\t\t\t\t\t\tthis.$.documents.updateCounts();\n\t\t\t\t\t}\n\t\t\t\t},\n\n /**\n * This function is called after a successful classification.\n\t\t\t\t * @method processClassifyResponse\n * @param {Object} rdf the rdf response of the request\n * @param {String} searchWord the search word\n */\n processClassifyResponse: function(rdf, searchWord){\n this.updateEntityList(rdf, searchWord);\n this.updateClassifiedDocList(rdf);\n },\n\n /**\n * This function updates the document list after classification\n\t\t\t\t * to have the correct order.\n\t\t\t\t * @method updateClassifiedDocList\n * @param {Object} rdf the RDF object\n */\n updateClassifiedDocList: function(rdf){\n var documents = this.createClassifiedDocList(rdf);\n this.$.documents.updateList(documents, this.searchWord);\n this.$.documents.documentsCount = this.getDocumentsCount(rdf);\n this.$.documents.updateCounts();\n },\n\n /**\n * This function creates a document list after classification.\n\t\t\t\t * @method createClassifiedDocList\n * @param {Object} rdf the RDF object\n * @return {Array} the created document list\n */\n createClassifiedDocList: function(rdf){\n var documents = [];\n var main = this;\n\n var query = 'SELECT * { ?url <http://fusepool.eu/ontologies/ecs#textPreview> ?preview';\n query += ' OPTIONAL { ?url <http://purl.org/dc/terms/title> ?title }';\n query += ' OPTIONAL { ?url <http://purl.org/dc/terms/abstract> ?content }';\n query += ' OPTIONAL { ?url <http://www.w3.org/2001/XMLSchema#double> ?orderVal }';\n query += '}';\n query += ' ORDER BY DESC(?orderVal)';\n rdf.execute(query, function(success, results) {\n if (success) {\n for(var i=0;i<results.length;i++){\n var row = results[i];\n if(!isEmpty(row.content) && (isEmpty(row.title) || isEmpty(row.title.lang) || row.title.lang + '' === main.lang)){\n var content = row.content.value;\n var title = '';\n if(!isEmpty(row.title)){\n title = row.title.value;\n }\n if(!main.containsDocument(documents, content, title, row.url.value)){\n documents.push({url: row.url.value, shortContent: content, title: title});\n }\n }\n }\n }\n });\n return documents;\n },\n\n /**\n * This function groups and sorts the entities and updates\n\t\t\t\t * the entity list on the left side.\n\t\t\t\t * @method updateEntityList\n * @param {Object} rdf the rdf object which contains the new entity list\n * @param {String} searchWord the search word\n */\n updateEntityList: function(rdf, searchWord){\n // The checked facets and type facets\n var checkedEntities = this.getCheckedEntities(rdf);\n\n // The facet and the type facet list\n var categories = this.getEntities(rdf);\n\n var groupVars = _.groupBy(categories, function(val){ return val.value; });\n var sortedGroup = _.sortBy(groupVars, function(val){ return -val.length; });\n\n var dictionaries = [];\n for(var i=0;i<sortedGroup.length;i++){\n // One category\n var category = sortedGroup[i];\n if(category.length > 0){\n var categoryText = replaceAll(category[0].value, '_', ' ');\n var categoryName = categoryText.substr(categoryText.lastIndexOf('/')+1);\n\n var entities = [];\n for(var j=0;j<category.length;j++){\n this.deteleLaterEntities(sortedGroup, category[j].entity, i);\n // Entity\n var entityId = category[j].entityId;\n var entityText = replaceAll(category[j].entity + '', '_', ' ');\n var entityName = entityText.substr(entityText.lastIndexOf('/')+1);\n entityName = entityName.substr(entityName.lastIndexOf('#')+1);\n var entityCount = category[j].count;\n var typeFacet = category[j].typeFacet;\n\n var entity = {id: entityId, text:entityName, count: entityCount, typeFacet: typeFacet};\n if(!this.containsEntity(entities, entity)){\n entities.push(entity);\n }\n }\n dictionaries.push({ name: categoryName, entities: entities });\n }\n }\n var dictionaryObject = { searchWord: searchWord, checkedEntities: checkedEntities, dictionaries: dictionaries };\n this.$.dictionaries.updateLists(dictionaryObject);\n },\n\n /**\n * This function searches for dictionary categories in an rdf object.\n\t\t\t\t * @method getEntities\n * @param {Object} rdf the rdf object\n * @return {Array} the categories array with the entities\n */\n getEntities: function(rdf){\n var entities = [];\n entities = this.getFacets(rdf);\n entities = entities.concat(this.getTypeFacets(rdf));\n return entities;\n },\n\n /**\n * This function searches for dictionary categories in an rdf object.\n\t\t\t\t * @method getCheckedEntities\n * @param {Object} rdf the rdf object\n * @return {Array} the categories array with the entities\n */\n getCheckedEntities: function(rdf){\n var checkedEntities = [];\n var checkedEntities = this.checkedEntitiesFromRdf(rdf);\n checkedEntities = checkedEntities.concat(this.checkedTypeFacetsFromRdf(rdf));\n return checkedEntities;\n },\n\n /**\n * This function returns an array of type facets found in an RDF object.\n\t\t\t\t * @method getTypeFacets\n * @param {Object} rdf the RDF object which contains the type facets\n * @return {Array} the result array\n */\n getTypeFacets: function(rdf){\n var result = [];\n var query = 'SELECT * { ?v <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://fusepool.eu/ontologies/ecs#ContentStoreView>.';\n query += ' ?v <http://fusepool.eu/ontologies/ecs#typeFacet> ?f. ';\n query += ' ?f <http://fusepool.eu/ontologies/ecs#facetCount> ?count. ';\n query += ' ?f <http://fusepool.eu/ontologies/ecs#facetValue> ?id. ';\n\t\t\t\t\tquery += '\t\tOPTIONAL { { ?id <http://www.w3.org/2000/01/rdf-schema#label> ?entity .';\n\t\t\t\t\tquery += ' filter ( lang(?entity) = \"en\")';\n\t\t\t\t\tquery += ' } UNION { ';\n\t\t\t\t\tquery += ' ?id <http://www.w3.org/2000/01/rdf-schema#label> ?entity .';\n\t\t\t\t\tquery += ' filter ( lang(?entity) = \"\")';\n\t\t\t\t\tquery += ' } } ';\n query += ' OPTIONAL { ?id <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?type }';\n query += '}';\n rdf.execute(query, function(success, results) {\n if (success) {\n for(var i=0;i<results.length;i++){\n var row = results[i];\n var entity = row.entity;\n if(isEmpty(entity)){\n entity = row.id.value;\n } else {\n entity = row.entity.value;\n }\n var type = row.type;\n if(isEmpty(type)){\n type = 'Facet types';\n } else {\n type = row.type.value;\n }\n result.push({entityId: row.id.value, entity: entity, value: type, count: row.count.value, typeFacet: true});\n }\n }\n });\n return result;\n },\n\n\t\t\t\t/**\n * This function returns an array of facets found in an RDF object.\n\t\t\t\t * @method getFacets\n * @param {Object} rdf the RDF object which contains the facets\n * @return {Array} the result array\n\t\t\t\t*/\n getFacets: function(rdf){\n var result = [];\n var query = 'SELECT * { ?v <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://fusepool.eu/ontologies/ecs#ContentStoreView>.';\n query += ' ?v <http://fusepool.eu/ontologies/ecs#facet> ?f. ';\n query += ' ?f <http://fusepool.eu/ontologies/ecs#facetCount> ?count. ';\n query += ' ?f <http://fusepool.eu/ontologies/ecs#facetValue> ?id. ';\n\t\t\t\t\tquery += '\t\tOPTIONAL { { ?id <http://www.w3.org/2000/01/rdf-schema#label> ?entity .';\n\t\t\t\t\tquery += ' filter ( lang(?entity) = \"en\")';\n\t\t\t\t\tquery += ' } UNION { ';\n\t\t\t\t\tquery += ' ?id <http://www.w3.org/2000/01/rdf-schema#label> ?entity .';\n\t\t\t\t\tquery += ' filter ( lang(?entity) = \"\")';\n\t\t\t\t\tquery += ' } } ';\n query += ' OPTIONAL { ?id <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?type }';\n query += '}';\n rdf.execute(query, function(success, results) {\n if (success) {\n for(var i=0;i<results.length;i++){\n var row = results[i];\n\t\t\t\t\t\t\t\t// if(!isEmpty(row.entity)){ \t// X branch\n if(!isEmpty(row.entity) && !isEmpty(row.type)){\n var type = row.type.value;\n var categoryName = type.substring(type.lastIndexOf('#')+1);\n result.push({entityId: row.id.value, entity: row.entity.value, value: categoryName, count: row.count.value, typeFacet: false}); \n }\n }\n }\n });\n return result;\n },\n\n /**\n * This function searches for the checked entities in an RDF object and\n * returns them.\n\t\t\t\t * @method checkedEntitiesFromRdf\n * @param {Object} rdf the rdf object\n * @return {Array} the checked entity list\n */\n checkedEntitiesFromRdf: function(rdf){\n var main = this;\n var checkedEntities = [];\n var query = 'SELECT * { ?s <http://fusepool.eu/ontologies/ecs#subject> ?id';\n query += ' OPTIONAL { ?id <http://www.w3.org/2000/01/rdf-schema#label> ?entity }';\n query += '}';\n rdf.execute(query, function(success, results) {\n if (success) {\n for(var i=0;i<results.length;i++){\n var row = results[i];\n if(!isEmpty(row.entity)){\n var entity = {id: row.id.value, text: row.entity.value, count: -1, typeFacet: false};\n if(!main.containsEntity(checkedEntities, entity)){\n checkedEntities.push(entity);\n }\n }\n }\n }\n });\n return checkedEntities;\n },\n\n /**\n * This function searches for the checked entities in an RDF object and\n * returns them.\n\t\t\t\t * @method checkedTypeFacetsFromRdf\n * @param {Object} rdf the rdf object\n * @return {Array} the checked entity list\n */\n checkedTypeFacetsFromRdf: function(rdf){\n var checkedTypes = [];\n var query = 'SELECT * { ?s <http://fusepool.eu/ontologies/ecs#type> ?o }';\n rdf.execute(query, function(success, results) {\n for(var i=0;i<results.length;i++){\n var id = results[i].o.value;\n var text = id.substring(id.lastIndexOf('#')+1);\n text = text.substring(text.lastIndexOf('/')+1);\n var entity = {id: id, text: text, count: -1, typeFacet: true};\n checkedTypes.push(entity);\n }\n });\n return checkedTypes;\n },\n\n /**\n * This function decides whether an entity list contains an entity or not.\n\t\t\t\t * @method containsEntity\n * @param {Array} entities the array of the entities\n * @param {String} entity the entity\n * @return {Boolean} true, if the list contains the entity, false otherwise\n */\n containsEntity: function(entities, entity){\n for(var i=0;i<entities.length;i++){\n if(entities[i].id === entity.id || entities[i].text.toUpperCase() === entity.text.toUpperCase()){\n return true;\n }\n }\n return false;\n },\n\n /**\n * This function deletes every entity from an array that equals\n * a given entity (after a given index).\n\t\t\t\t * @method deteleLaterEntities\n * @param {Array} array the array\n * @param {String} entity the checked entity\n * @param {Number} fromIndex the start index in the array\n */\n deteleLaterEntities: function(array, entity, fromIndex){\n for(var i=fromIndex+1;i<array.length;i++){\n var category = array[i];\n for(var j=0;j<category.length;j++){\n if(category[j].entity === entity){\n array[i].splice(j, 1);\n j--;\n }\n }\n }\n },\n\n /**\n * This function updates the document list in the middle.\n\t\t\t\t * @method updateDocumentList\n * @param {Object} rdf the RDF object which contains the new document list\n */\n updateDocumentList: function(rdf){\n this.$.documents.documentsCount = this.getDocumentsCount(rdf);\n this.$.documents.updateCounts();\n\t\t\t\t\tif(this.$.documents.documentsCount>0) {\n\t\t\t\t\t\tvar documents = this.createDocumentList(rdf);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tvar documents = [];\n\t\t\t\t\t}\n\t\t\t\t\tthis.$.documents.updateList(documents, this.searchWord, this.checkedEntities);\n },\n\n /**\n * This function deletes the content from the Preview panel.\n\t\t\t\t * @method cleanPreviewBox\n */\n cleanPreviewBox: function(){\n this.$.previewBox.clean();\n },\n\t\t\t\t\n /**\n * This function deletes the content from the Details panel.\n\t\t\t\t * @method cleanDetailsBox\n */\n cleanDetailsBox: function(){\n this.$.detailsBox.clean();\n },\n\n /**\n * This function searches for the count of documents in an rdf object.\n\t\t\t\t * @method getDocumentsCount\n * @param {Object} rdf the rdf object, which contains the count of documents.\n * @return {Number} the count of documents\n */\n getDocumentsCount: function(rdf){\n var result = 0;\n var query = 'SELECT * { ?s <http://fusepool.eu/ontologies/ecs#contentsCount> ?o }';\n rdf.execute(query, function(success, results) {\n if (success) {\n\t\t\t\t\t\t\tif(results.length > 0) {\n\t\t\t\t\t\t\t\tresult = results[0].o.value;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n return result;\n },\n\n\t\t\t\t/**\n\t\t\t\t * This function creates an ordered list of documents from an rdf object.\n\t\t\t\t * @method createDocumentList\n\t\t\t\t * @param {Object} rdf the rdf object\n\t\t\t\t * @return {Array} the document list\n\t\t\t\t */\n\t\t\t\tcreateDocumentList: function(rdf){\n\t\t\t\t\tvar documents = [];\n\t\t\t\t\tvar main = this;\n\t\t\t\t\tvar hits = [];\n\n\t\t\t\t\trdf.rdf.setPrefix(\"ecs\",\"http://fusepool.eu/ontologies/ecs#\");\n\t\t\t\t\trdf.rdf.setPrefix(\"rdf\",\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\");\n\t\t\t\t\tvar graph;\n\t\t\t\t\trdf.graph(function(success, things){graph = things;});\n\t\t\t\t\tvar triples = graph.match(null, rdf.rdf.createNamedNode(rdf.rdf.resolve(\"ecs:contents\")), null).toArray();\n\t\t\t\t\tvar current = triples[0].object;\n\n\t\t\t\t\twhile(!current.equals(rdf.rdf.createNamedNode(rdf.rdf.resolve(\"rdf:nil\")))){\n\t\t\t\t\t\tvar hit = graph.match(current, rdf.rdf.createNamedNode(rdf.rdf.resolve(\"rdf:first\")), null).toArray()[0].object;\n\t\t\t\t\t\thits.push(hit.nominalValue);\n\t\t\t\t\t\tcurrent = graph.match(current, rdf.rdf.createNamedNode(rdf.rdf.resolve(\"rdf:rest\")), null).toArray()[0].object;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(readCookie('viewType') == \"entityList\") {\t\t\t\t\t\t\t\n\t\t\t\t\t\tvar querylist = 'PREFIX foaf: <http://xmlns.com/foaf/0.1/>' + \n\t\t\t\t\t\t'PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>' + \n\t\t\t\t\t\t'SELECT ?url ?name ?addresslocality ?streetaddress ' + \n\t\t\t\t\t\t'WHERE { ' + \n\t\t\t\t\t\t\t'?url rdf:type foaf:Person . ' + \n\t\t\t\t\t\t\t'?url foaf:name ?name . ' + \n\t\t\t\t\t\t\t'?url <http://schema.org/address> ?addressURI . ' + \n\t\t\t\t\t\t\t'?addressURI <http://schema.org/addressLocality> ?addresslocality . ' + \n\t\t\t\t\t\t\t'?addressURI <http://schema.org/streetAddress> ?streetaddress ' + \n\t\t\t\t\t\t'}';\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tvar querylist = 'PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> ';\n\t\t\t\t\t\t\tquerylist += 'SELECT * {';\n\t\t\t\t\t\t\tquerylist += ' { ?url <http://purl.org/dc/terms/title> ?title . ';\n\t\t\t\t\t\t\tquerylist += ' filter ( lang(?title) = \"en\")';\n\t\t\t\t\t\t\tquerylist += ' } UNION { ';\n\t\t\t\t\t\t\tquerylist += ' ?url <http://purl.org/dc/terms/title> ?title . ';\n\t\t\t\t\t\t\tquerylist += ' filter ( lang(?title) = \"\")';\n\t\t\t\t\t\t\tquerylist += ' }';\n\t\t\t\t\t\t\tquerylist += ' OPTIONAL { ?url <http://purl.org/dc/terms/abstract> ?abst } . ';\n\t\t\t\t\t\t\tquerylist += ' OPTIONAL { ?url <http://fusepool.eu/ontologies/ecs#textPreview> ?preview } . ';\n\t\t\t\t\t\t\tquerylist += ' OPTIONAL { ?url <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?dtype } . ';\n\t\t\t\t\t\t\tquerylist += '}';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t/* This is the tentative to iterate the list at the API level to have it in ORDER \n\t\t\t\t\t\tvar triples = graph.match(null, rdf.rdf.createNamedNode(rdf.rdf.resolve(\"ecs:contents\")), null).toArray();\n\t\t\t\t\t\tvar hit = graph.match(triples[0].object, store.rdf.createNamedNode(store.rdf.resolve(\"rdf:rest\")), null).toArray(); */\n\n\t\t\t\t\trdf.execute(querylist, function(success, results) {\n\t\t\t\t\t\tif (success) {\n\t\t\t\t\t\t\tfor(var rank=0; rank<hits.length; rank++){\n\t\t\t\t\t\t\t\tfor(var i=0; i<results.length; i++){\n\t\t\t\t\t\t\t\t\tvar row = results[i];\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(row.url.value!=hits[rank]) {\n\t\t\t\t\t\t\t\t\t\t/*if(row.url.value!=hits[rank] || \n\t\t\t\t\t\t\t\t\t\trow.dtype.value.indexOf(\"ecs\") != -1 || \n\t\t\t\t\t\t\t\t\t\trow.dtype.value.indexOf(\"owl#A\") != -1 ){ */\n\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//// TITLE ////\n\t\t\t\t\t\t\t\t\tvar title = '[Unknown]';\n\t\t\t\t\t\t\t\t\tif(!isEmpty(row.title)){\n\t\t\t\t\t\t\t\t\t\ttitle = row.title.value;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse if(!isEmpty(row.name)) {\n\t\t\t\t\t\t\t\t\t\ttitle = row.name.value;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//// SHORT CONTENT ////\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tvar shortContent = '';\n\t\t\t\t\t\t\t\t\tif(!isEmpty(row.abst)) {\n\t\t\t\t\t\t\t\t\t\tshortContent = row.abst.value;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse if(!isEmpty(row.preview)) {\n\t\t\t\t\t\t\t\t\t\tshortContent = row.preview.value;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse if(!isEmpty(row.addresslocality) && !isEmpty(row.streetaddress)) {\n\t\t\t\t\t\t\t\t\t\tshortContent = row.addresslocality.value + ', ' + row.streetaddress.value;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\tvar exclude = ['http://www.w3.org/1999/02/22-rdf-syntax-ns#type','http://purl.org/dc/terms/title'];\n\t\t\t\t\t\t\t\t\t\tshortContent = getAPropertyValue(rdf, row.url.value, exclude);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//// DOCTYPE ////\n\t\t\t\t\t\t\t\t\tvar dtype = '[Type not found]';\n\t\t\t\t\t\t\t\t\tif(!isEmpty(row.dtype)){\n\t\t\t\t\t\t\t\t\t\tdtype = row.dtype.value;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(!main.containsDocument(documents, shortContent, title, row.url.value)){\n\t\t\t\t\t\t\t\t\t\tdocuments.push({url: row.url.value, shortContent: shortContent, title: title, type: dtype});\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\treturn documents;\n\t\t\t\t},\n\t\t\t\t\n /**\n * This function decides whether a document list contains\n\t\t\t\t * a document with a specific content and title or not.\n\t\t\t\t * @method containsDocument\n * @param {Array} documents the list of documents\n * @param {String} content content of the other document\n * @param {String} title title of the other document\n * @return {Boolean} true, if the list contains, false otherwise\n */\n containsDocument: function(documents, content, title, url){\n for(var i=0;i<documents.length;i++){\n if(documents[i].url === url || (documents[i].shortContent === content && documents[i].title === title)){\n return true;\n }\n }\n return false;\n },\n\n /**\n * This function calls the content updater function of the\n\t\t\t\t * details box.\n\t\t\t\t * [replaced with function 'displayDetails']\n\t\t\t\t * @method updateDetails\n * @param {String} title the title of the details\n * @param {Object} addressObject the address object\n */\n updateDetails: function(title, addressObject){\n this.$.detailsBox.updateDetails(title, addressObject);\n },\n\t\t\t\t\n\t\t\t\t/**\n\t\t\t\t * This function calls the display function of the\n\t\t\t\t * details box.\n\t\t\t\t * @method displayDetails\n\t\t\t\t * @param {Object} rdf rdf with the metadata of the entity\n\t\t\t\t */\n\t\t\t\tdisplayDetails: function(rdf){\n\t\t\t\t\tthis.$.detailsBox.displayDetails(rdf);\n\t\t\t\t}\n });\n }", "function startWatchingWindow() {\n\n isWatchingWindow = true;\n\n // Listen for window changes.\n win.on(\"resize.bnLazySrc\", windowChanged);\n win.on(\"scroll\", windowChanged);\n\n // Set up a timer to watch for document-height changes.\n documentTimer = setInterval(checkDocumentHeight, documentDelay);\n\n }", "onDOMReady() {\n\n\t\t\t// resize the canvas to fill browser window dynamically\n\t\t\twindow.addEventListener('resize', _onWindowResize, false);\n\t\t\t_onWindowResize();\n\t\t\t\n\t\t\t// Stop generic mouse events from propagating up to the document\n\t\t\tlet windows = document.querySelectorAll('.ui-window');\n\t\t\tfor(let i = 0, len = windows.length; i < len; i++) {\n\t\t\t\tlet element = windows[i];\n\t\t\t\telement.addEventListener('mousedown', event => {\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t});\n\t\t\t\telement.addEventListener('wheel', event => {\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// Initialize the starting windows\n\t\t\t_windows = {\n\t\t\t\t'newsfeed': new NewsfeedWindow('#window-Newsfeed')\n\t\t\t};\n\t\t\t_windows.newsfeed.clearNews(LogicM.getUniverseClock());\n\n\t\t\t// this.addNews(\"Welcome back, Emperor.\", null, LogicM.getUniverseClock(), 'self', false);\n\t\t}", "function MainWnd () {}", "function createMain() {\n\n\tcreateMainWindow();\n\n\t// IPC PART\n\tipcMain.on('toggle-window', () => {\n\t\tif (!posBubbleChanged && bubble.isFocused()) {\n\t\t\tmainWindow.webContents.reload();\n\t\t\tbubble.webContents.send('message-read');\n\t\t\tif (mainWindow.isVisible()) {\n\t\t\t\tmainWindow.show();\n\t\t\t} else {\n\t\t\t\tif (!posExplicitlyChanged) deduceNewWindowPos();\n\t\t\t\tmainWindow.unmaximize();\n\t\t\t\tmainWindow.show();\n\t\t\t\tmainWindow.focus();\n\n\t\t\t}\n\t\t}\n\t\tposBubbleChanged = false;\n\t});\n\n\n\tipcMain.on('read-message', (event, arg) => {\n\t\tmainWindow.webContents.reload();\n\t\tbubble.webContents.send('message-read');\n\t\tif (!mainWindow.isVisible()) {\n\t\t\tmainWindow.show();\n\t\t}\n\t\tmainWindow.focus();\n\t});\n\n\tipcMain.on('new-message', (event, arg) => {\n\t\tif (mainWindow != null && !mainWindow.isFocused()) bubble.webContents.send('new-message', arg);\n\t});\n\n\tipcMain.on('hide-bubble', () => {\n\t\tbubble.hide();\n\t});\n\n\tipcMain.on('position-changed', () => {\n\t\tif (!posExplicitlyChanged) posExplicitlyChanged = true;\n\t});\n\n\tipcMain.on('bubble-position-changed', () => {\n\t\tif (!posBubbleChanged) posBubbleChanged = true;\n\t});\n\n\tipcMain.on('maximize-window', () => {\n\t\tmainWindow.isMaximized() ? mainWindow.unmaximize() : mainWindow.maximize();\n\t});\n\n\tipcMain.on('minimize-window', () => {\n\t\tmainWindow.minimize();\n\t});\n\n\tipcMain.on('close-window', () => {\n\t\tposExplicitlyChanged = false;\n\t\tposBubbleChanged = false;\n\t\tmainWindow.hide();\n\t});\n\n\n\t// Shortcuts\n\tglobalShortcut.register('Alt+A', () => {\n\t\tif (mainWindow.isVisible()) {\n\t\t\tmainWindow.blur();\n\t\t} else {\n\t\t\tif (!posExplicitlyChanged) deduceNewWindowPos();\n\t\t\tmainWindow.unmaximize();\n\t\t\tmainWindow.show();\n\t\t\tmainWindow.focus();\n\t\t\tbubble.webContents.send('new-message', '');\n\t\t}\n\t});\n\n\tglobalShortcut.register('Alt+Q', () => {\n\t\tif (bubble.isVisible()) {\n\t\t\tbubble.hide();\n\t\t} else {\n\t\t\tbubble.show();\n\t\t}\n\t});\n\n\tglobalShortcut.register('Alt+Z', () => {\n\t\tbubble.blur();\n\t});\n}", "function index() {\n createMainWin().open();\n }", "function Main(){\n PubSub.call(this); // super();\n\n // ui system\n this.screens = new Screens(this);\n\n this.onceOn('init', this.init, this);\n }", "initWindowEvents() {\n /**\n * Several keyboard events.\n */\n window.addEventListener(\"keydown\", (event) => {\n if (event.shiftKey && event.ctrlKey && event.which === 83) {\n // ctrl+shift+s preview sync source\n return this.previewSyncSource();\n }\n else if (event.metaKey || event.ctrlKey) {\n // ctrl+c copy\n if (event.which === 67) {\n // [c] copy\n document.execCommand(\"copy\");\n }\n else if (event.which === 187 && !this.config.vscode) {\n // [+] zoom in\n this.zoomIn();\n }\n else if (event.which === 189 && !this.config.vscode) {\n // [-] zoom out\n this.zoomOut();\n }\n else if (event.which === 48 && !this.config.vscode) {\n // [0] reset zoom\n this.resetZoom();\n }\n else if (event.which === 38) {\n // [ArrowUp] scroll to the most top\n if (this.presentationMode) {\n window[\"Reveal\"].slide(0);\n }\n else {\n this.previewElement.scrollTop = 0;\n }\n }\n }\n else if (event.which === 27) {\n // [esc] toggle sidebar toc\n this.escPressed(event);\n }\n });\n window.addEventListener(\"resize\", () => {\n this.scrollMap = null;\n });\n window.addEventListener(\"message\", (event) => {\n const data = event.data;\n if (!data) {\n return;\n }\n // console.log('receive message: ' + data.command)\n if (data.command === \"updateHTML\") {\n this.totalLineCount = data.totalLineCount;\n this.sidebarTOCHTML = data.tocHTML;\n this.sourceUri = data.sourceUri;\n this.renderSidebarTOC();\n this.updateHTML(data.html, data.id, data.class);\n }\n else if (data.command === \"changeTextEditorSelection\" &&\n (this.config.scrollSync || data.forced)) {\n const line = parseInt(data.line, 10);\n let topRatio = parseFloat(data.topRatio);\n if (isNaN(topRatio)) {\n topRatio = 0.372;\n }\n this.scrollToRevealSourceLine(line, topRatio);\n }\n else if (data.command === \"startParsingMarkdown\") {\n /**\n * show refreshingIcon after 1 second\n * if preview hasn't finished rendering.\n */\n if (this.refreshingIconTimeout) {\n clearTimeout(this.refreshingIconTimeout);\n }\n this.refreshingIconTimeout = setTimeout(() => {\n if (!this.presentationMode) {\n this.refreshingIcon.style.display = \"block\";\n }\n }, 1000);\n }\n else if (data.command === \"openImageHelper\") {\n window[\"$\"](\"#image-helper-view\").modal();\n }\n else if (data.command === \"runAllCodeChunks\") {\n this.runAllCodeChunks();\n }\n else if (data.command === \"runCodeChunk\") {\n this.runNearestCodeChunk();\n }\n else if (data.command === \"escPressed\") {\n this.escPressed();\n }\n else if (data.command === \"previewSyncSource\") {\n this.previewSyncSource();\n }\n else if (data.command === \"copy\") {\n document.execCommand(\"copy\");\n }\n else if (data.command === \"zommIn\") {\n this.zoomIn();\n }\n else if (data.command === \"zoomOut\") {\n this.zoomOut();\n }\n else if (data.command === \"resetZoom\") {\n this.resetZoom();\n }\n else if (data.command === \"scrollPreviewToTop\") {\n if (this.presentationMode) {\n window[\"Reveal\"].slide(0);\n }\n else {\n this.previewElement.scrollTop = 0;\n }\n }\n }, false);\n }", "function main(){\n app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT;\n //app.scriptPreferences.userInteractionLevel = UserInteractionLevels.INTERACT_WITH_ALL;\n if(app.documents.length != 0){\n\t\tif (app.activeDocument.stories.length != 0){\n myFolder = (\"U:/\")\n expFormat = \".txt\"\n myExportPages(expFormat, myFolder)\n $.gc()\n }\n else alert(\"The document does not contain any text. Please open a document containing text and try again.\");\n }\n else alert(\"No documents are open. Please open a document and try again.\");\n}", "function main(){\n //app.scriptPreferences.userInteractionLevel = UserInteractionLevels.NEVER_INTERACT;\n app.scriptPreferences.userInteractionLevel = UserInteractionLevels.INTERACT_WITH_ALL;\n if(app.documents.length != 0){\n\t\tif (app.activeDocument.stories.length != 0){\n myFolder = (\"U:/\")\n expFormat = \".txt\"\n myExportPages(expFormat, myFolder)\n //myExportLinks(\n $.gc()\n }\n else alert(\"The document does not contain any text. Please open a document containing text and try again.\");\n }\n else alert(\"No documents are open. Please open a document and try again.\");\n}", "onDocumentClicked(event) {\n const isClickedInside = this.containerNode.contains(event.target);\n if (!isClickedInside) {\n this.updateActiveState(false);\n }\n }", "init() {\n\t\tglobalApplication.events.document();\n\t\tglobalApplication.events.header();\n\t}", "function onMain() {\n const winNum = document.querySelector(\"#winNum\");\n winNum.innerHTML = fin.desktop.Window.getCurrent().name\n}", "function initializeDocument() {\n\t\tconverterLabel.append(temperatureInput);\n\t\tconverterDocument.append(converterLabel);\n\t\tconverterLabel.after(documentSpaceBreak);\n\t\tdocumentSpaceBreak.after(converterResult);\n\t\tdocumentSpaceBreak.after(fahrenheitToCelsiusBtn);\n\t\tdocumentSpaceBreak.after(celsiusToFahrenheitBtn);\n\t\tdocument.querySelector('h3').after(converterDocument);\n\t\treturn;\n\t}", "connectedCallback() {\n if (!this.isConnected) return;\n super.connectedCallback();\n window.addEventListener(\"contextmenu\", this.showDocs.bind(this));\n window.addEventListener(\"input\", (e) => {\n console.log(e)\n })\n }", "function setupMain() {\n\tupkeep();\n\tDRAW.newsBorder($('#news_border'));\n\t\n\tvar $a \t\t= $('#news_wrapper');\n\tvar loadNews \t= function(e) {\n\t\n\t\t// Change the load target based on which button is pressed\n\t\t// Changer la cible en fonction du bouton sur lequel on appuie sur\n\t\tswitch ( e.currentTarget.getAttribute('id') ) {\n\t\t\tcase 'news_main_button':\n\t\t\tvar path = 'include/sampleNews.html';\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'news_tag_button':\n\t\t\tvar path = 'include/sampleNewsTag.html';\n\t\t\tbreak;\n\t\t}\n\t\n\t\tvar b = $a.data('jsp');\n\t\t\n\t\tif ( b ) {\n\t\t\tvar c = b.getContentPane();\n\t\t\tc.load(path, function() {\n\t\t\t\t$('#news_window section.news-section').each(function() {\n\t\t\t\t\t$(this).height($(this).height());\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\tb.reinitialise();\n\t\t\t});\n\t\t} else {\n\t\t\t$a.load(path, function() {\n\t\t\t\t$('#news_window section.news-section').each(function() {\n\t\t\t\t\t$(this).height($(this).height());\n\t\t\t\t});\n\t\t\t\n\t\t\t\t$a.jScrollPane({verticalGutter: 10});\n\t\t\t});\n\t\t}\n\t};\n\t\n\t// Button font scale\n\t//var b = $('#news_button_wrapper');\n\t//b.css('font-size', b.height()*0.20);\n\t\n\tvar c = $('#notification_list');\n\tc.css('font-size', c.children('div.notif-entry:first').height()*0.125);\n\t\n\t// Button event and load initial news\n\t$('#news_main_button').click(loadNews).click();\n\t$('#news_tag_button').click(loadNews);\n\t$('#notify_btn_refresh').click(function() {\n\t\talert('refresh');\n\t});\n\t$('#notify_btn_eraseall').click(function() {\n\t\talert('remove all');\n\t});\n\t\n\t// Draw the list window\n\tDRAW.notifications($('#notification_wrapper'));\n\tDRAW.mainBars($('#news_button_wrapper'));\n\t\n\t// Event for clicking on notification\n\t//$('#notification_list').on\n\t// Scale Bar\n\t//var r1 = $('#news_button_wrapper').width() / 627;\n\t//var r2 = $('#news_button_wrapper').height()/ 67;\n\t//$('#mainBar path:first').attr('transform', 'matrix('+r1+',0,0,'+r2+',0,0)');\n}", "function EraMain()\r\n\t{\r\n\t\tvar current_window = window;\r\n\t\tvar current_document = document;\r\n\t\t\r\n\t\tCreateEraLink(current_window, current_document);\r\n\t}", "openDocument(fileName) {\n const existingWindow = this.getDocumentByFilename(fileName);\n if (existingWindow && existingWindow.window) {\n existingWindow.window.show();\n return;\n }\n\n fs.readFile(fileName, 'utf-8', (err, data) => {\n if (err) {\n alert('An error ocurred reading the file: ' + err.message);\n return;\n }\n\n const basename = path.basename(fileName);\n\n const window = this.createWindow({fileName});\n window.setRepresentedFilename(basename);\n window.setTitle(basename);\n window.once('ready-to-show', () => {\n this.setWindowContents(window, JSON.parse(data));\n window.show();\n });\n\n this.addAppRecentDocument(fileName);\n });\n }", "setGeneralAppListener(app) {\n //custom event to load file from the load menu with the file explorer\n document.addEventListener(\"fileload\", (e) => { this.loadFileEvent(e); });\n //All drog and drop events\n window.ondragover = function () { return false; };\n window.ondragend = function () { return false; };\n document.ondragstart = () => { this.styleOnDragStart(); };\n document.ondragenter = (e) => {\n var srcElement = e.srcElement;\n if (srcElement.className != null && srcElement.className == \"node-button\") {\n }\n else {\n this.styleOnDragStart();\n }\n };\n document.ondragleave = (e) => {\n var elementTarget = e.target;\n if (elementTarget.id == \"svgCanvas\") {\n //alert(\"svg\")\n this.styleOnDragEnd();\n e.stopPropagation();\n e.preventDefault();\n }\n };\n //scroll event to check the size of the document\n document.onscroll = () => {\n this.checkRealWindowSize();\n };\n //resize event\n var body = document.getElementsByTagName(\"body\")[0];\n body.onresize = () => { this.checkRealWindowSize(); };\n window.ondrop = (e) => {\n this.styleOnDragEnd();\n var x = e.clientX;\n var y = e.clientY;\n this.uploadOn(this, null, x, y, e);\n };\n //custom double touch from library menu to load an effect or an intrument.\n document.addEventListener(\"dbltouchlib\", (e) => { this.dblTouchUpload(e); });\n }", "function getMainDocument() {\n let productFrame = document.getElementsByTagName(\"frame\").product;\n\n let innerFrames = productFrame.contentDocument.getElementsByTagName(\"iframe\");\n let inFrame1 = innerFrames.tab_400057.contentDocument;\n\n let mainFrame = inFrame1.getElementById(\"role_main\");\n let mainDoc = mainFrame.contentDocument;\n\n return mainDoc;\n}", "function _WindowwOnLoad() {\r\n uuready.gone.win = 1;\r\n _DOMContentLoaded();\r\n win.xwin && win.xwin(uu); // window.xwin(uu) callback\r\n uulazyfire(\"canvas\");\r\n uulazyfire(\"audio\");\r\n uulazyfire(\"video\");\r\n}", "function createWindow () {\n\n mainWindow = new BrowserWindow({\n show: false,\n width: 1000, height: 800,\n minWidth: 1000, minHeight:500,\n titleBarStyle: 'hidden',\n icon: '../img/icon.png',\n webPreferences: {\n sandbox: false,\n nodeIntegration: true }\n })\n\n secWindow = new BrowserWindow({\n show: false,\n alwaysOnTop:true,\n width: 600, height: 750,\n resizable: false,\n titleBarStyle: 'hidden',\n parent:mainWindow,\n modal:true,\n webPreferences: { \n nodeIntegration: true }\n })\n\n\n // Load index.html into the new BrowserWindow\n\n secWindow.loadFile('views/privacyact.ejs')\n secWindow.once(\"ready-to-show\",()=> {secWindow.show() })\n \n mainWindow.loadFile('views/index.ejs')\n mainWindow.once(\"ready-to-show\",()=> {mainWindow.show() })\n\n\n\n // Open DevTools - Remove for PRODUCTION!\n //mainWindow.webContents.openDevTools();\n\n // Listen for window being closed\n mainWindow.on('closed', () => {\n mainWindow = null\n })\n\n secWindow.on('closed', () => {\n secWindow = null\n })\n}", "function main() {\n init(fontSize);\n\n renderModel = ReadModel();\n renderUI = ReaderBaseFrame(RootContainer);\n renderModel.init(function (data) {\n renderUI(data);\n });\n\n EventHandler();\n }", "function Main()\r{\r try\r {\r var document = app.activeDocument\r\r if ( document != null )\r SetVisibleLayers(document.layers);\r //document.save(); \r //document.close();\r }\r catch (e)\r {\r alert(SCRIPT_NAME + \" execution stopped, error: \" + \"\\n\\n\" + e);\r }\r}", "function getMainWindow(callback) {\n if (!mainWindow) {\n paragon.app.window.getById('main', function (win) {\n mainWindow = win;\n callback(win);\n });\n } else {\n callback(mainWindow);\n }\n }", "function bindDocumentClickFunction(){\r\n\t\t$(document).on(\"click\", function(e) {\r\n\t\t\tif ($(e.target).closest(\"#xel_textAreaDiv\").length === 0) {\r\n\t\t\t\t if(xelPopUpTextAreaDisplayed){\r\n\t\t\t\t\thidePopTextAreaAndResetFocus(ele);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t}", "function main() {\n\n // Sets AsciiDoc file from url query string \n const params = new URLSearchParams(location.search);\n let aDocName = params.get('aDoc');\n if (aDocName === null || aDocName === '') {\n aDocName = 'indice';\n }\n aDoc = aDocs.find(aDoc => aDoc.name === aDocName);\n \n // Updates UI with HTML content from AsciiDoc file\n updateDocContents(aDoc);\n}", "initial() {\n this._window = getRootWindow();\n }", "function startObserving(rootDocument) {\n if (refCount === 0) {\n eventManager.addEventListener(rootDocument, 'keydown', function (event) {\n if (!pressedKeys.has(event.keyCode)) {\n pressedKeys.add(event.keyCode);\n }\n });\n eventManager.addEventListener(rootDocument, 'keyup', function (event) {\n if (pressedKeys.has(event.keyCode)) {\n pressedKeys.delete(event.keyCode);\n }\n });\n eventManager.addEventListener(rootDocument, 'visibilitychange', function () {\n if (rootDocument.hidden) {\n pressedKeys.clear();\n }\n });\n eventManager.addEventListener(rootDocument.defaultView, 'blur', function () {\n pressedKeys.clear();\n });\n }\n\n refCount += 1;\n}", "function startObserving(rootDocument) {\n if (refCount === 0) {\n eventManager.addEventListener(rootDocument, 'keydown', function (event) {\n if (!pressedKeys.has(event.keyCode)) {\n pressedKeys.add(event.keyCode);\n }\n });\n eventManager.addEventListener(rootDocument, 'keyup', function (event) {\n if (pressedKeys.has(event.keyCode)) {\n pressedKeys.delete(event.keyCode);\n }\n });\n eventManager.addEventListener(rootDocument, 'visibilitychange', function () {\n if (rootDocument.hidden) {\n pressedKeys.clear();\n }\n });\n eventManager.addEventListener(rootDocument.defaultView, 'blur', function () {\n pressedKeys.clear();\n });\n }\n\n refCount += 1;\n}", "function _onCurrentDocumentChange() {\n var doc = DocumentManager.getCurrentDocument(),\n container = _editorHolder.get(0);\n \n var perfTimerName = PerfUtils.markStart(\"EditorManager._onCurrentDocumentChange():\\t\" + (!doc || doc.file.fullPath));\n\n // Remove scroller-shadow from the current editor\n if (_currentEditor) {\n ViewUtils.removeScrollerShadow(container, _currentEditor);\n }\n \n // Update the UI to show the right editor (or nothing), and also dispose old editor if no\n // longer needed.\n if (doc) {\n _showEditor(doc);\n ViewUtils.addScrollerShadow(container, _currentEditor);\n } else {\n _showNoEditor();\n }\n\n\n PerfUtils.addMeasurement(perfTimerName);\n }", "function init() {\n console.debug(\"Document Load and Ready\");\n\n listener();\n initGallery();\n cargarAlumnos();\n\n // mejor al mostrar la modal\n // cargarCursos();\n}", "function renderMainWindow () {\n\tvar targetMainPage = process.cwd() + '/html/main.html';\n\n\tvar html = fs.readFileSync(targetMainPage, 'utf8');\n\n\t$('#window').append(html);\n}", "function createMainWindow() {\n //Crétion de la novelle fenêtre\n mainWindow = new BrowserWindow({\n icon: path.join(__dirname, '/img/mainIco.png'),\n width: 870,\n height: 565,\n webPreferences: {\n nodeIntegration: true\n },\n transparent: true,\n frame: false,\n });\n\n //Chargement la page HTML dans l'application\n mainWindow.loadURL(url.format({\n pathname: path.join(__dirname, 'views/accueil.html'),\n protocol: 'file:',\n slashes: true\n }));\n\n\n\n //Quit app when closed\n //fermer toutes les fenetres à la fermeture de la fenêtre mere\n mainWindow.on('closed', function () {\n // Dereference the window object, usually you would store windows\n // in an array if your app supports multi windows, this is the time\n // when you should delete the corresponding element.\n mainWindow = null\n app.quit();\n });\n\n // Open the DevTools.\n //mainWindow.webContents.openDevTools();\n\n //Construction du menu\n //const mainMenu = Menu.buildFromTemplate(mainMenuTemplate);\n //Insertion du l'item dans le menu\n //Menu.setApplicationMenu(mainMenu);\n}", "function addDocumentClickListener() {\n document.addEventListener('click', onDocumentClick, true);\n }", "triggerDoc() {\n window.open(config.docs.cubeWiki);\n }", "activate() {\n this._setDocumentTitle();\n }", "function createWindow() {\n\n //Initialize sql database when window is created\n const server = require('./javascript/dbService')\n \n // Create Main window with custom size\n win = new BrowserWindow({\n width: 900,\n height: 680,\n webPreferences: {\n nodeIntegration: true\n }\n })\n\n bookmarkWindow = new BrowserWindow({\n width: 400,\n height: 380,\n parent: win,\n show: false,\n webPreferences: {\n nodeIntegration: true\n }\n })\n\n newBookmarkWindow = new BrowserWindow({\n width: 400,\n height: 380,\n parent: win,\n show: false,\n webPreferences: {\n nodeIntegration: true\n }\n })\n\n // load selected html file on the main window\n win.loadFile('./src/index.html')\n bookmarkWindow.loadFile('./src/bm.html')\n newBookmarkWindow.loadFile('./src/newbookmark.html')\n // Open the DevTools.\n win.webContents.openDevTools()\n\n //disable webconsole\n //win.webContents.on(\"devtools-opened\", () => { win.webContents.closeDevTools()})\n\n/*\n bookmarkWindow.webContents.on('did-finish-load', () => {\n bookmarkWindow.webContents.send('ping', 'pong')\n })*/\n\n \n // Clear variable when application window is closed\n win.on('closed', () => {\n win = null\n })\n\n bookmarkWindow.on('close', (e) => {\n e.preventDefault()\n bookmarkWindow.hide()\n })\n\n newBookmarkWindow.on('close', (e) => {\n e.preventDefault()\n newBookmarkWindow.hide()\n })\n\n\n}", "function init2(){\t\n\tdomViewer.initialize()\n\tcomputedStyleViwer.initialize()\n\t\n\tif(!window.arguments){\n\t\twinService = Components.classes[\"@mozilla.org/appshell/window-mediator;1\"].getService(Components.interfaces.nsIWindowMediator);\n\t\tvar fWins=winService.getEnumerator('');\n\t\twhile(fWins.hasMoreElements()){\t\t\t\n\t\t\tmWindow=fWins.getNext()\t\t\t\n\t\t} \n\t\twinService.getZOrderDOMWindowEnumerator('', true);\n\t\tdomViewer.setWindow(mWindow)\n\t}else{\t\t\n\t\tinspect(window.arguments[0],window.arguments[1])\n\t}\t\n\t\n\t\n\t//dump(window.arguments,window.arguments[0],window.arguments[1])\n}", "function EditorSharedStartup() {\n // Just for convenience\n gContentWindow = window.content;\n\n // Disable DNS Prefetching on the docshell - we don't need it for composer\n // type windows.\n GetCurrentEditorElement().docShell.allowDNSPrefetch = false;\n\n // Set up the mime type and register the commands.\n if (IsHTMLEditor()) {\n SetupHTMLEditorCommands();\n } else {\n SetupTextEditorCommands();\n }\n\n // add observer to be called when document is really done loading\n // and is modified\n // Note: We're really screwed if we fail to install this observer!\n try {\n var commandManager = GetCurrentCommandManager();\n commandManager.addCommandObserver(\n gEditorDocumentObserver,\n \"obs_documentCreated\"\n );\n commandManager.addCommandObserver(\n gEditorDocumentObserver,\n \"cmd_setDocumentModified\"\n );\n commandManager.addCommandObserver(\n gEditorDocumentObserver,\n \"obs_documentWillBeDestroyed\"\n );\n commandManager.addCommandObserver(\n gEditorDocumentObserver,\n \"obs_documentLocationChanged\"\n );\n\n // Until nsIControllerCommandGroup-based code is implemented,\n // we will observe just the bold command to trigger update of\n // all toolbar style items\n commandManager.addCommandObserver(gEditorDocumentObserver, \"cmd_bold\");\n } catch (e) {\n dump(e);\n }\n\n var isMac = AppConstants.platform == \"macosx\";\n\n // Set platform-specific hints for how to select cells\n // Mac uses \"Cmd\", all others use \"Ctrl\"\n var tableKey = GetString(isMac ? \"XulKeyMac\" : \"TableSelectKey\");\n var dragStr = tableKey + GetString(\"Drag\");\n var clickStr = tableKey + GetString(\"Click\");\n\n var delStr = GetString(isMac ? \"Clear\" : \"Del\");\n\n SafeSetAttribute(\"menu_SelectCell\", \"acceltext\", clickStr);\n SafeSetAttribute(\"menu_SelectRow\", \"acceltext\", dragStr);\n SafeSetAttribute(\"menu_SelectColumn\", \"acceltext\", dragStr);\n SafeSetAttribute(\"menu_SelectAllCells\", \"acceltext\", dragStr);\n // And add \"Del\" or \"Clear\"\n SafeSetAttribute(\"menu_DeleteCellContents\", \"acceltext\", delStr);\n\n // Set text for indent, outdent keybinding\n\n // hide UI that we don't have components for\n RemoveInapplicableUIElements();\n\n // Use browser colors as initial values for editor's default colors\n var BrowserColors = GetDefaultBrowserColors();\n if (BrowserColors) {\n gDefaultTextColor = BrowserColors.TextColor;\n gDefaultBackgroundColor = BrowserColors.BackgroundColor;\n }\n\n // For new window, no default last-picked colors\n gColorObj.LastTextColor = \"\";\n gColorObj.LastBackgroundColor = \"\";\n gColorObj.LastHighlightColor = \"\";\n}", "function addDocumentClickListener() {\n document.addEventListener('click', onDocumentClick, true);\n }", "function EmbeddedDocument() {\n Subdocument.apply(this, arguments);\n\n this.$session(this.ownerDocument().$session());\n }", "function EmbeddedDocument() {\n Subdocument.apply(this, arguments);\n\n this.$session(this.ownerDocument().$session());\n }", "function EmbeddedDocument() {\n Subdocument.apply(this, arguments);\n\n this.$session(this.ownerDocument().$session());\n }", "function createWindow () {\n\n //BrowserWindow represente une fenetre\n mainWindow = new BrowserWindow({\n width: 1024,\n height: 500,\n icon: './assets/IT-Akademy.png',\n title: 'login', //'Task Organiser & Deployment Of',\n center: true//,\n //frame: false, //bordure de la fenetre\n //show: false\n }); // on définit une taille pour notre fenêtre\n\n mainWindow.loadURL(`file://${__dirname}/main.html`); // on doit charger un chemin absolu\n\n mainWindow.on('closed', () => {\n mainWindow = null;\n });\n\n //mainWindow.show();\n\n const childWindow = new BrowserWindow({\n parent: mainWindow,\n width: 810,\n height: 456,\n //x: 400,\n //y: 400,\n icon: '/assets/logo.png',\n title: 'enfant',\n show: false\n //frame: false\n });\n\n childWindow.loadURL(`file://${__dirname}/start.html`);\n\n childWindow.on('close', function(event){\n childWindow.hide();\n event.preventDefault();\n //mainWindow.show();\n });\n\n}", "initListeners() {\n // main ui component toggles visibility of the calendar body\n this.uiComponents.outerContainer.addEventListener('click', (e) => {\n if (e.target !== this.uiComponents.outerContainer) return;\n this.open = !this.open;\n // const currViz = this.uiComponents.calendarBody.style.visibility;\n // this.uiComponents.calendarBody.style.visibility = currViz === 'hidden' ? 'visible' : 'hidden';\n });\n\n this.iterators.left.addEventListener('mousedown', () => {\n if (this.disabled) return;\n this.iterateWeek(-1);\n });\n\n this.iterators.right.addEventListener('mousedown', () => {\n if (this.disabled) return;\n this.iterateWeek(1);\n });\n }", "function globalUpdate() {\n document.querySelectorAll(\".note\").forEach((e) => e.remove()); //cleares window\n moveSelected(false);\n\n allNotes.forEach((element) => {\n if (element.titleOfNoteBook == openNotebook && element.delete != true) {\n main.prepend(element.noteElement);\n }\n });\n}", "function main() {\n addEventListeners();\n addAdvancedEventListeners();\n}", "openDocuments() {\n if (this.thread) {\n this.thread.open();\n } else {\n this._openDocuments();\n }\n }", "function showMainPage(){\n\t\t\t$(\"#loginDiv\").addClass(\"analyst-login-div-hide\");\n\t\t\t$(\"#analystMainPage\").removeClass(\"analys-main-page-hide\");\n\t\t\tpopulateAllDocs();\n\t\t}", "connectedCallback () {\n this._container.addEventListener('click', e => {\n for (let application of this._applications) {\n if (e.target === application) {\n this._windowHandler.addWindow(new SubWindow(application.getNewApplication(), true, application.getIconURL()),\n application.getApplication(application.getNoOfApplicationInstances() - 1).getWidthRequired(),\n application.getApplication(application.getNoOfApplicationInstances() - 1).getHeightRequired() + this._headerSize)\n this._dragger.startListening()\n let app = application.getApplication(application.getNoOfApplicationInstances() - 1)\n // If application is life-game, set eventlistener\n if (application.getName() === 'life') {\n app.addEventListener('sentimage', e => {\n let imgURL = app.getSnapShot()\n for (let application2 of this._applications) {\n if (application2.getName() === 'chat') {\n application2.getAllApplications().forEach(function (element) {\n element.importImageURL(imgURL)\n element.pasteImage()\n })\n }\n }\n })\n }\n }\n }\n })\n\n this._AppContainer.addEventListener('mouseover', e => {\n // Make sure element moves to front\n this._windowHandler.incrementZindex()\n this._windowHandler.unfocusAllWindows()\n this._AppContainer.style.zIndex = this._windowHandler.getHighestZindex()\n this._applications.forEach((element) => {\n element.style.visibility = 'visible'\n })\n\n // And change size of bubble\n this._AppContainer.style.width = `${this._applications.length * (this._buttonWidth + this._buttonSpacer) +\n 2 * this._buttonSpacer}px`\n this._AppContainer.style.height = `${this._buttonHeight + 2 * this._buttonSpacer}px`\n })\n this._AppContainer.addEventListener('mouseout', e => {\n this._applications.forEach((element) => {\n element.style.visibility = 'hidden'\n })\n this._AppContainer.style.width = this._AppContIdleWidth\n this._AppContainer.style.height = this._AppContIdleHeight\n })\n }", "function windowWatcher(subject, topic) {\n if (topic == \"domwindowopened\")\n runOnLoad(subject);\n }", "function on_doc_down(event){\n \t//Toggle Cursor Menu Dropdown\n \tif (!event.target.matches('#dropBtn') && !event.target.classList.contains('menuBtn')) {\n \t closeMenu();\n \t}\n\n \t//Confirm name change of sidebar element if clicking outside of textbox\n \tif (editingList && event.target.type != 'text'){\n \t\tvar li = editingList.parentElement.parentElement;\n \t\tli.attached.name = editingList.value;\n \t\tli.innerHTML = editingList.value;\n \t\teditingList = false;\n \t\treturn false;\n \t}\n\n \t//Reset all object opacities\n \tfor (var i=0; i<scene.objects.length; i++){\n \t\tif (scene.objects[i] != SELECTED){\n \t\t\tscene.objects[i].material.opacity = 1;\n \t\t}\n \t}\n\n \t//Select a cube if name in sidebar is clicked, otherwise unselect all\n \tif (event.target != renderer.domElement){\n \t\tif (event.target.localName == \"li\"){\n \t\t\tif(SELECTED){\n \t\t\t\tunselect();\n \t\t\t}\n \t\t\t// console.log(\"select!\");\n \t\t\tselectObj(event.srcElement.attached);\n \t\t}\n \t}\n }", "function main() {\n addEventListeners();\n}", "function eventWindowLoaded() {\n\tcanvasApp();\t\n}", "function main() {\n var ui = MyApp.ui,\n widget = MyApp.widget;\n\n // SC.View initially has no layers, so you'll add your widget to your \n // view's layers so it can display itself and receive events.\n ui.get('layers').pushObject(widget);\n\n // Next, you'll tell `SC.app` that you want your `SC.View` surface to \n // become the app's user interface ('ui'). Each app has only one active \n // `ui` surface, though you can change it at any time.\n SC.app.set('ui', ui);\n\n // You can also add arbitary surfaces to the application using \n // `SC.app.addSurface(...)`, but this is for a more advanced tutorial.\n}", "function main(){\r// setup some variables\rvar d = app.documents.add(); // active doc\rvar pg = d.pages.item(0); // first page\rvar tf = pg.textFrames.add(); // the one textframe that is there\r\r// the function buildBounds(app.documents.item());\r// calculates the size of the textframe\rtf.geometricBounds = buildBounds(d);\r\r\rtf.contents = \"Hello World\";\r\r// now we can loop thru the text\r\rfor(var i = 0;i < tf.characters.length; i++){\r\tvar c = tf.characters[i];\r\t// the next line loops thru all characters in the text\r\tc.pointSize = calcVal(23);\r\t}\r\r\r}", "function showDocumentForm(id,type,subType) {\r\n\tvar documentFormWin = null;\r\n\tvar urlPrefix = \"\";\r\n\t\r\n\tif(Strings.isEmpty(id) || Strings.isEmpty(type)) {\r\n\t\treturn;\r\n\t}\r\n\r\n\turlPrefix = \"/app/\" + $F('APP_NAME') + \"/document/\" + type ;\r\n\r\n\tif(!Strings.isEmpty(subType)) {\r\n\t\turlPrefix += \"/\" + subType ;\r\n\t}\r\n\turlPrefix += \"/form/\" ;\r\n\tvar url = urlPrefix + id + \"/show\";\r\n \r\n\tvar qs = new QueryString();\r\n\tdocumentFormWin = new Launcher('documentFormWin', url);\r\n\tdocumentFormWin.arguments = qs;\r\n\tdocumentFormWin.setCord({y:30, x:50, w:1080, h:650});\r\n\tdocumentFormWin.callBack = function(){documentFormWin = null;};\r\n\tdocumentFormWin.open();\r\n}", "function main() {\n\n\t$(\"#nav-search-btn\").on(\"click\", function(e) {\n\t\te.preventDefault();\n\t\tif ($(\"#ex1\").val()) {\n\t\t\t$(\".search\").empty();\n\t\t\t$(\".search\").show();\n\t\t\t$(\".notSearch\").hide();\n\t\t\tlet userQuery = $(\"#ex1\").val().toLowerCase();\n\t\t\tsearchEndPoint(userQuery);\n\t\t}\n\t});\n\n\t$(\"#reportSearch\").on(\"click\", function(e) {\n\t\tconsole.log(\"Reportar\");\n\t\tlet reported = $('.rightSearch').attr('id');\n\t\tgetReported(reported);\n\t});\n\n\t$(\".searches-container\").on(\"click\", function(e) {\t\t\n\t\twindow.scroll({\n\t\t\ttop: 0, \n\t\t\tleft: 0, \n\t\t\tbehavior: 'smooth'\n\t\t});\n\t\tdisplaySearch(e.target.id);\n\t});\n}", "function onDocumentMouseDown(e){\n \t//right click\n \tif(e.button == 2){\n \t\t//create a basic right click dialog if no object is selected\n \t\t//if(CurrentObject == null){\n \t\t\tvar r = new RightClickDialog(e.clientX, e.clientY);\n \t\t//}\n \t}\n \t//left click\n \telse if (e.button == 0){\n \t\t//check to see we're not clicking on any generated UI\n \t\tif(e.target.id == \"WindowOverlay\"){\n \t\t\t//translate to world space\n\t \t\tvar mouse = new THREE.Vector3();\n\t \t\tmouse.x = ( e.clientX / window.innerWidth ) * 2 - 1;\n\t\t\t\tmouse.y = - ( e.clientY / window.innerHeight ) * 2 + 1;\n\n\t\t\t\t//get raycast starting position\n\t\t\t\tvar vector = new THREE.Vector3( mouse.x, mouse.y, 0.5 );\n\t\t\t\tvar projector = new THREE.Projector();\n\t\t\t\tprojector.unprojectVector( vector, RTS.Camera );\n\n\t\t\t\t//make raycaster\n\t\t\t\tvar raycaster = new THREE.Raycaster( RTS.CameraHolder.position, vector.sub( RTS.CameraHolder.position ).normalize() );\n\t\t\t\t//check for intersections on geometry\n\t\t\t\tvar GeometryIntersections = raycaster.intersectObjects(ActiveObjects);\n\n\t\t\t\t//check for intersections on an active handle\n\t\t\t\tvar HandleClicked = IS.checkHandleClicked(new THREE.Vector3( mouse.x, mouse.y, 0.5 ));\n\n\t\t\t\tif(GeometryIntersections.length > 0 && HandleClicked == false){\n\t\t\t\t\t//we have intersected with an object\n\n\t\t\t\t\t//choose the closest intersection\n\t\t\t\t\tvar index = 0;\n\t\t\t\t\tvar shortestLength = Infinity;\n\t\t\t\t\tfor(var i = 0; i < GeometryIntersections.length; i ++){\n\t\t\t\t\t\tif(GeometryIntersections[i].distance < shortestLength){\n\t\t\t\t\t\t\tshortestLength = GeometryIntersections[i].distance;\n\t\t\t\t\t\t\tindex = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t//check to see if the object already has a handle attached\n\t\t\t\t\tvar HandleAttached = false;\n\t\t\t\t\tfor(var i = 0; i < GeometryIntersections[index].object.children.length; i ++){\n\t\t\t\t\t\tif(GeometryIntersections[index].object.children[i].name == \"Handle\") HandleAttached = true;\n\t\t\t\t\t}\n\n\t\t\t\t\t//if the object has no children, give it a handle, set that handle as our active handle\n\t\t\t\t\tif(!HandleAttached){\n\t\t\t\t\t\tIS.changeObjectAndHandle(GeometryIntersections[index].object);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\telse if(GeometryIntersections.length == 0 && !HandleClicked){\n\t\t\t\t\tIS.removeHandle();\n\t\t\t\t}\n \t\t}\n\n \t\t\n \t}\n \t\n }", "function postWindowInit() {\n \n // Hide disabled books on chooser\n useFirstAvailableBookIf();\n ViewPort.disableMissingBooks(getPrefOrCreate(\"HideDisabledBooks\", \"Bool\", false));\n \n // Open language menu if a new locale was just installed\n if ((!document.getElementById(\"sub-lang\").disabled && XS_window.NewModuleInfo.showLangMenu) || \n XS_window.NewModuleInfo.NewLocales.length) {\n var opmenu = getDataUI(\"menu.options\");\n var lamenu = getDataUI(\"menu.options.language\");\n var result={};\n var dlg = window.openDialog(\"chrome://xulsword/content/dialogs/dialog/dialog.xul\", \"dlg\", DLGSTD, result, \n fixWindowTitle(getDataUI(\"menu.options.language\")),\n XSBundle.getFormattedString(\"LangSelectMsg\", [opmenu, lamenu]), \n DLGINFO,\n DLGOK);\n openLanguageMenu();\n }\n \n // Enable help email address\n var email = null;\n try {email = prefs.getCharPref(\"HelpEmailAddress\");}\n catch (er) {}\n if (email) {\n var menu = document.getElementById(\"emailus\");\n menu.setAttribute(\"label\", email);\n menu.removeAttribute(\"hidden\");\n document.getElementById(\"emailus-sep\").removeAttribute(\"hidden\");\n }\n \n createHelpVideoMenu();\n \n checkCipherKeys();\n \n initBookmarksLocale(BM, BMDS);\n \n refreshAudioCatalog();\n for (var w=1; w<=NW; w++) {\n BibleTexts.updateAudioLinks(w);\n }\n updateBibleNavigatorAudio();\n\n}", "function windowWatcher(subject, topic) {\r\n if (topic == \"domwindowopened\")\r\n runOnLoad(subject);\r\n }", "function windowWatcher(subject, topic) {\n if (topic == \"domwindowopened\")\n runOnLoad(subject);\n }", "onOpenWindow(xulWindow) {\n var win = xulWindow.QueryInterface(Ci.nsIInterfaceRequestor)\n .getInterface(Ci.nsIDOMWindowInternal || Ci.nsIDOMWindow);\n win.addEventListener(\n \"load\",\n () => this.addWindowEventListeners(win),\n {once: true}\n );\n }", "function mainWindow()\n{\n\n\twin = new BrowserWindow({\n\t\twidth: 2048,\n\t\theight: 864,\n\t\tframe: false\n\t});\n\n\twin.loadURL('http://localhost:' + process.env.PORT + '/');\n\n\twin.on('closed', () => {\n\t\twin = null\n\t});\n\n\twin.webContents.openDevTools();\n\n\twin.webContents.on('devtools-opened', () => {\n\t\twin.webContents.closeDevTools();\n\t});\n}", "runApp() {\n this.addButton()\n this.allPanes = document.createElement(\"div\")\n this.allPanes.id = \"allpanes\"\n this.applicationHolder.append(this.allPanes)\n this.btn.click()\n }", "getDocumentStart() {\n let block = this.viewer.pages[0].bodyWidgets[0].childWidgets[0];\n return this.setPositionForBlock(block, true);\n }", "function WindowListener() {\n this._init.apply(this, arguments);\n}", "function loadedXUL() {\n //start_venkman();\n\n initCSS();\n \n document.getElementById(\"topbox\").setAttribute(\"libSwordLoadFailed\", LibSword.loadFailed ? \"true\":\"false\");\n document.getElementById(\"topbox\").setAttribute(\"hasBible\", LibSword.hasBible ? \"true\":\"false\");\n \n document.title = fixWindowTitle(XSBundle.getString(\"Title\"));\n \n //To make the program window draw cleaner and faster, size initialization \n //routines use prefs to size the frames since window size is not available during \n //initialization. However, the first time the program is run, there are no size prefs \n //as yet. The solution in this case is to init everything using a timeout so that \n //window size is then available and can be stored into the size prefs before the frames \n //are initialized.\n try {prefs.getIntPref(\"ViewPortHeight\");}\n catch (er) {\n document.getElementById('main-viewport').style.visibility = 'hidden';\n window.setTimeout(function () {\n loadedXUL2();\n document.getElementById('main-viewport').style.visibility = '';\n }, 0);\n return;\n }\n \n loadedXUL2();\n}", "function initWnd() {\n if (textWnd!=null && tocWnd!=null) {\n return;\n }\n if (parent!=self) {\n if (parent.frames.length>1 && parent.frames[0]==self) {\n if (parent.frames[1].length>1 && parent.frames[1].FRAME_BODY!=null) {\n // new UHB layout (BOOK: 1 + 2 frames)\n textWnd = parent.frames[1].FRAME_BODY ;\n tocWnd = parent.frames[1].FRAME_TOC ;\n }\n else {\n // new UHB layout (HUB etc.: 2 frames)\n textWnd = parent.frames[1] ;\n tocWnd = null ;\n }\n }\n }\n}", "function init() {\n wndConversations = Cc['@mozilla.org/appshell/window-mediator;1']\n .getService(Ci.nsIWindowMediator)\n .getMostRecentWindow('SamePlace:Conversations');\n\n if(!wndConversations) {\n wndConversations = window.open(\n 'chrome://sameplace/content/conversations/conversations.xul',\n 'SamePlace:Conversations', 'chrome');\n\n wndConversations.addEventListener('load', function(event) {\n setTimeout(function() { wndConversations.hide(); });\n }, false);\n }\n\n window.addEventListener('contact/select', selectedContact, false);\n}", "function ShowSearchResultsWindow() {\n var newWindow = window.open(\"about:blank\", \"searchValue\", \"width=500, height=300, resizable=yes, maximizable=no, status=yes, scrollbars=yes\");\n newWindow.document.write('<html>\\n<head>\\n<title>Search Results</title>\\n');\n newWindow.document.write('</head>\\n');\n newWindow.document.write('<body>\\n');\n\n //Fill SearchResults List\n for(var i=0;((i<SearchResults.length) && (i<500));i++) {\n //Search Topic Title\n var aTitle = SearchTitles[SearchResults[i]];\n //URL\n var aURL = SearchFiles[SearchResults[i]];\n\n newWindow.document.write('<p>Title: '+ aTitle +'<br>\\n');\n newWindow.document.write('URL: <a href=\"'+ aURL +'\">'+aURL+'</a></p>\\n');\n }\n\n newWindow.document.write(\"</body>\\n\");\n newWindow.document.write(\"</html>\\n\");\n newWindow.document.close();\n// self.name = \"main\";\n}", "function displayDocuManager() {\n\n\t// clear\n\t$(\".controlContentBlock[id=compare-manage] > ol\").empty();\n\n\t// show each corpus\n\tfor (let corpusName in _dataset) {\n\t\tif (typeof _dataset[corpusName] !== 'object') continue;\n\t\tlet manageItem = \"<li name=\\\"\" + corpusName + \"\\\">\" + corpusName + \"</li>\";\n\t\tlet className = (_dataset[corpusName].isShow) ?\"glyphicon-eye-open\" :\"glyphicon-eye-close\";\n\t\tlet hideBtn = \"<span class=\\\"glyphicon \" + className + \"\\\" name=\\\"\" + corpusName + \"\\\" onclick=\\\"hideOrShowCorpus(this, '\"+corpusName+\"')\\\"></span>\";\n\t\tlet deleteBtn = \"<span class=\\\"glyphicon glyphicon-trash\\\" name=\\\"\" + corpusName + \"\\\" onclick=\\\"deleteCorpus('\" + corpusName + \"')\\\"></span>\";\n\t\t$(\".controlContentBlock[id=compare-manage] > ol\").append(manageItem + hideBtn + deleteBtn);\n\t}\n}", "attachToAllVisible() {\n for (const editor of vscode.window.visibleTextEditors) {\n this.ensure(editor.document.uri.toString(), editor.document);\n }\n }", "function createWindow() {\n mainWindow = new BrowserWindow({ width: 680, height: 520, titleBarStyle: 'hidden', title: 'elabel' ,icon: iconPath });\n mainWindow.loadURL(url.format({\n pathname: path.join(__dirname, 'index.html'),\n protocol: 'file:',\n slashes: true\n }));\n //abre o devtools do browser, em produção isso deve estar comentado\n if (process.env.MODE == \"dev\") {\n mainWindow.webContents.openDevTools();\n } \n\n //ao acionar o fechamento da janela executar\n mainWindow.on('closed', () => {\n mainWindow = null;\n });\n\n //chamada de metodo ao finalizar o carregamento da janela\n mainWindow.webContents.on('did-finish-load', () => {\n //disparar a ação estabelecida em render ao terminar o carregamento\n mainWindow.webContents.send('did-finish-load');\n });\n}", "constructor() {\n\t\t/**\n\t\t * Selection done on this document.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/view/documentselection~DocumentSelection} module:engine/view/document~Document#selection\n\t\t */\n\t\tthis.selection = new DocumentSelection();\n\n\t\t/**\n\t\t * Roots of the view tree. Collection of the {@link module:engine/view/element~Element view elements}.\n\t\t *\n\t\t * View roots are created as a result of binding between {@link module:engine/view/document~Document#roots} and\n\t\t * {@link module:engine/model/document~Document#roots} and this is handled by\n\t\t * {@link module:engine/controller/editingcontroller~EditingController}, so to create view root we need to create\n\t\t * model root using {@link module:engine/model/document~Document#createRoot}.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:utils/collection~Collection} module:engine/view/document~Document#roots\n\t\t */\n\t\tthis.roots = new Collection( { idProperty: 'rootName' } );\n\n\t\t/**\n\t\t * Defines whether document is in read-only mode.\n\t\t *\n\t\t * When document is read-ony then all roots are read-only as well and caret placed inside this root is hidden.\n\t\t *\n\t\t * @observable\n\t\t * @member {Boolean} #isReadOnly\n\t\t */\n\t\tthis.set( 'isReadOnly', false );\n\n\t\t/**\n\t\t * True if document is focused.\n\t\t *\n\t\t * This property is updated by the {@link module:engine/view/observer/focusobserver~FocusObserver}.\n\t\t * If the {@link module:engine/view/observer/focusobserver~FocusObserver} is disabled this property will not change.\n\t\t *\n\t\t * @readonly\n\t\t * @observable\n\t\t * @member {Boolean} module:engine/view/document~Document#isFocused\n\t\t */\n\t\tthis.set( 'isFocused', false );\n\n\t\t/**\n\t\t * True if composition is in progress inside the document.\n\t\t *\n\t\t * This property is updated by the {@link module:engine/view/observer/compositionobserver~CompositionObserver}.\n\t\t * If the {@link module:engine/view/observer/compositionobserver~CompositionObserver} is disabled this property will not change.\n\t\t *\n\t\t * @readonly\n\t\t * @observable\n\t\t * @member {Boolean} module:engine/view/document~Document#isComposing\n\t\t */\n\t\tthis.set( 'isComposing', false );\n\n\t\t/**\n\t\t * Post-fixer callbacks registered to the view document.\n\t\t *\n\t\t * @private\n\t\t * @member {Set}\n\t\t */\n\t\tthis._postFixers = new Set();\n\t}", "constructor()\n {\n super();\n this.addHandlerShowWindow();\n this.addHandlerHideWindow();\n }", "function createUI(){\n\n /**\n * @class DocumentMobileApp\n */\n enyo.kind(\n /** @lends DocumentMobileApp.prototype */\n {\n name: 'DocumentMobileApp',\n kind: enyo.Control,\n layoutKind: 'FittableRowsLayout',\n\n create: function(){\n this.inherited(arguments);\n renderTemplateDiv();\n this.processGETParameters();\n },\n\n published: {\n searchWord: '',\n checkedEntities: [],\n lang: 'en'\n },\n\n components: [\n { kind: 'Panels', name: 'panels', fit: true, arrangerKind: 'CollapsingArranger', components: [\n {\n kind: 'LeftPanel',\n name: 'leftPanel',\n classes: 'leftPanel',\n searchFunction: 'search',\n bookmarkFunction: 'createBookmark',\n popupBookmarkFunction: 'popupBookmark'\n },\n {\n kind: 'MiddlePanel',\n name: 'middlePanel',\n mainSearchFunction: 'search',\n openDocFunction: 'openDoc',\n documentsCountClass: 'documentsMobileCount',\n moreDocumentsFunction: 'moreDocuments'\n },\n {\n kind: 'RightPanel',\n name: 'rightPanel',\n closeParentFunction: 'searchShow'\n }\n ]},\n { kind: 'ClosablePopup', name: 'bookmarkPopup', classes: 'bookmarkMobilePopup', closeButtonClasses: 'popupCloseButton' }\n ],\n\n /**\n * This function processes GET parameters. If it finds 'search' or\n * 'entity', it fires a search and open the document if there is the\n * 'openPreview' parameter.\n\t\t\t\t * @method processGETParameters\n */\n processGETParameters: function(){\n // Search\n this.search(GetURLParameter('search')[0], GetURLParameter('entity'));\n // Open Document\n var openPreview = GetURLParameter('openPreview')[0];\n if(!isEmpty(openPreview)){\n this.openDoc(openPreview);\n }\n },\n\n /**\n * This function returns whether the window width is mobile size or not.\n\t\t\t\t * @method isMobileSize\n * @return {Boolean} true, if the screen size is maximum 800 pixels, otherwise false\n */\n isMobileSize: function(){\n return jQuery(window).width() <= 800;\n },\n\n /**\n\t\t\t\t * This function shows the middle panel.\n\t\t\t\t * @method searchShow\n\t\t\t\t */\n searchShow: function(){\n this.$.panels.setIndex(1);\n },\n\n /**\n\t\t\t\t * This function shows the left panel.\n\t\t\t\t * @method entityShow\n\t\t\t\t */\n entityShow: function(){\n this.$.panels.setIndex(0);\n },\n\n /**\n * This function opens a document in the preview panel.\n * If the screen size is small, it shows the right panel only.\n\t\t\t\t * @method openDoc\n * @param {String} documentURI the document URI to be opened\n */\n openDoc: function(documentURI, type){\n if(this.isMobileSize()){\n this.$.panels.setIndex(2);\n }\n this.$.rightPanel.openDoc(documentURI);\n this.$.middlePanel.$.documents.sendDocListAnnotation(documentURI, type, 'true');\n },\n\t\t\t\t\n /**\n * This function updates the 'open' buttons (e.g. the\n * 'entities button' in the middle).\n\t\t\t\t * @method updateButtons\n */\n updateButtons: function(){\n if(!this.isMobileSize()){\n this.$.leftPanel.hideDocsButton();\n this.$.middlePanel.hideEntitiesButton();\n this.$.rightPanel.hideBackButton();\n } else {\n this.$.leftPanel.showDocsButton();\n this.$.middlePanel.showEntitiesButton();\n this.$.rightPanel.showBackButton();\n }\n },\n\n /**\n * This function is called when the screen size is changing or\n * the user rotates the device. This function sets the actual panel\n\t\t\t\t * according to the screen size, updates the buttons, and changes\n\t\t\t\t * the position of the bookmark popup.\n\t\t\t\t * @method reflow\n */\n reflow: function() {\n this.inherited(arguments);\n if(!isEmpty(this.$.bookmarkPopup.getContent())){\n this.changeBMPopupPosition();\n }\n if(this.isMobileSize()){\n // If the 3. panel is the active, it means that the user's\n // keyboard appears on the mobile device -> we have to do nothing\n if(this.$.panels.getIndex() !== 2){\n this.$.panels.setIndex(1); \n }\n } else {\n this.$.panels.setIndex(0);\n }\n this.updateButtons();\n },\n\n /**\n * This function creates and saves a bookmark. It contains the\n * search word, the unchecked entities and the opened document.\n\t\t\t\t * @method createBookmark\n */\n createBookmark: function(){\n if(!isEmpty(this.searchWord)){\n // Cut characters after '?'\n var location = window.location.href;\n var parametersIndex = location.indexOf('?');\n if(parametersIndex !== -1){\n location = location.substr(0, parametersIndex);\n }\n // Search word\n var url = location + '?search=' + this.searchWord;\n // Unchecked entities\n var entities = this.getCheckedEntities();\n for(var i=0;i<entities.length;i++){\n if(!isEmpty(entities[i].id)){\n url += '&entity=' + entities[i].id;\n } else {\n url += '&entity=' + entities[i];\n }\n }\n // Preview document\n var documentURL = this.$.rightPanel.getDocumentURI();\n if(!isEmpty(documentURL)){\n url += '&openPreview=' + documentURL;\n }\n\n var title = 'Fusepool';\n this.$.middlePanel.saveBookmark(url, title);\n } else {\n this.$.middlePanel.saveBookmark();\n }\n },\n\n /**\n * This function shows a message in the bookmark popup.\n\t\t\t\t * @method popupBookmark\n * @param {String} message the message what the function shows\n */\n popupBookmark: function(message){\n this.$.bookmarkPopup.show();\n this.$.bookmarkPopup.setContent(message);\n this.changeBMPopupPosition();\n },\n\n /**\n * This function calculates the position of the popup to be \n * displayed in the middle of the screen.\n\t\t\t\t * @method changeBMPopupPosition\n */\n changeBMPopupPosition: function(){\n var margin = 30;\n var newWidth = jQuery('#' + this.$.middlePanel.getId()).width() - margin;\n var windowWidth = jQuery(document).width();\n var newLeft = (windowWidth - newWidth) / 2;\n \n this.$.bookmarkPopup.updateWidth(newWidth, margin);\n this.$.bookmarkPopup.applyStyle('left', newLeft + 'px');\n },\n\n /**\n * This function calls the ajax search if the search word is not empty.\n\t\t\t\t * @method search\n * @param {String} searchWord the search word\n * @param {Array} checkedEntities the unchecked entities on the left side\n */\n search: function(searchWord, checkedEntities){\n this.cleanPreviewBox();\n this.searchWord = searchWord;\n\t\t\t\t\tcreateCookie('lastSearch',searchWord,30);\n this.checkedEntities = checkedEntities;\n if(!isEmpty(searchWord)){\n this.$.middlePanel.startSearching();\n this.$.middlePanel.updateInput(this.searchWord);\n\n this.sendSearchRequest(searchWord, checkedEntities, 'processSearchResponse');\n }\n },\n\n /**\n * This function sends an ajax request for searching.\n\t\t\t\t * @method sendSearchRequest\n * @param {String} searchWord the search word\n * @param {String} checkedEntities the checked entities on the left side\n * @param {String} responseFunction the name of the response function\n * @param {Number} offset the offset of the documents (e.g. offset = 10 --> documents in 10-20)\n */\n sendSearchRequest: function(searchWord, checkedEntities, responseFunction, offset){\n var main = this;\n var url = this.createSearchURL(searchWord, checkedEntities, offset);\n var store = rdfstore.create();\n store.load('remote', url, function(success) {\n main[responseFunction](success, store);\n });\n },\n\n /**\n * This function creates the search URL for the query.\n\t\t\t\t * @method createSearchURL\n * @param {String} searchWord the search word\n * @param {Array} checkedEntities the checked entities\n * @param {Number} offset offset of the query\n * @return {String} the search url\n */\n createSearchURL: function(searchWord, checkedEntities, offset){\n\t\t\t\t\n\t\t\t\t\t// var labelPattern = /^.*'label:'.*$/;\n\t\t\t\t\t// if(labelPattern.test(searchWord)) {\n\t\t\t\t\t\n\t\t\t\t\t// }\n\t\t\t\t\t// var predictedLabelPattern = /^.*'predicted label:'.*$/;\n\t\t\t\t\t// if(predictedLabelPattern.test(searchWord)) {\n\t\t\t\t\t\n\t\t\t\t\t// }\n\t\t\t\t\t\n var url = CONSTANTS.SEARCH_URL;\n if(isEmpty(offset)){\n offset = 0;\n }\n url += '?search='+searchWord;\n if(checkedEntities.length > 0){\n url += this.getCheckedEntitiesURL(checkedEntities);\n }\n url += '&offset='+offset+'&maxFacets='+readCookie('maxFacets')+'&items='+readCookie('items');\n return url;\n },\n\n /**\n * This function send a request for more documents.\n\t\t\t\t * @method moreDocuments\n * @param {Number} offset the offset (offset = 10 --> document in 10-20)\n */\n moreDocuments: function(offset){\n this.sendSearchRequest(this.searchWord, this.checkedEntities, 'processMoreResponse', offset);\n },\n\n /**\n * This function runs after getting the response from the ajax\n\t\t\t\t * more search. It calls the document updater function.\n\t\t\t\t * @method processMoreResponse\n * @param {Boolean} success the search query was success or not\n * @param {Object} rdf the response rdf object\n */\n processMoreResponse: function(success, rdf){\n var documents = this.createDocumentList(rdf);\n this.$.middlePanel.addMoreDocuments(documents);\n },\n\n /**\n * This function creates a URL fraction that represents\n\t\t\t\t * the checked entities.\n\t\t\t\t * @method getCheckedEntitiesURL\n * @param {Array} checkedEntities the original checked entities\n * @return {String} built URL fraction\n */\n getCheckedEntitiesURL: function(checkedEntities){\n var result = '';\n for(var i=0;i<checkedEntities.length;i++){\n if(!isEmpty(checkedEntities[i].id)){\n result += '&subject=' + checkedEntities[i].id;\n } else {\n result += '&subject=' + checkedEntities[i];\n }\n }\n return result;\n },\n\n /**\n * This function runs after the ajax search is getting finished.\n\t\t\t\t * It calls the entity list updater and the document updater functions.\n\t\t\t\t * @method processSearchResponse\n * @param {Boolean} success state of the search query\n * @param {Object} rdf the response rdf object\n */\n processSearchResponse: function(success, rdf){\n\t\t\t\t\tif(success) {\n\t\t\t\t\t\tthis.updateEntityList(rdf, this.searchWord);\n\t\t\t\t\t\tthis.updateDocumentList(rdf);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tthis.$.middlePanel.$.documents.updateList([], this.searchWord);\n\t\t\t\t\t\tthis.$.middlePanel.updateCounts(0);\n\t\t\t\t\t}\n\t\t\t\t},\n\n /**\n * This function groups and sorts the entities and updates\n\t\t\t\t * the entity list on the left side.\n\t\t\t\t * @method updateEntityList\n * @param {Object} rdf the rdf object\n * @param {String} searchWord the search word\n */\n updateEntityList: function(rdf, searchWord){\n var checkedEntities = this.checkedEntitiesFromRdf(rdf);\n var categories = this.getCategories(rdf);\n\n var groupVars = _.groupBy(categories, function(val){ return val.value; });\n var sortedGroup = _.sortBy(groupVars, function(val){ return -val.length; });\n\n var dictionaries = [];\n for(var i=0;i<sortedGroup.length;i++){\n // One category\n var category = sortedGroup[i];\n if(category.length > 0){\n var categoryText = replaceAll(category[0].value, '_', ' ');\n var categoryName = categoryText.substr(categoryText.lastIndexOf('/')+1);\n\n var entities = [];\n for(var j=0;j<category.length;j++){\n this.deteleLaterEntities(sortedGroup, category[j].entity, i);\n // Entity\n var entityId = category[j].entityId;\n var entityText = replaceAll(category[j].entity + '', '_', ' ');\n var entityName = entityText.substr(entityText.lastIndexOf('/')+1);\n\n var entity = {id: entityId, text:entityName };\n if(!this.containsEntity(entities, entity)){\n entities.push(entity);\n }\n }\n dictionaries.push({ name: categoryName, entities: entities });\n }\n }\n var dictionaryObject = { searchWord: searchWord, checkedEntities: checkedEntities, dictionaries: dictionaries };\n this.$.leftPanel.updateDictionaries(dictionaryObject);\n },\n\n /**\n * This function searches for dictionary categories in an rdf object.\n\t\t\t\t * @method getCategories\n * @param {Object} rdf the rdf object that contains the categories\n * @return {Array} the categories array with the entities\n */\n getCategories: function(rdf){\n var categories = [];\n var query = 'SELECT * { ?id <http://www.w3.org/2000/01/rdf-schema#label> ?entity';\n query += ' OPTIONAL { ?id <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?type }';\n query += '}';\n rdf.execute(query, function(success, results) {\n if (success) {\n for(var i=0;i<results.length;i++){\n var row = results[i];\n\t\t\t\t\t\t\t\tif(!isEmpty(row.type)) {\n\t\t\t\t\t\t\t\t\tif(row.type.value.indexOf('#') === -1){\n\t\t\t\t\t\t\t\t\t\tcategories.push({entityId: row.id.value, entity: row.entity.value, value: row.type.value});\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n }\n }\n });\n return categories;\n },\n\n /**\n * This function searches for the checked entities in an rdf object\n\t\t\t\t * and returns the array of it.\n\t\t\t\t * @method checkedEntitiesFromRdf\n * @param {Object} rdf the rdf object\n * @return {Array} the checked entity list\n */\n checkedEntitiesFromRdf: function(rdf){\n var main = this;\n var checkedEntities = [];\n var query = 'SELECT * { ?s <http://fusepool.eu/ontologies/ecs#subject> ?id';\n query += ' OPTIONAL { ?id <http://www.w3.org/2000/01/rdf-schema#label> ?entity }';\n query += '}';\n rdf.execute(query, function(success, results) {\n if (success) {\n for(var i=0;i<results.length;i++){\n var row = results[i];\n if(!isEmpty(row.entity)){ \n var entity = {id: row.id.value, text: row.entity.value};\n if(!main.containsEntity(checkedEntities, entity)){\n checkedEntities.push(entity);\n }\n }\n }\n }\n });\n return checkedEntities;\n },\n\n /**\n * This function decides whether an entity list contains an entity or not.\n\t\t\t\t * @method containsEntity\n * @param {Array} entities array of the entities\n * @param {String} entity the entity\n * @return {Boolean} true if the list contains the entity, false otherwise\n */\n containsEntity: function(entities, entity){\n for(var i=0;i<entities.length;i++){\n if(entities[i].id === entity.id || entities[i].text.toUpperCase() === entity.text.toUpperCase()){\n return true;\n }\n }\n return false;\n },\n\n /**\n * This function deletes every entity from an array that equals\n * a given entity (after a given index).\n\t\t\t\t * @method deteleLaterEntities\n * @param {Array} array the array\n * @param {String} entity the checked entity\n * @param {Number} fromIndex the start index in the array\n */\n deteleLaterEntities: function(array, entity, fromIndex){\n for(var i=fromIndex+1;i<array.length;i++){\n var category = array[i];\n for(var j=0;j<category.length;j++){\n if(category[j].entity === entity){\n array[i].splice(j, 1);\n j--;\n }\n }\n }\n },\n\n /**\n * This function updates the document list in the middle.\n\t\t\t\t * @method updateDocumentList\n * @param {Object} rdf the rdf object that contains the new document list\n */\n updateDocumentList: function(rdf){\n var count = this.getDocumentsCount(rdf);\n this.$.middlePanel.$.documents.updateCounts(count);\n\t\t\t\t\tif(count>0) {\n\t\t\t\t\t\tvar documents = this.createDocumentList(rdf);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tvar documents = [];\n\t\t\t\t\t}\n this.$.middlePanel.updateDocuments(documents);\n },\n\n /**\n * This function deletes the content from the preview panel.\n\t\t\t\t * @method cleanPreviewBox\n */\n cleanPreviewBox: function(){\n this.$.rightPanel.clean();\n },\n\n /**\n * This function returns the count of documents in an rdf object.\n\t\t\t\t * @method getDocumentsCount\n * @param {Object} rdf the rdf object\n * @return {Number} count of documents\n */\n getDocumentsCount: function(rdf){\n var result = 0;\n var query = 'SELECT * { ?s <http://fusepool.eu/ontologies/ecs#contentsCount> ?o }';\n rdf.execute(query, function(success, results) {\n if (success) {\n result = results[0].o.value;\n }\n });\n return result;\n },\n\n /**\n\t\t\t\t * This function creates an ordered document list from the rdf object.\n\t\t\t\t * @method createDocumentList\n * @param {Object} rdf the rdf object\n * @return {Array} array of containing documents\n */\n createDocumentList: function(rdf){\n\t\t\t\t\tvar documents = [];\n\t\t\t\t\tvar main = this;\n\t\t\t\t\tvar hits = [];\n\n\t\t\t\t\trdf.rdf.setPrefix(\"ecs\",\"http://fusepool.eu/ontologies/ecs#\");\n\t\t\t\t\trdf.rdf.setPrefix(\"rdf\",\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\");\n\t\t\t\t\tvar graph;\n\t\t\t\t\trdf.graph(function(success, things){graph = things;});\n\t\t\t\t\tvar triples = graph.match(null, rdf.rdf.createNamedNode(rdf.rdf.resolve(\"ecs:contents\")), null).toArray();\n\t\t\t\t\tvar current = triples[0].object;\n\n\t\t\t\t\twhile(!current.equals(rdf.rdf.createNamedNode(rdf.rdf.resolve(\"rdf:nil\")))){\n\t\t\t\t\t\tvar hit = graph.match(current, rdf.rdf.createNamedNode(rdf.rdf.resolve(\"rdf:first\")), null).toArray()[0].object;\n\t\t\t\t\t\thits.push(hit.nominalValue);\n\t\t\t\t\t\tcurrent = graph.match(current, rdf.rdf.createNamedNode(rdf.rdf.resolve(\"rdf:rest\")), null).toArray()[0].object;\n\t\t\t\t\t}\n\n\t\t\t\t\tvar querylist = 'PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> ';\n\t\t\t\t\tquerylist += 'SELECT * {';\n\t\t\t\t\tquerylist += ' ?url <http://purl.org/dc/terms/abstract> ?content .';\n\t\t\t\t\tquerylist += ' { ?url <http://purl.org/dc/terms/title> ?title .';\n\t\t\t\t\tquerylist += ' filter ( lang(?title) = \"en\")';\n\t\t\t\t\tquerylist += ' } UNION { ';\n\t\t\t\t\tquerylist += ' ?url <http://purl.org/dc/terms/title> ?title .';\n\t\t\t\t\tquerylist += ' filter ( lang(?title) = \"\")';\n\t\t\t\t\tquerylist += ' }'\n\t\t\t\t\tquerylist += ' ?url <http://fusepool.eu/ontologies/ecs#textPreview> ?preview .';\n\t\t\t\t\t// querylist += ' ?url <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?dtype .';\t// X branch\n\t\t\t\t\tquerylist += ' OPTIONAL { ?url <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?dtype }';\n\t\t\t\t\tquerylist += '}';\n\n\t\t\t\t\t/* This is the tentative to iterate the list at the API level to have it in ORDER \n\t\t\t\t\t\tvar triples = graph.match(null, rdf.rdf.createNamedNode(rdf.rdf.resolve(\"ecs:contents\")), null).toArray();\n\t\t\t\t\t\tvar hit = graph.match(triples[0].object, store.rdf.createNamedNode(store.rdf.resolve(\"rdf:rest\")), null).toArray();\n\t\t\t\t\t*/\n\n\t\t\t\t\trdf.execute(querylist, function(success, results) {\n\t\t\t\t\t\tif (success) {\n\t\t\t\t\t\t\tfor(var rank=0; rank<hits.length; rank++){\n\t\t\t\t\t\t\t\tfor(var i=0; i<results.length; i++){\n\t\t\t\t\t\t\t\t\tvar row = results[i];\n\t\t\t\t\t\t\t\t\tif(row.url.value!=hits[rank]) {\n\t\t\t\t\t\t\t\t\t\t/*if(row.url.value!=hits[rank] || \n\t\t\t\t\t\t\t\t\t\trow.dtype.value.indexOf(\"ecs\") != -1 || \n\t\t\t\t\t\t\t\t\t\trow.dtype.value.indexOf(\"owl#A\") != -1 ){ */\n\t\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// if(!isEmpty(row.content) && (isEmpty(row.title) || isEmpty(row.title.lang) || row.title.lang + '' === main.lang)){\n\t\t\t\t\t\t\t\t\t// var content = row.content.value;\n\t\t\t\t\t\t\t\t\tvar content;\n\t\t\t\t\t\t\t\t\tif(isEmpty(row.content)) {\n\t\t\t\t\t\t\t\t\t\tcontent = row.preview.value;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\tcontent = row.content.value;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tvar title = 'Title not found';\n\t\t\t\t\t\t\t\t\tif(!isEmpty(row.title)){\n\t\t\t\t\t\t\t\t\t\ttitle = row.title.value;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tvar dtype = 'Type not found';\n\t\t\t\t\t\t\t\t\tif(!isEmpty(row.dtype)){\n\t\t\t\t\t\t\t\t\t\tdtype = row.dtype.value;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif(!main.containsDocument(documents, content, title, row.url.value)){\n\t\t\t\t\t\t\t\t\t\tdocuments.push({url: row.url.value, shortContent: content, title: title, type: dtype});\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\treturn documents;\n },\n\n /**\n * This function decides whether a document list contains\n\t\t\t\t * a document with a specific content and title or not.\n\t\t\t\t * @method containsDocument\n * @param {Array} documents the list of documents\n * @param {String} content content of the other document\n * @param {String} title title of the other document\n * @return {Boolean} true, if the list contains, false otherwise\n */\n containsDocument: function(documents, content, title, url){\n for(var i=0;i<documents.length;i++){\n if(documents[i].url === url || (documents[i].shortContent === content && documents[i].title === title)){\n return true;\n }\n }\n return false;\n }\n\n });\n }", "async function clickedNew (win) {\n const fromHomePage = !!win\n await openDocument(win, null, fromHomePage)\n}", "function windows() {\n $('.window').windows({\n snapping: true,\n snapSpeed: 500,\n snapInterval: 1100,\n onScroll: function(scrollPos){\n // scrollPos:Number\n },\n onSnapComplete: function($el){\n // after window ($el) snaps into place\n },\n onWindowEnter: function($el){\n // when new window ($el) enters viewport\n }\n })\n\n //console.log('windows initiated');\n}", "function setWindow() {\n\n\t\t//alert('<?PHP print $a;?>');\n\t\tvar a = \"<?= $a ?>\";\n\t\t//var hoge = <?php echo json_encode($hoge); ?>;\t\t\t\n\n\t\t_$parent.append(a);\n\n\t\tsetStyleSheet();\n\t\t_$parent.css({\n\t\t\topacity : 0,\n\t\t\ttop : '70%',\n\t\t\tleft : '50%',\n\t\t\twidth : 50 + \"%\",\n\t\t\theight : 50 + \"%\",\n\t\t\tmargin : \"auto\",\n\t\t});\n\n\n\t\t_$parent.css({\n\t\t\tmarginTop : -_$parent.height()/2,\n\t\t\tmarginLeft: -_$parent.width()/2,\n\t\t});\n\n\t\t_$parent.animate({\n\t\t\topacity : 1,\n\t\t\ttop : '50%'\n\t\t},300);\n\n\t\tsetMouseMoveObj(_$parent);\n\t\tsetNav();\n\t\tsetCloseBtn();\n\t\tsetStorageBtn();\n\t\tsetWideBtn();\n\t\tsetOnMouseGetState();\n\n\t\tsetGetActiveMail();\n\t\t//setGetDeskNets();\n\t\tsetBoard();\n\n\t\treturn false\n\t}", "function setEvents()\n{\n\tvar transformTime = 1500;\n\t\n\t//var button = document.getElementById( 'page' );\n\t//button.addEventListener( 'click', function ( event ) {transform(currentPage.WGLobjects, currentPage.targets.page, transformTime, transformTime, false, currentPage);}, false );\n\n\t//var button = document.getElementById( 'button1' );\n\t//button.addEventListener( 'click', function ( event ) {getPage('Home');}, false );\n\t\n\twindow.addEventListener( 'resize', onWindowResize, false );\n\t\n\tvar mousewheelevt = (/Firefox/i.test(navigator.userAgent)) ? \"DOMMouseScroll\" : \"mousewheel\"; //FF doesn't recognize mousewheel as of FF3.x\n\t\n\t$(window).bind(mousewheelevt, function(event) \n\t{\n\t\tvar delta = extractDelta(event);\n\t\tif (delta <= 0) VScroll(true);\n\t\telse VScroll(false);\n\t});\n}", "get mainChannel() {\n return this.getElement('main');\n }", "connectedCallback () {\n this.shadowRoot.addEventListener('menuIconClick', (e) => this.addWindow(e))\n this.shadowRoot.addEventListener('displayContextMenu', (e) => this.displayContextMenu(e))\n this.shadowRoot.addEventListener('closeEvent', (e) => this.deleteWindow(e))\n this.shadowRoot.addEventListener('closeAll', (e) => this.closeAll(e))\n this.shadowRoot.addEventListener('minimizeAll', (e) => this.minimizeAll(e))\n this.shadowRoot.addEventListener('restoreWindow', (e) => this.restoreWindow(e))\n }", "onReady() {\n SmartCrawlerMenu.set();\n this.createWindow();\n }", "function DocumentWidgetManager(options) {\n this._activateRequested = new signaling_1.Signal(this);\n this._isDisposed = false;\n this._registry = options.registry;\n }", "function createMainWindow() {\n mainWindow = new BrowserWindow({\n width: WIDTH,\n height: HEIGHT,\n icon: path.join(__dirname, \"resource/icon.ico\")\n })\n mainWindow.on(\"close\", () => {\n mainWindow = null;\n })\n // Load init page\n mainWindow.loadURL(url.format({\n pathname: path.join(__dirname, \"index.html\"),\n protocol: \"file:\",\n slashes: true\n }))\n}", "function createWindow(){\n //Create Browser window\n mainWindow = new BrowserWindow({width: 800, height: 600, icon: __dirname+'assets/icons/egress.png' });\n\n //load index.html\n mainWindow.loadURL(url.format({\n protocol: \"file:\",\n slashes: true,\n pathname: path.join(__dirname, 'index.html')\n }));\n\n //load devtools\n //win.webContents.openDevTools();\n\n //Setting the Mainmenu\n const mainMenu = Menu.buildFromTemplate(mainMenuTemplate)\n\n //Start IPFS node\n startIpfsDaemon();\n\n mainWindow.on('closed', ()=>{\n app.quit();\n });\n}" ]
[ "0.65709203", "0.6451293", "0.6370044", "0.6208044", "0.61439836", "0.6126203", "0.6086894", "0.6031861", "0.5991655", "0.59863883", "0.59543633", "0.5925826", "0.59093785", "0.5905834", "0.59046125", "0.5903986", "0.58924305", "0.5880814", "0.58703136", "0.586705", "0.5858745", "0.58493763", "0.58282167", "0.58161", "0.58017284", "0.5757506", "0.5738511", "0.57181513", "0.5712014", "0.5706787", "0.560969", "0.55809873", "0.55693203", "0.5567931", "0.5547739", "0.55448854", "0.5533394", "0.5513123", "0.5496734", "0.5483417", "0.5457413", "0.5444794", "0.5444794", "0.54398674", "0.54361796", "0.5434988", "0.5423665", "0.54082626", "0.54077524", "0.54065925", "0.5397588", "0.5397251", "0.5394314", "0.53723866", "0.5360313", "0.5360313", "0.5360313", "0.53399867", "0.5328541", "0.5328175", "0.5327929", "0.5326968", "0.53237605", "0.532376", "0.53230244", "0.5320355", "0.53102285", "0.53024834", "0.5290194", "0.5287641", "0.5286074", "0.5284604", "0.5278796", "0.52755314", "0.52720493", "0.52716327", "0.52704525", "0.5259145", "0.5256551", "0.52524126", "0.5247849", "0.5247435", "0.5228494", "0.5223827", "0.5215964", "0.51976514", "0.519734", "0.51942044", "0.5191753", "0.5190395", "0.5182182", "0.5181188", "0.51729417", "0.51697063", "0.5158476", "0.5149843", "0.51450235", "0.5143035", "0.5142819", "0.51401377", "0.51256776" ]
0.0
-1
If so, return the validated action. Otherwise, return null
function validateAction(action, interactable, element, eventTarget, scope) { if (interactable.testIgnoreAllow(interactable.options[action.name], element, eventTarget) && interactable.options[action.name].enabled && withinInteractionLimit(interactable, element, action, scope)) { return action; } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "getFormAction(element) {\n return element.getAttribute(\"action\");\n }", "getFormAction(element) {\n return element.getAttribute(\"action\");\n }", "get actionInput() {\n return this._action;\n }", "function validateAction (action, interactable) {\n if (!isObject(action)) { return null; }\n\n var actionName = action.name,\n options = interactable.options;\n\n if (( (actionName === 'resize' && options.resize.enabled )\n || (actionName === 'drag' && options.drag.enabled )\n || (actionName === 'gesture' && options.gesture.enabled))\n && actionIsEnabled[actionName]) {\n\n if (actionName === 'resize' || actionName === 'resizeyx') {\n actionName = 'resizexy';\n }\n\n return action;\n }\n return null;\n }", "function validateAction (action, interactable) {\n if (!isObject(action)) { return null; }\n\n var actionName = action.name,\n options = interactable.options;\n\n if (( (actionName === 'resize' && options.resize.enabled )\n || (actionName === 'drag' && options.drag.enabled )\n || (actionName === 'gesture' && options.gesture.enabled))\n && actionIsEnabled[actionName]) {\n\n if (actionName === 'resize' || actionName === 'resizeyx') {\n actionName = 'resizexy';\n }\n\n return action;\n }\n return null;\n }", "function validateAction (action, interactable) {\n if (!isObject(action)) { return null; }\n\n var actionName = action.name,\n options = interactable.options;\n\n if (( (actionName === 'resize' && options.resize.enabled )\n || (actionName === 'drag' && options.drag.enabled )\n || (actionName === 'gesture' && options.gesture.enabled))\n && actionIsEnabled[actionName]) {\n\n if (actionName === 'resize' || actionName === 'resizeyx') {\n actionName = 'resizexy';\n }\n\n return action;\n }\n return null;\n }", "function validateAction (action, interactable) {\n if (!isObject(action)) { return null; }\n\n var actionName = action.name,\n options = interactable.options;\n\n if (( (actionName === 'resize' && options.resize.enabled )\n || (actionName === 'drag' && options.drag.enabled )\n || (actionName === 'gesture' && options.gesture.enabled))\n && actionIsEnabled[actionName]) {\n\n if (actionName === 'resize' || actionName === 'resizeyx') {\n actionName = 'resizexy';\n }\n\n return action;\n }\n return null;\n }", "function validateAction (action, interactable) {\n if (!isObject(action)) { return null; }\n\n var actionName = action.name,\n options = interactable.options;\n\n if (( (actionName === 'resize' && options.resize.enabled )\n || (actionName === 'drag' && options.drag.enabled )\n || (actionName === 'gesture' && options.gesture.enabled))\n && actionIsEnabled[actionName]) {\n\n if (actionName === 'resize' || actionName === 'resizeyx') {\n actionName = 'resizexy';\n }\n\n return action;\n }\n return null;\n }", "actionable(action) {\n const self = this;\n return (rule, normalizedRule, parent) => {\n const ruleIsAMatch = self.test(rule, normalizedRule);\n if (ruleIsAMatch) {\n action(rule, parent);\n }\n return ruleIsAMatch;\n };\n }", "action(action = '') {\n\t\tif (action) {\n\t\t\tthis._action = String(action)\n\t\t\treturn this._action\n\t\t}\n\t\treturn this._action\n\t}", "get action () {\n\t\treturn this._action;\n\t}", "get action () {\n\t\treturn this._action;\n\t}", "get action () {\n\t\treturn this._action;\n\t}", "validate() {\n\n let validActions = {\n a: 'post',\n add: 'post',\n d: 'delete',\n delete: 'delete',\n h: 'help',\n help: 'help',\n l: 'list',\n list: 'list',\n };\n\n\n let validSecondActions = {\n c: 'category',\n category: 'category',\n null: null,\n };\n\n\n if (!validActions[this.action]) {\n this.error = 'invalidAction';\n return false;\n };\n\n\n if (this.payload === true) {\n\n if (!(validActions[this.action] == 'list')) {\n this.error = 'invalidPayload';\n return false;\n };\n\n };\n\n\n if (this.secondAction !== null && !validSecondActions[this.secondAction] ) {\n this.error = 'invalidSecondAction';\n return false;\n };\n\n\n if (this.category === true) {\n this.error = 'invalidCategory';\n return false;\n };\n\n\n return true;\n }", "get action() {\n\t\treturn this.__action;\n\t}", "_executeSubmitAction() {\n const action = this.get('submitAction');\n\n if (this.api && this.api[action]) {\n return this.api[action].call(this.api);\n }\n\n return Promise.reject();\n }", "action( data ){\n return data && data.actionNew ?\n ( typeof data.actionNew === 'function' ? data.actionNew() : data.actionNew ) : null;\n }", "validate({ getState, action }, allow, reject) {\n if (action.payload) {\n allow(action);\n } else { /* empty request, silently reject */\n reject();\n }\n }", "function Event_CompareToAction(action)\n{\n\t//by default: no match event\n\tvar result = new Event_EventResult();\n\n\t//do not bother processing anything if it should be ignored\n\tif (__DESIGNER_CONTROLLER && __DESIGNER_CONTROLLER.IsIgnoredSimlink && __DESIGNER_CONTROLLER.IsIgnoredSimlink(action.SimLinkId))\n\t\treturn result;\n\n\t//has valid advance and shouldn't be ignored?\n\tif (!String_IsNullOrWhiteSpace(action.Destiny))\n\t{\n\t\t//we need to determine whether we should check the qualificator or not\n\t\tvar bCheckData = !this.IgnoreData(this.InterpreterObject.DataObject.Class, this.Event);\n\t\t//overload\n\t\tresult = this.Match(action.InterpreterObjectId, true, \t\t//The Object Id which we are interested in\n\t\t\t-1, false, \t\t\t\t\t\t//The Object Class but we arent interested in this (only using id)\n\t\t\taction.Event, true, \t\t\t//The Event which we are interested in\n\t\t\taction.Data,\t\t\t\t\t//The Data and whether we are interested in it\n\t\t\tbCheckData,\t\t\t\t\t\t//whether we should check the qualificator or not\n\t\t\taction.UserDatas, \t\t\t\t//The user data to test\n\t\t\taction.InterpreterObjectIdEx, \t//the Interpreter Extra Event Object Id\n\t\t\taction.EventEx, \t\t\t\t//the Interpreter Extra Event Object Event\n\t\t\taction.DataEx); \t\t\t\t//the Interpreter Extra Event Object Data\n\t\t//match?\n\t\tif (result.Match)\n\t\t{\n\t\t\t//has bad data?\n\t\t\tif (result.BadData)\n\t\t\t{\n\t\t\t\t//have we got a tut?\n\t\t\t\tif (__SIMULATOR.StateManager.CurrentState.Tut)\n\t\t\t\t{\n\t\t\t\t\t//special message?\n\t\t\t\t\tif (result.BadDataRuleMessage)\n\t\t\t\t\t{\n\t\t\t\t\t\t//use this one\n\t\t\t\t\t\tresult.TriggerMessage = __SIMULATOR.StateManager.CurrentState.GetMessage(result.BadDataRuleMessage);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t//use the action's bad message\n\t\t\t\t\t\tresult.TriggerMessage = __SIMULATOR.StateManager.CurrentState.GetMessage(__SIMULATOR.StateManager.CurrentState.BadDataMessageId);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//set message type as error\n\t\t\t\tresult.TriggerMessageType = __MSG_TYPE_TRIGGER_ON_ERROR;\n\t\t\t\t//add tutorial data for tut layer\n\t\t\t\tresult.TriggerData = { Data: { TriggerId: -1, ObjectId: this.InterpreterObject.DataObject.Id }, DisplayRect: Position_GetDisplayRect(this.InterpreterObject.HTML) };\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//advance the lesson\n\t\t\t\tresult.AdvanceToStateId = action.Destiny;\n\t\t\t\t//mark the id of the action\n\t\t\t\tresult.SimLinkId = action.SimLinkId;\n\t\t\t}\n\t\t}\n\t}\n\t//return the result\n\treturn result;\n}", "is_authorized(){\n const validActions = Roles[this.user.role][this.object]\n const validatedAction = validActions.find(action => {\n return action === this.action\n })\n // TODO: maintain log of user and actions\n // console.info(`${this.user.name} ${validatedAction ? 'is' : 'is not'} authorized to ${this.action} ${this.object}`)\n return validatedAction\n }", "validate({ getState, action }, allow, reject) {\n if (action.payload) {\n allow(action);\n } else { /* empty request, silently reject */\n reject();\n }\n }", "async peekAction() {\n let action = await getWskActionWithoutCode(this.wsk, this.actionName);\n if (action === null) {\n throw new Error(`Action not found: ${this.actionName}`);\n }\n\n // check if there was an agent leftover\n if (isAgent(action)) {\n // ups, action is our agent, not the original\n // happens if a previous wskdebug was killed and could not restore before it exited\n const backupName = getActionCopyName(this.actionName);\n\n // check the backup action\n try {\n const backup = await getWskActionWithoutCode(this.wsk, backupName);\n\n if (!backup) {\n // backup is also an agent (should not happen)\n throw new Error(`Dang! Agent is already installed and action backup is missing.\\n\\nPlease redeploy your action first before running wskdebug again.`);\n\n } else if (isAgent(backup)) {\n // backup is also an agent (should not happen)\n throw new Error(`Dang! Agent is already installed and action backup is broken (${backupName}).\\n\\nPlease redeploy your action first before running wskdebug again.`);\n\n } else {\n log.warn(\"Agent was already installed, but backup is still present. All good.\");\n\n // need to look at the original action\n action = backup;\n this.agentInstalled = true;\n }\n\n } catch (e) {\n if (e.statusCode === 404) {\n // backup missing\n throw new Error(`Dang! Agent is already installed and action backup is gone (${backupName}).\\n\\nPlease redeploy your action first before running wskdebug again.`);\n\n } else {\n // other error\n throw e;\n }\n }\n }\n return action;\n }", "action(){\n if (!this.memory.actionMemory) this.memory.actionMemory = {}; // Set up an actionMemory\n this.memory.actionMemory.actionName = this.state();\n this.memory.actionMemory.tId = this.taskId();\n if (this.state() in ActionRegistry) {\n return new ActionRegistry[this.state()](this.memory.actionMemory);\n } else {\n Log('Invalid state does not map to an action. ' + this.string());\n }\n }", "getAction(internal_name) {\n if (IsString(internal_name, true)) {\n const action = this.asset.action.get(internal_name);\n return action ? action : {};\n }\n }", "__getActionEvent() {\n return this.action.event !== undefined ? this.action.event : this.constructor.defaultAction;\n }", "function validateActionId(req, res, next) {\n actions\n .get(req.params.id)\n .then((action) => {\n if (action) {\n req.action = action;\n next();\n } else {\n res.status(404).json({\n message: `No action ${req.params.id} can not be found.`,\n });\n }\n })\n .catch(() => {\n res.status(500).json({\n message: `There was an error retrieving action ${req.params.id}.`,\n });\n });\n}", "defaultAction(req, res, callback) {\n return callback(\"Invalid action\");\n }", "get hasAction() {\n return !!this.data.action;\n }", "function validateActionId (req, res, next) {\n Actions.get(req.params.id)\n .then(action => {\n if (!action) {\n res.status(404).json({ message:\"invalid action id\"});\n } else {\n req.action = action;\n next();\n }\n })\n}", "function validateActionCode()\n{\n\tif (emssObjInstance.emssObj.filterSelect) \n\t{\n\t\tif (NonSpace(self.main.document.getElementById(\"actionsSelect\").value) == 0) \n\t\t{\n\t\t\tsetRequiredField(self.main.document.getElementById(\"actionsSelect\"), getSeaPhrase(\"SELECT_PERSONNEL_ACTION\",\"ESS\"));\n\t\t\treturn false;\n\t\t} \n\t\telse\n\t\t\tclearRequiredField(self.main.document.getElementById(\"actionsSelect\"));\n\t} \n\telse \n\t{\n\t\tif (self.main.document.getElementById(\"actionsSelect\").selectedIndex <= 0) \n\t\t{\n\t\t\tvar actionsSelect = self.main.document.getElementById(\"actionsSelect\") || null;\n\t\t\tsetRequiredField(self.main.document.getElementById(\"actionsCell\"), getSeaPhrase(\"SELECT_PERSONNEL_ACTION\",\"ESS\"), actionsSelect);\n\t\t\treturn false;\n\t\t} \n\t\telse\n\t\t\tclearRequiredField(self.main.document.getElementById(\"actionsCell\"));\n\t}\n\treturn true;\n}", "function find(name) {\n\t\t\tfor (var i in data) {\n\t\t\t\tif (data[i].type == 'action' && data[i].name == name) {\n\t\t\t\t\treturn data[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "function validateActionId(req, res, next) {\n actionModel.get(req.params.id)\n .then(action => {\n if (action) {\n req.action = action;\n next();\n } else {\n res.status(400).json({ errorMessage: \"Invalid action ID\" })\n }\n })\n .catch(err => {\n res.status(500).json({ errorMessage: \"There was an error\", err })\n })\n}", "existingAction( clip, optionalRoot ) {\n\n\t\tconst root = optionalRoot || this._root,\n\t\t\trootUuid = root.uuid,\n\n\t\t\tclipObject = typeof clip === 'string' ?\n\t\t\t\tAnimationClip.findByName( root, clip ) : clip,\n\n\t\t\tclipUuid = clipObject ? clipObject.uuid : clip,\n\n\t\t\tactionsForClip = this._actionsByClip[ clipUuid ];\n\n\t\tif ( actionsForClip !== undefined ) {\n\n\t\t\treturn actionsForClip.actionByRoot[ rootUuid ] || null;\n\n\t\t}\n\n\t\treturn null;\n\n\t}", "existingAction( clip, optionalRoot ) {\n\n\t\tconst root = optionalRoot || this._root,\n\t\t\trootUuid = root.uuid,\n\n\t\t\tclipObject = typeof clip === 'string' ?\n\t\t\t\tAnimationClip.findByName( root, clip ) : clip,\n\n\t\t\tclipUuid = clipObject ? clipObject.uuid : clip,\n\n\t\t\tactionsForClip = this._actionsByClip[ clipUuid ];\n\n\t\tif ( actionsForClip !== undefined ) {\n\n\t\t\treturn actionsForClip.actionByRoot[ rootUuid ] || null;\n\n\t\t}\n\n\t\treturn null;\n\n\t}", "function getActionToSubmit(action) {\n // Clean preconditions\n var preconditionIndex, parameterIndex,\n preconditions, precondition,\n parameters, parameter,\n arguments, argument,\n subActions, subAction, actionIndex,\n current;\n\n var actionToSubmit = {\n \"label\": action.type + action.label,\n \"parameters\": action.parameters\n };\n\n function getParameters(parameters, arguments) {\n var result = [];\n for(parameterIndex in parameters) {\n parameter = parameters[parameterIndex];\n\n argument = arguments[parameter.reference];\n\n result.push(argument);\n }\n return result;\n }\n\n preconditions = [];\n for(preconditionIndex in action.preconditions) {\n current = action.preconditions[preconditionIndex];\n\n precondition = {};\n precondition.id = current.precondition.id;\n precondition.parameters = getParameters(current.precondition.parameters, current.arguments);\n\n preconditions.push(precondition);\n }\n actionToSubmit.preconditions = preconditions;\n\n subActions = [];\n for(actionIndex in action.actions) {\n current = action.actions[actionIndex];\n\n subAction = {};\n subAction.id = current.action.id;\n subAction.parameters = getParameters(current.action.parameters, current.arguments);\n\n subActions.push(subAction);\n }\n actionToSubmit.subActions = subActions;\n\n console.log(actionToSubmit);\n\n return {\n type: action.type,\n action: actionToSubmit\n };\n }", "function getFormActionAttribute(){\r\n var strAction = document.forms[0].getAttribute(\"action\");\r\n return strAction;\r\n}", "function actionCreator() {\n return action;\n }", "function BtnActionRequestFST(action) {\n if (IsValidForm() == 0) {\n if (IsValidDate() == 0) {\n if (IsValidLength() == 0) {\n if (IsValidTextbox() == 0) {\n CheckDataRequestFST(action);\n }\n }\n }\n }\n}", "function validateAction(req, res, next) {\n if (!Object.keys(req.body).length) {\n res.status(400).json({ message: 'Missing action data!' });\n } else if (!req.body.description) {\n res.status(400).json({ message: 'Missing required \"description\" field!' });\n } else if (!req.body.notes) {\n res.status(400).json({ message: 'Missing required \"notes\" field!' });\n } else {\n next();\n }\n}", "function actionCreator(){\n return action;\n }", "function actionCreator() {\n return action\n }", "function tryLocateAction(e) {\n //Try to match controller/action\n var ctrl = findPropIgnoreCase(_controllers, e.values.controller), action;\n if (ctrl) action = findPropIgnoreCase(ctrl.actions, e.values.action);\n //Match found, add values to event\n if (action) {\n //Add specific action properties to \"e\"\n //Allows for easier access... e.view rather than e.action.view\n //Need to avoid certain props such as require and events\n //TODO: Add additional props in future\n extend(e, action, \"model,view,controller,remote,updater,title,address,menu\");\n //Add properties to \"e\"\n e.controller = ctrl;\n e.action = action;\n //Return true if located\n return true;\n }\n }", "function validateActionId(req, res, next) {\n const { id } = req.params\n Action.get(id)\n .then(action => {\n console.log(action)\n if (action) {\n req.action = action;\n next();\n } else {\n res.status(400).json({ message: \"invalid action id\" })\n }\n })\n .catch(() => {\n res.status(500).json({ errorMessage: \"Could not validate action with the specified id\" })\n })\n\n}", "function actionCreator() {\n return action\n}", "getRawSemanticAction() {\n return this._rawSemanticAction;\n }", "getSemanticAction() {\n return this._semanticAction;\n }", "get relatedAction () {\n\t\treturn this._relatedAction;\n\t}", "getOriginalSemanticAction() {\n return this._orginialSemanticAction;\n }", "function getProductValidityListAction() {\n const action = {\n type: ApiConstants.API_PRODUCT_VALIDITY_LIST__LOAD\n };\n return action;\n}", "checkPlayIsValid(action) {\n // rules for if a play is valid\n }", "function validateActionId(req, res, next) {\n Actions.get(req.params.id)\n .then(action => {\n if (action) {\n next();\n } else {\n res.status(400).json({ errorMessage: \"Invalid Action ID\" });\n }\n })\n .catch(() =>\n res.status(500).json({ errorMessage: \"Error with accessing Actions\" })\n );\n}", "validate({ getState, action }, allow, reject) {\r\n let state = getState();\r\n if (!state.session.authenticated) {\r\n toastr.error('Unauthorized request');\r\n }\r\n if (state.session.user.userType != \"seeker\") {\r\n toastr.error(\"You don't have permission to edit listing, please register or login as a Seeker to submit or edit your listings\");\r\n } else {\r\n allow(action);\r\n }\r\n }", "function validate() {\n //always valid\n return null;\n }", "action() {}", "function act(state, action) {\n var val = action(state);\n if (state.error !== null) {\n throw state.error;\n }\n return val;\n }", "function processAction(action) {\n switch (action) {\n case 'migrate': {\n return { type: actionTypes_1.ActionTypes.Migrate, params: [] };\n }\n case 'rollback': {\n return { type: actionTypes_1.ActionTypes.Rollback, params: [] };\n }\n case 'create-migration': {\n return { type: actionTypes_1.ActionTypes.CreateMigration, params: [] };\n }\n default: {\n throw new InvalidActionException(action);\n }\n }\n}", "action(action, value) {\n\t switch (action) {\n\t // Parent view\n\t case 'parent':\n\t this._parentAction(value);\n\t return;\n\t // Change provider\n\t case 'provider':\n\t if (value !== this.provider) {\n\t this._providerAction(value);\n\t }\n\t return;\n\t // Global search\n\t case 'search':\n\t if (this._sources.api) {\n\t this._searchAction(this.provider, value);\n\t }\n\t return;\n\t // Filter collections\n\t case 'filter':\n\t if (typeof value !== 'string') {\n\t return;\n\t }\n\t value = value.trim().toLowerCase();\n\t if (this.route.params.filter !== value) {\n\t this.route.params.filter = value;\n\t this.blocksRequireUpdate = true;\n\t }\n\t else {\n\t return;\n\t }\n\t break;\n\t // Filter categories\n\t case 'categories':\n\t if ((value === null || typeof value === 'string') &&\n\t value !== this.route.params.category) {\n\t this.route.params.category = value;\n\t this.blocksRequireUpdate = true;\n\t }\n\t else {\n\t return;\n\t }\n\t break;\n\t // Select collection, called from child view\n\t case 'collections-internal':\n\t if (typeof value !== 'string' || value === '') {\n\t return;\n\t }\n\t this._triggerCollectionAction(value, 1);\n\t return;\n\t // Select collection\n\t case 'collections':\n\t if (typeof value !== 'string' || value === '') {\n\t return;\n\t }\n\t this._triggerCollectionAction(value, 0);\n\t return;\n\t default:\n\t return;\n\t }\n\t // Action has changed something - trigger update event\n\t this._triggerUpdated();\n\t }", "function valida_actio(action) {\n console.log(\"en la mitad\");\n if (action === \"crear\") {\n crea_documento();\n } else {\n edita_documento();\n }\n }", "performAction () {\n if(this.action != null) \n this.action();\n }", "get oldAction(): ?Function {\n if (this.script && this.script.run && typeof this.script.run === 'function') {\n return this.script.run;\n }\n if (this.script && this.script.compile && typeof this.script.compile === 'function') {\n return this.script.compile;\n }\n return undefined;\n }", "function BtnAction(action) {\n if (action == \"delete\") {\n ActionDelete();\n return false;\n }\n\n if (IsValidForm() == 0) {\n if (IsValidDate() == 0) {\n if (IsValidLength() == 0) {\n if (IsOnlyNumberInput() == 0) {\n if (IsValidChecked() == 0) {\n var id = $.xResponse(linkProc + '/FORM_SUB_TYPE/IsInActive/', { value: $(\"#txt_form_sub_type_name\").text() });\n if (id > 0) {\n if (confirm(\"Data already exist, but its inactive. Do you want to re-activate ?\") == true) {\n ActionActivating(id);\n }\n } else {\n CheckData(action);\n }\n }\n }\n }\n }\n }\n}", "function getActionValue(action, e) {\n var prop = go.getProp(\"action.\" + action, e);\n if (prop) {\n prop = go.format(prop, e.values);\n prop = go.format(prop, e);\n }\n return prop;\n }", "callbackFor(action) {\n switch (action) {\n case 'check':\n return this.actions.check.callback;\n case 'format':\n return this.actions.format.callback;\n default:\n throw Error('Unknown action type');\n }\n }", "callbackFor(action) {\n switch (action) {\n case 'check':\n return this.actions.check.callback;\n case 'format':\n return this.actions.format.callback;\n default:\n throw Error('Unknown action type');\n }\n }", "checkAction(){\n Actions.pop();\n }", "function applyAction(action, gs) {\n if (isValidAction(action, gs)) {\n return takeAction(action, gs);\n }\n else {\n return {\n kind: \"illegalAction\"\n };\n }\n}", "function actionCreator(action) {\n return action\n}", "action(action, value) {\n\t switch (action) {\n\t // Select parent view\n\t case 'parent':\n\t this._parentAction(value);\n\t return;\n\t // Change provider\n\t case 'provider':\n\t if (value !== this.provider) {\n\t this._providerAction(value);\n\t }\n\t return;\n\t // Global search\n\t case 'search':\n\t this._searchAction(this.provider, value);\n\t return;\n\t // Search icons\n\t case 'filter':\n\t if (typeof value !== 'string') {\n\t return;\n\t }\n\t value = value.trim().toLowerCase();\n\t if (value === this.route.params.filter) {\n\t return;\n\t }\n\t this.route.params.filter = value;\n\t this.blocksRequireUpdate = true;\n\t break;\n\t // Change current page\n\t case 'pagination':\n\t if (typeof value === 'string') {\n\t value = parseInt(value);\n\t }\n\t // Check number\n\t if (typeof value !== 'number' ||\n\t isNaN(value) ||\n\t value < 0 ||\n\t value === this.route.params.page) {\n\t return;\n\t }\n\t // Change page\n\t this.route.params.page = value;\n\t this.blocksRequireUpdate = true;\n\t break;\n\t // Change reference icon\n\t case 'icons-nav':\n\t if (value === '' || value === null) {\n\t // Reset\n\t this.route.params.icon = '';\n\t break;\n\t }\n\t // Check type\n\t if (typeof value !== 'string') {\n\t return;\n\t }\n\t // Change reference icon and automatically set page\n\t this.route.params.icon = value;\n\t this.route.params.page = null;\n\t this.blocksRequireUpdate = true;\n\t break;\n\t // Filters\n\t case 'tags':\n\t this._filterAction('tag', value);\n\t return;\n\t case 'themePrefixes':\n\t this._filterAction('themePrefix', value);\n\t return;\n\t case 'themeSuffixes':\n\t this._filterAction('themeSuffix', value);\n\t return;\n\t // Parent view's filter\n\t case 'collections':\n\t this._collectionsAction(value);\n\t return;\n\t default:\n\t return;\n\t }\n\t // Action has changed something - trigger update event\n\t this._triggerUpdated();\n\t }", "function valida_actio(action) {\n console.log(\"en la mitad\");\n if (action === \"crear\") {\n crea_acompanamiento();\n } else if (action === \"editar\") {\n edita_acompanamiento();\n };\n }", "function goActionFormsClickedA(modelName, path, docName, popUpNeeded) {\n\tvar defaultValue = $(\"#actions\").val();\n\tif (defaultValue == -1) {\n\t\tdialogTemplate(\"Alert\",\n\t\t\t\t\"Please select a valid action before selecting Next\");\n\t\treturn false;\n\t}\n\n\tvar valText = document.getElementById(\"jsonvals\").value;\n\tvar data = eval(\"(\" + valText + \")\");\n\tvar action = document.getElementById(\"actions\").value;\n\tvar index;\n\tfor (index = 0; index < data.vals.length; index++) {\n\t\tif (data.vals[index].n == action) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\tif (index < data.vals.length) {\n\t\tvar reqd = data.vals[index].r;\n\t\t// alert(regd);\n\t\tvar rsn = document.getElementById(\"actionReason\").value.trim();\n\t\tif (reqd == 'y' && rsn.length == 0) {\n\t\t\tgoActionValidations(modelName, action);\n\t\t} else {\n\t\t\tgoActionCommon();\n\t\t}\n\t}\n}", "function ACTION() {}", "randomAction() {\n var action;\n const role = this.role.toLowerCase();\n switch (this.location.location.toLowerCase()) {\n case 'throne': \n if (role == 'advisor' && randomChoice([0,1,1]) == 1) {\n action = new Action.Propose(randomChoice([100,150,200,300]),randomChoice([this.game.courtyard,this.game.chapel,this.game.barracks]));\n } break;\n case 'courtyard': break;\n case 'ballroom': \n if (role != 'captain' && role != 'grim' && randomChoice([0,1,1]) == 1) {\n action = new Action.Laud(randomChoice(this.game.characters));\n } break;\n case 'chapel':\n if (role != 'captain' && randomChoice([0,1,1]) == 1) {\n action = new Action.Pray();\n } break;\n case 'barracks': break;\n }\n if (action == null) {\n action = randomChoice([0,0,1]) == 1 ? this.randomVisit() : new Action.Investigate(randomChoice(this.game.characters));\n }\n if (action.time <= this.time) {\n return action;\n } else {\n return new Action.End(this.time);\n }\n }", "function getActionClass(action) {\n if(actions.indexOf(action) !== -1) { return 'action'; }\n if(movements.indexOf(action) !== -1 ) { return 'movement'; }\n\n return 'invalid';\n}", "getPostSubmitRedirect() {\n if (typeof this.payload.redirect === \"string\") {\n return this.payload.redirect;\n }\n\n return false;\n }", "function valida_actio(action) {\n console.log(\"en la mitad\");\n if (action === \"crear\") {\n crea_gastos();\n } else if (action === \"editar\") {\n edita_gastos();\n };\n }", "@action\n onSubmit() {\n // set to true for a visual display of which inputs are invalid\n // passed down to date-time-picker and location-input components\n this.set('checkIfMissing', true);\n this.set('error', null);\n\n const { dispositionsByRole: dispositions } = this.model;\n const dispositionForAllActions = this.get('dispositionForAllActions');\n\n let fieldsFilled;\n\n // the form logic will pass in the fake dispositionForAllActions object\n // but this also needs to bring in the logic for when there is only 1 dispo\n const allActions = this.get('allActions') || (dispositions.length <= 1);\n\n // a function to check if each hearing location/date field is truthy\n function infoExists(hearingInfo) {\n return hearingInfo;\n }\n\n // if user is submitting ONE hearing for ALL actions\n if (allActions) {\n const allActionsDispHearingLocation = dispositionForAllActions.dcpPublichearinglocation;\n const allActionsDispHearingDate = dispositionForAllActions.dcpDateofpublichearing;\n fieldsFilled = allActionsDispHearingLocation && allActionsDispHearingDate;\n // if user is submitting a hearing PER action\n } else {\n const dispositionHearingLocations = dispositions.map(disp => `${disp.dcpPublichearinglocation}`);\n const dispositionHearingDates = dispositions.map(disp => disp.dcpDateofpublichearing);\n\n // using function infoExists, fieldsFilled checks whether each item in array is truthy\n fieldsFilled = dispositionHearingLocations.every(infoExists) && dispositionHearingDates.every(infoExists);\n }\n\n if (fieldsFilled) {\n this.set('modalOpen', true);\n }\n }", "function eventToAction( event ) {\n switch (event) {\n case DataPortalEvent.preFetch:\n case DataPortalEvent.postFetch:\n return DataPortalAction.fetch;\n case DataPortalEvent.preCreate:\n case DataPortalEvent.postCreate:\n return DataPortalAction.create;\n case DataPortalEvent.preInsert:\n case DataPortalEvent.postInsert:\n return DataPortalAction.insert;\n case DataPortalEvent.preUpdate:\n case DataPortalEvent.postUpdate:\n return DataPortalAction.update;\n case DataPortalEvent.preRemove:\n case DataPortalEvent.postRemove:\n return DataPortalAction.remove;\n case DataPortalEvent.preExecute:\n case DataPortalEvent.postExecute:\n return DataPortalAction.execute;\n case DataPortalEvent.preSave:\n case DataPortalEvent.postSave:\n default:\n return null;\n }\n}", "validate() {\n return null;\n }", "function liftAction(action) { // 187\n var liftedAction = { // 188\n type: ActionTypes.PERFORM_ACTION, // 189\n action: action, // 190\n timestamp: Date.now() // 191\n }; // 192\n return liftedAction; // 193\n} // 194", "action(action, value) {\n\t switch (action) {\n\t // Change to parent view\n\t case 'parent':\n\t this._parentAction(value);\n\t return;\n\t // Change provider\n\t case 'provider':\n\t if (value !== this.provider) {\n\t this._providerAction(value);\n\t }\n\t return;\n\t // Global search\n\t case 'search':\n\t if (typeof value !== 'string') {\n\t return;\n\t }\n\t value = value.trim().toLowerCase();\n\t if (value === this.keyword) {\n\t return;\n\t }\n\t this._searchAction(this.provider, value);\n\t return;\n\t // Change current page\n\t case 'pagination':\n\t if (value === 'more' && this._showMoreButton()) {\n\t // Change to current page + 1\n\t value = this.route.params.page + 1;\n\t }\n\t // Check number\n\t if (typeof value === 'string') {\n\t value = parseInt(value);\n\t }\n\t if (typeof value !== 'number' ||\n\t isNaN(value) ||\n\t value === this.route.params.page ||\n\t value < 0) {\n\t return;\n\t }\n\t // Check for \"more\"\n\t if (value > 0 && this._showMoreButton()) {\n\t // Create sibling route\n\t this._triggerFullResults(value);\n\t return;\n\t }\n\t this.route.params.page = value;\n\t this.blocksRequireUpdate = true;\n\t break;\n\t // Collections filter\n\t case 'collections':\n\t this._collectionsAction(value, 0);\n\t return;\n\t // Collections filter, called from child view\n\t case 'collections-internal':\n\t this._collectionsAction(value, 1);\n\t return;\n\t default:\n\t return;\n\t }\n\t // Action has changed something - trigger update event\n\t this._triggerUpdated();\n\t }", "function Memory_NoAction() {\n \"use strict\";\n return this.action === \"\";\n}", "get action() { return this.actionIn; }", "function getFormAction(form) {\t\n if (form.getAttribute(\"action\")) {\n \t// Ensure that the form action is returned as a absolute URL.\n\treturn qualifyUrl(form.getAttribute(\"action\"));\n } else {\n return document.URL;\n }\n}", "function evaluateAction(data, callback) {\n\t\tlog('evaluateAction', data);\n\t\tif (shouldSkip(data)) {\n\t\t\tlog('skip', data);\n\t\t\treturn callback({ skip: true});\n\t\t}\n\t\tvar start = performance.now();\n\n\t\tvar actions = {\n\t\t\tcreateNode: createNode,\n\t\t\tcreateComment: customCreateComment,\n\t\t\tfocus: focusEl,\n\t\t\tsetHTML: setHTML,\n\t\t\tinsertBefore: customInsertBefore,\n\t\t\tappendHTML: appendHTML,\n\t\t\tremoveChild: customRemoveChild,\n\t\t\tgetInnerHTML: getInnerHTML,\n\t\t\tsetParentNode: setParentNode,\n\t\t\tgetStyleValue: getStyleValue,\n\t\t\tpushState: customPushState,\n\t\t\treplaceState: customReplaceState,\n\t\t\tsetTextContent: setTextContent,\n\t\t\tstyleSheetAddRule: styleSheetAddRule,\n\t\t\talert: customAlert,\n\t\t\tscrollTo: scrollTo,\n\t\t\taddEventListener: customAddEventListener,\n\t\t\theadAppendChild: headAppendChild,\n\t\t\tbodyAppendChild: bodyAppendChild,\n\t\t\tappendChild: appendChild,\n\t\t\tsetAttribute: setAttribute,\n\t\t\tremoveAttribute: removeAttribute,\n\t\t\tsetStyle: setStyle,\n\t\t\tsetProperty: setProperty,\n\t\t\tremoveNode: removeNode,\n\t\t\tloadImage: loadImage,\n\t\t\tsetClassName: setClassName,\n\t\t\tgetElementById: customGetElementById,\n\t\t\taddClass: addClass,\n\t\t\tremoveClass: removeClass\n\t\t};\n\n\t\tif (data.action) {\n\t\t\tcallback({ uid: data.uid, cb: true, result: actions[data.action](data) });\n\t\t\tif (data.action === 'alert') {\n\t\t\t\tsendMessage(data);\n\t\t\t}\n\t\t\tsetTimePerAction(data.action, performance.now() - start);\n\t\t\tlog('action', data);\n\t\t} else {\n\t\t\tcallback({});\n\t\t\tlog('no-action', data);\n\t\t}\n\t}", "function validateAction(action) {\n var validator = utils_1.createActionValidator(Fullscreen_1.ActionType);\n return type_validate_1.validate(action, validator);\n}", "function getProductValidityListAction() {\n return {\n type: ApiConstants.API_PRODUCT_VALIDITY_LIST_LOAD,\n };\n}", "function onActionSuccess() {\n var actionResult = actionResultService.getActionResult();\n\n if ( resourceType ) {\n // Get the id of the item being operated upon\n var id = performData[idAttributeName];\n if ( actionType == actionTypes.UPDATE ) {\n actionResult.updated(resourceType, id);\n } else if ( actionType == actionTypes.DELETE ) {\n actionResult.deleted(resourceType, id);\n }\n }\n\n return actionResult.result;\n }", "function isSubmitAction(action) {\n return action.type === 'submit';\n }", "getAction(name){\n return _useAction.bind(this,name);\n }", "__getActionData() {\n return this.action.data || {};\n }", "onAction() {\n return this._onAction;\n }", "parseAction(action) {\n const registeredTypes = Object.keys(this.actionMap);\n \n for (const actionType of registeredTypes) {\n // If the action's type matches a registered action type, call the\n // associated callback\n if (action.type === actionType) {\n this.actionMap[actionType](action);\n break;\n }\n }\n }", "validInput(value) {\n if (!value)\n return this.props.eReq;\n return null;\n }", "function getRuleAction() {\n $(\"#firewall-rules\").on(\"click\", \"td button\", function() {\n var button = $(this).text().toLowerCase();\n // Gets rule values\n var row = $(this).closest(\"tr\").find(\"td\").map(function() {\n return $(this).text()\n }).get();\n\n if (button === \"delete\") {\n buildDeleteRequest(row);\n }\n });\n}", "action(action, value) {\n\t switch (action) {\n\t // Change view\n\t case 'parent':\n\t this._parentAction(value);\n\t return;\n\t // Change provider\n\t case 'provider':\n\t this._providerAction(value);\n\t return;\n\t // Set icons\n\t case 'set':\n\t this.setIcons(value);\n\t // Returning because setIcons will trigger event\n\t return;\n\t // Search icons\n\t case 'filter':\n\t if (typeof value !== 'string') {\n\t return;\n\t }\n\t value = value.trim().toLowerCase();\n\t if (value === this.route.params.filter) {\n\t return;\n\t }\n\t this.route.params.filter = value;\n\t this.blocksRequireUpdate = true;\n\t break;\n\t // Change current page\n\t case 'pagination':\n\t if (typeof value === 'string') {\n\t value = parseInt(value);\n\t }\n\t // Check number\n\t if (typeof value !== 'number' ||\n\t isNaN(value) ||\n\t value < 0 ||\n\t value === this.route.params.page) {\n\t return;\n\t }\n\t // Change page\n\t this.route.params.page = value;\n\t this.blocksRequireUpdate = true;\n\t break;\n\t default:\n\t return;\n\t }\n\t // Action has changed something - trigger update event\n\t this._triggerUpdated();\n\t }", "static getRelevantAction(keysPressed, vimState) {\n let isPotentialMatch = false;\n const possibleActionsForMode = Actions.actionMap.get(vimState.currentMode) || [];\n for (const actionType of possibleActionsForMode) {\n const action = new actionType();\n if (action.doesActionApply(vimState, keysPressed)) {\n action.keysPressed = vimState.recordedState.actionKeys.slice(0);\n return action;\n }\n if (action.couldActionApply(vimState, keysPressed)) {\n isPotentialMatch = true;\n }\n }\n return isPotentialMatch ? KeypressState.WaitingOnKeys : KeypressState.NoPossibleMatch;\n }", "function validateActionData(req, res, next) {\n if (!req.body.project_id || !req.body.description || !req.body.notes) {\n res.status(400).json({\n message: \"Please include project_id, action description and action notes .\",\n });\n } else {\n next();\n }\n}" ]
[ "0.61434495", "0.61434495", "0.6012537", "0.5983699", "0.5983699", "0.5983699", "0.5983699", "0.5983699", "0.5976837", "0.59609896", "0.5928764", "0.5928764", "0.5928764", "0.59064025", "0.5904692", "0.5902481", "0.58524704", "0.5833749", "0.5827592", "0.579775", "0.57764775", "0.57545686", "0.57128084", "0.5673612", "0.56717426", "0.5646592", "0.56313556", "0.56305426", "0.5628645", "0.5609958", "0.5596529", "0.551506", "0.550044", "0.550044", "0.54900014", "0.5468203", "0.54633296", "0.5458232", "0.5450343", "0.54171544", "0.5394123", "0.53585106", "0.5332596", "0.52966607", "0.5291774", "0.5261747", "0.5257132", "0.5234086", "0.5227475", "0.5219955", "0.52029413", "0.51997346", "0.5199545", "0.51698303", "0.5156326", "0.51550394", "0.5148385", "0.51479095", "0.513811", "0.5124141", "0.510261", "0.5101975", "0.5094993", "0.5094993", "0.50934243", "0.5089239", "0.5062348", "0.50534385", "0.50521487", "0.5035029", "0.50007653", "0.4990362", "0.49656758", "0.49649182", "0.49608997", "0.4960346", "0.49525666", "0.49457857", "0.4923406", "0.49148822", "0.49127656", "0.49028727", "0.48994508", "0.4885749", "0.4885411", "0.48684597", "0.4865872", "0.4841793", "0.48408514", "0.4825383", "0.4813258", "0.4805045", "0.47825655", "0.4782221", "0.47788322", "0.47701564", "0.4761281" ]
0.61463904
3
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
function normalizeSymbolSize(symbolSize) { if (!zrUtil.isArray(symbolSize)) { symbolSize = [+symbolSize, +symbolSize]; } return symbolSize; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get Android() {}", "function SBRecordsetPHP_analyzePlatformSpecific()\r\n{\r\n\r\n\r\n}", "onChildAppStart () {\n\n }", "private internal function m248() {}", "private public function m246() {}", "onMessageStart() { }", "createStream () {\n\n }", "_playbackCompatibility() {\n // Detect audio playback capabilities.\n\n // Detect HTML5 Audio playback.\n // http://caniuse.com/#feat=audio\n this.canUseAudio = Boolean(new Audio());\n console.log('Native HTML5 Audio playback capability: ' +\n this.canUseAudio);\n\n // Detect Cordova Media Playback\n // It allows playing audio using the native bridge inside WebView Apps.\n // https://github.com/apache/cordova-plugin-media/blob/master/doc/index.md\n this.canUseCordovaMedia = Boolean(window.Media);\n console.log('Cordova Media playback capability: ' +\n this.canUseCordovaMedia);\n\n if (!(this.canUseAudio || this.canUseCordovaMedia)) {\n throw new Error(\n 'Some form of audio playback capability is required');\n }\n\n var _audio = new Audio();\n if (_audio.canPlayType === 'function') {\n throw new Error(\n 'Unable to detect audio playback capabilities');\n }\n\n var canPlayOggVorbis = _audio.canPlayType(\n 'audio/ogg; codecs=\"vorbis\"') !== '';\n var canPlayOggOpus = _audio.canPlayType(\n 'audio/ogg; codecs=\"opus\"') !== '';\n var canPlayWave = _audio.canPlayType('audio/wav') !== '';\n var canPlayMP3 = _audio.canPlayType('audio/mpeg; codecs=\"mp3\"') !== '';\n var canPlayAAC = _audio.canPlayType(\n 'audio/mp4; codecs=\"mp4a.40.2\"') !== '';\n var canPlay3GPP = _audio.canPlayType(\n 'audio/3gpp; codecs=\"samr\"') !== '';\n\n console.log('Native Vorbis audio in Ogg container playback capability: ' +\n canPlayOggVorbis);\n console.log('Native Opus audio in Ogg container playback capability: ' +\n canPlayOggOpus);\n console.log('Native PCM audio in Waveform Audio File Format (WAVE) ' +\n 'playback capability: ' + canPlayWave);\n console.log('Native MPEG Audio Layer 3 (MP3) playback capability: ' +\n canPlayMP3);\n console.log('Native Low-Complexity AAC audio in MP4 container playback ' +\n 'capability: ' + canPlayAAC);\n console.log('Native AMR audio in 3GPP container playback capability: ' +\n canPlay3GPP);\n\n if (!(canPlayWave || canPlayMP3)) {\n throw new Error(\n 'Native Wave or MP3 playback is required');\n }\n }", "constructor() {\n\t}", "constructor() {\n\t}", "constructor() {\n\n\t}", "onComponentMount() {\n\n }", "constructor() {\n throw new Error('Not implemented');\n }", "supportsPlatform() {\n return true;\n }", "function _____SHARED_functions_____(){}", "constructor() {\n }", "constructor() {\n\t\t// ...\n\t}", "static get tag(){return\"hal-9000\"}", "static getDeviceModel() {\n return \"zhimi.fan.za4\";\n }", "requestContainerInfo() {}", "constructor () { super() }", "function BaseDeviceProfile() {\n \n this.audioNeedsTranscodingCodecs = []; // fill these with audio codecs that the implemented device can handle natively\n this.videoNeedsTranscodingCodecs = []; // fill these with video codecs that the implemented device can handle natively\n this.validFormats = []; // fill these with video formats that the implemented device can handle natively\n\n this.transcodeOptions = {\n rescaleVideo : false, // BaseDeviceProfile.prototype.rescale\n subtitle : false, // BaseDeviceProfile.prototype.hardCodeSubtitle\n audioShiftCorrect : false // BaseDeviceProfile.prototype.correctAudioOffset\n };\n\n /**\n * @todo: whutz this?\n * @param {[type]} probeData [description]\n * @return {[type]} [description]\n */\n this.canPlayContainer = function (probeData) {\n throw new Error(\"canPlayContainer : Not Implemented\");\n };\n\n /**\n * Implement this method to return device specific ffmpeg flags for a probed media\n * @param {object} probeData ffmpeg probe data\n * @param {[type]} forceTranscode force transcode even if native format?\n * @return {Promise} [description]\n */\n this.getFFmpegFlags = function (probeData, forceTranscode) {\n throw new Error(\"getFFmpegFlags : Not Implemented!\");\n };\n\n}", "static get STATUS() {\n return 0;\n }", "static create () {}", "get() {}", "didMount() {\n }", "_onMessage() {\n throw new Error(\"not implemented\");\n }", "onReady() {}", "native() {\n throw new Error('NOT_IMPLEMENTED_EXCEPTION: you must override this method in order to use it')\n }", "function sdk(){\n}", "constructor () {\r\n\t\t\r\n\t}", "transient private protected internal function m182() {}", "function version(){ return \"0.13.0\" }", "static getDeviceModel() {\n return \"zhimi.fan.za5\";\n }", "function getVersion(){return _VERSION}", "transient private internal function m185() {}", "started () {}", "constructor() {\r\n }", "started() { }", "InitVsaEngine() {\n\n }", "function SigV4Utils() { }", "started() {\r\n\r\n\t}", "static get NOT_READY () {return 0}", "initialize() {\n\n }", "started () {\n\n }", "started () {\n\n }", "started () {\n\n }", "onMessageReceive() {}", "initialize()\n {\n }", "_get () {\n throw new Error('_get not implemented')\n }", "get () {\n }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "function getImplementation( cb ){\n\n }", "started() {}", "started() {}", "started() {}", "started() {}", "started() {}", "started() {}", "started() {}", "started() {}", "started() {}", "started() {}", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "heartbeat () {\n }", "static final private internal function m106() {}", "initleancloud() {\n AV.init({\n appId: keys.appId,\n appKey: keys.appKey\n })\n this.globalData.AV = AV\n }", "getStreamPosition() {\n return Native.getStreamPosition();\n }", "onMessage() {}", "onMessage() {}", "get WSAPlayerX64() {}", "constructor() {\n super();\n this._logger = new pip_services3_components_node_3.CompositeLogger();\n this._connectionResolver = new connect_1.AwsConnectionResolver();\n this._connectTimeout = 30000;\n this._client = null; //AmazonCloudWatchClient\n this._opened = false;\n }" ]
[ "0.53504926", "0.4896905", "0.48514667", "0.48116106", "0.4775166", "0.4743932", "0.47342455", "0.47035336", "0.4694186", "0.4694186", "0.46744877", "0.46453032", "0.46394095", "0.4629355", "0.46211302", "0.45832416", "0.45812932", "0.45752546", "0.45698234", "0.45625272", "0.4557475", "0.4549714", "0.45494938", "0.4545794", "0.45383474", "0.4523037", "0.45180768", "0.45005357", "0.4496748", "0.4486438", "0.447462", "0.44716924", "0.4468301", "0.44601226", "0.4456266", "0.4455926", "0.44557476", "0.4445067", "0.44378054", "0.44258687", "0.44258553", "0.4424118", "0.44097725", "0.4406038", "0.4404498", "0.4404498", "0.4404498", "0.43926418", "0.43781474", "0.43708664", "0.43657827", "0.43545496", "0.43545496", "0.43545496", "0.43545496", "0.43545496", "0.43545496", "0.43545496", "0.43545496", "0.43545496", "0.43545496", "0.43545496", "0.43526813", "0.43514904", "0.43514904", "0.43514904", "0.43514904", "0.43514904", "0.43514904", "0.43514904", "0.43514904", "0.43514904", "0.43514904", "0.4350625", "0.4350625", "0.4350625", "0.4350625", "0.4350625", "0.4350625", "0.4350625", "0.4350625", "0.4350625", "0.4350625", "0.4350625", "0.4350625", "0.4350625", "0.4350625", "0.4350625", "0.4350625", "0.4350625", "0.4350625", "0.4350625", "0.4350625", "0.4349645", "0.43450522", "0.43440443", "0.43390423", "0.43347356", "0.43347356", "0.43332103", "0.43318707" ]
0.0
-1
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
function _default(ecModel, api, payload) { ecModel.eachSeriesByType('sankey', function (seriesModel) { var nodeWidth = seriesModel.get('nodeWidth'); var nodeGap = seriesModel.get('nodeGap'); var layoutInfo = getViewRect(seriesModel, api); seriesModel.layoutInfo = layoutInfo; var width = layoutInfo.width; var height = layoutInfo.height; var graph = seriesModel.getGraph(); var nodes = graph.nodes; var edges = graph.edges; computeNodeValues(nodes); var filteredNodes = zrUtil.filter(nodes, function (node) { return node.getLayout().value === 0; }); var iterations = filteredNodes.length !== 0 ? 0 : seriesModel.get('layoutIterations'); var orient = seriesModel.get('orient'); var nodeAlign = seriesModel.get('nodeAlign'); layoutSankey(nodes, edges, nodeWidth, nodeGap, width, height, iterations, orient, nodeAlign); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get Android() {}", "function SBRecordsetPHP_analyzePlatformSpecific()\r\n{\r\n\r\n\r\n}", "onChildAppStart () {\n\n }", "private internal function m248() {}", "private public function m246() {}", "onMessageStart() { }", "createStream () {\n\n }", "_playbackCompatibility() {\n // Detect audio playback capabilities.\n\n // Detect HTML5 Audio playback.\n // http://caniuse.com/#feat=audio\n this.canUseAudio = Boolean(new Audio());\n console.log('Native HTML5 Audio playback capability: ' +\n this.canUseAudio);\n\n // Detect Cordova Media Playback\n // It allows playing audio using the native bridge inside WebView Apps.\n // https://github.com/apache/cordova-plugin-media/blob/master/doc/index.md\n this.canUseCordovaMedia = Boolean(window.Media);\n console.log('Cordova Media playback capability: ' +\n this.canUseCordovaMedia);\n\n if (!(this.canUseAudio || this.canUseCordovaMedia)) {\n throw new Error(\n 'Some form of audio playback capability is required');\n }\n\n var _audio = new Audio();\n if (_audio.canPlayType === 'function') {\n throw new Error(\n 'Unable to detect audio playback capabilities');\n }\n\n var canPlayOggVorbis = _audio.canPlayType(\n 'audio/ogg; codecs=\"vorbis\"') !== '';\n var canPlayOggOpus = _audio.canPlayType(\n 'audio/ogg; codecs=\"opus\"') !== '';\n var canPlayWave = _audio.canPlayType('audio/wav') !== '';\n var canPlayMP3 = _audio.canPlayType('audio/mpeg; codecs=\"mp3\"') !== '';\n var canPlayAAC = _audio.canPlayType(\n 'audio/mp4; codecs=\"mp4a.40.2\"') !== '';\n var canPlay3GPP = _audio.canPlayType(\n 'audio/3gpp; codecs=\"samr\"') !== '';\n\n console.log('Native Vorbis audio in Ogg container playback capability: ' +\n canPlayOggVorbis);\n console.log('Native Opus audio in Ogg container playback capability: ' +\n canPlayOggOpus);\n console.log('Native PCM audio in Waveform Audio File Format (WAVE) ' +\n 'playback capability: ' + canPlayWave);\n console.log('Native MPEG Audio Layer 3 (MP3) playback capability: ' +\n canPlayMP3);\n console.log('Native Low-Complexity AAC audio in MP4 container playback ' +\n 'capability: ' + canPlayAAC);\n console.log('Native AMR audio in 3GPP container playback capability: ' +\n canPlay3GPP);\n\n if (!(canPlayWave || canPlayMP3)) {\n throw new Error(\n 'Native Wave or MP3 playback is required');\n }\n }", "constructor() {\n\t}", "constructor() {\n\t}", "constructor() {\n\n\t}", "onComponentMount() {\n\n }", "constructor() {\n throw new Error('Not implemented');\n }", "supportsPlatform() {\n return true;\n }", "function _____SHARED_functions_____(){}", "constructor() {\n }", "constructor() {\n\t\t// ...\n\t}", "static get tag(){return\"hal-9000\"}", "static getDeviceModel() {\n return \"zhimi.fan.za4\";\n }", "requestContainerInfo() {}", "constructor () { super() }", "function BaseDeviceProfile() {\n \n this.audioNeedsTranscodingCodecs = []; // fill these with audio codecs that the implemented device can handle natively\n this.videoNeedsTranscodingCodecs = []; // fill these with video codecs that the implemented device can handle natively\n this.validFormats = []; // fill these with video formats that the implemented device can handle natively\n\n this.transcodeOptions = {\n rescaleVideo : false, // BaseDeviceProfile.prototype.rescale\n subtitle : false, // BaseDeviceProfile.prototype.hardCodeSubtitle\n audioShiftCorrect : false // BaseDeviceProfile.prototype.correctAudioOffset\n };\n\n /**\n * @todo: whutz this?\n * @param {[type]} probeData [description]\n * @return {[type]} [description]\n */\n this.canPlayContainer = function (probeData) {\n throw new Error(\"canPlayContainer : Not Implemented\");\n };\n\n /**\n * Implement this method to return device specific ffmpeg flags for a probed media\n * @param {object} probeData ffmpeg probe data\n * @param {[type]} forceTranscode force transcode even if native format?\n * @return {Promise} [description]\n */\n this.getFFmpegFlags = function (probeData, forceTranscode) {\n throw new Error(\"getFFmpegFlags : Not Implemented!\");\n };\n\n}", "static get STATUS() {\n return 0;\n }", "static create () {}", "get() {}", "didMount() {\n }", "_onMessage() {\n throw new Error(\"not implemented\");\n }", "onReady() {}", "native() {\n throw new Error('NOT_IMPLEMENTED_EXCEPTION: you must override this method in order to use it')\n }", "function sdk(){\n}", "constructor () {\r\n\t\t\r\n\t}", "transient private protected internal function m182() {}", "function version(){ return \"0.13.0\" }", "static getDeviceModel() {\n return \"zhimi.fan.za5\";\n }", "started () {}", "function getVersion(){return _VERSION}", "transient private internal function m185() {}", "constructor() {\r\n }", "started() { }", "InitVsaEngine() {\n\n }", "started() {\r\n\r\n\t}", "function SigV4Utils() { }", "static get NOT_READY () {return 0}", "started () {\n\n }", "started () {\n\n }", "started () {\n\n }", "initialize() {\n\n }", "onMessageReceive() {}", "initialize()\n {\n }", "_get () {\n throw new Error('_get not implemented')\n }", "get () {\n }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "function getImplementation( cb ){\n\n }", "started() {}", "started() {}", "started() {}", "started() {}", "started() {}", "started() {}", "started() {}", "started() {}", "started() {}", "started() {}", "heartbeat () {\n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "initleancloud() {\n AV.init({\n appId: keys.appId,\n appKey: keys.appKey\n })\n this.globalData.AV = AV\n }", "static final private internal function m106() {}", "getStreamPosition() {\n return Native.getStreamPosition();\n }", "onMessage() {}", "onMessage() {}", "constructor() {\n super();\n this._logger = new pip_services3_components_node_3.CompositeLogger();\n this._connectionResolver = new connect_1.AwsConnectionResolver();\n this._connectTimeout = 30000;\n this._client = null; //AmazonCloudWatchClient\n this._opened = false;\n }", "get WSAPlayerX64() {}" ]
[ "0.5349978", "0.48933455", "0.48501366", "0.48083982", "0.4772584", "0.474481", "0.47349635", "0.47027457", "0.46929818", "0.46929818", "0.4673667", "0.4644517", "0.46389893", "0.46253318", "0.4618249", "0.4582536", "0.45813942", "0.45742747", "0.45687214", "0.45623618", "0.45563498", "0.45493752", "0.45489514", "0.45457798", "0.4538844", "0.45218396", "0.45187637", "0.4498104", "0.44946006", "0.44832855", "0.44729492", "0.44691566", "0.44642788", "0.44588575", "0.44554883", "0.4453296", "0.44531393", "0.4443642", "0.44374335", "0.44267404", "0.44238108", "0.44228086", "0.4407407", "0.44043022", "0.44043022", "0.44043022", "0.44035548", "0.4393825", "0.43761918", "0.43697277", "0.4364149", "0.43530616", "0.43530616", "0.43530616", "0.43530616", "0.43530616", "0.43530616", "0.43530616", "0.43530616", "0.43530616", "0.43530616", "0.43530616", "0.43517888", "0.43511248", "0.43511248", "0.43511248", "0.43511248", "0.43511248", "0.43511248", "0.43511248", "0.43511248", "0.43511248", "0.43511248", "0.43502304", "0.43493763", "0.43493763", "0.43493763", "0.43493763", "0.43493763", "0.43493763", "0.43493763", "0.43493763", "0.43493763", "0.43493763", "0.43493763", "0.43493763", "0.43493763", "0.43493763", "0.43493763", "0.43493763", "0.43493763", "0.43493763", "0.43493763", "0.43493763", "0.43440503", "0.43416435", "0.43375877", "0.43357816", "0.43357816", "0.43336093", "0.43330038" ]
0.0
-1
Can not use instanceof, consider different scope by cross domain or es module import in ec extensions. Mount a method "isInstance()" to Clz.
function enableClassCheck(Clz) { var classAttr = ['__\0is_clz', classBase++, Math.random().toFixed(3)].join('_'); Clz.prototype[classAttr] = true; Clz.isInstance = function (obj) { return !!(obj && obj[classAttr]); }; } // superCall should have class info, which can not be fetch from 'this'.
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function instanceOf (obj, Clss) {\n return Clss[Symbol.hasInstance](obj);\n}", "static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n return obj['__pulumiType'] === Addon.__pulumiType;\n }", "static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n return obj['__pulumiType'] === Network.__pulumiType;\n }", "static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n return obj['__pulumiType'] === NetworkInterface.__pulumiType;\n }", "static isInstance(obj) {\n return utils.isInstance(obj, \"__pulumiUnknown\");\n }", "function lisp_is_instance(obj, c) {\n return lisp_is_subclass(lisp_class_of(obj), c);\n}", "static [Symbol.hasInstance](obj) {\n return false;\n }", "static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n return obj['__pulumiType'] === ProxyTarget.__pulumiType;\n }", "static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n return obj['__pulumiType'] === DefaultNetworkAcl.__pulumiType;\n }", "static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n return obj['__pulumiType'] === DefaultNetworkAcl.__pulumiType;\n }", "static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n return obj['__pulumiType'] === Detector.__pulumiType;\n }", "function isInstance(obj,type){return obj instanceof type||obj!=null&&obj.constructor!=null&&obj.constructor.name!=null&&obj.constructor.name===type.name;}", "function isInstance(obj,type){return obj instanceof type||obj!=null&&obj.constructor!=null&&obj.constructor.name!=null&&obj.constructor.name===type.name;}", "function isInstance(obj,type){return obj instanceof type||obj!=null&&obj.constructor!=null&&obj.constructor.name!=null&&obj.constructor.name===type.name;}", "static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n return obj['__pulumiType'] === Endpoint.__pulumiType;\n }", "static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n return obj['__pulumiType'] === PatchBaseline.__pulumiType;\n }", "function isInstance(obj, type) {\n return (\n obj instanceof type ||\n (obj != null &&\n obj.constructor != null &&\n obj.constructor.name != null &&\n obj.constructor.name === type.name)\n );\n }", "static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n return obj['__pulumiType'] === ServerTrustGroup.__pulumiType;\n }", "static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n return obj['__pulumiType'] === ResourceServer.__pulumiType;\n }", "function isInstance(obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n }", "static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n return obj['__pulumiType'] === EventSourceMapping.__pulumiType;\n }", "static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n return obj['__pulumiType'] === Pipeline.__pulumiType;\n }", "static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n return obj['__pulumiType'] === StorageTarget.__pulumiType;\n }", "function isInstance(obj, type) {\n return (\n obj instanceof type ||\n (obj != null &&\n obj.constructor != null &&\n obj.constructor.name != null &&\n obj.constructor.name === type.name)\n );\n }", "static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n return obj['__pulumiType'] === Certificate.__pulumiType;\n }", "static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n return obj['__pulumiType'] === VpcPeeringConnection.__pulumiType;\n }", "static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n return obj['__pulumiType'] === PeeringService.__pulumiType;\n }", "static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n return obj['__pulumiType'] === RestApi.__pulumiType;\n }", "static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n return obj['__pulumiType'] === ApplicationSecurityGroup.__pulumiType;\n }", "static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n return obj['__pulumiType'] === AccessControlRecord.__pulumiType;\n }", "static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n return obj['__pulumiType'] === DevEndpoint.__pulumiType;\n }", "function detecteInstanceOf (obj, origin) {\n return obj instanceof origin\n // return Object.getPrototypeOf(obj) === origin.prototype\n // return obj.__proto__ === origin.prototype\n}", "static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n return obj['__pulumiType'] === MachineLearningCompute.__pulumiType;\n }", "static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n return obj['__pulumiType'] === ApiRelease.__pulumiType;\n }", "static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n return obj['__pulumiType'] === ClusterSnapshot.__pulumiType;\n }", "function isInstance(obj, type) {\n\t\treturn obj instanceof type || obj != null && obj.constructor != null && obj.constructor.name != null && obj.constructor.name === type.name;\n\t}", "static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n return obj['__pulumiType'] === VolumeContainer.__pulumiType;\n }", "static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n return obj['__pulumiType'] === Image.__pulumiType;\n }", "static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n return obj['__pulumiType'] === StaticIpAttachment.__pulumiType;\n }", "static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n return obj['__pulumiType'] === OpenIdConnectProvider.__pulumiType;\n }", "static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n return obj['__pulumiType'] === StackSetInstance.__pulumiType;\n }", "static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n return obj['__pulumiType'] === LifecycleHook.__pulumiType;\n }", "static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n return obj['__pulumiType'] === WorkloadNetworkSegment.__pulumiType;\n }", "static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n return obj['__pulumiType'] === Document.__pulumiType;\n }", "static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n return obj['__pulumiType'] === SshKey.__pulumiType;\n }", "static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n return obj['__pulumiType'] === VirtualRouter.__pulumiType;\n }", "function isInstance(a) {\n return a instanceof $ || ($['zepto'] && $['zepto']['isZ'](a));\n }", "static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n return obj['__pulumiType'] === ApiIssue.__pulumiType;\n }", "static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n return obj['__pulumiType'] === Authorizer.__pulumiType;\n }", "static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n return obj['__pulumiType'] === Budget.__pulumiType;\n }", "static isInstance(obj) {\n return utils.isInstance(obj, \"__pulumiOutput\");\n }", "static isInstance(obj) {\n if (obj === undefined || obj === null) {\n return false;\n }\n return obj['__pulumiType'] === EndpointConfiguration.__pulumiType;\n }", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}", "function isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}" ]
[ "0.74138486", "0.7238343", "0.72239125", "0.7198562", "0.71668994", "0.71356755", "0.7110122", "0.7055961", "0.7044018", "0.7044018", "0.7030113", "0.69928986", "0.69928986", "0.69928986", "0.6991868", "0.697667", "0.6962421", "0.69558203", "0.69399625", "0.69149274", "0.6913663", "0.69111496", "0.6901754", "0.6873482", "0.68697304", "0.6864227", "0.6863875", "0.6861434", "0.68566567", "0.6833769", "0.68211883", "0.68170863", "0.68151295", "0.68134385", "0.6810905", "0.6807969", "0.6807012", "0.6799733", "0.67983717", "0.67924654", "0.6790602", "0.6788241", "0.678552", "0.67810214", "0.6773071", "0.6752463", "0.6751726", "0.67364484", "0.6733025", "0.6722316", "0.6716968", "0.67113554", "0.6707607", "0.6707607", "0.6707607", "0.6707607", "0.6707607", "0.6707607", "0.6707607", "0.6707607", "0.6707607", "0.6707607", "0.6707607", "0.6707607", "0.6707607", "0.6707607", "0.6707607", "0.6707607", "0.6707607", "0.6707607", "0.6707607", "0.6707607", "0.6707607", "0.6707607", "0.6707607", "0.6707607", "0.6707607", "0.6707607", "0.6707607", "0.6707607", "0.6707607", "0.6707607", "0.6707607", "0.6707607", "0.6707607", "0.6707607", "0.6707607", "0.6707607", "0.6707607", "0.6707607", "0.6707607", "0.6707607", "0.6707607", "0.6707607", "0.6707607", "0.6707607", "0.6707607", "0.6707607", "0.6707607", "0.6707607", "0.6707607" ]
0.0
-1
Consider this case: class A has method f, class B inherits class A, overrides method f, f call superApply('f'), class C inherits class B, do not overrides method f, then when method of class C is called, dead loop occured.
function superCall(context, methodName) { var args = zrUtil.slice(arguments, 2); return this.superClass.prototype[methodName].apply(context, args); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __applyUp(self, func, args)\r\n{\r\n func.apply(self, args);\r\n if (self.__parent) {\r\n __applyUp(self.__parent, func, args);\r\n }\r\n}", "function b(){f.call(this)}", "function __applyDown(self, func, args)\r\n{\r\n func.apply(self, args);\r\n if (self.__children) {\r\n var c = self.__children;\r\n for (var i = 0, l = c.length; i < l; ++i)\r\n {\r\n __applyDown(c[i], func, args);\r\n }\r\n }\r\n}", "apply(target, thisArg, argArray = []) {\n // Don't proceed if the hook says no\n if (!hook({\n kind: \"__$$_PROXY_APPLY\" /* APPLY */,\n policy,\n thisArg,\n argArray,\n target,\n path: stringifyPath(inputPath)\n })) {\n return;\n }\n return Reflect.apply(target, thisArg, argArray);\n }", "function _apply(f, thisArg, args) {\n\t\treturn args.length === 0\n\t\t\t? attempt.call(thisArg, f)\n\t\t\t: attempt.apply(thisArg, [f].concat(args));\n\t}", "function _apply(f, thisArg, args) {\n\t\treturn args.length === 0\n\t\t\t? attempt.call(thisArg, f)\n\t\t\t: attempt.apply(thisArg, [f].concat(args));\n\t}", "function inherit(){}", "function B(f) {\n Cs.push(C);\n while(f instanceof F) {\n var fun = f.f;\n f.f = __blackhole;\n C = 0;\n f = fun();\n }\n C = Cs.pop();\n return f;\n}", "function B(f) {\n while(f instanceof F) {\n var fun = f.f;\n f.f = __blackhole;\n f = fun();\n }\n return f;\n}", "function A(f, args) {\n while(true) {\n f = E(f);\n if(f instanceof F) {\n f = E(B(f));\n }\n if(f instanceof PAP) {\n // f is a partial application\n if(args.length == f.arity) {\n // Saturated application\n return f.f.apply(null, f.args.concat(args));\n } else if(args.length < f.arity) {\n // Application is still unsaturated\n return new PAP(f.f, f.args.concat(args));\n } else {\n // Application is oversaturated; \n var f2 = f.f.apply(null, f.args.concat(args.slice(0, f.arity)));\n args = args.slice(f.arity);\n f = B(f2);\n }\n } else if(f instanceof Function) {\n if(args.length == f.length) {\n return f.apply(null, args);\n } else if(args.length < f.length) {\n return new PAP(f, args);\n } else {\n var f2 = f.apply(null, args.slice(0, f.length));\n args = args.slice(f.length);\n f = B(f2);\n }\n } else {\n return f;\n }\n }\n}", "apply () {}", "function B(f) {\n while(f instanceof F) {\n var fun = f.f;\n f = __blackhole;\n f = fun();\n }\n return f;\n}", "function Fitness ( f ) {\n /*jshint validthis: true */ \n this.apply = f; \n}", "function NaiveBroadphase(){\n Broadphase.apply(this);\n}", "function NaiveBroadphase(){\n Broadphase.apply(this);\n}", "function NaiveBroadphase(){\n Broadphase.apply(this);\n}", "function foldCause_(self, f, g, __trace) {\n return fold_(sandbox(self), f, g, __trace);\n}", "function Fitness ( f ) {\n this.apply = f;\n \n}", "function DispatchApply(callback, thisArg) { callback.apply(thisArg); }", "function exitFunction(node) {\n const stackContext = popContext();\n if (stackContext?.member == null ||\n stackContext.class == null ||\n stackContext.usesThis ||\n (ignoreOverrideMethods && stackContext.member.override) ||\n (ignoreClassesThatImplementAnInterface &&\n stackContext.class.implements != null)) {\n return;\n }\n if (isIncludedInstanceMethod(stackContext.member)) {\n context.report({\n node,\n loc: util.getFunctionHeadLoc(node, sourceCode),\n messageId: 'missingThis',\n data: {\n name: util.getFunctionNameWithKind(node),\n },\n });\n }\n }", "function trackDerivedFunction(derivation, f, context) {\n var prevAllowStateReads = allowStateReadsStart(true);\n // pre allocate array allocation + room for variation in deps\n // array will be trimmed by bindDependencies\n changeDependenciesStateTo0(derivation);\n derivation.newObserving = new Array(derivation.observing.length + 100);\n derivation.unboundDepsCount = 0;\n derivation.runId = ++globalState.runId;\n var prevTracking = globalState.trackingDerivation;\n globalState.trackingDerivation = derivation;\n var result;\n if (globalState.disableErrorBoundaries === true) {\n result = f.call(context);\n }\n else {\n try {\n result = f.call(context);\n }\n catch (e) {\n result = new CaughtException(e);\n }\n }\n globalState.trackingDerivation = prevTracking;\n bindDependencies(derivation);\n warnAboutDerivationWithoutDependencies(derivation);\n allowStateReadsEnd(prevAllowStateReads);\n return result;\n}", "function trackDerivedFunction(derivation, f, context) {\n var prevAllowStateReads = allowStateReadsStart(true);\n // pre allocate array allocation + room for variation in deps\n // array will be trimmed by bindDependencies\n changeDependenciesStateTo0(derivation);\n derivation.newObserving = new Array(derivation.observing.length + 100);\n derivation.unboundDepsCount = 0;\n derivation.runId = ++globalState.runId;\n var prevTracking = globalState.trackingDerivation;\n globalState.trackingDerivation = derivation;\n var result;\n if (globalState.disableErrorBoundaries === true) {\n result = f.call(context);\n }\n else {\n try {\n result = f.call(context);\n }\n catch (e) {\n result = new CaughtException(e);\n }\n }\n globalState.trackingDerivation = prevTracking;\n bindDependencies(derivation);\n warnAboutDerivationWithoutDependencies(derivation);\n allowStateReadsEnd(prevAllowStateReads);\n return result;\n}", "function trackDerivedFunction(derivation, f, context) {\n // pre allocate array allocation + room for variation in deps\n // array will be trimmed by bindDependencies\n changeDependenciesStateTo0(derivation);\n derivation.newObserving = new Array(derivation.observing.length + 100);\n derivation.unboundDepsCount = 0;\n derivation.runId = ++globalState.runId;\n var prevTracking = globalState.trackingDerivation;\n globalState.trackingDerivation = derivation;\n var result;\n if (globalState.disableErrorBoundaries === true) {\n result = f.call(context);\n } else {\n try {\n result = f.call(context);\n } catch (e) {\n result = new CaughtException(e);\n }\n }\n globalState.trackingDerivation = prevTracking;\n bindDependencies(derivation);\n return result;\n}", "function trackDerivedFunction(derivation, f, context) {\n // pre allocate array allocation + room for variation in deps\n // array will be trimmed by bindDependencies\n changeDependenciesStateTo0(derivation);\n derivation.newObserving = new Array(derivation.observing.length + 100);\n derivation.unboundDepsCount = 0;\n derivation.runId = ++globalState.runId;\n var prevTracking = globalState.trackingDerivation;\n globalState.trackingDerivation = derivation;\n var result;\n\n if (globalState.disableErrorBoundaries === true) {\n result = f.call(context);\n } else {\n try {\n result = f.call(context);\n } catch (e) {\n result = new CaughtException(e);\n }\n }\n\n globalState.trackingDerivation = prevTracking;\n bindDependencies(derivation);\n return result;\n}", "function trackDerivedFunction(derivation, f, context) {\r\n var prevAllowStateReads = allowStateReadsStart(true);\r\n // pre allocate array allocation + room for variation in deps\r\n // array will be trimmed by bindDependencies\r\n changeDependenciesStateTo0(derivation);\r\n derivation.newObserving = new Array(derivation.observing.length + 100);\r\n derivation.unboundDepsCount = 0;\r\n derivation.runId = ++globalState.runId;\r\n var prevTracking = globalState.trackingDerivation;\r\n globalState.trackingDerivation = derivation;\r\n var result;\r\n if (globalState.disableErrorBoundaries === true) {\r\n result = f.call(context);\r\n }\r\n else {\r\n try {\r\n result = f.call(context);\r\n }\r\n catch (e) {\r\n result = new CaughtException(e);\r\n }\r\n }\r\n globalState.trackingDerivation = prevTracking;\r\n bindDependencies(derivation);\r\n warnAboutDerivationWithoutDependencies(derivation);\r\n allowStateReadsEnd(prevAllowStateReads);\r\n return result;\r\n}", "function y(){f.call(this)}", "function y(){f.call(this)}", "function y(){f.call(this)}", "function super_fn() {\n\t\t\t\t\tif (!oldFn) { return }\n\t\t\t\t\teach(arguments, function(arg, i) {\n\t\t\t\t\t\targs[i] = arg\n\t\t\t\t\t})\n\t\t\t\t\treturn oldFn.apply(self, args)\n\t\t\t\t}", "function super_fn() {\n\t\t\t\t\tif (!oldFn) { return }\n\t\t\t\t\teach(arguments, function(arg, i) {\n\t\t\t\t\t\targs[i] = arg\n\t\t\t\t\t})\n\t\t\t\t\treturn oldFn.apply(self, args)\n\t\t\t\t}", "function super_fn() {\n\t\t\t\t\tif (!oldFn) { return }\n\t\t\t\t\teach(arguments, function(arg, i) {\n\t\t\t\t\t\targs[i] = arg\n\t\t\t\t\t})\n\t\t\t\t\treturn oldFn.apply(self, args)\n\t\t\t\t}", "function super_fn() {\n\t\t\t\t\tif (!oldFn) { return }\n\t\t\t\t\teach(arguments, function(arg, i) {\n\t\t\t\t\t\targs[i] = arg\n\t\t\t\t\t})\n\t\t\t\t\treturn oldFn.apply(self, args)\n\t\t\t\t}", "function trackDerivedFunction(derivation, f, context) {\n // pre allocate array allocation + room for variation in deps\n // array will be trimmed by bindDependencies\n changeDependenciesStateTo0(derivation);\n derivation.newObserving = new Array(derivation.observing.length + 100);\n derivation.unboundDepsCount = 0;\n derivation.runId = ++globalState.runId;\n var prevTracking = globalState.trackingDerivation;\n globalState.trackingDerivation = derivation;\n var result;\n try {\n result = f.call(context);\n }\n catch (e) {\n result = new CaughtException(e);\n }\n globalState.trackingDerivation = prevTracking;\n bindDependencies(derivation);\n return result;\n}", "function trackDerivedFunction(derivation, f, context) {\n // pre allocate array allocation + room for variation in deps\n // array will be trimmed by bindDependencies\n changeDependenciesStateTo0(derivation);\n derivation.newObserving = new Array(derivation.observing.length + 100);\n derivation.unboundDepsCount = 0;\n derivation.runId = ++globalState.runId;\n var prevTracking = globalState.trackingDerivation;\n globalState.trackingDerivation = derivation;\n var result;\n try {\n result = f.call(context);\n }\n catch (e) {\n result = new CaughtException(e);\n }\n globalState.trackingDerivation = prevTracking;\n bindDependencies(derivation);\n return result;\n}", "function trackDerivedFunction(derivation, f, context) {\n // pre allocate array allocation + room for variation in deps\n // array will be trimmed by bindDependencies\n changeDependenciesStateTo0(derivation);\n derivation.newObserving = new Array(derivation.observing.length + 100);\n derivation.unboundDepsCount = 0;\n derivation.runId = ++globalState.runId;\n var prevTracking = globalState.trackingDerivation;\n globalState.trackingDerivation = derivation;\n var result;\n try {\n result = f.call(context);\n }\n catch (e) {\n result = new CaughtException(e);\n }\n globalState.trackingDerivation = prevTracking;\n bindDependencies(derivation);\n return result;\n}", "function trackDerivedFunction(derivation, f, context) {\n // pre allocate array allocation + room for variation in deps\n // array will be trimmed by bindDependencies\n changeDependenciesStateTo0(derivation);\n derivation.newObserving = new Array(derivation.observing.length + 100);\n derivation.unboundDepsCount = 0;\n derivation.runId = ++globalState.runId;\n var prevTracking = globalState.trackingDerivation;\n globalState.trackingDerivation = derivation;\n var result;\n try {\n result = f.call(context);\n }\n catch (e) {\n result = new CaughtException(e);\n }\n globalState.trackingDerivation = prevTracking;\n bindDependencies(derivation);\n return result;\n}", "function trackDerivedFunction(derivation, f, context) {\n // pre allocate array allocation + room for variation in deps\n // array will be trimmed by bindDependencies\n changeDependenciesStateTo0(derivation);\n derivation.newObserving = new Array(derivation.observing.length + 100);\n derivation.unboundDepsCount = 0;\n derivation.runId = ++globalState.runId;\n var prevTracking = globalState.trackingDerivation;\n globalState.trackingDerivation = derivation;\n var result;\n try {\n result = f.call(context);\n }\n catch (e) {\n result = new CaughtException(e);\n }\n globalState.trackingDerivation = prevTracking;\n bindDependencies(derivation);\n return result;\n}", "function trackDerivedFunction(derivation, f, context) {\n // pre allocate array allocation + room for variation in deps\n // array will be trimmed by bindDependencies\n changeDependenciesStateTo0(derivation);\n derivation.newObserving = new Array(derivation.observing.length + 100);\n derivation.unboundDepsCount = 0;\n derivation.runId = ++globalState.runId;\n var prevTracking = globalState.trackingDerivation;\n globalState.trackingDerivation = derivation;\n var result;\n try {\n result = f.call(context);\n }\n catch (e) {\n result = new CaughtException(e);\n }\n globalState.trackingDerivation = prevTracking;\n bindDependencies(derivation);\n return result;\n}", "function trackDerivedFunction$$1(derivation, f, context) {\n // pre allocate array allocation + room for variation in deps\n // array will be trimmed by bindDependencies\n changeDependenciesStateTo0$$1(derivation);\n derivation.newObserving = new Array(derivation.observing.length + 100);\n derivation.unboundDepsCount = 0;\n derivation.runId = ++globalState$$1.runId;\n var prevTracking = globalState$$1.trackingDerivation;\n globalState$$1.trackingDerivation = derivation;\n var result;\n if (globalState$$1.disableErrorBoundaries === true) {\n result = f.call(context);\n }\n else {\n try {\n result = f.call(context);\n }\n catch (e) {\n result = new CaughtException$$1(e);\n }\n }\n globalState$$1.trackingDerivation = prevTracking;\n bindDependencies(derivation);\n return result;\n}", "function g()\n{\n return f.call(this);\n}", "function A(f, args) {\n while(true) {\n f = E(f);\n if(f instanceof Function) {\n if(args.length === f.length) {\n return f.apply(null, args);\n } else if(args.length < f.length) {\n return new PAP(f, args);\n } else {\n var f2 = f.apply(null, args.slice(0, f.length));\n args = args.slice(f.length);\n f = B(f2);\n }\n } else if(f instanceof PAP) {\n if(args.length === f.arity) {\n return f.f.apply(null, f.args.concat(args));\n } else if(args.length < f.arity) {\n return new PAP(f.f, f.args.concat(args));\n } else {\n var f2 = f.f.apply(null, f.args.concat(args.slice(0, f.arity)));\n args = args.slice(f.arity);\n f = B(f2);\n }\n } else {\n return f;\n }\n }\n}", "function NaiveBroadphase(){\n\t Broadphase.apply(this);\n\t}", "function ContextFixer(func, context) {\n /* Make sure 'this' inside a method points to its class */\n this.func = func;\n this.context = context;\n this.args = arguments;\n var self = this;\n \n this.execute = function() {\n /* execute the method */\n var args = new Array();\n // the first arguments will be the extra ones of the class\n for (var i=0; i < self.args.length - 2; i++) {\n args.push(self.args[i + 2]);\n };\n // the last are the ones passed on to the execute method\n for (var i=0; i < arguments.length; i++) {\n args.push(arguments[i]);\n };\n return self.func.apply(self.context, args);\n };\n\n}", "function Fold(f, z, c, to) {\n\t\t\tthis.f = f; this.z = z; this.c = c; this.to = to;\n\t\t\tthis.resolver = failIfRejected;\n\t\t\tthis.receiver = this;\n\t\t}", "function Fold(f, z, c, to) {\n\t\t\tthis.f = f; this.z = z; this.c = c; this.to = to;\n\t\t\tthis.resolver = failIfRejected;\n\t\t\tthis.receiver = this;\n\t\t}", "function Fold(f, z, c, to) {\n\t\t\tthis.f = f; this.z = z; this.c = c; this.to = to;\n\t\t\tthis.resolver = failIfRejected;\n\t\t\tthis.receiver = this;\n\t\t}", "function Fold(f, z, c, to) {\n\t\t\tthis.f = f; this.z = z; this.c = c; this.to = to;\n\t\t\tthis.resolver = failIfRejected;\n\t\t\tthis.receiver = this;\n\t\t}", "function Fold(f, z, c, to) {\n\t\t\tthis.f = f; this.z = z; this.c = c; this.to = to;\n\t\t\tthis.resolver = failIfRejected;\n\t\t\tthis.receiver = this;\n\t\t}", "function Fold(f, z, c, to) {\n\t\t\tthis.f = f; this.z = z; this.c = c; this.to = to;\n\t\t\tthis.resolver = failIfRejected;\n\t\t\tthis.receiver = this;\n\t\t}", "function Fold(f, z, c, to) {\n\t\t\tthis.f = f; this.z = z; this.c = c; this.to = to;\n\t\t\tthis.resolver = failIfRejected;\n\t\t\tthis.receiver = this;\n\t\t}", "function A(f, args) {\n if(f instanceof T) {\n f = E(f);\n }\n // Closure does some funny stuff with functions that occasionally\n // results in non-functions getting applied, so we have to deal with\n // it.\n if(!(f instanceof Function)) {\n f = B(f);\n if(!(f instanceof Function)) {\n return f;\n }\n }\n\n if(f.arity === undefined) {\n f.arity = f.length;\n }\n if(args.length === f.arity) {\n switch(f.arity) {\n case 0: return f();\n case 1: return f(args[0]);\n default: return f.apply(null, args);\n }\n } else if(args.length > f.arity) {\n switch(f.arity) {\n case 0: return f();\n case 1: return A(f(args.shift()), args);\n default: return A(f.apply(null, args.splice(0, f.arity)), args);\n }\n } else {\n var g = function() {\n return A(f, args.concat(Array.prototype.slice.call(arguments)));\n };\n g.arity = f.arity - args.length;\n return g;\n }\n}", "function example3 () {\n function Animal(name) {\n this.name = name;\n this.speed = 0;\n }\n\n Animal.prototype.run = function(speed) {\n this.speed += speed;\n console.log( this.name + ' бежит, скорость ' + this.speed );\n };\n\n function Rabbit(name) {\n this.name = name;\n this.speed = 0;\n }\n\n Rabbit.prototype = Object.create(Animal.prototype)\n Rabbit.prototype.constructor = Rabbit\n\n Rabbit.prototype.jump = function() {\n this.speed++;\n console.log( this.name + ' прыгает' );\n };\n\n //total overriding\n Rabbit.prototype.run = function () {\n this.speed++\n this.jump()\n }\n\n // extend parent method\n Rabbit.prototype.run = function() {\n Animal.prototype.run.apply(this, arguments) // don't forget about proper context\n this.jump()\n };\n\n var rabbit = new Rabbit('Кроль');\n}", "function Fold(f, z, c, to) {\n\t\t\t\tthis.f = f; this.z = z; this.c = c; this.to = to;\n\t\t\t\tthis.resolver = failIfRejected;\n\t\t\t\tthis.receiver = this;\n\t\t\t}", "function foldCause(f, g, __trace) {\n return self => fold_(sandbox(self), f, g, __trace);\n}", "_callerHungup() {\n assert(false, 'subclass responsibility to override this method');\n }", "function B(){}", "apply() {\n this.onApply(this.operations);\n }", "apply() {\n this.onApply(this.operations);\n }", "function e(a,b){return function(){return a.apply(b,arguments)}}", "function inherited() { }", "apply(){\n super.apply();\n this.effect.connect(this.wet)\n }", "function superCall(context,methodName){var args=zrUtil.slice(arguments,2);return this.superClass.prototype[methodName].apply(context,args);}", "pMethod(){\r\n console.log(\"Parent Method\"); \r\n }", "function Nothing$prototype$chain(f) {\n return this;\n }", "function applyTo(args) {\n return function actuallyApply(func) {\n var allArgs;\n var unboxedFunc;\n switch (func.type) {\n case DATA:\n allArgs = args;\n unboxedFunc = func.fields[0];\n break;\n case PARTIAL_APPLY:\n allArgs = func.args.concat(args);\n unboxedFunc = func.func;\n break;\n default:\n throw new Error(\"an Apply node's function field evaluated to a non-function (of type \" + func.type + \"), which probably indicates a bug in the humbaba toolchain or runtime\");\n }\n var desired = unboxedFunc.length;\n var present = allArgs.length;\n if (present < desired) {\n PartialApply.call(this, unboxedFunc, allArgs);\n } else if (present > desired) {\n var func2 = {}\n unboxedFunc.apply(func2, allArgs.slice(0, desired));\n Apply.call(this, func2, allArgs.slice(desired));\n } else {\n unboxedFunc.apply(this, allArgs);\n }\n }\n}", "function task1 () {\n \n function Animal(name) {\n this.name = name;\n }\n\n Animal.prototype.walk = function() {\n console.log( \"ходит \" + this.name );\n };\n\n function Rabbit(name) {\n this.name = name;\n }\n Rabbit.prototype = Animal.prototype;\n\n Rabbit.prototype.walk = function() {\n console.log( \"прыгает! и ходит: \" + this.name );\n };\n\n var a = new Animal('a')\n\n var r = new Rabbit('r')\n\n a.walk() // прыгает и ходит????\n r.walk()\n}", "function createAdjustor(args, f, a, b) {\n return function(){\n var x = f.apply(null, arguments);\n while(x instanceof F) {x = x.f();}\n return x;\n };\n}", "function createAdjustor(args, f, a, b) {\n return function(){\n var x = f.apply(null, arguments);\n while(x instanceof F) {x = x.f();}\n return x;\n };\n}", "function r(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}", "function r(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}", "function ContextFixer(func, context) {\n this.func = func;\n this.context = context;\n this.args = arguments;\n var self = this;\n\n this.execute = function() {\n /* execute the method */\n var args = new Array();\n // the first arguments will be the extra ones of the class\n for (var i=0; i < self.args.length - 2; i++) {\n args.push(self.args[i + 2]);\n };\n // the last are the ones passed on to the execute method\n for (var i=0; i < arguments.length; i++) {\n args.push(arguments[i]);\n };\n return self.func.apply(self.context, args);\n };\n\n}", "execute(incomingNode, exitingNode) {\r\n\t\tthrow new Error('TransitionStrategy.execute is abstract.');\r\n\t}", "function inherit(C, P) {\n\tvar F = function () {};\n\tF.prototype = P.prototype;\n\tC.prototype = new F();\n\tC.uber = P.prototype; // KEEP A REFERENCE LINK TO THE PARENT'S PROTOTYPE DIRECTLY\n}", "function r(t,e){if(!(t instanceof e))throw new TypeError(\"Cannot call a class as a function\")}", "function inherit(targ, src) {\n var f = function() {\n if (this.__super__ == f) {\n // add __super__ of parent to front of lookup chain\n // so parent class constructor can call its parent using this.__super__\n this.__super__ = src.prototype.__super__;\n // call parent constructor function. this.__super__ now points to parent-of-parent\n src.apply(this, arguments);\n // remove temp __super__, expose targ.prototype.__super__ again\n delete this.__super__;\n }\n };\n\n f.prototype = src.prototype || src; // added || src to allow inheriting from objects as well as functions\n // Extend targ prototype instead of wiping it out --\n // in case inherit() is called after targ.prototype = {stuff}; statement\n targ.prototype = extend$1(new f(), targ.prototype); //\n targ.prototype.constructor = targ;\n targ.prototype.__super__ = f;\n }", "function mutate(liveRange, formatter, rootHasImpliedContext) {\n\t\tif (liveRange.collapsed) {\n\t\t\treturn;\n\t\t}\n\t\t// Because range may be mutated during traversal, we must only\n\t\t// refer to it before traversal.\n\t\tvar cac = liveRange.commonAncestorContainer;\n\t\tvar topmostOverrideNode = null;\n\t\tvar bottommostOverrideNode = null;\n\t\tvar isNonClearableOverride = false;\n\t\tvar upperBoundaryAndBeyond = false;\n\t\tvar fromCacToContext = Dom.childAndParentsUntilIncl(cac, function (node) {\n\t\t\t// Because we shouldn't expect hasContext to handle the\n\t\t\t// document element (which has nodeType 9).\n\t\t\treturn !node.parentNode || 9 === node.parentNode.nodeType || formatter.hasContext(node);\n\t\t});\n\t\tArrays.forEach(fromCacToContext, function (node) {\n\t\t\tupperBoundaryAndBeyond = upperBoundaryAndBeyond || formatter.isUpperBoundary(node);\n\t\t\tif (null != formatter.getOverride(node)) {\n\t\t\t\ttopmostOverrideNode = node;\n\t\t\t\tisNonClearableOverride = upperBoundaryAndBeyond;\n\t\t\t\tbottommostOverrideNode = bottommostOverrideNode || node;\n\t\t\t}\n\t\t});\n\t\tif ((rootHasImpliedContext || formatter.hasContext(Arrays.last(fromCacToContext)))\n\t\t\t && !isNonClearableOverride) {\n\t\t\tvar pushDownFrom = topmostOverrideNode || cac;\n\t\t\tvar cacOverride = formatter.getOverride(bottommostOverrideNode || cac);\n\t\t\tvar clearOverrideRec = formatter.clearOverrideRec || function (node) {\n\t\t\t\tDom.walkRec(node, formatter.clearOverride);\n\t\t\t};\n\t\t\tpushDownContext(\n\t\t\t\tliveRange,\n\t\t\t\tpushDownFrom,\n\t\t\t\tcacOverride,\n\t\t\t\tformatter.getOverride,\n\t\t\t\tformatter.clearOverride,\n\t\t\t\tclearOverrideRec,\n\t\t\t\tformatter.pushDownOverride\n\t\t\t);\n\t\t} else {\n\t\t\tvar setContext = function (node) {\n\t\t\t\tformatter.setContext(node, isNonClearableOverride);\n\t\t\t};\n\t\t\twalkBoundary(\n\t\t\t\tliveRange,\n\t\t\t\tformatter.getOverride,\n\t\t\t\tformatter.pushDownOverride,\n\t\t\t\tformatter.clearOverride,\n\t\t\t\tsetContext\n\t\t\t);\n\t\t}\n\t}", "function SuperclassBare() {}", "function SuperclassBare() {}", "function recursive(node, state, funcs, base, override) {\n var visitor = funcs ? exports.make(funcs, base) : base;(function c(node, st, override) {\n visitor[override || node.type](node, st, c);\n })(node, state, override);\n}", "function full(node, callback, baseVisitor, state, override) {\n if (!baseVisitor) { baseVisitor = base\n ; }(function c(node, st, override) {\n var type = override || node.type;\n baseVisitor[type](node, st, c);\n if (!override) { callback(node, st, type); }\n })(node, state, override);\n }", "function full(node, callback, baseVisitor, state, override) {\n if (!baseVisitor) { baseVisitor = base\n ; }(function c(node, st, override) {\n var type = override || node.type;\n baseVisitor[type](node, st, c);\n if (!override) { callback(node, st, type); }\n })(node, state, override);\n }", "function g() {\n (void 0).f();\n}", "apply(fn) {\n // overload custom middleware to allow context free transitions\n let root = this.root.assign({ data: { middleware: defaultMiddleware } });\n // focus on current tree and apply the function to it\n let nextRoot = over(this.lens, fn, root);\n // put the original middleware into the next root tree so the middleware will\n return map(tree => {\n if (tree.is(nextRoot)) {\n return nextRoot.assign({ data: { middleware: this.root.data.middleware } });\n } else {\n return tree;\n }\n }, nextRoot);\n }", "function full(node, callback, baseVisitor, state, override) {\n if (!baseVisitor) { baseVisitor = base\n ; }(function c(node, st, override) {\n var type = override || node.type;\n baseVisitor[type](node, st, c);\n if (!override) { callback(node, st, type); }\n })(node, state, override);\n}", "function $super(arrayOfArgs) {\n // since we are thunking a method call, performance is important here: \n // memoize all lookups, once memoized the fast path calls no other \n // functions\n //\n // find the caller (cannot be `strict` because of 'caller')\n var caller = $super.caller;\n // memoized 'name of method' \n var nom = caller.nom;\n // memoized next implementation prototype\n var _super = caller._super;\n if (!_super) {\n if (!nom) {\n nom = caller.nom = nameInThis.call(this, caller);\n }\n if (!nom) {\n console.warn('called super() on a method not installed declaratively (has no .nom property)');\n }\n // super prototype is either cached or we have to find it\n // by searching __proto__ (at the 'top')\n _super = memoizeSuper(caller, nom, getPrototypeOf(this));\n }\n if (!_super) {\n // if _super is falsey, there is no super implementation\n //console.warn('called $super(' + nom + ') where there is no super implementation');\n } else {\n // our super function\n var fn = _super[nom];\n // memoize information so 'fn' can call 'super'\n if (!fn._super) {\n memoizeSuper(fn, nom, _super);\n }\n // invoke the inherited method\n // if 'fn' is not function valued, this will throw\n return fn.apply(this, arrayOfArgs || []);\n }\n }", "function $super(arrayOfArgs) {\n // since we are thunking a method call, performance is important here: \n // memoize all lookups, once memoized the fast path calls no other \n // functions\n //\n // find the caller (cannot be `strict` because of 'caller')\n var caller = $super.caller;\n // memoized 'name of method' \n var nom = caller.nom;\n // memoized next implementation prototype\n var _super = caller._super;\n if (!_super) {\n if (!nom) {\n nom = caller.nom = nameInThis.call(this, caller);\n }\n if (!nom) {\n console.warn('called super() on a method not installed declaratively (has no .nom property)');\n }\n // super prototype is either cached or we have to find it\n // by searching __proto__ (at the 'top')\n _super = memoizeSuper(caller, nom, getPrototypeOf(this));\n }\n if (!_super) {\n // if _super is falsey, there is no super implementation\n //console.warn('called $super(' + nom + ') where there is no super implementation');\n } else {\n // our super function\n var fn = _super[nom];\n // memoize information so 'fn' can call 'super'\n if (!fn._super) {\n memoizeSuper(fn, nom, _super);\n }\n // invoke the inherited method\n // if 'fn' is not function valued, this will throw\n return fn.apply(this, arrayOfArgs || []);\n }\n }", "function Ab(a,b,c){F.call(this,c);this.c=a||0;this.b=void 0===b?Infinity:b}", "function F(){}", "function Child(a) {\n Parent.apply(this,arguments);\n}", "function inherit(C, P) {\n function F() {};\n F.prototype = P.prototype;\n C.prototype = new F();\n C.uber = P.prototype;\n C.constructor.prototype = C;\n}", "function Apply(func, args) {\n Thunk.call(this, func, applyTo(args));\n}", "function A(f, args) {\n if(f instanceof T) {\n f = E(f);\n }\n // Closure does some funny stuff with functions that occasionally\n // results in non-functions getting applied, so we have to deal with\n // it.\n if(!(f instanceof Function)) {\n return f;\n }\n\n if(f.arity === undefined) {\n f.arity = f.length;\n }\n if(args.length === f.arity) {\n switch(f.arity) {\n case 0: return f();\n case 1: return f(args[0]);\n default: return f.apply(null, args);\n }\n } else if(args.length > f.arity) {\n switch(f.arity) {\n case 0: return f();\n case 1: return A(f(args.shift()), args);\n default: return A(f.apply(null, args.splice(0, f.arity)), args);\n }\n } else {\n var g = function() {\n return A(f, args.concat(Array.prototype.slice.call(arguments)));\n };\n g.arity = f.arity - args.length;\n return g;\n }\n}", "function full(node, callback, base, state, override) {\n if (!base) { base = exports.base\n ; }(function c(node, st, override) {\n var type = override || node.type;\n base[type](node, st, c);\n if (!override) { callback(node, st, type); }\n })(node, state, override);\n}", "function catchAll_(self, f, __trace) {\n return (0, _foldM.foldM_)(self, f, _succeed.succeed, __trace);\n}", "function NaiveBroadphase(){\n Broadphase.call(this, Broadphase.NAIVE);\n}", "function apply_fun1(a, b, c) { assertEq(c, undefined) }", "function catchAllCause_(self, f, __trace) {\n return core.foldCauseM_(self, f, _succeed.succeed, __trace);\n}", "function tameInnocent() {\n var feralFunc = this;\n function tameApplyFuncWrapper(self, opt_args) {\n var feralThis = stopEscalation(untame(self));\n var feralArgs = untame(opt_args);\n var feralResult = feralFunc.apply(feralThis, feralArgs || []);\n return tame(feralResult);\n }\n markFuncFreeze(tameApplyFuncWrapper);\n\n function tameCallFuncWrapper(self, var_args) {\n return tameApplyFuncWrapper(self, Array.slice(arguments, 1));\n }\n markFuncFreeze(tameCallFuncWrapper);\n\n var result = PseudoFunction(tameCallFuncWrapper, tameApplyFuncWrapper);\n result.length = feralFunc.length;\n result.toString = markFuncFreeze(feralFunc.toString.bind(feralFunc));\n return primFreeze(result);\n }", "function L(){A.call(this)}", "function L(){A.call(this)}", "function L(){A.call(this)}" ]
[ "0.6127392", "0.55900556", "0.5322796", "0.5230175", "0.51986575", "0.51986575", "0.51831776", "0.51765615", "0.5160114", "0.5113265", "0.50895274", "0.5056441", "0.5030719", "0.5021578", "0.5021578", "0.5021578", "0.49843234", "0.4957536", "0.49430692", "0.49242058", "0.49101472", "0.49101472", "0.49062255", "0.49058628", "0.48925725", "0.48764408", "0.48764408", "0.48764408", "0.4876278", "0.4876278", "0.4876278", "0.4876278", "0.48697445", "0.48697445", "0.48697445", "0.48697445", "0.48697445", "0.48697445", "0.4851911", "0.48482162", "0.48451573", "0.4794323", "0.47716957", "0.47653964", "0.47653964", "0.47653964", "0.47653964", "0.47653964", "0.47653964", "0.47653964", "0.47547597", "0.47532836", "0.4738123", "0.47229928", "0.4719203", "0.47087497", "0.46809316", "0.46809316", "0.4668991", "0.4657936", "0.46450314", "0.46438238", "0.4633853", "0.4633197", "0.46318313", "0.46313164", "0.4628275", "0.4628275", "0.4619177", "0.4619177", "0.46111065", "0.46066365", "0.45949715", "0.45931247", "0.45902267", "0.45814043", "0.45575264", "0.45575264", "0.45563185", "0.45512676", "0.45512676", "0.45428193", "0.4526461", "0.45249453", "0.4523817", "0.4523817", "0.45134485", "0.4502657", "0.45024905", "0.4501031", "0.44881013", "0.4486896", "0.4481189", "0.44784716", "0.44691625", "0.44648075", "0.4456088", "0.4452807", "0.4451146", "0.4451146", "0.4451146" ]
0.0
-1
Truncates given string to the maximum characters count
function truncate(str, max) { if (max === void 0) { max = 0; } if (typeof str !== 'string' || max === 0) { return str; } return str.length <= max ? str : str.substr(0, max) + "..."; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function truncate(str, max = 0) {\n if (typeof str !== 'string' || max === 0) {\n return str;\n }\n return str.length <= max ? str : `${str.slice(0, max)}...`;\n }", "function truncate(str, max = 0) {\n\t if (typeof str !== 'string' || max === 0) {\n\t return str;\n\t }\n\t return str.length <= max ? str : `${str.substr(0, max)}...`;\n\t}", "function truncate(str, max = 0) {\n if (typeof str !== 'string' || max === 0) {\n return str;\n }\n return str.length <= max ? str : `${str.substr(0, max)}...`;\n}", "function truncate(str, max) {\n if (max === void 0) { max = 0; }\n // tslint:disable-next-line:strict-type-predicates\n if (typeof str !== 'string' || max === 0) {\n return str;\n }\n return str.length <= max ? str : str.substr(0, max) + \"...\";\n}", "function truncate(str, max) {\n if (max === void 0) { max = 0; }\n if (max === 0 || !is_1.isString(str)) {\n return str;\n }\n return str.length <= max ? str : str.substr(0, max) + \"\\u2026\";\n}", "function truncate(str, max) {\r\n if (max === void 0) {\r\n max = 0;\r\n }\r\n // tslint:disable-next-line:strict-type-predicates\r\n if (typeof str !== 'string' || max === 0) {\r\n return str;\r\n }\r\n return str.length <= max ? str : str.substr(0, max) + \"...\";\r\n}", "function truncate_string(string){\n \n}", "function truncate(str, maxlength) {\n if (str.length >= maxlength) {\n str = str.slice(0, maxlength - 3);\n return `${str}...`;\n }\n}", "function truncate(str, len){\r\n\tif(str.length > len)\r\n\t\tstr = str.substring(0,len);\r\n\treturn str;\r\n}", "function crop(str, maxChars, append) {\n\t str = toString(str);\n\t return truncate(str, maxChars, append, true);\n\t }", "function crop(str, maxChars, append) {\n str = toString(str);\n return truncate(str, maxChars, append, true);\n }", "function truncateString(str, len) {\n if (str.length > len) {\n str = str.substring(0, len);\n }\n return str;\n}", "function truncate(str, maxChars, append, onlyFullWords) {\n str = toString_1[\"default\"](str);\n append = append || '...';\n maxChars = onlyFullWords ? maxChars + 1 : maxChars;\n str = trim_1[\"default\"](str);\n if (str.length <= maxChars) {\n return str;\n }\n str = str.substr(0, maxChars - append.length);\n // crop at last space or remove trailing whitespace\n str = onlyFullWords ? str.substr(0, str.lastIndexOf(' ')) : trim_1[\"default\"](str);\n return str + append;\n}", "function truncate(string){\n if (string.length > 25){return string.substring(0,25)+'...';}\n else{return string;}\n}", "function truncate_string(str, length) {\n if ((str.constructor === String) && (length>0)) {\n return str.slice(0, length);\n }\n}", "function crop(str, maxChars, append) {\n return truncate(str, maxChars, append, true);\n}", "function truncate (string, count) {\n if (!count) {\n count = 94\n }\n if (string.length > count)\n return string.substring(0, count) + '...'\n else\n return string\n}", "function truncate(str, maxChars, append, onlyFullWords){\n\t str = toString(str);\n\t append = append || '...';\n\t maxChars = onlyFullWords? maxChars + 1 : maxChars;\n\n\t str = trim(str);\n\t if(str.length <= maxChars){\n\t return str;\n\t }\n\t str = str.substr(0, maxChars - append.length);\n\t //crop at last space or remove trailing whitespace\n\t str = onlyFullWords? str.substr(0, str.lastIndexOf(' ')) : trim(str);\n\t return str + append;\n\t }", "function truncateString(str, num) {\r\n // Clear out that junk in your trunk\r\n return str;\r\n}", "function truncateString(str, num) {\n // Clear out that junk in your trunk\n if (str.length > num) {\n return str.slice(0, num) + \"...\";\n }\n\n return str\n}", "function truncate (string) {\n return string.split(' ').slice(0, 50).join(' ') + '...';\n }", "function truncateString(str, num) {\n\t// Clear out that junk in your trunk\n\n\treturn str.length > num ? `${str.slice(0, num)}...` : str;\n}", "function trimString(str, maxLen) {\n return str.length > maxLen ? str.substring(0, maxLen - 3) + \"...\" : str\n}", "function truncateString(str, num) {\n return str.length > num ? str.slice(0, num) + \"...\" : str;\n}", "function truncateString(str, num) {\n return str.length > num ? str.slice(0, num) + \"...\" : str\n\n}", "function truncateString(str, num) {\n if (str.length > num) {\n return str.slice(0, num) + '...';\n }\n return str;\n}", "function truncate(str,size){\r\n return str.slice(0,size) + '...';\r\n}", "function truncateString() {\n var str1;\n var str =document.getElementById(\"demo6\").value;\n let num = document.getElementById(\"trncvalue\").value;\n\n\n str1 = str.slice(0, num) ;\n document.getElementById(\"ans6\").innerHTML = \"String after truncation is \"+str1+\" is with a limit of \"+num;\n\n}", "function truncateString(str, num) {\n\treturn str.length > num ? str.slice(0, num) + '...' : str;\n}", "function truncate(str, maxChars, append, onlyFullWords) {\n append = append || \"...\";\n maxChars = onlyFullWords ? maxChars + 1 : maxChars;\n\n str = trim(str);\n if (str.length <= maxChars) {\n return str;\n }\n str = str.substr(0, maxChars - append.length);\n //crop at last space or remove trailing whitespace\n str = onlyFullWords ? str.substr(0, str.lastIndexOf(\" \")) : trim(str);\n return str + append;\n}", "function truncate(str, maxLength, suffix = '...[truncated]') {\n maxLength = Math.floor(maxLength);\n // TODO: we should just ignore rest of the suffix...\n if (suffix.length > maxLength) {\n throw new Error('suffix string cannot be longer than maxLength');\n }\n if (typeof str === 'string' && str.length > maxLength) {\n str = str.substr(0, maxLength - suffix.length) + suffix;\n }\n return str;\n}", "function truncate(length, string) {\n return string.substring(0, length) + '...';\n}", "function truncateString(str, num) {\n return str.length <= num ? str : str.slice(0, num) + \"...\";\n}", "function truncateOverView(string, maxlength) {\r\n if (!string) return null;\r\n if (string.length <= maxlength) return string;\r\n return `${string.substring(0, maxlength)} ...`;\r\n}", "function limitLen(str, len) {\n\t if (str.length > len) {\n\t return str.substr(0, len);\n\t } else {\n\t return str;\n\t }\n\t}", "function limitLen(str, len) {\n\t if (str.length > len) {\n\t return str.substr(0, len);\n\t } else {\n\t return str;\n\t }\n\t}", "function truncateString(str, num) {\n // Clear out that junk in your trunk\n if(num >= str.length) return str;\n if(num <= 3) return str.slice(0, num) + \"...\";\n return str.slice(0, num)+'...';\n}", "function truncateString(str, num)\n {\n if (str.length > num) \n {\n return str.slice(0, num) + \"...\";\n } \n else {\n return str;\n }\n}", "function truncateString(str, num) {\n if (str.length > num) {\n return str.slice(0, num) + \"...\";\n } else {\n return str;\n }\n}", "limit( str, length, append ) {\n str = String( str );\n length = parseInt( length ) || 50;\n append = String( append || '' );\n return ( str.length > length ) ? str.substring( 0, length ) + append : str;\n }", "function truncateString(str, num) {\n if(str.length > num){\n return str.substring(0,num)+\"...\";\n }\n return str;\n}", "function truncateString(str, num) {\n if (str.length <= num) {\n return str;\n } else if (num <= 3) {\n return str.slice(0, num) + \"...\";\n } else {\n return str.slice(0, num - 3) + \"...\";\n }\n}", "function truncateString(str, num) {\n //Clear out that junk in your trunk\n if (str.length <= num) {\n return str; //code 3.\n } else if (num <= 2) {\n return str.slice(0, num) + \"...\"; //code 1.\n } else {\n return str.slice(0, num-3) + \"...\"; //code 2.\n }\n}", "function truncate(s, len)\n {\n if (s.length > len) {\n return s.substring(0, len - 3) + \"...\";\n }\n return s;\n }", "function truncateString(str, num) {\n // If the length of str is less than or equal to num\n // just return str--don't truncate it.\n if (str.length <= num) {\n return str;\n }\n // Return str truncated with '...' concatenated to the end of str.\n return str.slice(0, num) + \"...\";\n }", "function truncateString(str, num) {\n var newStr = [];\n for (var i = 0; i < num; i++) {\n if (num >= str.length) {\n return str;\n }\n else { newStr.push(str[i]) }\n }\n newStr = newStr.join(\"\")\n newStr += \"...\"\n return newStr;\n}", "function truncate(s, length) {\n\t if (s.length > length) {\n\t s = s.substring(0, length - 3) + \"...\";\n\t }\n\t return s;\n\t}", "function truncateString(str, num) {\n if (num >= str.length) return str;\n let myStr = '';\n for (let i = 0; i < num; i++){\n myStr += str[i];\n }\n return myStr + '...';\n}", "function truncateString(str, num) {\n if (str.length > num) {\n return str.slice(0, num)+'...'; // Start at the zeroeth index of str up to num and add ...\n }\n else {\n return str;\n }\n}", "function truncateString(str, num) {\n if (str.length > num) {\n return str.slice(0, num)+'...'; // Start at the zeroeth index of str up to num and add ...\n }\n else {\n return str;\n }\n}", "function truncate(str, len, suffix) {\n\t\t\tvar suff = (_.isUndefined(suffix) || _.isNull(suffix)) ? '...' : suffix;\n\n\t\t\tif (!_.isString(str)) {\n\t\t\t\treturn str;\n\t\t\t}\n\n\t\t\tif (str.length <= len) {\n\t\t\t\treturn str;\n\t\t\t}\n\n\t\t\treturn str.slice(0, len) + suff;\n\t\t}", "function maxLength(max, str) {\n if (str.length <= max)\n return str;\n return str.substr(0, max - 3) + \"...\";\n}", "function maxLength(max, str) {\n if (str.length <= max)\n return str;\n return str.substr(0, max - 3) + \"...\";\n}", "function maxLength(max, str) {\n if (str.length <= max)\n return str;\n return str.substr(0, max - 3) + \"...\";\n}", "function maxLength(max, str) {\n if (str.length <= max)\n return str;\n return str.substr(0, max - 3) + \"...\";\n}", "function truncate(string, size) {\n\tif(string && size != null && \n\t\t\tsize > -1 && string.length > size) \n\t\treturn string.substr(0, size) + \"... \"; \n\treturn string;\n}", "function truncate (str, num) {\n return str.substring(0, num) \n}", "function truncate(string, length, truncation) {\n\tlength = length || 30;\n\ttruncation = (typeof truncation == 'undefined') ? '...' : truncation;\n\treturn string.length > length ?\n\t\tstring.slice(0, length - truncation.length) + truncation : string;\n}", "function truncateText(text, limit) {\n\t\tif( text.length < limit ) return text;\n\n\t\tvar temp = text.substring(0, limit);\n\t\tvar lastSpaceIndex = temp.lastIndexOf(' ');\n\n\t\treturn temp.substring(0, lastSpaceIndex);\n\t}", "function truncate() {\n return function (str, maxlength) {\n // Maxlength should be less in acording length of \"...\" .\n if (str.length > maxlength - 3) {\n str = str.slice(0, maxlength) + \"...\";\n }\n return str;\n };\n }", "function truncateString(str, num) {\n if (str.length > num) {\n let truncStr = str.slice(0, num) + \"...\";\n return truncStr;\n }\n return str;\n}", "function maxLength(max, str) {\n if (str.length <= max)\n return str;\n return str.substr(0, max - 3) + '...';\n }", "function truncate(str, num) {\n\tif(num <= 3){\n\t\treturn str.slice(0, num) + \"...\"\n\t} \n\tif (str.length < num || str.length === num) {\n\t\treturn str;\n\t} else if (str.length > num) {\n\t\treturn str.slice(0, num - 3) + \"...\"\n\t}\n}", "function truncate(str,len){\n\t\tvar formatted = str;\n\t\tif (str.length > len){\n\t\t\tformatted = formatted.substr(0, len);\n\t\t\tformatted += '...';\n\t\t}\n\t\treturn formatted;\n\t}", "function truncateString(str, num) {\n // I want to return the string parts\n // from indexOf(0) to indexOf(num), only when the length of string > num\n // otherwise, return the string\n if (str.length > num) {\n return str.slice(0, num) + \"...\";\n } else {\n return str;\n }\n}", "function truncateString(str, num) {\n var strLen = str.length;\n var newString;\n if (strLen > num && num > 3) {\n return str.slice(0, num-3)+ '...';\n } else if (strLen > num && num <= 3) {\n return str.slice(0, num) + '...';\n } else {\n return str;\n }\n}", "function truncate(str, num) {\r\n // Clear out that junk in your trunk\r\n if (str.length > num) {\r\n var strTrunc = \"\";\r\n for (var i=0; i < num - 3; i++) {\r\n strTrunc += str[i];\r\n }\r\n return strTrunc += \"...\";\r\n } else {\r\n return str;\r\n }\r\n}", "function truncateString(str, num) {\n var truncd;\n if (str.length <= num) { // if length is same or less than number, leave string as it is\n return str;\n } else if (num > 3) { // if number is greater than 3\n num = num - 3; // number now equals to number subtracted by 3\n num = str.length-num; // number now equals to string length subtracted from number\n truncd = str.slice(str, -num).concat(\"...\"); // str slices string and length of number in backward then replace with '...'\n return truncd;\n } else {\n truncd = str.slice(str, num).concat(\"...\"); // if number is less than 3 just slice and replace or add with '...'\n return truncd;\n }\n}", "truncateText(str) {\n if (str.length > 30) {\n str = str.trim().substring(0, 10).split(\" \").slice(0, -1).join(\" \") + \"...\";\n }\n return str;\n }", "function f_string_truncate(\n ps_long_value,\n pn_max_len,\n ps_pad_with) {\n\n if ((ps_long_value) &&\n (pn_max_len)) {\n ps_pad_with = f_get_first_def(ps_pad_with, \"...\");\n\n if (ps_long_value.length > pn_max_len) {\n ps_long_value = (ps_long_value.substr(0, (pn_max_len - ps_pad_with.length)) + ps_pad_with);\n }\n }\n\n return(ps_long_value);\n}", "function truncate(str, n){\r\n return (str.length > n) ? str.substr(0, n-1) + '...' : str;\r\n}", "function truncateString(str, num) {\n\n if (str.length > num) {\n let result = str.slice(0, num) + \"...\";\n \n return result;\n }\n else {\n return str;\n }\n}", "function maxLength(max, str) {\n\t if (str.length <= max)\n\t return str;\n\t return str.substr(0, max - 3) + \"...\";\n\t}", "function maxLength(max, str) {\n\t if (str.length <= max)\n\t return str;\n\t return str.substr(0, max - 3) + \"...\";\n\t}", "function truncate(string,length) {\n string = string.length > length ? string.substr(0,length-1) + ' ...': string;\n return string;\n }", "function strTruncate(string, width) {\n\tstring = string.replace(/[\\s\\r\\n]+/, ' ');\n\tif (string.length >= width) {\n var result = string[width - 1] === ' ' ? string.substr(0, width - 1) : string.substr(0, string.substr(0, width).lastIndexOf(' '));\n if (result.length === 0)\n result = string.substr(0, width - 1);\n return result;\n\t}\n\treturn string;\n}", "function truncate(str, num){\n var newStr = '';\n if (str.length > num){ // ensure str is longer that num\n newStr = str.slice(0, (num - 3));\n return newStr += \"...\";\n } else {\n return str;\n }\n}", "function textTruncate(str, length, ending) {\n if (length == null) {\n length = 100;\n }\n if (ending == null) {\n ending = '...';\n }\n if (str.length > length) {\n return str.substring(0, length - ending.length) + ending;\n } else {\n return str;\n }\n }", "function truncateStr(str, len) {\n // If the string is over the length, then truncate it\n // DEV: We go 1 under length so we have room for ellipses\n if (str.length > len) {\n return str.slice(0, len - 2) + '…';\n }\n\n // Otherwise, return the string\n return str;\n}", "function truncateString(str, num) {\n if (str.length > num && num > 3) {\n str = str.slice(0, num - 3);\n str = str + '...';\n }else if (num <= 3) {\n str = str.slice(0, num);\n str = str + '...';\n }\n console.log(str);\n return str;\n}", "function safeTruncate(str, length) {\n return false;\n }", "function truncateString(str, num) {\n var newStr = \"\";\n var dots = \"...\";\n var length = str.length;\n\n if (length <= num) {\n return str;\n } else if (num <= 3) {\n newStr = str.slice(0, num) + dots;\n return newStr;\n } else {\n newStr = str.slice(0, num - 3) + dots;\n return newStr;\n }\n}", "function truncateString(str, num) {\n if(num>3){\n if(num>=str.length){\n return str\n }\n else{\n return str.slice(0,num-3)+\"...\"; \n }\n } else{\n return str.slice(0,num)+\"...\";\n }\n}", "function maxLength(max, str) {\n\t\t if (str.length <= max)\n\t\t return str;\n\t\t return str.substr(0, max - 3) + \"...\";\n\t\t}", "function truncate(str, num) {\n\n//trim to num# of letters\n if (str.length > num) {\n\n var firsttrim = str.substring(0,num);\n\n//re-trim if in the middle of a word by substringing from letter 0 to the first space encountered via counting from the back(firsttrim.length)\n firsttrim = firsttrim.substring(0, Math.min(firsttrim.length, firsttrim.lastIndexOf(\" \")));\n\n return firsttrim+\"...\";\n\n }\n // if str.length is less than or equal to num, just return the string.\n else {\n return str;\n }\n}", "function truncateString(str6, num) {\n\n var num = 4;\n var outp;\n var str6 = document.getElementById(\"demo6\");\n if (str6.length <= num) {\n\n outp = str6.slice(0, num) + '...';\n}\ndocument.getElementById(\"ans6\").innerHTML = outp;\n}", "function truncate (value, length) {\n length = length || 15\n if( !value || typeof value !== 'string' ) return ''\n if( value.length <= length) return value\n return value.substring(0, length) + '...'\n}", "function truncate(text, length) {\n\torg_length = text.length;\n\ttext = text.split(\" \"); // word boundary\n\ttext = text.slice(0, length);\n\ttext = text.join(\" \");\n if(org_length != text.length) {\n return text + \" [...]\";\n }\n return text;\n}", "function truncateString(str, num) {\r\n var temp;\r\n if(num <= 3) {\r\n temp = str.slice(0, num) + \"...\";\r\n }\r\n else if(num > 3 && num < str.length-1) {\r\n temp = str.slice(0, num-3) + \"...\";\r\n }\r\n else {\r\n temp = str.slice(0, num);\r\n }\r\n return temp;\r\n}", "function TrimLength(text, maxLength) {\n var shortURL = text.substring(0, maxLength) + '...';\n return shortURL;\n}", "function truncate(string, length) {\n const words = string.split(' ')\n const lengths = words\n .map(word => word.length + 1)\n .reduce((a, x, i) => [...a, x + (a[i - 1]|| 0)], []);\n const lastToReturn = lengths.filter(word => word <= length + 1);\n return words.slice(0, lastToReturn.length).join(' ')\n}", "function truncate(str, n) {\n return str?.length > n ? str.substr(0, n - 1) + \"...\" : str;\n }", "function truncate(str, n) {\n return str?.length > n ? str.substr(0, n - 1) + \"...\" : str;\n }", "function truncate(string, byteLength) {\n\t if (typeof string !== \"string\") {\n\t throw new Error(\"Input must be string\");\n\t }\n\n\t var charLength = string.length;\n\t var curByteLength = 0;\n\t var codePoint;\n\t var segment;\n\n\t for (var i = 0; i < charLength; i += 1) {\n\t codePoint = string.charCodeAt(i);\n\t segment = string[i];\n\n\t if (isHighSurrogate(codePoint) && isLowSurrogate(string.charCodeAt(i + 1))) {\n\t i += 1;\n\t segment += string[i];\n\t }\n\n\t curByteLength += byteLen(segment);\n\n\t if (curByteLength === byteLength) {\n\t return string.slice(0, i + 1);\n\t } else if (curByteLength > byteLength) {\n\t return string.slice(0, i - segment.length + 1);\n\t }\n\t }\n\n\t return string;\n\t}", "function truncateString(str, n) {\n if (str.length > n) {\n return str.slice(0, n) + \"...\";\n }\n return str;\n\n //single line code\n // return str.length > n ? str.slice(0, n) + \"...\" : str;\n}", "function truncate(str, len) {\n var truncated = str;\n\n if (len < str.length) {\n truncated = str.substr(0, len); // End at a space.\n\n // Add ellipsis if needed. Avoid adding after punctuation.\n if (truncated.charAt(truncated.length - 1) !== '.') {\n truncated = truncated.substr(0, truncated.lastIndexOf(' '));\n }\n\n if (truncated.charAt(truncated.length - 1).search(/[.,;!?]/)) {\n truncated += '...';\n }\n }\n return truncated;\n }", "function truncateString (str, num) {\n if (str.length > num && num > 3) {\n let trunc = str.substring(0, num)\n let dots = trunc.substring(trunc.length - 3)\n let newStr = trunc.replace(dots, '...')\n return newStr\n } else if (num < 3) {\n let trunc = str.substring(0, num)\n let newStr = trunc + '...'\n return newStr\n } else if (str.length <= num) {\n let newStr = str\n return newStr\n }\n}", "function shorten( $text, $length ) {\n\n // Skip if max length defined zero\n if ( $length == '0' ) return $text;\n\n // Do the magic\n var length = $length || 10;\n if ( $text.length > length ) {\n $text = $text.substring( 0, length ) + '&hellip;';\n }\n\n return $text;\n}" ]
[ "0.8294033", "0.82458264", "0.8231845", "0.81994814", "0.816453", "0.8122893", "0.805614", "0.7893945", "0.7810414", "0.7756278", "0.7730918", "0.7671303", "0.7650801", "0.7638327", "0.7623884", "0.7602149", "0.7572789", "0.7561847", "0.75533897", "0.7552987", "0.75457025", "0.75435805", "0.754151", "0.7537738", "0.753481", "0.7530339", "0.7503982", "0.74916023", "0.7482852", "0.74157226", "0.7413961", "0.7388617", "0.7387792", "0.738665", "0.7375747", "0.7375747", "0.7372542", "0.7361093", "0.7350061", "0.7349465", "0.7331249", "0.72978896", "0.7289347", "0.72861576", "0.72832847", "0.728188", "0.72818524", "0.7280338", "0.72658163", "0.72658163", "0.72633374", "0.7236139", "0.7236139", "0.7236139", "0.7236139", "0.7232042", "0.72282326", "0.7213241", "0.720938", "0.7208995", "0.7208086", "0.72024786", "0.7187993", "0.7179819", "0.71569985", "0.71548563", "0.7145788", "0.7143718", "0.7130971", "0.71240413", "0.71214026", "0.7112546", "0.7103578", "0.7103578", "0.7099495", "0.7083309", "0.70778245", "0.7071849", "0.705852", "0.703", "0.7018138", "0.7015229", "0.701213", "0.70118326", "0.70087886", "0.7005399", "0.69885886", "0.6982575", "0.6962829", "0.69087666", "0.6907725", "0.6905104", "0.6905104", "0.69027114", "0.6890613", "0.6889424", "0.68757194", "0.6873427" ]
0.81988335
5
This is basically just `trim_line` from
function snipLine(line, colno) { var newLine = line; var ll = newLine.length; if (ll <= 150) { return newLine; } if (colno > ll) { // eslint-disable-next-line no-param-reassign colno = ll; } var start = Math.max(colno - 60, 0); if (start < 5) { start = 0; } var end = Math.min(start + 140, ll); if (end > ll - 5) { end = ll; } if (end === ll) { start = Math.max(end - 140, 0); } newLine = newLine.slice(start, end); if (start > 0) { newLine = "'{snip} " + newLine; } if (end < ll) { newLine += ' {snip}'; } return newLine; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function trim_lines(lines) {\r\n if (lines == null) return lines;\r\n\r\n var result = '';\r\n temp = lines.split('\\n');\r\n for (var i = 0; i < temp.length; i++) {\r\n line = temp[i].replace(/\\s+/g,' ').trim();\r\n if (line.length > 0) {\r\n result += (i == temp.length - 1) ? line : line + '\\n';\r\n }\r\n }\r\n return result;\r\n}", "trimEmptyLines () {\n this.trimEmptyLinesAtBeginning()\n\n this.lines.reverse()\n this.trimEmptyLinesAtBeginning()\n this.lines.reverse()\n }", "function trimLeading(text) {\n return text ? text.replace(/\\r?\\n\\s*/g, '') : ''\n}", "function removeUnnecessaryData(line, next) {\n const newData = line.replace(/^\\w+\\s?/, '');\n\n next(null, newData ? newData : undefined);\n}", "normalizeLine (line) {\n return line.replace('\\r', '')\n }", "function removeEmptyLines() {\n utilitymanager_1.um.utilityManager({\n utilType: utilitymanager_1.um.TIXUtilityType.utLinesUtility,\n sp: utilitymanager_1.um.TIXSelPolicy.All,\n }, function (up) {\n var arr = up.inlines;\n for (var i = arr.length - 1; i >= 0; i--) {\n if (!arr[i].trim()) {\n arr.splice(i, 1);\n }\n }\n return arr;\n });\n }", "function trimTrailingLines(value) {\n var val = String(value)\n var index = val.length\n\n while (val.charAt(--index) === line) {\n // Empty\n }\n\n return val.slice(0, index + 1)\n}", "function trimTrailingLines(value) {\n var val = String(value)\n var index = val.length\n\n while (val.charAt(--index) === line) {\n // Empty\n }\n\n return val.slice(0, index + 1)\n}", "function trimTrailingLines(value) {\n var val = String(value)\n var index = val.length\n\n while (val.charAt(--index) === line) {\n // Empty\n }\n\n return val.slice(0, index + 1)\n}", "function trimTrailingLines(value) {\n var val = String(value)\n var index = val.length\n\n while (val.charAt(--index) === line) {\n /* Empty */\n }\n\n return val.slice(0, index + 1)\n}", "function trimTrailingLines(value) {\n var val = String(value)\n var index = val.length\n\n while (val.charAt(--index) === line) {\n /* Empty */\n }\n\n return val.slice(0, index + 1)\n}", "function trimTrailingLines(value) {\n var val = String(value);\n var index = val.length;\n\n while (val.charAt(--index) === line) { /* empty */ }\n\n return val.slice(0, index + 1);\n}", "function trimLeadingAndTrailing(input) {\n const lines = (input || \"\").split(/\\r?\\n/);\n\n const trimmed = lines\n .reduceRight(trimUntilText, [])\n .reduceRight(trimUntilText, []);\n return trimmed.join(\"\\n\");\n}", "function trim()\n{\n if(this.length < 1)\n return \"\";\n \n var s = this;\n \n while(s.startsWith(' ')||s.startsWith('\\t')||s.startsWith('\\n')\n ||s.startsWith('\\r'))\n s = s.substr(1);\n \n while(s.endsWith(' ')||s.endsWith('\\t')||s.endsWith('\\n')\n ||s.endsWith('\\r'))\n s = s.substring(0, s.length - 1);\n \n return s;\n}", "function trimTrailingWhitespacesForRemainingRange() {\n var startPosition = previousRange ? previousRange.end : originalRange.pos;\n var startLine = sourceFile.getLineAndCharacterOfPosition(startPosition).line;\n var endLine = sourceFile.getLineAndCharacterOfPosition(originalRange.end).line;\n trimTrailingWhitespacesForLines(startLine, endLine + 1, previousRange);\n }", "function trimText(text) {\n return text ? text.replace(/\\s*\\r?\\n\\s*/g, '') : ''\n}", "function trimTrailingLines(value) {\n return String(value).replace(/\\n+$/, '')\n}", "function trimFirstLineEnding(content) {\n const matches = content.match(/^\\n|\\r\\n/);\n if (matches) {\n content = content.substr(matches[0].length);\n }\n return content;\n}", "function trim (buffer, level) {\n return trimInternal(buffer, level, true, true);\n}", "function filter_lines_for_parsing(lines) {\n\t\t// filter out blank lines\n\t\tlines = lines.filter(function (line) {\n\t\t\treturn !(0, _helpers.is_blank)(line.line);\n\t\t});\n\t\n\t\tlines.forEach(function (line) {\n\t\t\t// remove single line comments\n\t\t\tline.line = line.line.replace(/^\\s*\\/\\/.*/, '');\n\t\t\t// remove any trailing whitespace\n\t\t\tline.line = line.line.trim();\n\t\t});\n\t\n\t\treturn lines;\n\t}", "normalize() {\n this._lines = this._lines.map(line => line.trim().replace(/\\s+/g, ' '));\n }", "function trimLeadingLineBreaks(node) {\n\t\t\t\tdo {\n\t\t\t\t\tif (node.nodeType === 3) {\n\t\t\t\t\t\tnode.nodeValue = node.nodeValue.replace(/^[\\r\\n]+/, '');\n\t\t\t\t\t}\n\n\t\t\t\t\tnode = node.firstChild;\n\t\t\t\t} while (node);\n\t\t\t}", "function trimLeadingLineBreaks(node) {\n\t\t\t\tdo {\n\t\t\t\t\tif (node.nodeType === 3) {\n\t\t\t\t\t\tnode.nodeValue = node.nodeValue.replace(/^[\\r\\n]+/, '');\n\t\t\t\t\t}\n\n\t\t\t\t\tnode = node.firstChild;\n\t\t\t\t} while (node);\n\t\t\t}", "function trimLeadingLineBreaks(node) {\n\t\t\t\tdo {\n\t\t\t\t\tif (node.nodeType === 3) {\n\t\t\t\t\t\tnode.nodeValue = node.nodeValue.replace(/^[\\r\\n]+/, '');\n\t\t\t\t\t}\n\n\t\t\t\t\tnode = node.firstChild;\n\t\t\t\t} while (node);\n\t\t\t}", "function lineFilter(lines, line, i, { length }) {\n if (i > 0) { line = line.trimLeft(); }\n if (i + 1 < length) { line = line.trimRight(); }\n if (line) { lines.push(line); }\n\n return lines;\n}", "function filter_lines_for_parsing(lines) {\n\t// filter out blank lines\n\tlines = lines.filter(function (line) {\n\t\treturn !(0, _helpers.is_blank)(line.line);\n\t});\n\n\tlines.forEach(function (line) {\n\t\t// remove single line comments\n\t\tline.line = line.line.replace(/^\\s*\\/\\/.*/, '');\n\t\t// remove any trailing whitespace\n\t\tline.line = line.line.trim();\n\t});\n\n\treturn lines;\n}", "function betterTrim(content) {\n // Helper functions\n function trimLeft(val) {\n // Adapted from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/Trim#Polyfill\n return val.replace(/^[\\s\\uFEFF\\xA0]+/g, '')\n }\n function trimLineBreaks(input) {\n var lines = input.split('\\n')\n\n // Trim line-breaks from the beginning\n for (var i = 0; i < lines.length; i++) {\n if (lines[i].trim() === '') {\n lines.splice(i--, 1)\n } else break\n }\n\n // Trim line-breaks from the end\n for (var i = lines.length - 1; i >= 0; i--) {\n if (lines[i].trim() === '') {\n lines.splice(i, 1)\n } else break\n }\n\n return lines.join('\\n')\n }\n\n // Main function for betterTrim()\n return (function(content) {\n var lines = content.split('\\n')\n // Calculate the minimum amount to remove on each line start of the snippet (can be 0)\n var pad = lines.reduce(function(acc, line) {\n if (\n line.length > 0 &&\n trimLeft(line).length > 0 &&\n acc > line.length - trimLeft(line).length\n ) {\n return line.length - trimLeft(line).length\n }\n return acc\n }, Number.POSITIVE_INFINITY)\n // Slice each line with this amount\n return lines\n .map(function(line, index) {\n return line.slice(pad)\n })\n .join('\\n')\n })(content)\n}", "async trimData () {\n const trimmedNames = []\n const response = await this.readFile(this.inFile)\n const evenIndex = (element, index) => index % 2 === 0\n // splits response data by line then filters by every other line (lines\n // that names are included on)\n const nameRow = response.split('\\n').filter(evenIndex)\n // loops through lines to separate first and last name data, then pushes first\n // and last name data to trimmedNames array\n nameRow.forEach((element) => {\n const firstName = element.split(' ')[1]\n const lastNameWithComma = element.split(' ')[0]\n // removes comma from last name\n const lastName = lastNameWithComma.substring(0, lastNameWithComma.length - 1)\n trimmedNames.push(firstName + ' ' + lastName)\n })\n // remove empty last element of array (caused by blank line at end of text file)\n trimmedNames.pop()\n return trimmedNames\n }", "function trim(value) {\n\tif (value) {\n\t\treturn ltrim(rtrim(value));\n\t}\n\treturn '';\n}", "function trim( value )\n{\n\treturn lTrim(rTrim(value));\n}", "function trim(text) {\n\t\ttry {\n\t\t\ttext = text.replace(/^\\s+|\\s+$/g, '');\n\t\t\treturn text.replace(/(\\r\\n|\\n|\\r|\\t)/gm, '');\n\t\t} catch(e) { return ''; }\n\t}", "function trim()\n{\n return this.rtrim().ltrim();\n}", "function trim( value ) {\r\n\t\r\n return LTrim(RTrim(value));\r\n\t\r\n }", "function cleanupLine(p) {\n\treturn simplify(p, 1.0, true);\n}", "static trim(str) {\n return (str.replace(/(\\r\\n|\\n|\\r)/gm, '')).trim().replace(/\\s+/g, ' ');\n }", "function stripBlankLines(text) {\n return text.split(EOL).filter(line => line.trim() !== '').join(EOL);\n}", "function trim (zeichenkette) {\n return zeichenkette.replace (/^\\s+/, '').replace (/\\s+$/, '');\n}", "function myTrim(x) {\n \n return x.replace(/^\\s+|\\s+$/gm,'');\n }", "trimStack(stack) {\n let lines = stack.split(\"\\n\");\n lines = lines.slice(1);\n return lines.join(\"\\n\");\n }", "function trim(str){\treturn str.replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, '');}", "function trim (str) { //high efficiency\n\t\treturn this.replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, '');\n\t}", "function trim( value ) {\r\n\t\treturn LTrim(RTrim(value));\r\n\t}", "function ltrim()\n{\n return this.replace( /^\\s+/g,'');\n}", "function empty () {\n return !line || !line.trim()\n }", "function s_trim(TRIM_VALUE) {\n\tif(TRIM_VALUE.length < 1) return\"\";\n TRIM_VALUE = StringTrim(TRIM_VALUE,'right');\n TRIM_VALUE = StringTrim(TRIM_VALUE,'left');\n if(TRIM_VALUE==\"\") return \"\";\n\t\telse return TRIM_VALUE;\n}", "function trim( value ) {\r\n\t\r\n\treturn LTrim(RTrim(value));\r\n\t\r\n}", "function ltrim(value) {\n\tif (value) {\n\t\tvar re = /\\s*((\\S+\\s*)*)/;\n\t\treturn value.replace(re, '$1');\n\t}\n\treturn '';\n}", "function parse_single_line(line) {\n return line.replace(/\\s*\\/\\//, '');\n }", "function trim( value ) {\n\t\n\treturn LTrim(RTrim(value));\n\t\n}", "function trim( value ) {\n\t\n\treturn LTrim(RTrim(value));\n\t\n}", "function trim( value ) {\n\t\n\treturn LTrim(RTrim(value));\n\t\n}", "function trim(string) {\n}", "function trim( value )\r\n{\r\n\t\r\n\treturn LTrim(RTrim(value));\r\n\t\r\n}", "function trim(str) { Logger.log('in trim(), str is ' + str);\n return str.replace(/^\\s+/, '').replace(/\\s+$/, '');\n}", "function trim( value ) {\n\n return LTrim(RTrim(value));\n\n}", "function trim( value ) {\n\t\n\treturn LTrim(RTrim(value));\n}", "function lrtrim(strSrc){\r\n\tstrSrc = lefttrim(strSrc);\r\n\tstrSrc = righttrim(strSrc);\r\n\treturn strSrc;\r\n}", "function trim( value )\n{\n\n return LTrim(RTrim(value));\n\n}", "function normalize(data, durationLinePos) {\n var noEmptyLine = _.filter(data.split('\\n'), function(line) { return line.trim().length !== 0; });\n noEmptyLine.splice(noEmptyLine.length - durationLinePos - 1, 1);\n return noEmptyLine.join('\\n');\n}", "trim(x0, y0, x1, y1) {\n // calc resulting coords\n var result_x0 = Math.max(x0, this.x);\n var result_y0 = Math.max(y0, this.y);\n var result_x1 = Math.min(x1, this.x + this.width - 1);\n var result_y1 = Math.min(y1, this.y + this.height - 1);\n\n // update fields\n this.x = result_x0;\n this.y = result_y0;\n this.width = result_x1 - result_x0;\n this.height = result_y1 - result_y0;\n }", "function trim( value ) {\n return LTrim(RTrim(value));\n}", "function trimCell(cell) {\n\t\tvar bogus = cell.getBogus();\n\t\tbogus && bogus.remove();\n\t\tcell.trim();\n\t}", "trim() {\n errors.throwNotImplemented(\"trimming elements from a collection\");\n }", "function trim(strText)\n{\n// return ((!strText) ? \"\" : strText.replace(/^\\s*(\\S*(\\s+\\S+)*)\\s*$/, \"$1\"));\n return ((!strText) ? '' : strText.replace(/^\\s*/, '').replace(/\\s*$/, ''));\n}", "function trim( value ) {\r\n return LTrim(RTrim(value));\r\n}", "unvoidLine() {\r\n\t\treturn null\r\n\t}", "function TrimModifier() {\n }", "function trim( value ) {\r\n\treturn LTrim(RTrim(value));\r\n}", "function trimTabs(data) {\n\tvar lines = data.split(/\\r?\\n/);\n\tvar output = \"\";\n\tfor (var i=0; i<lines.length; i++) {\n\t\tlet line = lines[i].replace(/\\t+$/, \"\");\n\t\tif (line.match(/^\\s*$/)) {\n\t\t\t// ignoring blank lines\n\t\t\tcontinue;\n\t\t}\n\t\tif (line.match(/^!!![^\\s]+:\\t/)) {\n\t\t\tline = line.replace(/\\t/, \" \");\n\t\t}\n\t\toutput += line + \"\\n\";\n\t}\n\treturn output;\n}", "function trim( value )\r\n{\r\n return LTrim(RTrim(value));\r\n}", "function trim(value) {\n return LTrim(RTrim(value));\n}", "*lines(raw) {\n var lines = raw.split(\"\\n\");\n for (var i = 0; i < lines.length; ++i) {\n var line = lines[i].trim();\n yield line;\n }\n }", "function parseLine(line) {\n return line.replace(/\\s+|\\\"/g, '')\n}", "function trimCell(cell) {\n\t\tvar bogus = cell.getBogus();\n\t\tif (bogus) {\n\t\t\tbogus.remove();\n\t\t}\n\t\tcell.trim();\n\t}", "function ui_trim (str_string){\n\tvar exp_Space_head \t= /^(\\s+)(\\S?.*)$/ ; //define exp pattern, all space at header\n\tvar exp_Space_tail \t\t= /^(.*\\S+)(\\s+)$/ ; //define exp pattern, all space at tail\n\tstr_string = str_string.replace(exp_Space_head, \"$2\"); // remove the space at the header\n\tstr_string = str_string.replace(exp_Space_tail, \"$1\"); // remove the space at the tail\n\treturn str_string;\n}", "function ltrim(str) {\n return str.replace(/^\\s+/, \"\");\n}", "function trim(text) {\n text= text.replace(/ /g,\"\"); //elimina espacios a izquierda y derecha\n text= text.replace(/\\n\\r/g,\"\");\n text= text.replace(/\\n/g,\"\");\n return text;\n}", "function FFString_trim( value ){\n\treturn FFString_trimRight(FFSting_trimLeft(value));\t\n}", "function trim(string) { return string.replace(/^\\s+|\\s+$/g , ''); }", "function trim(thisTrimEnd) {\n var chop = theSlice.length - maxSize;\n if (chop <= 0) {\n return;\n }\n if (trimEnd !== 'auto') {\n thisTrimEnd = trimEnd;\n }\n if (thisTrimEnd === 'end') {\n theSlice = theSlice.slice(0, theSlice.length - chop);\n } else {\n theSlice = theSlice.slice(chop);\n startPos = startPos + chop;\n }\n }", "trim() {\n let start = 0;\n let end = this.formatParts.length;\n const isNoArg = (i) => {\n const arg = this.formatParts[i];\n return arg !== undefined && NO_ARG_PLACEHOLDERS.includes(arg);\n };\n while (start < end && isNoArg(start)) {\n start++;\n }\n while (start < end && isNoArg(end)) {\n end--;\n }\n if (start > 0 || end < this.formatParts.length) {\n return this.copy({\n args: this.args,\n formatParts: this.formatParts.slice(start, end),\n referencedSymbols: this.referencedSymbols,\n });\n }\n else {\n return this;\n }\n }", "function trim(stringValue) {\r\n // var trimedString = stringValue.replace( /^\\s+/g, \"\" );\r\n // return trimedString.replace( /\\s+$/g, \"\" );\r\n return ltrim(rtrim(stringValue));\r\n}", "trim(numToTrim) {\n this._ensureUnpacked();\n if (numToTrim > 0) {\n this.unpackedArray = this.unpackedArray.slice(0,\n this.unpackedArray.length - numToTrim);\n }\n }", "function cleanUpLine(line) {\n\t line.parent = null;\n\t detachMarkedSpans(line);\n\t }", "function cleanUpLine(line) {\n\t line.parent = null;\n\t detachMarkedSpans(line);\n\t }", "function cleanUpLine(line) {\n\t line.parent = null;\n\t detachMarkedSpans(line);\n\t }", "function String_StripLineFeed()\n{\n\t//remove targets\n\treturn this.replace(/\\r/g, \"\").replace(/\\n/g, \"\");\n}", "function trim(fieldValue) {\r\n\t// strips ALL whitespace (debugging only!)\r\n\t//return fieldValue.replace(/\\s/g,'');\r\n\t// strips only from the beginning and end\r\n\treturn fieldValue.replace(/^\\s*|\\s*$/g,'');\r\n}", "function trim(s) { return s.replace(/^\\s+|\\s+$/g, ''); }", "function cleanUpLine(line) {\r\n line.parent = null;\r\n detachMarkedSpans(line);\r\n}", "function trim(s) { return s.trim(); }", "function trim(s) { return s.trim(); }", "function cleanUpLine(line) {\r\n line.parent = null;\r\n detachMarkedSpans(line);\r\n }", "function cleanUpLine(line) {\n line.parent = null;\n detachMarkedSpans(line);\n }", "function cleanUpLine(line) {\n line.parent = null;\n detachMarkedSpans(line);\n }", "function cleanUpLine(line) {\n line.parent = null;\n detachMarkedSpans(line);\n }", "function cleanUpLine(line) {\n line.parent = null;\n detachMarkedSpans(line);\n }", "function cleanUpLine(line) {\n line.parent = null;\n detachMarkedSpans(line);\n }", "function cleanUpLine(line) {\n line.parent = null;\n detachMarkedSpans(line);\n }", "function cleanUpLine(line) {\n line.parent = null;\n detachMarkedSpans(line);\n }", "function cleanUpLine(line) {\n line.parent = null;\n detachMarkedSpans(line);\n }" ]
[ "0.709873", "0.68174124", "0.67371136", "0.6703741", "0.6702536", "0.6654126", "0.65636367", "0.65636367", "0.65636367", "0.654661", "0.654661", "0.64966524", "0.6436412", "0.63677233", "0.6356577", "0.63520586", "0.63273376", "0.62499326", "0.624892", "0.62246186", "0.62198555", "0.6180427", "0.6180427", "0.6180427", "0.6123682", "0.61083555", "0.60904044", "0.60880923", "0.6079396", "0.606313", "0.60580796", "0.60384125", "0.6035027", "0.6026764", "0.601596", "0.60087645", "0.6002298", "0.60008514", "0.59965444", "0.5987414", "0.59711593", "0.59706116", "0.59648174", "0.5937459", "0.593117", "0.59295", "0.5926004", "0.59231013", "0.5915801", "0.5915801", "0.5915801", "0.59131527", "0.58923674", "0.58832526", "0.5882036", "0.58817667", "0.5880674", "0.58786935", "0.587003", "0.5868524", "0.5867413", "0.58660173", "0.58476156", "0.58437693", "0.5840525", "0.5834751", "0.58297783", "0.58271176", "0.5822803", "0.5817419", "0.5816626", "0.5810967", "0.5810822", "0.5801704", "0.5797137", "0.5770849", "0.5763297", "0.57623553", "0.57538134", "0.5748462", "0.5744661", "0.57171685", "0.5708219", "0.57026947", "0.57026947", "0.57026947", "0.5687944", "0.56657606", "0.56577396", "0.5656863", "0.56564605", "0.56564605", "0.5655944", "0.56505096", "0.56505096", "0.56505096", "0.56505096", "0.56505096", "0.56505096", "0.56505096", "0.56505096" ]
0.0
-1
Join values in array
function safeJoin(input, delimiter) { if (!Array.isArray(input)) { return ''; } var output = []; // eslint-disable-next-line @typescript-eslint/prefer-for-of for (var i = 0; i < input.length; i++) { var value = input[i]; try { output.push(String(value)); } catch (e) { output.push('[value cannot be serialized]'); } } return output.join(delimiter); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function joined(array) {\n return array.join();\n}", "function join(arr) {\n let res = \"\";\n for (let i = 0; i < arr.length; i++)\n res += arr[i];\n return res;\n}", "function join(arr) {\n let res = \"\";\n for (let i = 0; i < arr.length; i++)\n res += arr[i];\n return res;\n}", "function joinElement(arr) {\n return arr.toString();\n}", "function join(arr) {\n var res = '';\n for (var i = 0; i < arr.length; i++)\n res += arr[i];\n return res;\n}", "function join(array, string) {}", "function concatenateArray(arrayToJoin) {\n\n var tempStr = \"\";\n for (var i in arrayToJoin) {\n tempStr += arrayToJoin[i] + \" \";\n }\n return tempStr;\n}", "function mapJoin(arr, sep, foo){\n if (foo === undefined){\n foo = sep;\n sep = \"\";\n }\n return $.map(arr, foo).join(sep);\n}", "function joinAllElements(array) {\n var output = '';\n //var counter = 0;\n for (var i = 0; i < array.length; i++) {\n if (([array[i]] != undefined) && (array[i] != null) && (array[i] != Infinity) && (!isNaN(array[i]))) {\n output += array[i];\n\n }\n }\n return output;\n}", "stringThisArray(array){\n return array.join(\"\");\n }", "function joinArray(a)\r\n\t\t{\r\n\t\t\tvar b;\r\n\t\t\tb = \"[\" + a.join(\"],[\") + \"]\";\r\n\t\t\treturn(b);\r\n\t\t}", "function join(array, sep) {\r\n\tvar out = '';\r\n\tArray.prototype.forEach.call(\r\n\t\tarray,\r\n\t\tfunction(item) {\r\n\t\t\tout += typeof item === 'string' ?\r\n\t\t\t\titem + sep :\r\n\t\t\t\tinspect(item) + sep;\r\n\t\t}\r\n\t);\r\n\r\n\treturn out;\r\n}", "function join(){\n var newArray = [];\n for (var i = 0; i < numbers.length; i ++){\n newArray = newArray.concat(numbers[i]);\n }\n for (var j = 0; j < strings.length; j ++){\n newArray = newArray.concat(strings[j]);\n }\n return newArray;\n}", "function joinArray(arr, joiner) {\n var joinString = ''\n if (joiner === undefined) {\n joiner = '';\n }\n \n for (var i = 0; i < arr.length; i++) {\n if (i > 0) {\n joinString += joiner;\n }\n \n joinString += arr[i];\n }\n \n return joinString;\n}", "function joinProse(array)\n{\n var length = array.length;\n switch (length) {\n case 0:\n return \"\";\n case 1:\n return array[0];\n default:\n return _.reduce(array.slice(1, length - 1), function (word, accu) { return word + \", \" + accu }, array[0]) + \" and \" + array[length - 1];\n }\n}", "function joinElements (arr) {\n var newString = \"\";\n for (var i = 0; i < arr.length; i++) {\n if (arr[i] !== undefined && arr[i] !== null && typeof arr[i] !== \"NaN\" && arr[i] !== Infinity) {\n //izbori se sa Nan\n newString += arr[i];\n }\n }\n return newString;\n}", "function outputString(arr) {\n var arr1 = arr.join(' ');\n var arr2 = arr.join('+');\n var arr3 = arr.join(',');\n console.log(arr1);\n console.log(arr2);\n console.log(arr3);\n}", "function mapJoin(array, sep, func, self) {\n return array.map(func, self).join(isString(sep) ? sep : ' ');\n}", "function joinArray(arr, delimiter) {\n\t// var result = toNumberTypeArray(arr);\n\tvar t_arr = arr;\n\tvar join = \"'\" + t_arr[0] + \"'\";\n\tfor(var i = 1; i < t_arr.length; i++) {\n\t\tif(t_arr[i] === '\\\\N') {\n\t\t\tjoin = join + delimiter + 'NULL';\n\t\t}\n\t\telse {\n\t\t\tif(t_arr[i].indexOf(\"'\") !== -1) {\n\t\t\t\tjoin = join + delimiter + \"$$\" + t_arr[i] + \"$$\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\tjoin = join + delimiter + \"'\" + t_arr[i]+ \"'\";\t\t\t\t\n\t\t\t}\n\t\t}\n\t}\n\t// console.log(join);\n\t// result.result = join;\n\treturn join;\n}", "function joinElements(a) {\r\n return a.join(',');\r\n}", "function join(array, separator) {\n if (!isArray(array)) {\n throw new Error('Error: Only Arrays are allowed!');\n }\n\n var rezStr = \"\";\n for (var i = 0; i <= array.length-1; i++) {\n if (typeof array[i] === \"undefined\" || array[i] === null) {\n rezStr += \"\";\n } else {\n rezStr += array[i];\n }\n\n if (separator) {\n if (i != array.length-1) {\n rezStr += separator;\n } \n } else {\n if (i != array.length-1) {\n rezStr += \",\";\n } \n } \n }\n return rezStr;\n }", "function stringConcat(arr) {\n return arr.join('');\n}", "niceList(array, join, finalJoin) {\n var arr = array.slice(0), last = arr.pop();\n join = join || ', ';\n finalJoin = finalJoin || ' and ';\n return arr.join(join) + finalJoin + last;\n }", "function stringConcat(arr) {\n const result = arr.reduce(arr.toString());\n return result;\n}", "function quotedJoined (array) {\n return array\n .map(el => `\"${el}\"`)\n .join(' ')\n}", "function join() {\n return normal(Array.join(arguments, SEPARATOR));\n}", "function join(maybeArray, separator) {\n return maybeArray ? maybeArray.filter(function (x) {\n return x;\n }).join(separator || '') : '';\n }", "function join(maybeArray, separator) {\n return maybeArray ? maybeArray.filter(function (x) {\n return x;\n }).join(separator || '') : '';\n }", "function comma(arr) {\n return arr.join(', ')\n}", "function join(maybeArray, separator) {\n\t\t return maybeArray ? maybeArray.filter(function (x) {\n\t\t return x;\n\t\t }).join(separator || '') : '';\n\t\t}", "function j(a){return a.map(function(a){return\" \"+a})}", "function join$1(maybeArray, separator) {\n return maybeArray ? maybeArray.filter(function (x) {\n return x;\n }).join(separator || '') : '';\n}", "function join(maybeArray, separator) {\n return maybeArray ? maybeArray.filter(function (x) {\n return x;\n }).join(separator || '') : '';\n}", "function join(maybeArray, separator) {\n return maybeArray ? maybeArray.filter(function (x) {\n return x;\n }).join(separator || '') : '';\n}", "function join(maybeArray, separator) {\n return maybeArray ? maybeArray.filter(function (x) {\n return x;\n }).join(separator || '') : '';\n}", "function join(maybeArray, separator) {\n return maybeArray ? maybeArray.filter(function (x) {\n return x;\n }).join(separator || '') : '';\n}", "function join(maybeArray, separator) {\n return maybeArray ? maybeArray.filter(function (x) {\n return x;\n }).join(separator || '') : '';\n}", "function join(maybeArray, separator) {\n return maybeArray ? maybeArray.filter(function (x) {\n return x;\n }).join(separator || '') : '';\n}", "function join(maybeArray, separator) {\n return maybeArray ? maybeArray.filter(function (x) {\n return x;\n }).join(separator || '') : '';\n}", "function join(maybeArray, separator) {\n return maybeArray ? maybeArray.filter(function (x) {\n return x;\n }).join(separator || '') : '';\n}", "function join(maybeArray, separator) {\n return maybeArray ? maybeArray.filter(function (x) {\n return x;\n }).join(separator || '') : '';\n}", "function join(maybeArray, separator) {\n return maybeArray ? maybeArray.filter(function (x) {\n return x;\n }).join(separator || '') : '';\n}", "function join(maybeArray, separator) {\n return maybeArray ? maybeArray.filter(function (x) {\n return x;\n }).join(separator || '') : '';\n}", "function join(maybeArray, separator) {\n return maybeArray ? maybeArray.filter(function (x) {\n return x;\n }).join(separator || '') : '';\n}", "function join(maybeArray, separator) {\n return maybeArray ? maybeArray.filter(function (x) {\n return x;\n }).join(separator || '') : '';\n}", "function join(maybeArray, separator) {\n return maybeArray ? maybeArray.filter(function (x) {\n return x;\n }).join(separator || '') : '';\n}", "function join(maybeArray, separator) {\n return maybeArray ? maybeArray.filter(function (x) {\n return x;\n }).join(separator || '') : '';\n}", "function join(maybeArray, separator) {\n return maybeArray ? maybeArray.filter(function (x) {\n return x;\n }).join(separator || '') : '';\n}", "function join(maybeArray, separator) {\n return maybeArray ? maybeArray.filter(function (x) {\n return x;\n }).join(separator || '') : '';\n}", "function join(maybeArray, separator) {\n return maybeArray ? maybeArray.filter(function (x) {\n return x;\n }).join(separator || '') : '';\n}", "function join(maybeArray, separator) {\n return maybeArray ? maybeArray.filter(function (x) {\n return x;\n }).join(separator || '') : '';\n}", "function join(maybeArray, separator) {\n return maybeArray ? maybeArray.filter(function (x) {\n return x;\n }).join(separator || '') : '';\n}", "function join(maybeArray, separator) {\n return maybeArray ? maybeArray.filter(function (x) {\n return x;\n }).join(separator || '') : '';\n}", "function join(arr, delimiter) {\n if (delimiter === undefined) {\n delimiter = ' ';\n }\n\n var ret = '';\n for(var i = 0; i < arr.length; i += 1) {\n ret += arr[i];\n if(i !== arr.length - 1) {\n ret += delimiter;\n }\n }\n return ret;\n}", "function join(maybeArray, separator) {\n\t return maybeArray ? maybeArray.filter(function (x) {\n\t return x;\n\t }).join(separator || '') : '';\n\t}", "function join(maybeArray, separator) {\n\t return maybeArray ? maybeArray.filter(function (x) {\n\t return x;\n\t }).join(separator || '') : '';\n\t}", "function join(maybeArray, separator) {\n\t return maybeArray ? maybeArray.filter(function (x) {\n\t return x;\n\t }).join(separator || '') : '';\n\t}", "function joinElements(arr) {\n\n var niz = \"\";\n\n for (i = 0; i < arr.length; i++) {\n\n if (isFinite(arr[i])===false || arr[i] === undefined || arr[i] === null) {\n\n continue;\n\n } \n niz += arr[i] + \" \";\n \n\n }\n return niz;\n\n}", "function joinArr(arr){\n\tvar newArr = arr.split(' ').reverse().join(' ')\n\treturn newArr;\n}", "function stringifyArray(input){\n return input.join(',');\n}", "function join(x)\r\n{\r\n a=x.join(',') ;\r\n b=x.join('+') ;\r\n console.log('\"'+a+'\"') ;\r\n console.log('\"'+b+'\"') ;\r\n \r\n}", "join(seperator = \",\") {\n let str = \"\";\n for (let i in this)\n str += seperator + this[i];\n return str;\n }", "function join(array, str) {\n return array.join(str)\n}", "function filterJoin(arr, sep, foo){\n if (foo === undefined){\n foo = sep;\n sep = \"\";\n }\n return $.grep(arr, foo).join(sep);\n}", "function joinArrayToRR(RRarray) {\n // add open brackets\n var res = \"[\";\n for (var i = 0; i < RRarray.length; i++) { \n res += JSON.stringify(RRarray[i]);\n res += \",\";\n }\n //remove the last comma\n res = res.substring(0, res.length - 1);\n // add closing brackets \n return res += \"]\";\n}", "function join(s, arr) {\n\t\tvar str = arr[0];\n\t\tfor(var i = 1; i < arr.length; i++) {\n\t\t\tstr += s + arr[i];\n\t\t}\n\t\treturn str;\n\t}", "function arrayJoin(array1, array2) {\n return array1.concat(array2);\n}", "function join(separator, ...values) {\r\n return values.join(separator);\r\n}", "function join(arr, sepStr) {\n var result = '';\n if (arr.length === 0) return '';\n\n for (var i = 0; i < arr.length - 1; i++) { result += String(arr[i]) + sepStr; }\n result += String(arr[arr.length - 1]);\n\n return result;\n}", "function join(a, b) {\n\t\t Array.prototype.push.apply(a, b);\n\t\t return a;\n \t}", "function arrayToString(array) {\n return array.join('')\n }", "function concatTokenValues(arr) {\n let str = '';\n for (i = 0; i < arr.length; i++) {\n str += arr[i].value;\n }\n return str;\n }", "function arrayToString(arr) {\n return arr.join(\"\")\n }", "function joinData(data) {\n return withoutEmptyStrings(data).join(\" ; \");\n}", "function stringConcat(arr) {\n return arr.reduce((acc, el) => `${acc}${el}`) \n}", "function join(maybeArray) {\n var _maybeArray$filter$jo;\n\n var separator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n return (_maybeArray$filter$jo = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.filter(function (x) {\n return x;\n }).join(separator)) !== null && _maybeArray$filter$jo !== void 0 ? _maybeArray$filter$jo : '';\n}", "function join(maybeArray) {\n var _maybeArray$filter$jo;\n\n var separator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n return (_maybeArray$filter$jo = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.filter(function (x) {\n return x;\n }).join(separator)) !== null && _maybeArray$filter$jo !== void 0 ? _maybeArray$filter$jo : '';\n}", "function join(maybeArray) {\n var _maybeArray$filter$jo;\n\n var separator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n return (_maybeArray$filter$jo = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.filter(function (x) {\n return x;\n }).join(separator)) !== null && _maybeArray$filter$jo !== void 0 ? _maybeArray$filter$jo : '';\n}", "function join(maybeArray) {\n var _maybeArray$filter$jo;\n\n var separator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n return (_maybeArray$filter$jo = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.filter(function (x) {\n return x;\n }).join(separator)) !== null && _maybeArray$filter$jo !== void 0 ? _maybeArray$filter$jo : '';\n}", "function join(maybeArray) {\n var _maybeArray$filter$jo;\n\n var separator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n return (_maybeArray$filter$jo = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.filter(function (x) {\n return x;\n }).join(separator)) !== null && _maybeArray$filter$jo !== void 0 ? _maybeArray$filter$jo : '';\n}", "function join(maybeArray) {\n var _maybeArray$filter$jo;\n\n var separator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n return (_maybeArray$filter$jo = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.filter(function (x) {\n return x;\n }).join(separator)) !== null && _maybeArray$filter$jo !== void 0 ? _maybeArray$filter$jo : '';\n}", "function join(maybeArray) {\n var _maybeArray$filter$jo;\n\n var separator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n return (_maybeArray$filter$jo = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.filter(function (x) {\n return x;\n }).join(separator)) !== null && _maybeArray$filter$jo !== void 0 ? _maybeArray$filter$jo : '';\n}", "function join(maybeArray) {\n var _maybeArray$filter$jo;\n\n var separator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n return (_maybeArray$filter$jo = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.filter(function (x) {\n return x;\n }).join(separator)) !== null && _maybeArray$filter$jo !== void 0 ? _maybeArray$filter$jo : '';\n}", "function join(maybeArray) {\n var _maybeArray$filter$jo;\n\n var separator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n return (_maybeArray$filter$jo = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.filter(function (x) {\n return x;\n }).join(separator)) !== null && _maybeArray$filter$jo !== void 0 ? _maybeArray$filter$jo : '';\n}", "function join(maybeArray) {\n var _maybeArray$filter$jo;\n\n var separator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n return (_maybeArray$filter$jo = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.filter(function (x) {\n return x;\n }).join(separator)) !== null && _maybeArray$filter$jo !== void 0 ? _maybeArray$filter$jo : '';\n}", "function stringConcat(arr) {\n return arr.reduce((a, b) => a.toString() + b);\n}", "function stringConcat(arr) {\n const result = arr.reduce(function(total, num){\n\t\treturn total += num.toString(); \n\t});\n \treturn result;\n}", "function joinFunc(n){\n joinArray = n.reverse().join(`,`)\n console.log(joinArray);\n}", "function joinArrayOfArrays(arr) {\n\t// create a result array\n\tlet result = [];\n\t// iterate through the first array to get array element\n\tfor (let i = 0; i < arr.length; i++) {\n\t\t// reassign the result to the concat\n\t\tresult = result.concat(arr[i]);\n\t}\n\t// return result;\n\treturn result;\n}", "function mergeToStringUsingFor(elements, delimiter = ',') {\n\n}", "function joinElements (joiner) {\n var result = ''\n for (var i = 0; i < elements.length; i++) {\n if (i < elements.length - 1) {\n result += elements[i] + joiner\n } else {\n result += elements[i]\n }\n }\n return result\n}", "function join(maybeArray, separator = '') {\n var _maybeArray$filter$jo;\n\n return (_maybeArray$filter$jo =\n maybeArray === null || maybeArray === void 0\n ? void 0\n : maybeArray.filter((x) => x).join(separator)) !== null &&\n _maybeArray$filter$jo !== void 0\n ? _maybeArray$filter$jo\n : '';\n}", "function join(writer, value, delim) {\n if ( isArray(value) ) {\n return value.join(delim || ' ');\n }\n return value;\n}", "function joinArr (a, b) {\n\tvar c =[]\n\tif (a.length > 0) {\n\t\tfor (i = 0; i < a.length; i++) {\n\t\t\tc[c.length] = a[i];\n\t\t}\n\t}\n\tif (b.length > 0) {\n\t\tfor (j = 0; j < b.length; j++) {\n\t\t\tc[c.length] = b[j];\n\t\t}\n\t}\n\treturn c;\n}", "function join(arr, str) {\n var i;\n var newStr = '';\n for (i = 0; i < arr.length - 1; i++) {\n newStr += String(arr[i]) + str;\n }\n newStr += String(arr[arr.length - 1]);\n return newStr;\n}", "function stringConcat(arr) {\n const result = arr.reduce(function(total, num){\n return total + num.toString();\n });\n \n return result;\n}", "toListString(arr) {\n\t\tif (!arr.length) return '';\n\t\tif (arr.length === 1) return arr[0];\n\t\tif (arr.length === 2) return `${arr[0]} and ${arr[1]}`;\n\t\treturn `${arr.slice(0, -1).join(\", \")}, and ${arr.slice(-1)[0]}`;\n\t}", "function join(arr, str) {\n return arr.join(str);\n}", "function printArray(array) {\n return array.join();\n}", "function stringConcat(arr) {\n return arr.reduce((total, curr) => {\n curr = String(curr);\n return total + curr;\n }, \"\")\n}", "function concatenate(arr) {\n let concatStr = [];\n for (let i = 0; i < arr.length; i++) {\n concatStr += arr[i];\n }\n return concatStr;\n}" ]
[ "0.78730714", "0.76609993", "0.76609993", "0.7616198", "0.75838137", "0.7539979", "0.72907186", "0.707199", "0.7059498", "0.70557815", "0.70099896", "0.6967532", "0.6947322", "0.69445705", "0.69359845", "0.69340944", "0.68965673", "0.68501645", "0.68387747", "0.68108803", "0.6799326", "0.6774111", "0.6728012", "0.66607803", "0.66495067", "0.66335005", "0.6616132", "0.6616132", "0.6599333", "0.65761775", "0.65729856", "0.65572774", "0.6535869", "0.6535869", "0.6535869", "0.6535869", "0.6535869", "0.6535869", "0.6535869", "0.6535869", "0.6535869", "0.6535869", "0.6535869", "0.6535869", "0.6535869", "0.6535869", "0.6535869", "0.6535869", "0.6535869", "0.6535869", "0.6535869", "0.6535869", "0.6535869", "0.6532439", "0.6525078", "0.6525078", "0.6525078", "0.6508927", "0.650711", "0.6502799", "0.6498145", "0.6485949", "0.64787465", "0.6468392", "0.6460168", "0.64487684", "0.6433537", "0.642666", "0.642178", "0.6417854", "0.64166856", "0.6413309", "0.63840353", "0.6374795", "0.6340327", "0.63316995", "0.63316995", "0.63316995", "0.63316995", "0.63316995", "0.63316995", "0.63316995", "0.63316995", "0.63316995", "0.63316995", "0.63257724", "0.6324748", "0.63072145", "0.6306824", "0.6304663", "0.6298528", "0.6292064", "0.62726605", "0.626634", "0.62651056", "0.6258867", "0.62504077", "0.6243193", "0.6237406", "0.6230141", "0.6224246" ]
0.0
-1
Checks if the value matches a regex or includes the string
function isMatchingPattern(value, pattern) { if (!Object(_is__WEBPACK_IMPORTED_MODULE_0__[/* isString */ "k"])(value)) { return false; } if (Object(_is__WEBPACK_IMPORTED_MODULE_0__[/* isRegExp */ "j"])(pattern)) { return pattern.test(value); } if (typeof pattern === 'string') { return value.indexOf(pattern) !== -1; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkRegex() {\n var text = input.val();\n return text.match(settings.regex);\n }", "isRegexMatch(value, expression) {\n return new RegExp(expression).test(String(value));\n }", "function checkString(match, value) {\n if (value == null || value == undefined) return false; // A non-string never matches.\n if (match == null || match == undefined || match == '') return true; // Empty search always match\n\n var regexp = new RegExp(\".*?\" + match + \".*?\" ,\"gi\");\n return value.match(regexp);\n }", "function validateValue(value, regex, type) {\n if(regex.exec(value))\n console.log('Invalid ' + type);\n else\n console.log('Valid ' + type);\n}", "function testValue(regex, value, errorContainer) {\n if (!regex.test(value)) {\n alert(errorContainer.text());\n return false;\n }\n return true;\n }", "function evalRegex(field, value) {\n let regex = new RegExp(regexList[field]);\n return regex.test(value);\n}", "function isMatchingPattern(\n value,\n pattern,\n requireExactStringMatch = false,\n ) {\n if (!isString(value)) {\n return false;\n }\n\n if (isRegExp(pattern)) {\n return pattern.test(value);\n }\n if (isString(pattern)) {\n return requireExactStringMatch ? value === pattern : value.includes(pattern);\n }\n\n return false;\n }", "function validateRegex(value, regex) {\n if (isEmpty(regex)) {\n return true;\n }\n return regex.test(value);\n}", "function checkRegex(userInput, regex){\n if(regex.test(userInput)){\n return true;\n } \n else{\n return false;\n }\n}", "function isMatchingPattern(\n value,\n pattern,\n requireExactStringMatch = false,\n) {\n if (!is.isString(value)) {\n return false;\n }\n\n if (is.isRegExp(pattern)) {\n return pattern.test(value);\n }\n if (is.isString(pattern)) {\n return requireExactStringMatch ? value === pattern : value.includes(pattern);\n }\n\n return false;\n}", "function regexContains(stringValue, regex) {\n var matches = stringValue.match(regex);\n return matches !== null;\n}", "function isMatchingPattern(\n\t value,\n\t pattern,\n\t requireExactStringMatch = false,\n\t) {\n\t if (!isString$2(value)) {\n\t return false;\n\t }\n\n\t if (isRegExp$2(pattern)) {\n\t return pattern.test(value);\n\t }\n\t if (isString$2(pattern)) {\n\t return requireExactStringMatch ? value === pattern : value.includes(pattern);\n\t }\n\n\t return false;\n\t}", "function match (data, regex) {\n return string(data) && !! data.match(regex);\n }", "function isMatchingPattern(value, pattern) {\r\n if (Object(_is__WEBPACK_IMPORTED_MODULE_0__[\"isRegExp\"])(pattern)) {\r\n return pattern.test(value);\r\n }\r\n if (typeof pattern === 'string') {\r\n return value.includes(pattern);\r\n }\r\n return false;\r\n}", "matches(regex) {\n return this.addValidator({\n message: (value, label) => `Expected ${label} to match \\`${regex}\\`, got \\`${value}\\``,\n validator: value => regex.test(value)\n });\n }", "function CheckValidity(value, patternWord) {\n let pattern = RegExp(patternWord)\n if (pattern.test(value)) {\n return true;\n }\n else {\n return false;\n }\n }", "function TextValid(value, type) {\n\tswitch (type) {\n\tcase 'email':\n\t\treturn isMail(value);\n\t\tbreak;\n\tcase 'number':\n\t\treg = new RegExp(\"^\\\\d{1,7}$\");\n\t\treturn reg.test(value);\n\t\tbreak;\n\tcase 'zip':\n\t\treturn isZip(value);\n\t\tbreak;\n\tcase 'phone':\n\t\treturn isPhone(value);\n\t\tbreak;\n\tdefault:\n\t\treturn !isEmpty(value);\n\t}\n}", "function coincidirConRegEx(regEx, field, message) {\n if (field.value.match(regEx)) {\n setValido(field);\n return true;\n } else {\n setInvalido(field, message);\n return false;\n }\n }", "'~=' ({ attr, value, insensitive }) {\n return (attr.match(/\\w+/g) || []).includes(value)\n }", "function isPhone(value){\n const regPhone = new RegExp('^(\\\\+33|0|0033)[1-9][0-9]{8}$');\n\n if (regPhone.test(value)){ \n return true;\n } \n return false;\n}", "function matches(regex) {\n var res = function (val) {\n regex.lastIndex = 0;\n return (0, isString_1.default)(val) && regex.test(val);\n };\n res.assert = (0, assert_1.default)(res);\n res.schema = 'matches(' + regex + ')';\n return res;\n}", "function isMatchingPattern(value, pattern) {\n if (!is_1.isString(value)) {\n return false;\n }\n if (is_1.isRegExp(pattern)) {\n return pattern.test(value);\n }\n if (typeof pattern === 'string') {\n return value.indexOf(pattern) !== -1;\n }\n return false;\n}", "function isMatchingPattern(value, pattern) {\n if (!is_1.isString(value)) {\n return false;\n }\n if (is_1.isRegExp(pattern)) {\n return pattern.test(value);\n }\n if (typeof pattern === 'string') {\n return value.indexOf(pattern) !== -1;\n }\n return false;\n}", "function inputChecker(e, regexValue) { \n var regex = new RegExp(\"^[\"+regexValue+\"]+$\");\n var str = String.fromCharCode(!e.charCode ? e.which : e.charCode);\n if (regex.test(str)) {\n return true;\n }\n e.preventDefault();\n return false;\n}", "function checkRegex(elem, regex) {\n if (typeof(regex) != 'undefined' && regex !== '') {\n var re = new RegExp(regex, 'g');\n\n if (re.test(elem.value)) {\n return false;\n } else if (elem.value !== \"\") {\n return true;\n } else if (typeof(elem.value) == \"undefined\") {\n console.warn('Unable to validate ' + elem.name + ' element.');\n return false;\n }\n } else {\n // console.warn('Invalid regex of ' + elem.name + ' element.');\n return false;\n }\n } // checkRegex", "function isMatchingPattern(value, pattern) {\n if (Object(_is__WEBPACK_IMPORTED_MODULE_0__[\"isRegExp\"])(pattern)) {\n return pattern.test(value);\n }\n if (typeof pattern === 'string') {\n return value.indexOf(pattern) !== -1;\n }\n return false;\n}", "function validateRegex(control, expression, requiresMatch, matchMessage, noMatchMessage, showMessage)\n{\n var result = true;\n \n if (control != null)\n {\n var pattern = new RegExp(decode(expression));\n var matches = pattern.test(control.value);\n \n if (matches != requiresMatch)\n {\n if (requiresMatch)\n {\n informUser(control, noMatchMessage, showMessage);\n }\n else\n {\n informUser(control, matchMessage, showMessage);\n }\n \n result = false;\n }\n }\n \n return result;\n}", "function testRegex(regex, field) {\n\n var string = field.number ? parseFloat(field.value).toFixed(2).replace(/\\./, '') : field.value;\n if (!regex.test(string)) {\n throw new nACHError({\n name: 'Invalid Data Type',\n message: field.name + '\\'s data type is required to be ' + field.type + ', but its contents don\\'t reflect that.'\n });\n }\n\n return true;\n}", "function testRegexAry(ary, string) {\n\tfor(var key in ary) {\n\t\tvar pattern = ary[key];\n\t\tif(pattern.test(string)) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}", "function isRegexp(value) {\n return Object.prototype.toString.call(value) === '[object RegExp]';\n}", "function pattern(rule,value,source,errors,options){if(rule.pattern instanceof RegExp){if(!rule.pattern.test(value)){errors.push(util.format(options.messages.pattern.mismatch,rule.fullField,value,rule.pattern));}}}", "function pattern(rule,value,source,errors,options){if(rule.pattern instanceof RegExp){if(!rule.pattern.test(value)){errors.push(util.format(options.messages.pattern.mismatch,rule.fullField,value,rule.pattern));}}}", "function pattern(rule,value,source,errors,options){if(rule.pattern instanceof RegExp){if(!rule.pattern.test(value)){errors.push(util.format(options.messages.pattern.mismatch,rule.fullField,value,rule.pattern));}}}", "function containsCharacters(field, code) {\n let regEx;\n switch(code) {\n case 1 :\n // letters\n regEx = /(?=.*[a-zA-Z])/;\n return matchWithRegEx(regEx, field, 'Must contain at least one letter');\n case 2 :\n // letters and numbers\n regEx = /(?=.*\\d)(?=.*[a-zA-Z])/;\n return matchWithRegEx(regEx, field, 'Must contain one letter & one number');\n case 3 :\n // uppcase, lowercase and number\n regEx = /(?=.*\\d)(?=.*[a-z])(?=.*[A-Z])/;\n return matchWithRegEx(regEx, field, 'Must contain one uppercase letter, one lowercase & one number');\n case 4 :\n // uppercase, lowercase, number and special char\n regEx = /(?=.*\\d)(?=.*[a-z])(?=.[A-Z])(?=.*\\W)/;\n return matchWithRegEx(regEx, field, 'Must contain at least one uppercase letter, one lowercase, one number and one special character');\n case 5 :\n regEx = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n return matchWithRegEx(regEx, field, 'Must contain a valid email address');\n default :\n // default return\n return false;\n }\n}", "function isRegExpMatch(rgx, opt_str, opt_onlyCheckStart) {\r\n rgx = RegExp(rgx.source + '|([\\\\S\\\\s])', (rgx + '').replace(/[\\s\\S]+\\/|g/g, '') + 'g');\r\n function f(str, opt_checkStartOnly) {\r\n rgx.lastIndex = undefined;\r\n opt_checkStartOnly = 1 in arguments ? opt_checkStartOnly : opt_onlyCheckStart;\r\n var isMatch = false, match, keepGoing = 1;\r\n while ((match = rgx.exec(str)) && keepGoing) {\r\n isMatch = slice(match, -1)[0] == undefined;\r\n keepGoing = isMatch && !opt_checkStartOnly;\r\n }\r\n return isMatch;\r\n }\r\n return opt_str == undefined ? f : f(opt_str, opt_onlyCheckStart);\r\n }", "function customPhoneValidation(value){\n if(!checkRegex(value, phoneRegex)){\n throw new Error(\"Phone should be in the format xxx-xxx-xxxx\");\n }\n return true;\n}", "function hasBoth(val) {\n return /[a-z][0-9]|[0-9][a-z]/i.test(val);\n}", "function hasBoth(val) {\n return /[a-z][0-9]|[0-9][a-z]/i.test(val);\n}", "function reTest(re, elemval) { //regex test\n\t\ttry {\n\t\t\treturn re.test(elemval);\n\t\t} catch(e) {}\n\t\treturn false;\n\t}", "validateInput(value) {\n if (value.search(/^[0-9\\-\\*]+$/) === -1) {\n return 'This bar code support 0-9 , * , -';\n }\n else {\n return undefined;\n }\n }", "function validatePhoneField(fieldValue, phonePattern) {\n return isNonEmpty(fieldValue) && fieldValue.match(phonePattern);\n}", "validateInput(value) {\n if (value.search(/^[0-9A-Z\\-\\.\\*\\$\\/\\+\\ %\\ ]+$/) === -1) {\n return 'Supports A-Z, 0-9, and symbols ( - . $ / + % SPACE).';\n }\n else {\n return undefined;\n }\n }", "function isRegExp(val) {\n return val instanceof RegExp;\n }", "'*=' ({ attr, value, insensitive }) {\n return attr.includes(value)\n }", "function regexp(rule,value,callback,source,options){var errors=[];var validate=rule.required||!rule.required&&source.hasOwnProperty(rule.field);if(validate){if(Object(__WEBPACK_IMPORTED_MODULE_1__util__[\"e\"/* isEmptyValue */])(value)&&!rule.required){return callback();}__WEBPACK_IMPORTED_MODULE_0__rule___[\"a\"/* default */].required(rule,value,source,errors,options);if(!Object(__WEBPACK_IMPORTED_MODULE_1__util__[\"e\"/* isEmptyValue */])(value)){__WEBPACK_IMPORTED_MODULE_0__rule___[\"a\"/* default */].type(rule,value,source,errors,options);}}callback(errors);}", "function matchPattern( val, tmpl ) {\n // TODO!\n }", "function patternMatch(pattern, value) {\n // no clllluuuueee what is going on with this...\n}", "function IsRegexMatched(thisObj, sPattern, sErrorMsg, bDisplayAsterisk, iTabID) {\n\n var c = (thisObj instanceof jQuery) ? thisObj : $('#' + thisObj);\n if (c.length == 0) return true;\n\n ResetError(c);\n\n var re = new RegExp(sPattern);\n if (!c.val().match(re)) {\n AddMsgInQueue(c, sErrorMsg, bDisplayAsterisk, iTabID);\n return false;\n }\n else {\n return true;\n }\n}", "function checkZipAndCVV(string, inputValue) {\n\n const obj = regrexObj[string];\n\n if(!regrexObj.digitsOnly.test(inputValue)) {\n\n $(obj.selector).text(regrexObj.invalidCharacterMessage);\n\n } else if(!obj.regrex.test(inputValue)) {\n\n $(obj.selector).text(obj.errorMessage);\n\n }else {\n\n $(obj.selector).empty();\n\n return true;\n }\n\n return false;\n\n}", "_anyMatch(string, regexps) {\n return regexps.reduce(\n (result, regexp) => {\n if (result) {\n return result;\n }\n return !!string.match(regexp);\n },\n false);\n }", "function isRegExp(val) {\n return val instanceof RegExp;\n }", "function checkvalid(regx, str, field){\r\n\tif(!regx.test(str)&&str!=\"\"){\r\n\t\tvalidstr += \"Invalid input of \"+field+\"; \";\r\n\t\tvalidflag = false;\r\n\t}\r\n}", "function validatingByText(value_condition, value_json, signal){\n\tvalue_condition = value_condition.toLowerCase();\n\tvalue_json = value_json.toLowerCase();\n\tif(signal == '='){\n\t\treturn (value_json.indexOf(value_condition) > -1);\n\t} else if(signal == '=='){\n\t\treturn (value_condition == value_json);\n\t} else if(signal == '<>'){\n\t\treturn (value_condition != value_json);\n\t}\n\treturn false;\n}", "function checkForRegExpPattern(input) {\r\n var pattern = new RegExp(/[$^*+?]/);\r\n return pattern.test(input);\r\n}", "function checkRegexp(o, regexp, n) {\n\t\tif (!(regexp.test(o.val()))) {\n\t\t\to.addClass(\"ui-state-error\");\n\t\t\tupdateTips(n);\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "function regexp(rule, value, callback, source, options) {\n var errors = [];\n var validate =\n rule.required ||\n (!rule.required && source.hasOwnProperty(rule.field));\n\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n\n rules.required(rule, value, source, errors, options);\n\n if (!isEmptyValue(value)) {\n rules.type(rule, value, source, errors, options);\n }\n }\n\n callback(errors);\n }", "function checkRegexp(o, regexp, n) {\n if (!(regexp.test(o.val()))) {\n o.addClass(\"ui-state-error\");\n updateTips(n);\n return false;\n }\n else {\n return true;\n }\n}", "function isRegex(any) {\n return Object.prototype.toString.call(any) === '[object RegExp]';\n}", "function isRegex(any) {\n return Object.prototype.toString.call(any) === '[object RegExp]';\n}", "verifyPhoneNumber(value) {\n let regex = RegExp('^[0-9-+()]*$');\n return regex.test(value);\n }", "function f_string_match_re(\n ps_str,\n pr_regexp) {\n return((typeof(ps_str) === \"string\") ? ps_str.match(pr_regexp) : false);\n}", "function match(regex, userAgent) {\n\t return regex.test(userAgent);\n\t }", "function regexVar(s) {\n const re = new RegExp(/^(Mr|Mrs|Ms|Dr|Er)\\.\\s[a-zA-Z]+$/);\n let status = re.test(s);\n return status;\n}", "function checkCreditCard(string, inputValue) {\n\n const creditObj = regrexObj[string];\n\n if(!regrexObj.digitsOnly.test(inputValue)) {\n\n $(creditObj.selector).text(regrexObj.invalidCharacterMessage);\n\n } else if(creditObj.minLength.test(inputValue)) {\n\n $(creditObj.selector).text(creditObj.minError);\n\n } else if (creditObj.maxLength.test(inputValue)) {\n\n $(creditObj.selector).text(creditObj.maxError);\n\n } else {\n\n $(creditObj.selector).empty();\n\n return true;\n }\n\n return false;\n}", "function regexp1(){\r\n var usrnam2 = document.getElementById(\"un2\").value;\r\n // i used i for capitalisation issue\r\n // upper case and lower case alphabets will be treated same \r\n var regx = /capg2021/i;\r\n\r\n if (regx.test(usrnam2)){\r\n return true ;\r\n }\r\n\r\n else{\r\n alert(\"invalid username \");\r\n return false ;\r\n }\r\n\r\n}", "function check(id,Regex) {\r\n var element = document.getElementById(id);\r\n if(!Regex.test(element.value)) return (false);\r\n else return (true);\r\n}", "function phonenumber() {\n inputtxt = $('#userPhoneRegistration').val();\n var phoneno = /^\\d{10}$/;\n if ((inputtxt.match(phoneno))) {\n return true;\n }\n else {\n return false;\n }\n}", "function checkFormat (str, result) {\n\tlet re = new RegExp(result[0].p_value, 'g')\n\treturn re.test(str);\n}", "function CheckString() {\n try {\n //user input field\n var s = $('#regExString').val();\n //Regular expression object is created:\n var regExpression = /^[A-Z,a-z]\\d[A-Z,a-z][\\s{1}]?\\d[A-Z,a-z]\\d/;\n // The test method returns a Boolean to indicate whether the input string matches the regular expression that was created.\n if (regExpression.test(s))\n alert(\"Valid postal code.\");\n else alert(\"Invalid postal code.\");\n } catch (e) {\n alert(e.message);\n }\n}", "function isRegExp(val) {\n return val && val.constructor && val.constructor === RegExp;\n}", "function regexp(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n es_rule.required(rule, value, source, errors, options);\n if (!isEmptyValue(value)) {\n es_rule.type(rule, value, source, errors, options);\n }\n }\n callback(errors);\n}", "function regexp(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n es_rule.required(rule, value, source, errors, options);\n if (!isEmptyValue(value)) {\n es_rule.type(rule, value, source, errors, options);\n }\n }\n callback(errors);\n}", "function regexp(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n es_rule.required(rule, value, source, errors, options);\n if (!isEmptyValue(value)) {\n es_rule.type(rule, value, source, errors, options);\n }\n }\n callback(errors);\n}", "function regexp(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n es_rule.required(rule, value, source, errors, options);\n if (!isEmptyValue(value)) {\n es_rule.type(rule, value, source, errors, options);\n }\n }\n callback(errors);\n}", "function regexp(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n es_rule.required(rule, value, source, errors, options);\n if (!isEmptyValue(value)) {\n es_rule.type(rule, value, source, errors, options);\n }\n }\n callback(errors);\n}", "function regexp(rule, value, callback, source, options) {\n\t var errors = [];\n\t var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\t\n\t if (validate) {\n\t if (isEmptyValue(value) && !rule.required) {\n\t return callback();\n\t }\n\t\n\t rules.required(rule, value, source, errors, options);\n\t\n\t if (!isEmptyValue(value)) {\n\t rules.type(rule, value, source, errors, options);\n\t }\n\t }\n\t\n\t callback(errors);\n\t}", "function regexp(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n if (validate) {\n if (Object(util[\"e\" /* isEmptyValue */])(value) && !rule.required) {\n return callback();\n }\n es_rule.required(rule, value, source, errors, options);\n if (!Object(util[\"e\" /* isEmptyValue */])(value)) {\n es_rule.type(rule, value, source, errors, options);\n }\n }\n callback(errors);\n}", "function matchesEntirely() {\n\tvar text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n\tvar regular_expression = arguments[1];\n\n\treturn new RegExp('^(?:' + regular_expression + ')$').test(text);\n}", "function regexp(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n if (validate) {\n if (Object(__WEBPACK_IMPORTED_MODULE_1__util__[\"isEmptyValue\"])(value) && !rule.required) {\n return callback();\n }\n __WEBPACK_IMPORTED_MODULE_0__rule___[\"default\"].required(rule, value, source, errors, options);\n if (!Object(__WEBPACK_IMPORTED_MODULE_1__util__[\"isEmptyValue\"])(value)) {\n __WEBPACK_IMPORTED_MODULE_0__rule___[\"default\"].type(rule, value, source, errors, options);\n }\n }\n callback(errors);\n}", "function checkRegexp( o, regexp, n ) {\n\tif ( !( regexp.test( o.val() ) ) ) {\n\t\to.addClass( \"ui-state-error\" );\n\t\tupdateTips( n );\n\t\treturn false;\n\t} else {\n\t\treturn true;\n\t}\n}", "function regexp(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n\n rules.required(rule, value, source, errors, options);\n\n if (!isEmptyValue(value)) {\n rules.type(rule, value, source, errors, options);\n }\n }\n\n callback(errors);\n}", "function regexp(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n\n rules.required(rule, value, source, errors, options);\n\n if (!isEmptyValue(value)) {\n rules.type(rule, value, source, errors, options);\n }\n }\n\n callback(errors);\n}", "function regexp(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n\n rules.required(rule, value, source, errors, options);\n\n if (!isEmptyValue(value)) {\n rules.type(rule, value, source, errors, options);\n }\n }\n\n callback(errors);\n}", "function regexp(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n\n rules.required(rule, value, source, errors, options);\n\n if (!isEmptyValue(value)) {\n rules.type(rule, value, source, errors, options);\n }\n }\n\n callback(errors);\n}", "function regexp(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n\n rules.required(rule, value, source, errors, options);\n\n if (!isEmptyValue(value)) {\n rules.type(rule, value, source, errors, options);\n }\n }\n\n callback(errors);\n}", "function regexp(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n\n rules.required(rule, value, source, errors, options);\n\n if (!isEmptyValue(value)) {\n rules.type(rule, value, source, errors, options);\n }\n }\n\n callback(errors);\n}", "function regexp(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n\n rules.required(rule, value, source, errors, options);\n\n if (!isEmptyValue(value)) {\n rules.type(rule, value, source, errors, options);\n }\n }\n\n callback(errors);\n}", "function regexp(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n\n rules.required(rule, value, source, errors, options);\n\n if (!isEmptyValue(value)) {\n rules.type(rule, value, source, errors, options);\n }\n }\n\n callback(errors);\n}", "function regexp(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n\n rules.required(rule, value, source, errors, options);\n\n if (!isEmptyValue(value)) {\n rules.type(rule, value, source, errors, options);\n }\n }\n\n callback(errors);\n}", "function regexp(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n\n rules.required(rule, value, source, errors, options);\n\n if (!isEmptyValue(value)) {\n rules.type(rule, value, source, errors, options);\n }\n }\n\n callback(errors);\n}", "function regexp(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n\n rules.required(rule, value, source, errors, options);\n\n if (!isEmptyValue(value)) {\n rules.type(rule, value, source, errors, options);\n }\n }\n\n callback(errors);\n}", "function regexp(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n\n rules.required(rule, value, source, errors, options);\n\n if (!isEmptyValue(value)) {\n rules.type(rule, value, source, errors, options);\n }\n }\n\n callback(errors);\n}", "function regexp(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n\n rules.required(rule, value, source, errors, options);\n\n if (!isEmptyValue(value)) {\n rules.type(rule, value, source, errors, options);\n }\n }\n\n callback(errors);\n}", "function regexp(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n\n rules.required(rule, value, source, errors, options);\n\n if (!isEmptyValue(value)) {\n rules.type(rule, value, source, errors, options);\n }\n }\n\n callback(errors);\n}", "function regexp(rule, value, callback, source, options) {\n var errors = [];\n var validate =\n rule.required || (!rule.required && source.hasOwnProperty(rule.field));\n\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n\n rules.required(rule, value, source, errors, options);\n\n if (!isEmptyValue(value)) {\n rules.type(rule, value, source, errors, options);\n }\n }\n\n callback(errors);\n}", "function regexp(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n\n if (validate) {\n if (isEmptyValue(value) && !rule.required) {\n return callback();\n }\n\n es_rule.required(rule, value, source, errors, options);\n\n if (!isEmptyValue(value)) {\n es_rule.type(rule, value, source, errors, options);\n }\n }\n\n callback(errors);\n}", "function regexp(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n if (validate) {\n if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util__[\"f\" /* isEmptyValue */])(value) && !rule.required) {\n return callback();\n }\n __WEBPACK_IMPORTED_MODULE_0__rule___[\"a\" /* default */].required(rule, value, source, errors, options);\n if (!__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util__[\"f\" /* isEmptyValue */])(value)) {\n __WEBPACK_IMPORTED_MODULE_0__rule___[\"a\" /* default */].type(rule, value, source, errors, options);\n }\n }\n callback(errors);\n}", "function regexp(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n if (validate) {\n if (__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util__[\"f\" /* isEmptyValue */])(value) && !rule.required) {\n return callback();\n }\n __WEBPACK_IMPORTED_MODULE_0__rule___[\"a\" /* default */].required(rule, value, source, errors, options);\n if (!__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__util__[\"f\" /* isEmptyValue */])(value)) {\n __WEBPACK_IMPORTED_MODULE_0__rule___[\"a\" /* default */].type(rule, value, source, errors, options);\n }\n }\n callback(errors);\n}", "function hasBoth(val) {\n return (/[a-z][0-9]|[0-9][a-z]/i.test(val)\n );\n}", "function pattern(rule, value, source, errors, options) {\n\t\t if (rule.pattern instanceof RegExp) {\n\t\t if (!rule.pattern.test(value)) {\n\t\t errors.push(util.format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));\n\t\t }\n\t\t }\n\t\t}" ]
[ "0.7127808", "0.702946", "0.6942304", "0.69261616", "0.692482", "0.67734176", "0.66326505", "0.65738076", "0.65241677", "0.6458053", "0.6398477", "0.6366949", "0.63587177", "0.6348114", "0.633678", "0.6283419", "0.6271974", "0.62557083", "0.62529397", "0.62499887", "0.624271", "0.6237103", "0.6237103", "0.6210334", "0.6208525", "0.6171869", "0.6150914", "0.6115128", "0.6067939", "0.6065871", "0.6057429", "0.6057429", "0.6057429", "0.60478497", "0.60306555", "0.6015281", "0.5989354", "0.5989354", "0.5956132", "0.59395415", "0.5933321", "0.5920182", "0.5909563", "0.58885026", "0.58879054", "0.5866419", "0.58646154", "0.58618724", "0.58617795", "0.58532125", "0.5827385", "0.5818148", "0.5817772", "0.58145237", "0.5806934", "0.579177", "0.5791569", "0.5783924", "0.5783924", "0.5775309", "0.5773286", "0.5757985", "0.57543516", "0.57527477", "0.5746942", "0.5746733", "0.5746109", "0.57434046", "0.5742068", "0.5739715", "0.5730947", "0.5730947", "0.5730947", "0.5730947", "0.5730947", "0.57303005", "0.5719735", "0.5713001", "0.57076985", "0.570077", "0.5683338", "0.5683338", "0.5683338", "0.5683338", "0.5683338", "0.5683338", "0.5683338", "0.5683338", "0.5683338", "0.5683338", "0.5683338", "0.5683338", "0.5683338", "0.5683338", "0.56807333", "0.56760895", "0.5669369", "0.5669369", "0.56690973", "0.56668735" ]
0.61266506
27
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. / Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
function _default(ecModel) { var legendModels = ecModel.findComponents({ mainType: 'legend' }); if (!legendModels || !legendModels.length) { return; } ecModel.eachSeriesByType('graph', function (graphSeries) { var categoriesData = graphSeries.getCategoriesData(); var graph = graphSeries.getGraph(); var data = graph.data; var categoryNames = categoriesData.mapArray(categoriesData.getName); data.filterSelf(function (idx) { var model = data.getItemModel(idx); var category = model.getShallow('category'); if (category != null) { if (typeof category === 'number') { category = categoryNames[category]; } // If in any legend component the status is not selected. for (var i = 0; i < legendModels.length; i++) { if (!legendModels[i].isSelected(category)) { return false; } } } return true; }); }, this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onChildAppStart () {\n\n }", "get Android() {}", "onMessageStart() { }", "_playbackCompatibility() {\n // Detect audio playback capabilities.\n\n // Detect HTML5 Audio playback.\n // http://caniuse.com/#feat=audio\n this.canUseAudio = Boolean(new Audio());\n console.log('Native HTML5 Audio playback capability: ' +\n this.canUseAudio);\n\n // Detect Cordova Media Playback\n // It allows playing audio using the native bridge inside WebView Apps.\n // https://github.com/apache/cordova-plugin-media/blob/master/doc/index.md\n this.canUseCordovaMedia = Boolean(window.Media);\n console.log('Cordova Media playback capability: ' +\n this.canUseCordovaMedia);\n\n if (!(this.canUseAudio || this.canUseCordovaMedia)) {\n throw new Error(\n 'Some form of audio playback capability is required');\n }\n\n var _audio = new Audio();\n if (_audio.canPlayType === 'function') {\n throw new Error(\n 'Unable to detect audio playback capabilities');\n }\n\n var canPlayOggVorbis = _audio.canPlayType(\n 'audio/ogg; codecs=\"vorbis\"') !== '';\n var canPlayOggOpus = _audio.canPlayType(\n 'audio/ogg; codecs=\"opus\"') !== '';\n var canPlayWave = _audio.canPlayType('audio/wav') !== '';\n var canPlayMP3 = _audio.canPlayType('audio/mpeg; codecs=\"mp3\"') !== '';\n var canPlayAAC = _audio.canPlayType(\n 'audio/mp4; codecs=\"mp4a.40.2\"') !== '';\n var canPlay3GPP = _audio.canPlayType(\n 'audio/3gpp; codecs=\"samr\"') !== '';\n\n console.log('Native Vorbis audio in Ogg container playback capability: ' +\n canPlayOggVorbis);\n console.log('Native Opus audio in Ogg container playback capability: ' +\n canPlayOggOpus);\n console.log('Native PCM audio in Waveform Audio File Format (WAVE) ' +\n 'playback capability: ' + canPlayWave);\n console.log('Native MPEG Audio Layer 3 (MP3) playback capability: ' +\n canPlayMP3);\n console.log('Native Low-Complexity AAC audio in MP4 container playback ' +\n 'capability: ' + canPlayAAC);\n console.log('Native AMR audio in 3GPP container playback capability: ' +\n canPlay3GPP);\n\n if (!(canPlayWave || canPlayMP3)) {\n throw new Error(\n 'Native Wave or MP3 playback is required');\n }\n }", "createStream () {\n\n }", "onComponentMount() {\n\n }", "function BaseDeviceProfile() {\n \n this.audioNeedsTranscodingCodecs = []; // fill these with audio codecs that the implemented device can handle natively\n this.videoNeedsTranscodingCodecs = []; // fill these with video codecs that the implemented device can handle natively\n this.validFormats = []; // fill these with video formats that the implemented device can handle natively\n\n this.transcodeOptions = {\n rescaleVideo : false, // BaseDeviceProfile.prototype.rescale\n subtitle : false, // BaseDeviceProfile.prototype.hardCodeSubtitle\n audioShiftCorrect : false // BaseDeviceProfile.prototype.correctAudioOffset\n };\n\n /**\n * @todo: whutz this?\n * @param {[type]} probeData [description]\n * @return {[type]} [description]\n */\n this.canPlayContainer = function (probeData) {\n throw new Error(\"canPlayContainer : Not Implemented\");\n };\n\n /**\n * Implement this method to return device specific ffmpeg flags for a probed media\n * @param {object} probeData ffmpeg probe data\n * @param {[type]} forceTranscode force transcode even if native format?\n * @return {Promise} [description]\n */\n this.getFFmpegFlags = function (probeData, forceTranscode) {\n throw new Error(\"getFFmpegFlags : Not Implemented!\");\n };\n\n}", "didMount() {\n }", "requestContainerInfo() {}", "function SBRecordsetPHP_analyzePlatformSpecific()\r\n{\r\n\r\n\r\n}", "function bridgeAndroidAndIOS() {\r\n\r\n //ios\r\n function setupWebViewJavascriptBridge(callback) {\r\n if (window.WebViewJavascriptBridge) {\r\n return callback(WebViewJavascriptBridge);\r\n }\r\n if (window.WVJBCallbacks) {\r\n return window.WVJBCallbacks.push(callback);\r\n }\r\n window.WVJBCallbacks = [callback];\r\n var WVJBIframe = document.createElement('iframe');\r\n WVJBIframe.style.display = 'none';\r\n WVJBIframe.src = 'https://__bridge_loaded__';\r\n document.documentElement.appendChild(WVJBIframe);\r\n setTimeout(function() {\r\n document.documentElement.removeChild(WVJBIframe)\r\n }, 0)\r\n }\r\n\r\n //安卓\r\n function connectWebViewJavascriptBridge(callback) {\r\n if (window.WebViewJavascriptBridge) {\r\n callback(WebViewJavascriptBridge)\r\n } else {\r\n document.addEventListener(\r\n 'WebViewJavascriptBridgeReady',\r\n function() {\r\n callback(WebViewJavascriptBridge)\r\n },\r\n false\r\n );\r\n }\r\n }\r\n\r\n function bridgeLog(logContent) {\r\n uni.showModal({\r\n title: \"原始数据\",\r\n content: logContent,\r\n })\r\n }\r\n\r\n switch (uni.getSystemInfoSync().platform) {\r\n case 'android':\r\n connectWebViewJavascriptBridge(function(bridge) {\r\n bridge.init();\r\n bridge.registerHandler(\"GetUser\", function(data, responseCallback) {\r\n if(JSON.parse(data).guid != \"null\"){\r\n uni.setStorageSync('userInfo', {\r\n guid: JSON.parse(data).guid,\r\n token: JSON.parse(data).token\r\n })\r\n }\r\n uni.setStorageSync('parameter', {\r\n activityID: JSON.parse(data).activityID,\r\n AppCode: JSON.parse(data).AppCode\r\n })\r\n // 初始传入token和guid\r\n Vue.config.configDic = {\r\n Authorization: JSON.parse(data).Authorization,\r\n statusBarHeight: Number.parseInt(JSON.parse(data).statusBarHeight),\r\n };\r\n });\r\n\r\n })\r\n break;\r\n case 'ios':\r\n setupWebViewJavascriptBridge(function(bridge) {\r\n bridge.registerHandler('GetUser', function(data, responseCallback) {\r\n if(data.guid != \"null\"){\r\n uni.setStorageSync('userInfo', {\r\n guid: data.guid,\r\n token: data.token\r\n })\r\n }\r\n uni.setStorageSync('parameter', {\r\n activityID: data.activityID,\r\n AppCode: data.AppCode\r\n })\r\n // 初始传入token和guid\r\n Vue.config.configDic = {\r\n Authorization: data.Authorization,\r\n productID: data.productID,\r\n statusBarHeight: data.statusBarHeight,\r\n };\r\n })\r\n })\r\n break;\r\n default:\r\n console.log('运行在开发者工具上')\r\n break;\r\n }\r\n\r\n}", "constructor() {\n super();\n this._logger = new pip_services3_components_node_3.CompositeLogger();\n this._connectionResolver = new connect_1.AwsConnectionResolver();\n this._connectTimeout = 30000;\n this._client = null; //AmazonCloudWatchClient\n this._opened = false;\n }", "static getDeviceModel() {\n return \"zhimi.fan.za4\";\n }", "constructor(speechCallback, clientId, streamId) {\n console.log(\"in gcloud\");\n const useOpus = false;\n this.clientId = clientId;\n this.streamId = streamId;\n this.isOpen = true;\n\n // Note: \n // 1) The client side detects silence and does a startStream, and endStream\n // The streamId is incremented everytime this happens, \n // so a combination of clientId + streamId can uniquely identify a stream.\n // The server will be transcribing each client's stream in parallel.\n //\n // 2) The streaming API has a limit of 5 minutes. So just before 5 minutes are up\n // there will timer that will close and reopen the stream. Any non final results will\n // we sent again to be re-transcribed,\n // The restartCounter will be incremented every time the stream is restarted. However\n // the streamId will remain the same.\n //\n // 3) Every stream will have set of results. Some results will be final and some won't be\n // After a result is final, that portion of the audio will not be transcribed again by the API\n // each final result will have resultEndTime, - this is time in seconds (and nanoseconds) \n // from the time the stream was started/restarted.\n // Results don'd have a startTime, it is implicit that the startTime is resultEndTime\n // of the last final stream, or 0 if there was no final stream before this\n // We augment the result to add this startTime\n //\n // We also keep a cumulative restartTime, which is the difference betwen the beginning of \n // stream start and begining of the most recent stream restart. And add this to \n // the startTime and endTime. This way the client is completely unaware of the internal restarts\n // \n \n // Have we started/restarted a new stream ?\n this.newStream = true;\n\n // number of times the stream has been restarted\n this.restartCounter = 0;\n\n // audio Input is any array of chunks (buffer)\n this.audioInput = [];\n this.audioInputSize = 0; // total size of all the buffers\n\n // the end time (in seconds) of the last result. \n // the End time is calculated from the beginning of start/restart stream\n this.resultEndTime = 0;\n\n // the end time of the last final result.\n this.finalEndTime = 0;\n\n // the start time (in seconds) of the current result. \n // It is calculated fom beginning of start/restart stream\n this.startTime = 0;\n \n // the time between the of beginning of start stream and the beginning of the most current restart stream.\n this.restartTime = 0;\n\n\n this.lastTranscriptWasFinal = false;\n\n this.restartTimer = null;\n\n this.config = {\n encoding: useOpus ? 'OGG_OPUS' : 'LINEAR16',\n sampleRateHertz: useOpus ? 48000 : 16000,\n languageCode: 'en_us',\n enableAutomaticPunctuation: true,\n speechContexts: [{ phrases: phrases}],\n };\n\n this.request = {\n config : this.config,\n interimResults: true,\n };\n\n this.startStreamInternal();\n }", "constructor() {\n }", "constructor(info) {\n super();\n\n _defineProperty(this, \"_peerConnectionId\", void 0);\n\n _defineProperty(this, \"_reactTag\", void 0);\n\n _defineProperty(this, \"_id\", void 0);\n\n _defineProperty(this, \"_label\", void 0);\n\n _defineProperty(this, \"_maxPacketLifeTime\", void 0);\n\n _defineProperty(this, \"_maxRetransmits\", void 0);\n\n _defineProperty(this, \"_negotiated\", void 0);\n\n _defineProperty(this, \"_ordered\", void 0);\n\n _defineProperty(this, \"_protocol\", void 0);\n\n _defineProperty(this, \"_readyState\", void 0);\n\n _defineProperty(this, \"_subscriptions\", []);\n\n _defineProperty(this, \"binaryType\", 'arraybuffer');\n\n _defineProperty(this, \"bufferedAmount\", 0);\n\n _defineProperty(this, \"bufferedAmountLowThreshold\", 0);\n\n this._peerConnectionId = info.peerConnectionId;\n this._reactTag = info.reactTag;\n this._label = info.label;\n this._id = info.id === -1 ? null : info.id; // null until negotiated.\n\n this._ordered = Boolean(info.ordered);\n this._maxPacketLifeTime = info.maxPacketLifeTime;\n this._maxRetransmits = info.maxRetransmits;\n this._protocol = info.protocol || '';\n this._negotiated = Boolean(info.negotiated);\n this._readyState = info.readyState;\n\n this._registerEvents();\n }", "_onMessage() {\n throw new Error(\"not implemented\");\n }", "getStreamPosition() {\n return Native.getStreamPosition();\n }", "onChildAppSourceChangeRestart () {\n\n }", "constructor() {\n\n\t}", "async componentDidUpdate() {\n console.log(this.props.directory);\n //this needs to be replaced with environment variable\n const beginingUrl = \"http://10.34.1.30:8080/songs/\";\n const songLoc = this.props.directory + \"/outputlist.m3u8\";\n var hlsUrl = beginingUrl + songLoc;\n var audio = this.player;\n\n //Should this logic be loacated here??This looks hacky,\n const token = await getToken();\n let bearerTokenString = \"Bearer \" + token;\n\n if (Hls.isSupported()) {\n var hls = new Hls({\n // This configuration is required to insure that only the\n // viewer can access the content by sending a session cookie\n // to api.video service\n xhrSetup: function (xhr, url) {\n xhr.setRequestHeader(\"Authorization\", bearerTokenString);\n },\n });\n hls.loadSource(hlsUrl);\n hls.attachMedia(audio);\n hls.on(Hls.Events.MANIFEST_PARSED, function () {\n audio.play();\n });\n } else if (audio.canPlayType(\"application/vnd.apple.mpegurl\")) {\n console.log(\"Nigga we here!!\");\n audio.src = hlsUrl;\n audio.addEventListener(\"loadedmetadata\", function () {\n audio.play();\n });\n }\n }", "onMessageReceive() {}", "constructor() {\n\t}", "constructor() {\n\t}", "componentWillMount() {\n //CodePush.disallowRestart();\n //Alert.alert(\"mounted cool vite OK OK MAINTENANT CA MARCHE !!!!!\");\n/*CodePush.sync(\n{\ndeploymentKey: 'giMb817KrtTFkIuOg4i5ohnEUDyoBJvD1i-VN',\nupdateDialog: true,\ninstallMode: CodePush.InstallMode.IMMEDIATE,\n},\nthis.CodePushStatusDidChange.bind(this),\nthis.CodePushDownloadDidProgress.bind(this)\n);*/\n /* Animated.loop(\n Animated.sequence([\n Animated.timing(this.animatedValue, { toValue: 1, duration: 3000, easing: Easing.ease, useNativeDriver: true }),\n Animated.timing(this.animatedValue, { toValue: 0, duration: 3000, easing: Easing.ease, useNativeDriver: true }),\n ])).start();*/\n //this.toggleLike(); \n //CodePush.notifyApplicationReady();\n this._onLoadStart();\n }", "get supportStreaming() { return exists && has(WA.instantiateStreaming); }", "function version(){ return \"0.13.0\" }", "static getDeviceModel() {\n return \"zhimi.fan.za5\";\n }", "_init(config) {\n this.name = config.name;\n this.appId = config.appid || config.appId;\n this.serverUrl = config.server_url + '/sync_xcx';\n this.autoTrackProperties = {};\n // cache commands.\n this._queue = [];\n\n if (config.isChildInstance) {\n this._state = {};\n } else {\n logger.enabled = config.enableLog;\n this.instances = []; // 子实例名称\n this._state = {\n getSystemInfo: false,\n initComplete: false,\n };\n systemInfo.getSystemInfo(() => {\n this._updateState({\n getSystemInfo: true,\n });\n });\n\n if (config.autoTrack) {\n this.autoTrack = PlatformAPI.initAutoTrackInstance(this, config);\n } else {\n var launchOptions = PlatformAPI.getAppOptions((options) => {\n if (options && options.scene) {\n this._setAutoTrackProperties({\n '#scene': options.scene,\n });\n }\n\n });\n if (launchOptions.scene) {\n this._setAutoTrackProperties({\n '#scene': launchOptions.scene,\n });\n }\n }\n }\n\n this.store = new ThinkingDataPersistence(config, () => {\n if (this.config.asyncPersistence && _.isFunction(this.config.persistenceComplete)) {\n this.config.persistenceComplete(this);\n }\n this._updateState();\n });\n }", "onChildAppRestart (/* reason */) {\n\n }", "_addHMRClientCode(data) {\n// If we have it, grab supporting code...\n let prependage = fs.readFileSync('./lib/hmr/clientSocket.js'),\n appendage = fs.readFileSync('./lib/hmr/hmr.js')\n\n// Prepend clientSocket.js to bundle.... Append hmr runtime to bundle\n return `${prependage}${data}${appendage}`\n }", "componentDidMount() {\n this.setState({\n configuration: {\n flow: {\n name: \"sample1\",\n id: \"01\",\n components: [\n {\n type: \"http-listener\",\n id: \"http-list-01\",\n properties: {\n method: \"get\",\n port: 8000,\n path: \"http://localhost\"\n }\n },\n {\n type: \"logger\",\n id: \"logger-01\",\n properties: {\n level: \"info\"\n }\n },\n {\n type: \"file-writer\",\n id: \"file-write-01\",\n properties: {\n location: \"xx\",\n username: \"sachith\",\n password: \"\",\n filename: \"hello.txt\"\n }\n }\n ]\n }\n }\n\n });\n }", "componentWillUnmount(){\n Streaming.disconnect();\n }", "pushStart() {\n Cordova.exec(\n () => {},\n () => {},\n 'SparkProxy',\n 'pushStart',\n []);\n }", "async onReady() {\n // Initialize your adapter here\n // Subsribe to all state changes\n this.subscribeStates('*');\n this.axiosInstance = axios_1.default.create({\n baseURL: `http://${this.config.host}/api/v1/`,\n timeout: 1000\n });\n // try to ping volumio\n const connectionSuccess = await this.pingVolumio();\n if (this.config.checkConnection) {\n let interval = this.config.checkConnectionInterval;\n if (!interval || !isNumber(interval)) {\n this.log.error(`Invalid connection check interval setting. Will be set to 30s`);\n interval = 30;\n }\n this.checkConnectionInterval = setInterval(this.checkConnection, interval * 1000, this);\n }\n // get system infos\n if (connectionSuccess) {\n this.apiGet('getSystemInfo').then(sysInfo => {\n this.setStateAsync('info.id', sysInfo.id, true);\n this.setStateAsync('info.host', sysInfo.host, true);\n this.setStateAsync('info.name', sysInfo.name, true);\n this.setStateAsync('info.type', sysInfo.type, true);\n this.setStateAsync('info.serviceName', sysInfo.serviceName, true);\n this.setStateAsync('info.systemversion', sysInfo.systemversion, true);\n this.setStateAsync('info.builddate', sysInfo.builddate, true);\n this.setStateAsync('info.variant', sysInfo.variant, true);\n this.setStateAsync('info.hardware', sysInfo.hardware, true);\n });\n // get inital player state\n this.updatePlayerState();\n }\n if (this.config.subscribeToStateChanges && this.config.subscriptionPort && connectionSuccess) {\n this.log.debug('Subscription mode is activated');\n try {\n this.httpServerInstance = this.httpServer.listen(this.config.subscriptionPort);\n this.log.debug(`Server is listening on ${ip_1.default.address()}:${this.config.subscriptionPort}`);\n this.subscribeToVolumioNotifications();\n }\n catch (error) {\n this.log.error(`Starting server on ${this.config.subscriptionPort} for subscription mode failed: ${error.message}`);\n }\n }\n else if (this.config.subscribeToStateChanges && !this.config.subscriptionPort) {\n this.log.error('Subscription mode is activated, but port is not configured.');\n }\n else if (!this.config.subscribeToStateChanges && connectionSuccess) {\n this.unsubscribeFromVolumioNotifications();\n }\n this.httpServer.post('/volumiostatus', (req, res) => {\n this.onVolumioStateChange(req.body);\n res.sendStatus(200);\n });\n }", "function IbtRealTimeSJ(){/***********************************************************\n\t * @attributes\n\t ***********************************************************/var appKey;// application key\n\tvar authToken;// authentication token\n\tvar clusterUrl;// cluster URL to connect\n\tvar waitingClusterResponse;// indicates whether is waiting for a cluster response\n\tvar connectionTimeout;// connection timeout in milliseconds\n\tvar messageMaxSize;// message maximum size in bytes\n\tvar channelMaxSize;// channel maximum size in bytes\n\tvar channelsMaxSize;// maximum of channels for batchSend\n\tvar messagesBuffer;// buffer to hold the message parts\n\tvar id;// object identifier\n\tvar isConnected;// indicates whether the client object is connected\n\tvar isConnecting;// indicates whether the client object is connecting\n\tvar alreadyConnectedFirstTime;// indicates whether the client already connected for the first time\n\tvar stopReconnecting;// indicates whether the user disconnected (stop the reconnecting proccess)\n\tvar ortc;// represents the object itself\n\tvar sockjs;// socket connected to\n\tvar url;// URL to connect\n\tvar userPerms;// user permissions\n\tvar connectionMetadata;// connection metadata used to identify the client\n\tvar announcementSubChannel;// announcement subchannel\n\tvar subscribedChannels;// subscribed/subscribing channels\n\tvar lastKeepAlive;// holds the time of the last keep alive received\n\tvar invalidConnection;// indicates whether the connection is valid\n\tvar reconnectIntervalId;// id used for the reconnect interval\n\tvar reconnectStartedAt;// the time which the reconnect started\n\tvar validatedTimeoutId;// id used for the validated timeout\n\tvar validatedArrived;// indicates whether the validated message arrived\n\tvar retryingWithSsl;// indicates whether the connection is being retried with SSL\n\tvar protocol;// protocol to use\n\tvar sslSessionCookieName;// the SSL session cookie name\n\tvar sessionCookieName;// the session cookie name\n\tvar sessionId;// the session ID\n\tvar registrationId;// browser device token for push notifications\n\tvar pushPlatform;// push notifications platform\n\t/***********************************************************\n\t * @attributes initialization\n\t ***********************************************************/sslSessionCookieName=\"ortcssl\";sessionCookieName=\"ortcsession-\";connectionTimeout=5000;messageMaxSize=800;channelMaxSize=100;connectionMetadataMaxSize=256;channelsMaxSize=50;// Time in seconds\n\tvar heartbeatDefaultTime=15;// Heartbeat default interval time\n\tvar heartbeatDefaultFails=3;// Heartbeat default max fails\n\tvar heartbeatMaxTime=60;var heartbeatMinTime=10;var heartbeatMaxFails=6;var heartbeatMinFails=1;var heartbeatTime=heartbeatDefaultTime;// Heartbeat interval time\n\tvar heartbeatFails=heartbeatDefaultFails;// Heartbeat max fails\n\tvar heartbeatInterval=null;// Heartbeat interval\n\tvar heartbeatActive=false;messagesBuffer={};subscribedChannels={};isConnected=false;isConnecting=false;alreadyConnectedFirstTime=false;invalidConnection=false;waitingClusterResponse=false;validatedArrived=false;retryingWithSsl=false;ortc=this;lastKeepAlive=null;userPerms=null;reconnectStartedAt=null;protocol=undefined;pushPlatform=\"GCM\";var delegateExceptionCallback=function(ortcArg,event){if(ortcArg!==null&&ortcArg.onException!==null){ortcArg.onException(ortcArg,event);}};/***********************************************************\n\t * @properties\n\t ***********************************************************/this.getId=function(){return id;};this.setId=function(newId){id=newId;};this.getUrl=function(){return url;};this.setUrl=function(newUrl){url=newUrl;clusterUrl=null;};this.getClusterUrl=function(){return clusterUrl;};this.setClusterUrl=function(newUrl){clusterUrl=newUrl;url=null;};this.getConnectionTimeout=function(){return connectionTimeout;};this.setConnectionTimeout=function(newTimeout){connectionTimeout=newTimeout;};this.getIsConnected=function(){return isConnected&&ortc.sockjs!==null;};this.getConnectionMetadata=function(){return connectionMetadata;};this.setConnectionMetadata=function(newConnectionMetadata){connectionMetadata=newConnectionMetadata;};this.getAnnouncementSubChannel=function(){return announcementSubChannel;};this.setAnnouncementSubChannel=function(newAnnouncementSubChannel){announcementSubChannel=newAnnouncementSubChannel;};this.getProtocol=function(){return protocol;};this.setProtocol=function(newProtocol){protocol=newProtocol;};this.getSessionId=function(){return sessionId;};/*\n\t * Get heartbeat interval.\n\t */this.getHeartbeatTime=function(){return heartbeatTime;};/*\n\t * Set heartbeat interval.\n\t */this.setHeartbeatTime=function(newHeartbeatTime){if(newHeartbeatTime&&!isNaN(newHeartbeatTime)){if(newHeartbeatTime>heartbeatMaxTime||newHeartbeatTime<heartbeatMinTime){delegateExceptionCallback(ortc,`Heartbeat time is out of limits - Min: ${heartbeatMinTime} | Max: ${heartbeatMaxTime}`);}else{heartbeatTime=newHeartbeatTime;}}else{delegateExceptionCallback(ortc,`Invalid heartbeat time ${newHeartbeatTime}`);}};/*\n\t * Get how many times can the client fail the heartbeat.\n\t */this.getHeartbeatFails=function(){return heartbeatFails;};/*\n\t * Set heartbeat fails. Defines how many times can the client fail the heartbeat.\n\t */this.setHeartbeatFails=function(newHeartbeatFails){if(newHeartbeatFails&&!isNaN(newHeartbeatFails)){if(newHeartbeatFails>heartbeatMaxFails||newHeartbeatFails<heartbeatMinFails){delegateExceptionCallback(ortc,`Heartbeat fails is out of limits - Min: ${heartbeatMinFails} | Max: ${heartbeatMaxFails}`);}else{heartbeatFails=newHeartbeatFails;}}else{delegateExceptionCallback(ortc,`Invalid heartbeat fails ${newHeartbeatFails}`);}};/*\n\t * Get heart beat active.\n\t */this.getHeartbeatActive=function(){return heartbeatActive;};/*\n\t * Set heart beat active. Heart beat provides better accuracy for presence data.\n\t */this.setHeartbeatActive=function(active){heartbeatActive=active;};/***********************************************************\n\t * @events\n\t ***********************************************************/this.onConnected=null;this.onDisconnected=null;this.onSubscribed=null;this.onUnsubscribed=null;this.onException=null;this.onReconnecting=null;this.onReconnected=null;/***********************************************************\n\t * @public methods\n\t ***********************************************************//*\n\t * Connects to the gateway with the application key and authentication token.\n\t */this.connect=function(appKey,authToken){/*\n\t Sanity Checks\n\t */if(isConnected){delegateExceptionCallback(ortc,\"Already connected\");}else if(!url&&!clusterUrl){delegateExceptionCallback(ortc,\"URL and Cluster URL are null or empty\");}else if(!appKey){delegateExceptionCallback(ortc,\"Application Key is null or empty\");}else if(!authToken){delegateExceptionCallback(ortc,\"Authentication Token is null or empty\");}else if(url&&!ortcIsValidUrl(url)){delegateExceptionCallback(ortc,\"Invalid URL\");}else if(clusterUrl&&!ortcIsValidUrl(clusterUrl)){delegateExceptionCallback(ortc,\"Invalid Cluster URL\");}else if(!ortcIsValidInput(appKey)){delegateExceptionCallback(ortc,\"Application Key has invalid characters\");}else if(!ortcIsValidInput(authToken)){delegateExceptionCallback(ortc,\"Authentication Token has invalid characters\");}else if(!ortcIsValidInput(announcementSubChannel)){delegateExceptionCallback(ortc,\"Announcement Subchannel has invalid characters\");}else if(connectionMetadata&&connectionMetadata.length>connectionMetadataMaxSize){delegateExceptionCallback(ortc,\"Connection metadata size exceeds the limit of \"+connectionMetadataMaxSize+\" characters\");}else{ortc.appKey=appKey;ortc.authToken=authToken;isConnecting=true;stopReconnecting=false;validatedArrived=false;clearValidatedTimeout(self);// Read SSL session cookie\n\t//var sslConn = readCookie(sslSessionCookieName);\n\tvar sslConn=false;if(sslConn){changeUrlSsl();}if(clusterUrl&&clusterUrl!=null){clusterUrl=clusterUrl.ortcTreatUrl();clusterConnection();}else{url=url.ortcTreatUrl();ortc.sockjs=createSocketConnection(url);}//If ssl connection increase connection timeout\n\tif(clusterUrl&&clusterUrl!=null&&clusterUrl.indexOf(\"/ssl\")>=0||url&&url.indexOf(\"https\")>=0){if(!retryingWithSsl){ortc.setConnectionTimeout(30*1000);}else{if(ortc.getConnectionTimeout()<300*1000){if(ortc.getConnectionTimeout()<30*1000){ortc.setConnectionTimeout(30*1000);}else{ortc.setConnectionTimeout((ortc.getConnectionTimeout()+10)*1000);}}else{stopReconnecting=true;clearReconnectInterval();}}}if(!ortc.reconnectIntervalId&&!stopReconnecting){// Interval to reconnect\n\tortc.reconnectIntervalId=setInterval(function(){if(stopReconnecting){clearReconnectInterval();}else{var currentDateTime=new Date();if(ortc.sockjs==null&&!waitingClusterResponse){reconnectSocket();}// 35 seconds\n\tif(lastKeepAlive!=null&&lastKeepAlive+35000<new Date().getTime()){lastKeepAlive=null;// Server went down\n\tif(isConnected){disconnectSocket();}}}},ortc.getConnectionTimeout());}}};this.setNotificationConfig=function(config){config.cmd=\"config\";this.sendMessageToServiceWorker(config);};this.showNotification=function(notification){notification.cmd=\"notification\";this.sendMessageToServiceWorker(notification);};this.sendMessageToServiceWorker=function(message){return new Promise(function(resolve,reject){var messageChannel=new MessageChannel();messageChannel.port1.onmessage=function(event){if(event.data.error){reject(event.data.error);}else{resolve(event.data);}};navigator.serviceWorker.controller.postMessage(message,[messageChannel.port2]);});};/*\n\t * Subscribes to the channel so the client object can receive all messages sent to it by other clients with Notifications.\n\t */this.subscribeWithNotifications=function(channel,subscribeOnReconnected,regId,onMessageCallback){ortc.registrationId=regId;this._subscribe(channel,subscribeOnReconnected,regId,null,onMessageCallback);};/*\n\t * Subscribes to the channel so the client object can receive all messages sent that are valid according to the given filter\n\t */this.subscribeWithFilter=function(channel,subscribeOnReconnected,filter,onMessageCallback){this._subscribe(channel,subscribeOnReconnected,null,filter,onMessageCallback);};/*\n\t * Subscribes to the channel so the client object can receive all messages sent to it by other clients.\n\t */this.subscribe=function(channel,subscribeOnReconnected,onMessageCallback){this._subscribe(channel,subscribeOnReconnected,null,null,onMessageCallback);};this._subscribe=function(channel,subscribeOnReconnected,regId,filter,onMessageCallback){/*\n\t Sanity Checks\n\t */if(!isConnected){delegateExceptionCallback(ortc,\"Not connected\");}else if(!channel){delegateExceptionCallback(ortc,\"Channel is null or empty\");}else if(!ortcIsValidInput(channel)){delegateExceptionCallback(ortc,\"Channel has invalid characters\");}else if(subscribedChannels[channel]&&subscribedChannels[channel].isSubscribing){delegateExceptionCallback(ortc,\"Already subscribing to the channel \\\"\"+channel+\"\\\"\");}else if(subscribedChannels[channel]&&subscribedChannels[channel].isSubscribed){delegateExceptionCallback(ortc,\"Already subscribed to the channel \\\"\"+channel+\"\\\"\");}else if(channel.length>channelMaxSize){delegateExceptionCallback(ortc,\"Channel size exceeds the limit of \"+channelMaxSize+\" characters\");}else if(!ortcIsValidBoolean(subscribeOnReconnected)){delegateExceptionCallback(ortc,\"The argument \\\"subscribeOnReconnected\\\" must be a boolean\");}else if(!ortcIsFunction(onMessageCallback)){delegateExceptionCallback(ortc,\"The argument \\\"onMessageCallback\\\" must be a function\");}else{if(ortc.sockjs!=null){var domainChannelCharacterIndex=channel.indexOf(\":\");var channelToValidate=channel;var hashPerm=null;if(domainChannelCharacterIndex>0){channelToValidate=channel.substring(0,domainChannelCharacterIndex+1)+\"*\";}if(userPerms&&userPerms!=null){hashPerm=userPerms[channelToValidate]?userPerms[channelToValidate]:userPerms[channel];}if(userPerms&&userPerms!=null&&!hashPerm){delegateExceptionCallback(ortc,\"No permission found to subscribe to the channel \\\"\"+channel+\"\\\"\");}else{if(subscribedChannels[channel]){subscribedChannels[channel].isSubscribing=true;subscribedChannels[channel].isSubscribed=false;subscribedChannels[channel].subscribeOnReconnected=subscribeOnReconnected;subscribedChannels[channel].onMessageCallback=onMessageCallback;subscribedChannels[channel].filter=filter;}else{subscribedChannels[channel]={\"isSubscribing\":true,\"isSubscribed\":false,\"subscribeOnReconnected\":subscribeOnReconnected,\"onMessageCallback\":onMessageCallback,\"filter\":filter};}if(regId){subscribedChannels[channel].withNotifications=true;ortc.sockjs.send(\"subscribe;\"+ortc.appKey+\";\"+ortc.authToken+\";\"+channel+\";\"+hashPerm+\";\"+regId+\";\"+pushPlatform);}else{subscribedChannels[channel].withNotifications=false;if(filter){ortc.sockjs.send(\"subscribefilter;\"+ortc.appKey+\";\"+ortc.authToken+\";\"+channel+\";\"+hashPerm+\";\"+filter);}else{ortc.sockjs.send(\"subscribe;\"+ortc.appKey+\";\"+ortc.authToken+\";\"+channel+\";\"+hashPerm);}}}}}};/*\n\t * Unsubscribes from the channel so the client object stops receiving messages sent to it.\n\t */this.unsubscribe=function(channel){/*\n\t Sanity Checks\n\t */if(!isConnected){delegateExceptionCallback(ortc,\"Not connected\");}else if(!channel){delegateExceptionCallback(ortc,\"Channel is null or empty\");}else if(!ortcIsValidInput(channel)){delegateExceptionCallback(ortc,\"Channel has invalid characters\");}else if(!subscribedChannels[channel]||subscribedChannels[channel]&&!subscribedChannels[channel].isSubscribed){delegateExceptionCallback(ortc,\"Not subscribed to the channel \"+channel);}else if(channel.length>channelMaxSize){delegateExceptionCallback(ortc,\"Channel size exceeds the limit of \"+channelMaxSize+\" characters\");}else{if(ortc.sockjs!=null){if(subscribedChannels[channel].withNotifications==true){ortc.sockjs.send(\"unsubscribe;\"+ortc.appKey+\";\"+channel+\";\"+ortc.registrationId+\";\"+pushPlatform);}else{ortc.sockjs.send(\"unsubscribe;\"+ortc.appKey+\";\"+channel);}}}};/*\n\t * Sends the message to the channel.\n\t */this.send=function(channel,message){/*\n\t Sanity Checks\n\t */if(!isConnected||ortc.sockjs==null){delegateExceptionCallback(ortc,\"Not connected\");}else if(!channel){delegateExceptionCallback(ortc,\"Channel is null or empty\");}else if(!ortcIsValidInput(channel)){delegateExceptionCallback(ortc,\"Channel has invalid characters\");}else if(!message){delegateExceptionCallback(ortc,\"Message is null or empty\");}else if(!ortcIsString(message)){delegateExceptionCallback(ortc,\"Message must be a string\");}else if(channel.length>channelMaxSize){delegateExceptionCallback(ortc,\"Channel size exceeds the limit of \"+channelMaxSize+\" characters\");}else{var domainChannelCharacterIndex=channel.indexOf(\":\");var channelToValidate=channel;var hashPerm=null;if(domainChannelCharacterIndex>0){channelToValidate=channel.substring(0,domainChannelCharacterIndex+1)+\"*\";}if(userPerms&&userPerms!=null){hashPerm=userPerms[channelToValidate]?userPerms[channelToValidate]:userPerms[channel];}if(userPerms&&userPerms!=null&&!hashPerm){delegateExceptionCallback(ortc,\"No permission found to send to the channel \\\"\"+channel+\"\\\"\");}else{// Multi part\n\tvar messageParts=[];var messageId=generateId(8);var i;var allowedMaxSize=messageMaxSize-channel.length;for(i=0;i<message.length;i=i+allowedMaxSize){// Just one part\n\tif(message.length<=allowedMaxSize){messageParts.push(message);break;}if(message.substring(i,i+allowedMaxSize)){messageParts.push(message.substring(i,i+allowedMaxSize));}}for(var j=1;j<=messageParts.length;j++){ortc.sockjs.send(\"send;\"+ortc.appKey+\";\"+ortc.authToken+\";\"+channel+\";\"+hashPerm+\";\"+messageId+\"_\"+j+\"-\"+messageParts.length+\"_\"+messageParts[j-1]);}}}};/*\n\t * Sends the message to multiple channels.\n\t */this.batchSend=function(channels,message){/*\n\t Sanity Checks\n\t */channels=ortcStrToArray(channels);if(!isConnected||ortc.sockjs==null){delegateExceptionCallback(ortc,\"Not connected\");}else if(!ortcIsArray(channels)){delegateExceptionCallback(ortc,\"Channels must be a array\");}else if(!message){delegateExceptionCallback(ortc,\"Message is null or empty\");}else if(!ortcIsString(message)){delegateExceptionCallback(ortc,\"Message must be a string\");}else if(channels.length<=0){delegateExceptionCallback(ortc,\"Channels must be an array at least with one channel\");}else if(channels.length>channelsMaxSize){channels=[];delegateExceptionCallback(ortc,\"The channel maximum was reached (>\"+channelsMaxSize+\")\");}for(i=0;i<channels.length;i++){var channel=channels[i];if(channel.length>channelMaxSize){channels.splice(i,1);delegateExceptionCallback(ortc,\"Channel \"+channel+\" size exceeds the limit of \"+channelMaxSize+\" characters\");}}if(channels.length>0){var arrayHashPerm=[];for(i=0;i<channels.length;i++){var channel=channels[i];var domainChannelCharacterIndex=channel.indexOf(\":\");var channelToValidate=channel;var hashPerm=null;if(domainChannelCharacterIndex>0){channelToValidate=channel.substring(0,domainChannelCharacterIndex+1)+\"*\";}if(userPerms&&userPerms!=null){hashPerm=userPerms[channelToValidate]?userPerms[channelToValidate]:userPerms[channel];}if(userPerms&&userPerms!=null&&!hashPerm){channels.splice(i,1);delegateExceptionCallback(ortc,\"No permission found to send to the channel \\\"\"+channel+\"\\\"\");}else{arrayHashPerm.push(hashPerm);}}if(channels.length>0){var messageParts=[];var messageId=generateId(8);var allowedMaxSize=messageMaxSize-channels.toString().length;for(i=0;i<message.length;i=i+allowedMaxSize){// Just one part\n\tif(message.length<=allowedMaxSize){messageParts.push(message);break;}if(message.substring(i,i+allowedMaxSize)){messageParts.push(message.substring(i,i+allowedMaxSize));}}for(j=1;j<=messageParts.length;j++){ortc.sockjs.send(\"batchSend;\"+ortc.appKey+\";\"+ortc.authToken+\";\"+JSON.stringify(channels)+\";\"+JSON.stringify(arrayHashPerm)+\";\"+messageId+\"_\"+j+\"-\"+messageParts.length+\"_\"+messageParts[j-1]);}}}};/*\n\t * Disconnects from the gateway.\n\t */this.disconnect=function(){clearReconnectInterval();stopReconnectProcess();// Clear subscribed channels\n\tsubscribedChannels={};/*\n\t Sanity Checks\n\t */if(!isConnected&&!invalidConnection){delegateExceptionCallback(ortc,\"Not connected\");}else{disconnectSocket();}};/*\n\t * Gets a value indicating whether this client object is subscribed to the channel.\n\t */this.isSubscribed=function(channel){/*\n\t Sanity Checks\n\t */if(!isConnected){delegateExceptionCallback(ortc,\"Not connected\");}else if(!channel){delegateExceptionCallback(ortc,\"Channel is null or empty\");}else if(!ortcIsValidInput(channel)){delegateExceptionCallback(ortc,\"Channel has invalid characters\");}else{if(subscribedChannels[channel]&&subscribedChannels[channel].isSubscribed){return subscribedChannels[channel].isSubscribed;}else{return false;}}};/*\n\t * Gets a json indicating the subscriptions in a channel.\n\t */this.presence=function(parameters,callback){try{var requestUrl=null,isCluster=false,appKey=ortc.appKey,authToken=ortc.authToken;if(parameters.url){requestUrl=parameters.url.ortcTreatUrl();isCluster=parameters.isCluster;appKey=parameters.applicationKey;authToken=parameters.authenticationToken;}else{if(clusterUrl&&clusterUrl!=null){requestUrl=clusterUrl;isCluster=true;}else{requestUrl=url.ortcTreatUrl();;}}getServerUrl({requestUrl:requestUrl,isCluster:isCluster,appKey:appKey},function(error,serverUrl){if(error){callback(error,null);}else{jsonp(serverUrl+\"/presence/\"+appKey+\"/\"+authToken+\"/\"+parameters.channel,callback);}});}catch(e){callback(\"Unable to get presence data\",null);}};var getServerUrl=function(parameters,callback){if(parameters.requestUrl&&parameters.isCluster){var guid=generateGuid();var queryString=\"guid=\"+generateGuid();queryString=parameters.appKey?queryString+\"&appkey=\"+parameters.appKey:queryString;loadClusterServerScript(parameters.requestUrl+\"/?\"+queryString,guid,function(clusterServerResolved,scriptGuid){if(clusterServerResolved){var resultUrl=SOCKET_SERVER;callback(null,resultUrl);}else{callback(null,\"Unable to get server from cluster\");}try{clearScripts(scriptGuid);}catch(loadError){}});}else{var resultUrl=parameters.requestUrl.ortcTreatUrl();callback(null,resultUrl);}};/*\n\t * Adds the Webspectator bootstrap script for the outmost frame on the same domain.\n\t */this.setMonetizerId=function(publicId){var tempWin;var win=tempWin=window;while(tempWin!=window.top){try{if(tempWin.frameElement){win=tempWin.parent;}}catch(e){}tempWin=tempWin.parent;}if(!win._WS_BOOT){var s=document.createElement(\"SCRIPT\");s.src=\"//wfpscripts.webspectator.com/bootstrap/ws-\"+publicId+\".js\";document.getElementsByTagName(\"head\")[0].appendChild(s);}};/***********************************************************\n\t * @private methods\n\t ***********************************************************//*\n\t * Change the current URL to use SSL\n\t */var changeUrlSsl=function(){if(!(\"ActiveXObject\"in window)){if(clusterUrl&&clusterUrl!=null){//clusterUrl = clusterUrl.replace(\"http://\", \"https://\");\n\tif(clusterUrl.indexOf(\"ssl/\")<0){var slashAtTheEnd=clusterUrl.search(/\\/([\\d.]*)\\/$/);if(slashAtTheEnd>-1){clusterUrl=clusterUrl.substring(0,slashAtTheEnd+1)+\"ssl/\"+clusterUrl.substring(slashAtTheEnd+1,clusterUrl.length);}else{clusterUrl=clusterUrl.substring(0,clusterUrl.lastIndexOf(\"/\")+1)+\"ssl/\"+clusterUrl.substring(clusterUrl.lastIndexOf(\"/\")+1);}}}else{url=url.replace(\"http://\",\"https://\");}}// Create session cookie\n\t//createSessionCookie(sslSessionCookieName, 1);\n\t};/*\n\t * Clear the reconnecting interval\n\t */var clearReconnectInterval=function(){if(ortc.reconnectIntervalId){clearInterval(ortc.reconnectIntervalId);ortc.reconnectIntervalId=null;}};/*\n\t * Clear the validated timeout\n\t */var clearValidatedTimeout=function(self){if(self.validatedTimeoutId){clearTimeout(self.validatedTimeoutId);self.validatedTimeoutId=null;}};/*\n\t * Stop the reconnecting process\n\t */var stopReconnectProcess=function(){stopReconnecting=true;alreadyConnectedFirstTime=false;};var startHeartBeatInterval=function(self){if(!self.heartbeatInterval&&heartbeatActive){self.sockjs.send(\"b\");self.heartbeatInterval=setInterval(function(){if(!heartbeatActive){stopHeartBeatInterval(self);}else{self.sockjs.send(\"b\");}},heartbeatTime*1000);}};var stopHeartBeatInterval=function(self){if(self.heartbeatInterval){clearInterval(self.heartbeatInterval);self.heartbeatInterval=null;}};/*\n\t * Creates a cookie with expiration time.\n\t */var createExpireCookie=function(name,value,minutes){var expires=\"\";if(minutes){var date=new Date();date.setTime(date.getTime()+minutes*60*1000);expires=\"; expires=\"+date.toGMTString();}document.cookie=name+\"=\"+value+expires+\"; path=/\";};/*\n\t * Creates a session cookie.\n\t */var createSessionCookie=function(name,value){document.cookie=name+\"=\"+value+\"; path=/\";};/*\n\t * Reads a cookie.\n\t */var readCookie=function(name){var nameEQ=name+\"=\";var ca=document.cookie.split(\";\");var result=null;for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==\" \"){c=c.substring(1,c.length);}if(c.indexOf(nameEQ)==0){result=c.substring(nameEQ.length,c.length);break;}}return result;};/*\n\t * Generates an ID.\n\t */var generateId=function(size){var result=\"\";var S4=function(){return((1+Math.random())*0x10000|0).toString(16).substring(1);};for(var i=0;i<size/4;i++){result+=S4();}return result;};/*\n\t * Disconnects the socket.\n\t */var disconnectSocket=function(){stopHeartBeatInterval(ortc);reconnectStartedAt=null;isConnected=false;isConnecting=false;validatedArrived=false;retryingWithSsl=false;clearValidatedTimeout(self);if(ortc.sockjs!=null){ortc.sockjs.close();ortc.sockjs=null;}};/*\n\t * Reconnects the socket.\n\t */var reconnectSocket=function(){stopHeartBeatInterval(ortc);if(isConnecting){delegateExceptionCallback(ortc,\"Unable to connect\");}isConnecting=true;delegateReconnectingCallback(ortc);reconnectStartedAt=new Date().getTime();if(clusterUrl&&clusterUrl!=null){clusterConnection();}else{ortc.sockjs=createSocketConnection(url);}};/*\n\t * Tries a connection through the cluster gateway with the application key and authentication token.\n\t */var clusterConnection=function(){var guid=generateGuid();var queryString=\"guid=\"+generateGuid();queryString=ortc.appKey?queryString+\"&appkey=\"+ortc.appKey:queryString;loadClusterServerScript(clusterUrl+\"/?\"+queryString,guid,function(clusterServerResolved,scriptGuid){if(clusterServerResolved){url=SOCKET_SERVER;sockjs=createSocketConnection(ortc.getUrl());}try{clearScripts(scriptGuid);}catch(loadError){}});};/*\n\t * Clears the javascript scripts previously loaded into the page.\n\t */var clearScripts=function(guid){var headChildren=document.getElementsByTagName(\"head\")[0].children;var childrenToRemove=[];for(var i=0;i<headChildren.length;i++){if(headChildren[i].attributes!=null&&headChildren[i].attributes[\"ortcScriptId\"]&&headChildren[i].attributes[\"ortcScriptId\"].value==guid){childrenToRemove.push(i);}}for(var child in childrenToRemove){document.getElementsByTagName(\"head\")[0].removeChild(headChildren[childrenToRemove[child]]);}};/*\n\t * Loads the cluster server javascript script into the page.\n\t */var loadClusterServerScript=function(scriptUrl,guid,callback){var script=document.createElement(\"script\");script.type=\"text/javascript\";script.setAttribute(\"ortcScriptId\",guid);waitingClusterResponse=true;if(script.readyState){// IE\n\tscript.onreadystatechange=function(){if(script.readyState==\"loaded\"||script.readyState==\"complete\"){waitingClusterResponse=false;script.onreadystatechange=null;if(typeof SOCKET_SERVER!=\"undefined\"&&SOCKET_SERVER.indexOf(\"undefined\")<0&&SOCKET_SERVER.indexOf(\"unknown_server\")<0){callback(true,guid);}else{callback(false,guid);}}};}else{// Others\n\tscript.onload=function(){waitingClusterResponse=false;if(typeof SOCKET_SERVER!=\"undefined\"&&SOCKET_SERVER.indexOf(\"undefined\")<0&&SOCKET_SERVER.indexOf(\"unknown_server\")<0){callback(true,guid);}else{callback(false,guid);}};}script.onerror=function(){waitingClusterResponse=false;};script.src=scriptUrl;document.getElementsByTagName(\"head\")[0].appendChild(script);};/*\n\t * Generates a GUID.\n\t */var generateGuid=function(){var S4=function(){return((1+Math.random())*0x10000|0).toString(16).substring(1);};return S4()+S4()+\"-\"+S4()+\"-\"+S4()+\"-\"+S4()+\"-\"+S4()+S4()+S4();};/*\n\t * Count the dictionary keys.\n\t */var countKeys=function(dic){var count=0;for(var i in dic){count++;}return count;};/*\n\t * Creates a socket connection.\n\t */var createSocketConnection=function(connectionUrl){var self=ortc;if(self.sockjs==null){if(navigator&&navigator.userAgent&&navigator.userAgent.indexOf(\"PlayStation Vita\")>=0){protocol=\"jsonp-polling\";}self.sockjs=new SockJS(connectionUrl+\"/broadcast\",protocol);// Timeout to receive the validated message\n\tif(!self.sslFallback){var validateTimeoutTime=5000;self.validatedTimeoutId=setTimeout(function(){self.sslFallback=true;stopReconnectProcess();disconnectSocket();invalidConnection=true;retryingWithSsl=true;if(connectionUrl.indexOf(\"https://\")>=0){// We are already using SSL, try streaming\n\tprotocol=\"xhr-streaming\";}else{protocol=undefined;}changeUrlSsl();},validateTimeoutTime);}else if(!self.xhrStreamingFallback){// The SSL fallback failed. Try xhr-streaming\n\tvar validateSslTimeoutTime=5000;self.validatedTimeoutId=setTimeout(function(){self.xhrStreamingFallback=true;stopReconnectProcess();disconnectSocket();invalidConnection=true;retryingWithSsl=true;protocol=\"xhr-streaming\";},validateSslTimeoutTime);}// Connect handler\n\tself.sockjs.onopen=function(){protocol=self.sockjs.protocol;// Update last keep alive time\n\tlastKeepAlive=new Date().getTime();// If is a reconnect do not count session\n\tif(alreadyConnectedFirstTime){sessionId=\"\";}else{// Read session cookie\n\tsessionId=readCookie(sessionCookieName+self.appKey+\"-s\");if(!sessionId){// Read expiration cookie\n\tsessionId=readCookie(sessionCookieName+self.appKey);if(!sessionId){sessionId=generateId(16);}// Create session cookie\n\tcreateSessionCookie(sessionCookieName+self.appKey+\"-s\",sessionId);// Check if session cookie was created\n\tif(!readCookie(sessionCookieName+self.appKey+\"-s\")){sessionId=\"\";}}}var heartbeatDetails=heartbeatActive?\";\"+self.getHeartbeatTime()+\";\"+self.getHeartbeatFails()+\";\":\"\";self.sockjs.send(\"validate;\"+self.appKey+\";\"+self.authToken+\";\"+(announcementSubChannel?announcementSubChannel:\"\")+\";\"+sessionId+\";\"+connectionMetadata+heartbeatDetails);};// Disconnect handler\n\tself.sockjs.onclose=function(e){// e.code=1000 - e.reason=Normal closure\n\t// e.code=1006 - e.reason=WebSocket connection broken\n\t// e.code=2000 - e.reason=All transports failed\n\tstopHeartBeatInterval(ortc);if(ortc.sockjs!=null){ortc.sockjs.close();ortc.sockjs=null;}// Clear user permissions\n\tuserPerms=null;if(e.code!=1000){if(isConnected){isConnected=false;isConnecting=false;protocol=undefined;delegateDisconnectedCallback(self);}if(!stopReconnecting){if(!reconnectStartedAt||reconnectStartedAt+connectionTimeout<new Date().getTime()){reconnectSocket();}}}else{if(!invalidConnection){isConnected=false;isConnecting=false;protocol=undefined;delegateDisconnectedCallback(self);}}if(retryingWithSsl){self.connect(self.appKey,self.authToken);retryingWithSsl=false;}invalidConnection=false;};// Receive handler\n\tself.sockjs.onmessage=function(e){// Update last keep alive time\n\tlastKeepAlive=new Date().getTime();var data=e.data;var channel=data.ch;var message=data.m;var filtered=data.f;// Multi part\n\tvar regexPattern=/^(\\w[^_]*)_{1}(\\d*)-{1}(\\d*)_{1}([\\s\\S.]*)$/;var match=regexPattern.exec(message);var messageId=null;var messageCurrentPart=1;var messageTotalPart=1;var lastPart=false;if(match&&match.length>0){if(match[1]){messageId=match[1];}if(match[2]){messageCurrentPart=match[2];}if(match[3]){messageTotalPart=match[3];}if(match[4]){message=match[4];}}if(messageId){if(!messagesBuffer[messageId]){messagesBuffer[messageId]={};}messagesBuffer[messageId][messageCurrentPart]=message;if(countKeys(messagesBuffer[messageId])==messageTotalPart){lastPart=true;}}else{lastPart=true;}if(lastPart){if(messageId){message=\"\";for(var i=1;i<=messageTotalPart;i++){message+=messagesBuffer[messageId][i];delete messagesBuffer[messageId][i];}delete messagesBuffer[messageId];}delegateMessagesCallback(self,channel,filtered,message);}};self.sockjs.onortcsubscribed=function(e){lastKeepAlive=new Date().getTime();var channel=e.data;if(subscribedChannels[channel]){subscribedChannels[channel].isSubscribing=false;subscribedChannels[channel].isSubscribed=true;}delegateSubscribedCallback(self,channel);};self.sockjs.onortcunsubscribed=function(e){lastKeepAlive=new Date().getTime();var channel=e.data;if(subscribedChannels[channel]){subscribedChannels[channel].isSubscribed=false;}delegateUnsubscribedCallback(self,channel);};self.sockjs.onheartbeat=function(){lastKeepAlive=new Date().getTime();};self.sockjs.onortcvalidated=function(e){var sessionExpirationTime=30;if(e.data){userPerms=e.data;}if(e.set){sessionExpirationTime=e.set;}clearValidatedTimeout(self);validatedArrived=true;retryingWithSsl=false;isConnecting=false;isConnected=true;reconnectStartedAt=null;if(sessionId){if(!readCookie(sessionCookieName+self.appKey+\"-s\")){createSessionCookie(sessionCookieName+self.appKey+\"-s\",sessionId);}if(!readCookie(sessionCookieName+self.appKey)){createExpireCookie(sessionCookieName+self.appKey,sessionId,sessionExpirationTime);}}if(alreadyConnectedFirstTime){var channelsToRemove={};// Subscribe to the previously subscribed channels\n\tfor(var key in subscribedChannels){// Subscribe again\n\tif(subscribedChannels[key].subscribeOnReconnected==true&&(subscribedChannels[key].isSubscribing||subscribedChannels[key].isSubscribed)){subscribedChannels[key].isSubscribing=true;subscribedChannels[key].isSubscribed=false;var domainChannelCharacterIndex=key.indexOf(\":\");var channelToValidate=key;var hashPerm=null;if(domainChannelCharacterIndex>0){channelToValidate=key.substring(0,domainChannelCharacterIndex+1)+\"*\";}if(userPerms&&userPerms!=null){hashPerm=userPerms[channelToValidate]?userPerms[channelToValidate]:userPerms[key];}if(subscribedChannels[key].filter){self.sockjs.send(\"subscribefilter;\"+self.appKey+\";\"+self.authToken+\";\"+key+\";\"+hashPerm+\";\"+subscribedChannels[key].filter);}else{self.sockjs.send(\"subscribe;\"+self.appKey+\";\"+self.authToken+\";\"+key+\";\"+hashPerm);}}else{channelsToRemove[key]=key;}}for(var keyToRemove in channelsToRemove){delete subscribedChannels[keyToRemove];}messagesBuffer={};delegateReconnectedCallback(self);}else{alreadyConnectedFirstTime=true;delegateConnectedCallback(self);}};self.sockjs.onortcerror=function(e){lastKeepAlive=new Date().getTime();var data=e.data;var operation=data.op;var channel=data.ch;var error=data.ex?data.ex:data;delegateExceptionCallback(self,error);switch(operation){case\"validate\":if(error.indexOf(\"busy\")<0){invalidConnection=true;clearValidatedTimeout(self);retryingWithSsl=false;stopReconnectProcess();}else{clearValidatedTimeout(self);retryingWithSsl=false;}break;case\"subscribe\":if(channel&&subscribedChannels[channel]){subscribedChannels[channel].isSubscribing=false;}break;case\"subscribe_maxsize\":case\"unsubscribe_maxsize\":case\"shutdown\":clearValidatedTimeout(self);retryingWithSsl=false;break;case\"send_maxsize\":if(channel&&subscribedChannels[channel]){subscribedChannels[channel].isSubscribing=false;}stopReconnectProcess();break;default:break;}};}return self.sockjs;};var jsonp=function(url,callback){var head=document.head?document.head:document.getElementsByTagName(\"head\")[0];var script=document.createElement(\"script\");var guid=\"ortcJsonp\"+ +new Date();var jsonpCallTimeout=setTimeout(function(){try{callback(\"Unable to get data\",null);window[guid]=undefined;delete window[guid];head.removeChild(script);}catch(e){}},15*1000);window[guid]=function(data){clearTimeout(jsonpCallTimeout);if(data.error){callback(data.error,null);}else{callback(null,data.content);}try{window[guid]=undefined;delete window[guid];head.removeChild(script);}catch(e){}};script.setAttribute(\"src\",url+\"?callback=\"+guid);head.appendChild(script);};var delegateConnectedCallback=function(ortc){if(ortc!=null&&ortc.onConnected!=null){startHeartBeatInterval(ortc);ortc.onConnected(ortc);}};var delegateDisconnectedCallback=function(ortc){if(ortc!=null&&ortc.onDisconnected!=null){ortc.onDisconnected(ortc);}};var delegateSubscribedCallback=function(ortc,channel){if(ortc!=null&&ortc.onSubscribed!=null&&channel!=null){ortc.onSubscribed(ortc,channel);}};var delegateUnsubscribedCallback=function(ortc,channel){if(ortc!=null&&ortc.onUnsubscribed!=null&&channel!=null){ortc.onUnsubscribed(ortc,channel);}};var delegateMessagesCallback=function(ortc,channel,filtered,message){if(ortc!=null&&subscribedChannels[channel]&&subscribedChannels[channel].isSubscribed&&subscribedChannels[channel].onMessageCallback!=null){if(filtered==null){// regular subscription\n\tsubscribedChannels[channel].onMessageCallback(ortc,channel,message);}else{// filtered subscription\n\tsubscribedChannels[channel].onMessageCallback(ortc,channel,filtered,message);}}};var delegateExceptionCallback=function(ortc,event){if(ortc!=null&&ortc.onException!=null){ortc.onException(ortc,event);}};var delegateReconnectingCallback=function(ortc){if(ortc!=null&&ortc.onReconnecting!=null){ortc.onReconnecting(ortc);}};var delegateReconnectedCallback=function(ortc){if(ortc!=null&&ortc.onReconnected!=null){startHeartBeatInterval(ortc);ortc.onReconnected(ortc);}};}", "componentDidMount() {\n //setLocalNotification();\n }", "constructor(httpClient) {\n this.httpClient = httpClient;\n //public url_base = \"http://localhost:8080\";\n this.url_base = \"https://yaoyuan333.wm.r.appspot.com\";\n }", "function AppMeasurement_Module_Media(s){var m=this;m.s=s;s=window;if(!s.s_c_in)s.s_c_il=[],s.s_c_in=0;m._il=s.s_c_il;m._in=s.s_c_in;m._il[m._in]=m;s.s_c_in++;m._c=\"s_m\";m.list=[];m.open=function(w,b,c,h){var d={},a=new Date,g=\"\",e;b||(b=-1);if(w&&c){if(!m.list)m.list={};m.list[w]&&m.close(w);if(h&&h.id)g=h.id;if(g)for(e in m.list)!Object.prototype[e]&&m.list[e]&&m.list[e].S==g&&m.close(m.list[e].name);d.name=w;d.length=b;d.u=0;d.c=0;d.playerName=m.playerName?m.playerName:c;d.S=g;d.L=0;d.f=0;d.timestamp=\r\n\t\tMath.floor(a.getTime()/1E3);d.j=0;d.r=d.timestamp;d.a=-1;d.B=\"\";d.k=-1;d.C=0;d.H={};d.F=0;d.m=0;d.e=\"\";d.A=0;d.K=0;d.z=0;d.D=0;d.l=!1;d.v=\"\";d.I=\"\";d.J=0;d.q=!1;d.G=\"\";d.complete=0;d.Q=0;d.o=0;d.p=0;m.list[w]=d}};m.openAd=function(w,b,c,h,d,a,g,e){var f={};m.open(w,b,c,e);if(f=m.list[w])f.l=!0,f.v=h,f.I=d,f.J=a,f.G=g};m.M=function(w){var b=m.list[w];m.list[w]=0;b&&b.monitor&&clearTimeout(b.monitor.R)};m.close=function(w){m.g(w,0,-1)};m.play=function(w,b,c,h){var d=m.g(w,1,b,c,h);if(d&&!d.monitor)d.monitor=\r\n\t\t{},d.monitor.update=function(){d.j==1&&m.g(d.name,3,-1);d.monitor.R=setTimeout(d.monitor.update,1E3)},d.monitor.update()};m.click=function(w,b){m.g(w,7,b)};m.complete=function(w,b){m.g(w,5,b)};m.stop=function(w,b){m.g(w,2,b)};m.track=function(w){m.g(w,4,-1)};m.P=function(w,b){var c=\"a.media.\",h=w.linkTrackVars,d=w.linkTrackEvents,a=\"m_i\",g,e=w.contextData,f;if(b.l){c+=\"ad.\";if(b.v)e[\"a.media.name\"]=b.v,e[c+\"pod\"]=b.I,e[c+\"podPosition\"]=b.J;if(!b.F)e[c+\"CPM\"]=b.G}if(b.q)e[c+\"clicked\"]=!0,b.q=!1;e[\"a.contentType\"]=\r\n\t\t\"video\"+(b.l?\"Ad\":\"\");e[\"a.media.channel\"]=m.channel;e[c+\"name\"]=b.name;e[c+\"playerName\"]=b.playerName;if(b.length>0)e[c+\"length\"]=b.length;e[c+\"timePlayed\"]=Math.floor(b.f);Math.floor(b.f)>0&&(e[c+\"timePlayed\"]=Math.floor(b.f));if(!b.F)e[c+\"view\"]=!0,a=\"m_s\",b.F=1;if(b.e){e[c+\"segmentNum\"]=b.m;e[c+\"segment\"]=b.e;if(b.A>0)e[c+\"segmentLength\"]=b.A;b.z&&b.f>0&&(e[c+\"segmentView\"]=!0)}if(!b.Q&&b.complete)e[c+\"complete\"]=!0,b.T=1;if(b.o>0)e[c+\"milestone\"]=b.o;if(b.p>0)e[c+\"offsetMilestone\"]=b.p;if(h)for(f in e)Object.prototype[f]||\r\n\t\t(h+=\",contextData.\"+f);g=e[\"a.contentType\"];w.pe=a;w.pev3=g;var s,n;if(m.contextDataMapping){if(!w.events2)w.events2=\"\";h&&(h+=\",events\");for(f in m.contextDataMapping)if(!Object.prototype[f]){a=f.length>c.length&&f.substring(0,c.length)==c?f.substring(c.length):\"\";g=m.contextDataMapping[f];if(typeof g==\"string\"){s=g.split(\",\");for(n=0;n<s.length;n++)g=s[n],f==\"a.contentType\"?(h&&(h+=\",\"+g),w[g]=e[f]):a==\"view\"||a==\"segmentView\"||a==\"clicked\"||a==\"complete\"||a==\"timePlayed\"||a==\"CPM\"?(d&&(d+=\",\"+\r\n\t\tg),a==\"timePlayed\"||a==\"CPM\"?e[f]&&(w.events2+=(w.events2?\",\":\"\")+g+\"=\"+e[f]):e[f]&&(w.events2+=(w.events2?\",\":\"\")+g)):a==\"segment\"&&e[f+\"Num\"]?(h&&(h+=\",\"+g),w[g]=e[f+\"Num\"]+\":\"+e[f]):(h&&(h+=\",\"+g),w[g]=e[f])}else if(a==\"milestones\"||a==\"offsetMilestones\")f=f.substring(0,f.length-1),e[f]&&m.contextDataMapping[f+\"s\"][e[f]]&&(d&&(d+=\",\"+m.contextDataMapping[f+\"s\"][e[f]]),w.events2+=(w.events2?\",\":\"\")+m.contextDataMapping[f+\"s\"][e[f]]);e[f]&&(e[f]=0);a==\"segment\"&&e[f+\"Num\"]&&(e[f+\"Num\"]=0)}}w.linkTrackVars=\r\n\t\th;w.linkTrackEvents=d};m.g=function(w,b,c,h,d){var a={},g=(new Date).getTime()/1E3,e,f,s=m.trackVars,n=m.trackEvents,o=m.trackSeconds,p=m.trackMilestones,q=m.trackOffsetMilestones,r=m.segmentByMilestones,t=m.segmentByOffsetMilestones,k,j,l=1,i={},u;if(!m.channel)m.channel=m.s.w.location.hostname;if(a=w&&m.list&&m.list[w]?m.list[w]:0){if(a.l)o=m.adTrackSeconds,p=m.adTrackMilestones,q=m.adTrackOffsetMilestones,r=m.adSegmentByMilestones,t=m.adSegmentByOffsetMilestones;c<0&&(c=a.j==1&&a.r>0?g-a.r+a.a:\r\n\t\ta.a);a.length>0&&(c=c<a.length?c:a.length);c<0&&(c=0);a.u=c;if(a.length>0)a.c=a.u/a.length*100,a.c=a.c>100?100:a.c;if(a.a<0)a.a=c;u=a.C;i.name=w;i.ad=a.l;i.length=a.length;i.openTime=new Date;i.openTime.setTime(a.timestamp*1E3);i.offset=a.u;i.percent=a.c;i.playerName=a.playerName;i.mediaEvent=a.k<0?\"OPEN\":b==1?\"PLAY\":b==2?\"STOP\":b==3?\"MONITOR\":b==4?\"TRACK\":b==5?\"COMPLETE\":b==7?\"CLICK\":\"CLOSE\";if(b>2||b!=a.j&&(b!=2||a.j==1)){if(!d)h=a.m,d=a.e;if(b){if(b==1)a.a=c;if((b<=3||b>=5)&&a.k>=0)if(l=!1,s=n=\r\n\t\t\"None\",a.k!=c){f=a.k;if(f>c)f=a.a,f>c&&(f=c);k=p?p.split(\",\"):0;if(a.length>0&&k&&c>=f)for(j=0;j<k.length;j++)if((e=k[j]?parseFloat(\"\"+k[j]):0)&&f/a.length*100<e&&a.c>=e)l=!0,j=k.length,i.mediaEvent=\"MILESTONE\",a.o=i.milestone=e;if((k=q?q.split(\",\"):0)&&c>=f)for(j=0;j<k.length;j++)if((e=k[j]?parseFloat(\"\"+k[j]):0)&&f<e&&c>=e)l=!0,j=k.length,i.mediaEvent=\"OFFSET_MILESTONE\",a.p=i.offsetMilestone=e}if(a.K||!d){if(r&&p&&a.length>0){if(k=p.split(\",\")){k.push(\"100\");for(j=f=0;j<k.length;j++)if(e=k[j]?parseFloat(\"\"+\r\n\t\tk[j]):0){if(a.c<e)h=j+1,d=\"M:\"+f+\"-\"+e,j=k.length;f=e}}}else if(t&&q&&(k=q.split(\",\"))){k.push(\"\"+(a.length>0?a.length:\"E\"));for(j=f=0;j<k.length;j++)if((e=k[j]?parseFloat(\"\"+k[j]):0)||k[j]==\"E\"){if(c<e||k[j]==\"E\")h=j+1,d=\"O:\"+f+\"-\"+e,j=k.length;f=e}}if(d)a.K=!0}if((d||a.e)&&d!=a.e){a.D=!0;if(!a.e)a.m=h,a.e=d;a.k>=0&&(l=!0)}if((b>=2||a.c>=100)&&a.a<c)a.L+=c-a.a,a.f+=c-a.a;if(b<=2||b==3&&!a.j)a.B+=(b==1||b==3?\"S\":\"E\")+Math.floor(c),a.j=b==3?1:b;if(!l&&a.k>=0&&b<=3&&(o=o?o:0)&&a.f>=o)l=!0,i.mediaEvent=\r\n\t\t\"SECONDS\";a.r=g;a.a=c}if(!b||b<=3&&a.c>=100)a.j!=2&&(a.B+=\"E\"+Math.floor(c)),b=0,s=n=\"None\",i.mediaEvent=\"CLOSE\";if(b==7)l=i.clicked=a.q=!0;if(b==5||m.completeByCloseOffset&&(!b||a.c>=100)&&a.length>0&&c>=a.length-m.completeCloseOffsetThreshold)l=i.complete=a.complete=!0;g=i.mediaEvent;g==\"MILESTONE\"?g+=\"_\"+i.milestone:g==\"OFFSET_MILESTONE\"&&(g+=\"_\"+i.offsetMilestone);a.H[g]?i.eventFirstTime=!1:(i.eventFirstTime=!0,a.H[g]=1);i.event=i.mediaEvent;i.timePlayed=a.L;i.segmentNum=a.m;i.segment=a.e;i.segmentLength=\r\n\t\ta.A;m.monitor&&b!=4&&m.monitor(m.s,i);b==0&&m.M(w);if(l&&a.C==u){w={};w.contextData={};w.linkTrackVars=s;w.linkTrackEvents=n;if(!w.linkTrackVars)w.linkTrackVars=\"\";if(!w.linkTrackEvents)w.linkTrackEvents=\"\";m.P(w,a);w.linkTrackVars||(w[\"!linkTrackVars\"]=1);w.linkTrackEvents||(w[\"!linkTrackEvents\"]=1);m.s.track(w);if(a.D)a.m=h,a.e=d,a.z=!0,a.D=!1;else if(a.f>0)a.z=!1;a.B=\"\";a.o=a.p=0;a.f-=Math.floor(a.f);a.k=c;a.C++}}}return a};m.O=function(w,b,c,h,d){var a=0;if(w&&(!m.autoTrackMediaLengthRequired||\r\n\t\tb&&b>0)){if(!m.list||!m.list[w]){if(c==1||c==3)m.open(w,b,\"HTML5 Video\",d),a=1}else a=1;a&&m.g(w,c,h,-1,0)}};m.attach=function(w){var b,c,h;if(w&&w.tagName&&w.tagName.toUpperCase()==\"VIDEO\"){if(!m.n)m.n=function(b,a,w){var c,f;if(m.autoTrack){c=b.currentSrc;(f=b.duration)||(f=-1);if(w<0)w=b.currentTime;m.O(c,f,a,w,b)}};b=function(){m.n(w,1,-1)};c=function(){m.n(w,1,-1)};m.i(w,\"play\",b);m.i(w,\"pause\",c);m.i(w,\"seeking\",c);m.i(w,\"seeked\",b);m.i(w,\"ended\",function(){m.n(w,0,-1)});m.i(w,\"timeupdate\",\r\n\t\tb);h=function(){!w.paused&&!w.ended&&!w.seeking&&m.n(w,3,-1);setTimeout(h,1E3)};h()}};m.i=function(m,b,c){m.attachEvent?m.attachEvent(\"on\"+b,c):m.addEventListener&&m.addEventListener(b,c,!1)};if(m.completeByCloseOffset==void 0)m.completeByCloseOffset=1;if(m.completeCloseOffsetThreshold==void 0)m.completeCloseOffsetThreshold=1;m.N=function(){var w,b;if(m.autoTrack&&(w=m.s.d.getElementsByTagName(\"VIDEO\")))for(b=0;b<w.length;b++)m.attach(w[b])};m.i(s,\"load\",m.N)}", "create () {\r\n // Send a create-job message to the native-app.\r\n openPort();\r\n return browser.storage.local.get({ props: {} }).then(result => {\r\n // Get a cookie jar for the job.\r\n return getCookieJarForVideo(this.props.videoUrl).then(cookieJar => {\r\n state.port.postMessage({\r\n topic: 'create-job',\r\n data: {\r\n jobId: this.id,\r\n // Merge the default props and the job props.\r\n props: Object.assign({ cookieJar }, result.props, this.props)\r\n }\r\n });\r\n \r\n // Flag this job as active.\r\n this.state = 'active';\r\n \r\n // Make the icon blue because a job is running.\r\n browser.browserAction.setIcon({\r\n path: 'icons/film-blue.svg'\r\n });\r\n });\r\n });\r\n }", "function AppMeasurement_Module_Media(s){var m=this;m.s=s;s=window;if(!s.s_c_in)s.s_c_il=[],s.s_c_in=0;m._il=s.s_c_il;m._in=s.s_c_in;m._il[m._in]=m;s.s_c_in++;m._c=\"s_m\";m.list=[];m.open=function(w,b,c,h){var d={},a=new Date,g=\"\",e;b||(b=-1);if(w&&c){if(!m.list)m.list={};m.list[w]&&m.close(w);if(h&&h.id)g=h.id;if(g)for(e in m.list)!Object.prototype[e]&&m.list[e]&&m.list[e].S==g&&m.close(m.list[e].name);d.name=w;d.length=b;d.u=0;d.c=0;d.playerName=m.playerName?m.playerName:c;d.S=g;d.L=0;d.f=0;d.timestamp=\r\nMath.floor(a.getTime()/1E3);d.j=0;d.r=d.timestamp;d.a=-1;d.B=\"\";d.k=-1;d.C=0;d.H={};d.F=0;d.m=0;d.e=\"\";d.A=0;d.K=0;d.z=0;d.D=0;d.l=!1;d.v=\"\";d.I=\"\";d.J=0;d.q=!1;d.G=\"\";d.complete=0;d.Q=0;d.o=0;d.p=0;m.list[w]=d}};m.openAd=function(w,b,c,h,d,a,g,e){var f={};m.open(w,b,c,e);if(f=m.list[w])f.l=!0,f.v=h,f.I=d,f.J=a,f.G=g};m.M=function(w){var b=m.list[w];m.list[w]=0;b&&b.monitor&&clearTimeout(b.monitor.R)};m.close=function(w){m.g(w,0,-1)};m.play=function(w,b,c,h){var d=m.g(w,1,b,c,h);if(d&&!d.monitor)d.monitor=\r\n{},d.monitor.update=function(){d.j==1&&m.g(d.name,3,-1);d.monitor.R=setTimeout(d.monitor.update,1E3)},d.monitor.update()};m.click=function(w,b){m.g(w,7,b)};m.complete=function(w,b){m.g(w,5,b)};m.stop=function(w,b){m.g(w,2,b)};m.track=function(w){m.g(w,4,-1)};m.P=function(w,b){var c=\"a.media.\",h=w.linkTrackVars,d=w.linkTrackEvents,a=\"m_i\",g,e=w.contextData,f;if(b.l){c+=\"ad.\";if(b.v)e[\"a.media.name\"]=b.v,e[c+\"pod\"]=b.I,e[c+\"podPosition\"]=b.J;if(!b.F)e[c+\"CPM\"]=b.G}if(b.q)e[c+\"clicked\"]=!0,b.q=!1;e[\"a.contentType\"]=\r\n\"video\"+(b.l?\"Ad\":\"\");e[\"a.media.channel\"]=m.channel;e[c+\"name\"]=b.name;e[c+\"playerName\"]=b.playerName;if(b.length>0)e[c+\"length\"]=b.length;e[c+\"timePlayed\"]=Math.floor(b.f);Math.floor(b.f)>0&&(e[c+\"timePlayed\"]=Math.floor(b.f));if(!b.F)e[c+\"view\"]=!0,a=\"m_s\",b.F=1;if(b.e){e[c+\"segmentNum\"]=b.m;e[c+\"segment\"]=b.e;if(b.A>0)e[c+\"segmentLength\"]=b.A;b.z&&b.f>0&&(e[c+\"segmentView\"]=!0)}if(!b.Q&&b.complete)e[c+\"complete\"]=!0,b.T=1;if(b.o>0)e[c+\"milestone\"]=b.o;if(b.p>0)e[c+\"offsetMilestone\"]=b.p;if(h)for(f in e)Object.prototype[f]||\r\n(h+=\",contextData.\"+f);g=e[\"a.contentType\"];w.pe=a;w.pev3=g;var s,n;if(m.contextDataMapping){if(!w.events2)w.events2=\"\";h&&(h+=\",events\");for(f in m.contextDataMapping)if(!Object.prototype[f]){a=f.length>c.length&&f.substring(0,c.length)==c?f.substring(c.length):\"\";g=m.contextDataMapping[f];if(typeof g==\"string\"){s=g.split(\",\");for(n=0;n<s.length;n++)g=s[n],f==\"a.contentType\"?(h&&(h+=\",\"+g),w[g]=e[f]):a==\"view\"||a==\"segmentView\"||a==\"clicked\"||a==\"complete\"||a==\"timePlayed\"||a==\"CPM\"?(d&&(d+=\",\"+\r\ng),a==\"timePlayed\"||a==\"CPM\"?e[f]&&(w.events2+=(w.events2?\",\":\"\")+g+\"=\"+e[f]):e[f]&&(w.events2+=(w.events2?\",\":\"\")+g)):a==\"segment\"&&e[f+\"Num\"]?(h&&(h+=\",\"+g),w[g]=e[f+\"Num\"]+\":\"+e[f]):(h&&(h+=\",\"+g),w[g]=e[f])}else if(a==\"milestones\"||a==\"offsetMilestones\")f=f.substring(0,f.length-1),e[f]&&m.contextDataMapping[f+\"s\"][e[f]]&&(d&&(d+=\",\"+m.contextDataMapping[f+\"s\"][e[f]]),w.events2+=(w.events2?\",\":\"\")+m.contextDataMapping[f+\"s\"][e[f]]);e[f]&&(e[f]=0);a==\"segment\"&&e[f+\"Num\"]&&(e[f+\"Num\"]=0)}}w.linkTrackVars=\r\nh;w.linkTrackEvents=d};m.g=function(w,b,c,h,d){var a={},g=(new Date).getTime()/1E3,e,f,s=m.trackVars,n=m.trackEvents,o=m.trackSeconds,p=m.trackMilestones,q=m.trackOffsetMilestones,r=m.segmentByMilestones,t=m.segmentByOffsetMilestones,k,j,l=1,i={},u;if(!m.channel)m.channel=m.s.w.location.hostname;if(a=w&&m.list&&m.list[w]?m.list[w]:0){if(a.l)o=m.adTrackSeconds,p=m.adTrackMilestones,q=m.adTrackOffsetMilestones,r=m.adSegmentByMilestones,t=m.adSegmentByOffsetMilestones;c<0&&(c=a.j==1&&a.r>0?g-a.r+a.a:\r\na.a);a.length>0&&(c=c<a.length?c:a.length);c<0&&(c=0);a.u=c;if(a.length>0)a.c=a.u/a.length*100,a.c=a.c>100?100:a.c;if(a.a<0)a.a=c;u=a.C;i.name=w;i.ad=a.l;i.length=a.length;i.openTime=new Date;i.openTime.setTime(a.timestamp*1E3);i.offset=a.u;i.percent=a.c;i.playerName=a.playerName;i.mediaEvent=a.k<0?\"OPEN\":b==1?\"PLAY\":b==2?\"STOP\":b==3?\"MONITOR\":b==4?\"TRACK\":b==5?\"COMPLETE\":b==7?\"CLICK\":\"CLOSE\";if(b>2||b!=a.j&&(b!=2||a.j==1)){if(!d)h=a.m,d=a.e;if(b){if(b==1)a.a=c;if((b<=3||b>=5)&&a.k>=0)if(l=!1,s=n=\r\n\"None\",a.k!=c){f=a.k;if(f>c)f=a.a,f>c&&(f=c);k=p?p.split(\",\"):0;if(a.length>0&&k&&c>=f)for(j=0;j<k.length;j++)if((e=k[j]?parseFloat(\"\"+k[j]):0)&&f/a.length*100<e&&a.c>=e)l=!0,j=k.length,i.mediaEvent=\"MILESTONE\",a.o=i.milestone=e;if((k=q?q.split(\",\"):0)&&c>=f)for(j=0;j<k.length;j++)if((e=k[j]?parseFloat(\"\"+k[j]):0)&&f<e&&c>=e)l=!0,j=k.length,i.mediaEvent=\"OFFSET_MILESTONE\",a.p=i.offsetMilestone=e}if(a.K||!d){if(r&&p&&a.length>0){if(k=p.split(\",\")){k.push(\"100\");for(j=f=0;j<k.length;j++)if(e=k[j]?parseFloat(\"\"+\r\nk[j]):0){if(a.c<e)h=j+1,d=\"M:\"+f+\"-\"+e,j=k.length;f=e}}}else if(t&&q&&(k=q.split(\",\"))){k.push(\"\"+(a.length>0?a.length:\"E\"));for(j=f=0;j<k.length;j++)if((e=k[j]?parseFloat(\"\"+k[j]):0)||k[j]==\"E\"){if(c<e||k[j]==\"E\")h=j+1,d=\"O:\"+f+\"-\"+e,j=k.length;f=e}}if(d)a.K=!0}if((d||a.e)&&d!=a.e){a.D=!0;if(!a.e)a.m=h,a.e=d;a.k>=0&&(l=!0)}if((b>=2||a.c>=100)&&a.a<c)a.L+=c-a.a,a.f+=c-a.a;if(b<=2||b==3&&!a.j)a.B+=(b==1||b==3?\"S\":\"E\")+Math.floor(c),a.j=b==3?1:b;if(!l&&a.k>=0&&b<=3&&(o=o?o:0)&&a.f>=o)l=!0,i.mediaEvent=\r\n\"SECONDS\";a.r=g;a.a=c}if(!b||b<=3&&a.c>=100)a.j!=2&&(a.B+=\"E\"+Math.floor(c)),b=0,s=n=\"None\",i.mediaEvent=\"CLOSE\";if(b==7)l=i.clicked=a.q=!0;if(b==5||m.completeByCloseOffset&&(!b||a.c>=100)&&a.length>0&&c>=a.length-m.completeCloseOffsetThreshold)l=i.complete=a.complete=!0;g=i.mediaEvent;g==\"MILESTONE\"?g+=\"_\"+i.milestone:g==\"OFFSET_MILESTONE\"&&(g+=\"_\"+i.offsetMilestone);a.H[g]?i.eventFirstTime=!1:(i.eventFirstTime=!0,a.H[g]=1);i.event=i.mediaEvent;i.timePlayed=a.L;i.segmentNum=a.m;i.segment=a.e;i.segmentLength=\r\na.A;m.monitor&&b!=4&&m.monitor(m.s,i);b==0&&m.M(w);if(l&&a.C==u){w={};w.contextData={};w.linkTrackVars=s;w.linkTrackEvents=n;if(!w.linkTrackVars)w.linkTrackVars=\"\";if(!w.linkTrackEvents)w.linkTrackEvents=\"\";m.P(w,a);w.linkTrackVars||(w[\"!linkTrackVars\"]=1);w.linkTrackEvents||(w[\"!linkTrackEvents\"]=1);m.s.track(w);if(a.D)a.m=h,a.e=d,a.z=!0,a.D=!1;else if(a.f>0)a.z=!1;a.B=\"\";a.o=a.p=0;a.f-=Math.floor(a.f);a.k=c;a.C++}}}return a};m.O=function(w,b,c,h,d){var a=0;if(w&&(!m.autoTrackMediaLengthRequired||\r\nb&&b>0)){if(!m.list||!m.list[w]){if(c==1||c==3)m.open(w,b,\"HTML5 Video\",d),a=1}else a=1;a&&m.g(w,c,h,-1,0)}};m.attach=function(w){var b,c,h;if(w&&w.tagName&&w.tagName.toUpperCase()==\"VIDEO\"){if(!m.n)m.n=function(b,a,w){var c,f;if(m.autoTrack){c=b.currentSrc;(f=b.duration)||(f=-1);if(w<0)w=b.currentTime;m.O(c,f,a,w,b)}};b=function(){m.n(w,1,-1)};c=function(){m.n(w,1,-1)};m.i(w,\"play\",b);m.i(w,\"pause\",c);m.i(w,\"seeking\",c);m.i(w,\"seeked\",b);m.i(w,\"ended\",function(){m.n(w,0,-1)});m.i(w,\"timeupdate\",\r\nb);h=function(){!w.paused&&!w.ended&&!w.seeking&&m.n(w,3,-1);setTimeout(h,1E3)};h()}};m.i=function(m,b,c){m.attachEvent?m.attachEvent(\"on\"+b,c):m.addEventListener&&m.addEventListener(b,c,!1)};if(m.completeByCloseOffset==void 0)m.completeByCloseOffset=1;if(m.completeCloseOffsetThreshold==void 0)m.completeCloseOffsetThreshold=1;m.N=function(){var w,b;if(m.autoTrack&&(w=m.s.d.getElementsByTagName(\"VIDEO\")))for(b=0;b<w.length;b++)m.attach(w[b])};m.i(s,\"load\",m.N)}", "supportsPlatform() {\n return true;\n }", "function FileSystemService($http, $q, $log) {\n var _directory = LocalFileSystem.PERSISTENT;\n var _fs = null;\n var _that = this;\n\n this.isInitalized = false;\n\n function errorHandler(e) {\n var msg = '';\n\n switch (e.code) {\n case FileError.QUOTA_EXCEEDED_ERR:\n msg = 'QUOTA_EXCEEDED_ERR';\n break;\n case FileError.NOT_FOUND_ERR:\n msg = 'NOT_FOUND_ERR';\n break;\n case FileError.SECURITY_ERR:\n msg = 'SECURITY_ERR';\n break;\n case FileError.INVALID_MODIFICATION_ERR:\n msg = 'INVALID_MODIFICATION_ERR';\n break;\n case FileError.INVALID_STATE_ERR:\n msg = 'INVALID_STATE_ERR';\n break;\n default:\n msg = 'Unknown Error';\n break;\n };\n\n $log.error('FileSystemService: ' + msg);\n }\n\n // startup\n window.requestFileSystem(_directory, 0, function(fs){\n _fs = fs;\n _that.isInitalized = true;\n }, errorHandler);\n\n\n /**\n * Checks if file is in persistent storage\n */\n this.fileExists = function(filename) {\n // fs not initialised\n if(!_that.isInitalized)\n return;\n //var uri = _directory + \"/\" + filename;\n //return $http.get(uri);\n var deferred = $q.defer();\n\n _fs.root.getFile(filename, {}, function(fileEntry) {\n // Get a File object representing the file,\n // then use FileReader to read its contents.\n fileEntry.file(function(file) {\n var reader = new FileReader();\n\n reader.onloadend = function(e) {\n deferred.resolve(e.target.result);\n };\n\n reader.readAsDataURL(file);\n }, errorHandler);\n }, errorHandler);\n\n return deferred.promise;\n }\n\n /**\n * Get File from perstistent storage\n */\n this.getFile = function(filename) {\n // fs not initialised\n if(!_that.isInitalized)\n return;\n //var uri = _directory + \"/\" + filename;\n //return $http.get(uri);\n var deferred = $q.defer();\n\n _fs.root.getFile(filename, {}, function(fileEntry) {\n // Get a File object representing the file,\n // then use FileReader to read its contents.\n fileEntry.file(function(file) {\n var reader = new FileReader();\n\n reader.onloadend = function(e) {\n deferred.resolve(e.target.result);\n };\n\n reader.readAsDataURL(file);\n }, errorHandler);\n }, errorHandler);\n\n return deferred.promise;\n }\n\n /**\n * Save data into file (and create that if necessary).\n */\n this.saveFile = function(filename, data) {\n // fs not initialised\n if(!_that.isInitalized)\n return;\n\n var deferred = $q.defer();\n\n _fs.root.getFile(filename, {create: true}, function(fileEntry) {\n // Create a FileWriter object for our FileEntry (log.txt).\n fileEntry.createWriter(function(fileWriter) {\n\n fileWriter.onwriteend = function(e) {\n $log.log('Write completed.');\n deferred.resolve();\n };\n\n fileWriter.onerror = function(e) {\n deferred.reject(e);\n $log.error('FileSystemService: write failed, ' + e.toString());\n };\n\n // Create a new Blob and write it to log.txt.\n var blob = new Blob([data], {type: 'text/plain'});\n\n fileWriter.write(blob);\n\n }, errorHandler);\n }, errorHandler);\n\n return deferred.promise;\n }\n}", "static initialize(app, changeLogService, deviceService, deviceFileService, deviceFileUploadService, file, httpService, localDBManagementService, localDbService, networkService, securityService) {\n if (this.initialized) {\n return;\n }\n deviceService.addStartUpService({\n serviceName: 'OfflineStartupService',\n start: () => {\n if (window['SQLitePlugin']) {\n localDBManagementService.setLogSQl((sessionStorage.getItem('wm.logSql') === 'true') || (sessionStorage.getItem('debugMode') === 'true'));\n window.logSql = (flag = true) => {\n localDBManagementService.setLogSQl(flag);\n sessionStorage.setItem('wm.logSql', flag ? 'true' : 'false');\n };\n window.executeLocalSql = (dbName, query, params) => {\n localDBManagementService.executeSQLQuery(dbName, query, params, true);\n };\n return localDBManagementService.loadDatabases().then(() => {\n changeLogService.addWorker(new IdResolver(localDBManagementService));\n changeLogService.addWorker(new ErrorBlocker(localDBManagementService));\n changeLogService.addWorker(new FileHandler());\n changeLogService.addWorker(new MultiPartParamTransformer(deviceFileService, localDBManagementService));\n new LiveVariableOfflineBehaviour(changeLogService, httpService, localDBManagementService, networkService, localDbService).add();\n new FileUploadOfflineBehaviour(changeLogService, deviceFileService, deviceFileUploadService, file, networkService, deviceFileService.getUploadDirectory()).add();\n new NamedQueryExecutionOfflineBehaviour(changeLogService, httpService, localDBManagementService, networkService).add();\n localDBManagementService.registerCallback(new UploadedFilesImportAndExportService(changeLogService, deviceFileService, localDBManagementService, file));\n changeLogService.addWorker({\n onAddCall: () => {\n if (!networkService.isConnected()) {\n networkService.disableAutoConnect();\n }\n },\n postFlush: stats => {\n if (stats.totalTaskCount > 0) {\n localDBManagementService.close()\n .catch(noop)\n .then(() => {\n location.assign(window.location.origin + window.location.pathname);\n });\n }\n }\n });\n });\n }\n return Promise.resolve();\n }\n });\n new SecurityOfflineBehaviour(app, file, deviceService, networkService, securityService).add();\n }", "constructor(){\n\t\t//console.log('API START');\n\t}", "get deviceServiceUUID() { return this._deviceServiceUUID ? this._deviceServiceUUID : 'FFE0'; }", "_sdkCompatibility() {\n // WebSocket\n // http://caniuse.com/#feat=websockets\n var canCreateWebSocket = 'WebSocket' in window;\n console.log('Native WebSocket capability: ' +\n canCreateWebSocket);\n\n if (!canCreateWebSocket) {\n throw new Error('No WebSocket capabilities');\n }\n }", "constructor () {\r\n\t\t\r\n\t}", "initleancloud() {\n AV.init({\n appId: keys.appId,\n appKey: keys.appKey\n })\n this.globalData.AV = AV\n }", "constructor(args) {\n super();\n args = args || {}\n this.CONSTRUCTOR_ID = 0x330b4067;\n this.SUBCLASS_OF_ID = 0xd3262a4a;\n\n this.phonecallsEnabled = args.phonecallsEnabled || null;\n this.defaultP2pContacts = args.defaultP2pContacts || null;\n this.preloadFeaturedStickers = args.preloadFeaturedStickers || null;\n this.ignorePhoneEntities = args.ignorePhoneEntities || null;\n this.revokePmInbox = args.revokePmInbox || null;\n this.blockedMode = args.blockedMode || null;\n this.pfsEnabled = args.pfsEnabled || null;\n this.date = args.date;\n this.expires = args.expires;\n this.testMode = args.testMode;\n this.thisDc = args.thisDc;\n this.dcOptions = args.dcOptions;\n this.dcTxtDomainName = args.dcTxtDomainName;\n this.chatSizeMax = args.chatSizeMax;\n this.megagroupSizeMax = args.megagroupSizeMax;\n this.forwardedCountMax = args.forwardedCountMax;\n this.onlineUpdatePeriodMs = args.onlineUpdatePeriodMs;\n this.offlineBlurTimeoutMs = args.offlineBlurTimeoutMs;\n this.offlineIdleTimeoutMs = args.offlineIdleTimeoutMs;\n this.onlineCloudTimeoutMs = args.onlineCloudTimeoutMs;\n this.notifyCloudDelayMs = args.notifyCloudDelayMs;\n this.notifyDefaultDelayMs = args.notifyDefaultDelayMs;\n this.pushChatPeriodMs = args.pushChatPeriodMs;\n this.pushChatLimit = args.pushChatLimit;\n this.savedGifsLimit = args.savedGifsLimit;\n this.editTimeLimit = args.editTimeLimit;\n this.revokeTimeLimit = args.revokeTimeLimit;\n this.revokePmTimeLimit = args.revokePmTimeLimit;\n this.ratingEDecay = args.ratingEDecay;\n this.stickersRecentLimit = args.stickersRecentLimit;\n this.stickersFavedLimit = args.stickersFavedLimit;\n this.channelsReadMediaPeriod = args.channelsReadMediaPeriod;\n this.tmpSessions = args.tmpSessions || null;\n this.pinnedDialogsCountMax = args.pinnedDialogsCountMax;\n this.pinnedInfolderCountMax = args.pinnedInfolderCountMax;\n this.callReceiveTimeoutMs = args.callReceiveTimeoutMs;\n this.callRingTimeoutMs = args.callRingTimeoutMs;\n this.callConnectTimeoutMs = args.callConnectTimeoutMs;\n this.callPacketTimeoutMs = args.callPacketTimeoutMs;\n this.meUrlPrefix = args.meUrlPrefix;\n this.autoupdateUrlPrefix = args.autoupdateUrlPrefix || null;\n this.gifSearchUsername = args.gifSearchUsername || null;\n this.venueSearchUsername = args.venueSearchUsername || null;\n this.imgSearchUsername = args.imgSearchUsername || null;\n this.staticMapsProvider = args.staticMapsProvider || null;\n this.captionLengthMax = args.captionLengthMax;\n this.messageLengthMax = args.messageLengthMax;\n this.webfileDcId = args.webfileDcId;\n this.suggestedLangCode = args.suggestedLangCode || null;\n this.langPackVersion = args.langPackVersion || null;\n this.baseLangPackVersion = args.baseLangPackVersion || null;\n }", "static _getName() {\n return 'ContentPlayback';\n }", "start(callback){\n \n }", "onStartHeaders() {}", "async componentWillMount() {\n var _this = this\n _this.setUpUserDataFromFB()\n\n //ASK FOR CAMERA ONLT IF IS PREVIEW TRUE AND SHOWBARCODE TRUE\n if (Config.isPreview && Config.showBCScanner) {\n const { status } = await Permissions.askAsync(Permissions.CAMERA);\n this.setState({ hasCameraPermission: status === 'granted' });\n }\n\n\n\n AppEventEmitter.addListener('user.state.changes', this.alterUserState);\n if (Config.isTesterApp) {\n this.listenForUserAuth();\n } else if (Config.isPreview && !Config.isTesterApp) {\n //Load list of apps\n _this.retreiveAppDemos(\"apps\");\n }\n\n if (!Config.isPreview && !Config.isTesterApp) {\n\n //Load the data automatically, this is normal app and refister for Push notification\n this.registerForPushNotificationsAsync();\n Notifications.addListener(this._handleNotification);\n this.retreiveMeta();\n }\n\n\n await Font.loadAsync({\n //\"Material Icons\": require(\"@expo/vector-icons/fonts/MaterialIcons.ttf\"),\n //\"Ionicons\": require(\"@expo/vector-icons/fonts/Ionicons.ttf\"),\n // \"Feather\": require(\"@expo/vector-icons/fonts/Feather.ttf\"),\n 'open-sans': require('./assets/fonts/OpenSans-Regular.ttf'),\n 'lato-light': require('./assets/fonts/Lato-Light.ttf'),\n 'lato-regular': require('./assets/fonts/Lato-Regular.ttf'),\n 'lato-bold': require('./assets/fonts/Lato-Bold.ttf'),\n 'lato-black': require('./assets/fonts/Lato-Black.ttf'),\n 'roboto-medium': require('./assets/fonts/Roboto-Medium.ttf'),\n 'roboto-bold': require('./assets/fonts/Roboto-Bold.ttf'),\n 'roboto-light': require('./assets/fonts/Roboto-Light.ttf'),\n 'roboto-thin': require('./assets/fonts/Roboto-Thin.ttf'),\n\n });\n\n this.setState({ isReady: true, fontLoaded: true });\n }", "function writeHeader() {\n seekHead = createSeekHead();\n \n let\n ebmlHeader = {\n \"id\": 0x1a45dfa3, // EBML\n \"data\": [\n {\n \"id\": 0x4286, // EBMLVersion\n \"data\": 1\n },\n {\n \"id\": 0x42f7, // EBMLReadVersion\n \"data\": 1\n },\n {\n \"id\": 0x42f2, // EBMLMaxIDLength\n \"data\": 4\n },\n {\n \"id\": 0x42f3, // EBMLMaxSizeLength\n \"data\": 8\n },\n {\n \"id\": 0x4282, // DocType\n \"data\": \"webm\"\n },\n {\n \"id\": 0x4287, // DocTypeVersion\n \"data\": 2\n },\n {\n \"id\": 0x4285, // DocTypeReadVersion\n \"data\": 2\n }\n ]\n },\n \n segmentInfo = {\n \"id\": 0x1549a966, // Info\n \"data\": [\n {\n \"id\": 0x2ad7b1, // TimecodeScale\n \"data\": 1e6 // Times will be in miliseconds (1e6 nanoseconds per step = 1ms)\n },\n {\n \"id\": 0x4d80, // MuxingApp\n \"data\": \"webm-writer-js\",\n },\n {\n \"id\": 0x5741, // WritingApp\n \"data\": \"webm-writer-js\"\n },\n segmentDuration // To be filled in later\n ]\n },\n \n videoProperties = [\n {\n \"id\": 0xb0, // PixelWidth\n \"data\": videoWidth\n },\n {\n \"id\": 0xba, // PixelHeight\n \"data\": videoHeight\n }\n ];\n \n if (options.transparent) {\n videoProperties.push(\n {\n \"id\": 0x53C0, // AlphaMode\n \"data\": 1\n }\n );\n }\n \n let\n tracks = {\n \"id\": 0x1654ae6b, // Tracks\n \"data\": [\n {\n \"id\": 0xae, // TrackEntry\n \"data\": [\n {\n \"id\": 0xd7, // TrackNumber\n \"data\": DEFAULT_TRACK_NUMBER\n },\n {\n \"id\": 0x73c5, // TrackUID\n \"data\": DEFAULT_TRACK_NUMBER\n },\n {\n \"id\": 0x9c, // FlagLacing\n \"data\": 0\n },\n {\n \"id\": 0x22b59c, // Language\n \"data\": \"und\"\n },\n {\n \"id\": 0x86, // CodecID\n \"data\": \"V_VP8\"\n },\n {\n \"id\": 0x258688, // CodecName\n \"data\": \"VP8\"\n },\n {\n \"id\": 0x83, // TrackType\n \"data\": 1\n },\n {\n \"id\": 0xe0, // Video\n \"data\": videoProperties\n }\n ]\n }\n ]\n };\n \n ebmlSegment = {\n \"id\": 0x18538067, // Segment\n \"size\": -1, // Unbounded size\n \"data\": [\n seekHead,\n segmentInfo,\n tracks,\n ]\n };\n \n let\n bufferStream = new ArrayBufferDataStream(256);\n \n writeEBML(bufferStream, blobBuffer.pos, [ebmlHeader, ebmlSegment]);\n blobBuffer.write(bufferStream.getAsDataArray());\n \n // Now we know where these top-level elements lie in the file:\n seekPoints.SegmentInfo.positionEBML.data = fileOffsetToSegmentRelative(segmentInfo.offset);\n seekPoints.Tracks.positionEBML.data = fileOffsetToSegmentRelative(tracks.offset);\n \n\t writtenHeader = true;\n }", "function AppMeasurement(){var s=this;s.version=\"1.0.3\";var w=window;if(!w.s_c_in)w.s_c_il=[],w.s_c_in=0;s._il=w.s_c_il;s._in=w.s_c_in;s._il[s._in]=s;w.s_c_in++;s._c=\"s_c\";var n=w,g,k;try{g=n.parent;for(k=n.location;g&&g.location&&k&&\"\"+g.location!=\"\"+k&&n.location&&\"\"+g.location!=\"\"+n.location&&g.location.host==k.host;)n=g,g=n.parent}catch(o){}s.za=function(s){try{console.log(s)}catch(a){}};s.ba=function(s){return\"\"+parseInt(s)==\"\"+s};s.replace=function(s,a,c){if(!s||s.indexOf(a)<0)return s;return s.split(a).join(c)};\r\ns.escape=function(b){var a,c;if(!b)return b;b=encodeURIComponent(b);for(a=0;a<7;a++)c=\"+~!*()'\".substring(a,a+1),b.indexOf(c)>=0&&(b=s.replace(b,c,\"%\"+c.charCodeAt(0).toString(16).toUpperCase()));return b};s.unescape=function(b){if(!b)return b;b=b.indexOf(\"+\")>=0?s.replace(b,\"+\",\" \"):b;try{return decodeURIComponent(b)}catch(a){}return unescape(b)};s.pa=function(){var b=w.location.hostname,a=s.fpCookieDomainPeriods,c;if(!a)a=s.cookieDomainPeriods;if(b&&!s.U&&!/^[0-9.]+$/.test(b)&&(a=a?parseInt(a):\r\n2,a=a>2?a:2,c=b.lastIndexOf(\".\"),c>=0)){for(;c>=0&&a>1;)c=b.lastIndexOf(\".\",c-1),a--;s.U=c>0?b.substring(c):b}return s.U};s.c_r=s.cookieRead=function(b){b=s.escape(b);var a=\" \"+s.d.cookie,c=a.indexOf(\" \"+b+\"=\"),e=c<0?c:a.indexOf(\";\",c);b=c<0?\"\":s.unescape(a.substring(c+2+b.length,e<0?a.length:e));return b!=\"[[B]]\"?b:\"\"};s.c_w=s.cookieWrite=function(b,a,c){var e=s.pa(),d=s.cookieLifetime,f;a=\"\"+a;d=d?(\"\"+d).toUpperCase():\"\";c&&d!=\"SESSION\"&&d!=\"NONE\"&&((f=a!=\"\"?parseInt(d?d:0):-60)?(c=new Date,c.setTime(c.getTime()+\r\nf*1E3)):c==1&&(c=new Date,f=c.getYear(),c.setYear(f+5+(f<1900?1900:0))));if(b&&d!=\"NONE\")return s.d.cookie=b+\"=\"+s.escape(a!=\"\"?a:\"[[B]]\")+\"; path=/;\"+(c&&d!=\"SESSION\"?\" expires=\"+c.toGMTString()+\";\":\"\")+(e?\" domain=\"+e+\";\":\"\"),s.cookieRead(b)==a;return 0};s.v=[];s.V=function(b,a){if(s.W)return 0;if(!s.maxDelay)s.maxDelay=250;var c=0,e=(new Date).getTime()+s.maxDelay,d=s.d.Ma,f=[\"webkitvisibilitychange\",\"visibilitychange\"];if(!d)d=s.d.Na;if(d&&d==\"prerender\"){if(!s.G){s.G=1;for(c=0;c<f.length;c++)s.d.addEventListener(f[c],\r\nfunction(){var b=s.d.Ma;if(!b)b=s.d.Na;if(b==\"visible\")s.G=0,s.delayReady()})}c=1;e=0}else s.u(\"_d\")&&(c=1);c&&(s.v.push({m:b,a:a,t:e}),s.G||setTimeout(s.delayReady,s.maxDelay));return c};s.delayReady=function(){var b=(new Date).getTime(),a=0,c;for(s.u(\"_d\")&&(a=1);s.v.length>0;){c=s.v.shift();if(a&&!c.t&&c.t>b){s.v.unshift(c);setTimeout(s.delayReady,parseInt(s.maxDelay/2));break}s.W=1;s[c.m].apply(s,c.a);s.W=0}};s.setAccount=s.sa=function(b){var a,c;if(!s.V(\"setAccount\",arguments))if(s.account=b,\r\ns.allAccounts){a=s.allAccounts.concat(b.split(\",\"));s.allAccounts=[];a.sort();for(c=0;c<a.length;c++)(c==0||a[c-1]!=a[c])&&s.allAccounts.push(a[c])}else s.allAccounts=b.split(\",\")};s.P=function(b,a,c,e,d){var f=\"\",i,j,w,q,g=0;b==\"contextData\"&&(b=\"c\");if(a){for(i in a)if(!Object.prototype[i]&&(!d||i.substring(0,d.length)==d)&&a[i]&&(!c||c.indexOf(\",\"+(e?e+\".\":\"\")+i+\",\")>=0)){w=!1;if(g)for(j=0;j<g.length;j++)i.substring(0,g[j].length)==g[j]&&(w=!0);if(!w&&(f==\"\"&&(f+=\"&\"+b+\".\"),j=a[i],d&&(i=i.substring(d.length)),\r\ni.length>0))if(w=i.indexOf(\".\"),w>0)j=i.substring(0,w),w=(d?d:\"\")+j+\".\",g||(g=[]),g.push(w),f+=s.P(j,a,c,e,w);else if(typeof j==\"boolean\"&&(j=j?\"true\":\"false\"),j){if(e==\"retrieveLightData\"&&d.indexOf(\".contextData.\")<0)switch(w=i.substring(0,4),q=i.substring(4),i){case \"transactionID\":i=\"xact\";break;case \"channel\":i=\"ch\";break;case \"campaign\":i=\"v0\";break;default:s.ba(q)&&(w==\"prop\"?i=\"c\"+q:w==\"eVar\"?i=\"v\"+q:w==\"list\"?i=\"l\"+q:w==\"hier\"&&(i=\"h\"+q,j=j.substring(0,255)))}f+=\"&\"+s.escape(i)+\"=\"+s.escape(j)}}f!=\r\n\"\"&&(f+=\"&.\"+b)}return f};s.ra=function(){var b=\"\",a,c,e,d,f,i,j,w,g=\"\",n=\"\",k=c=\"\";if(s.lightProfileID)a=s.J,(g=s.lightTrackVars)&&(g=\",\"+g+\",\"+s.ea.join(\",\")+\",\");else{a=s.e;if(s.pe||s.linkType)if(g=s.linkTrackVars,n=s.linkTrackEvents,s.pe&&(c=s.pe.substring(0,1).toUpperCase()+s.pe.substring(1),s[c]))g=s[c].Va,n=s[c].Ua;g&&(g=\",\"+g+\",\"+s.C.join(\",\")+\",\");n&&(n=\",\"+n+\",\",g&&(g+=\",events,\"));s.events2&&(k+=(k!=\"\"?\",\":\"\")+s.events2)}for(c=0;c<a.length;c++){d=a[c];f=s[d];e=d.substring(0,4);i=d.substring(4);\r\n!f&&d==\"events\"&&k&&(f=k,k=\"\");if(f&&(!g||g.indexOf(\",\"+d+\",\")>=0)){switch(d){case \"timestamp\":d=\"ts\";break;case \"dynamicVariablePrefix\":d=\"D\";break;case \"visitorID\":d=\"vid\";break;case \"pageURL\":d=\"g\";if(f.length>255)s.pageURLRest=f.substring(255),f=f.substring(0,255);break;case \"pageURLRest\":d=\"-g\";break;case \"referrer\":d=\"r\";break;case \"vmk\":case \"visitorMigrationKey\":d=\"vmt\";break;case \"visitorMigrationServer\":d=\"vmf\";s.ssl&&s.visitorMigrationServerSecure&&(f=\"\");break;case \"visitorMigrationServerSecure\":d=\r\n\"vmf\";!s.ssl&&s.visitorMigrationServer&&(f=\"\");break;case \"charSet\":d=\"ce\";break;case \"visitorNamespace\":d=\"ns\";break;case \"cookieDomainPeriods\":d=\"cdp\";break;case \"cookieLifetime\":d=\"cl\";break;case \"variableProvider\":d=\"vvp\";break;case \"currencyCode\":d=\"cc\";break;case \"channel\":d=\"ch\";break;case \"transactionID\":d=\"xact\";break;case \"campaign\":d=\"v0\";break;case \"resolution\":d=\"s\";break;case \"colorDepth\":d=\"c\";break;case \"javascriptVersion\":d=\"j\";break;case \"javaEnabled\":d=\"v\";break;case \"cookiesEnabled\":d=\r\n\"k\";break;case \"browserWidth\":d=\"bw\";break;case \"browserHeight\":d=\"bh\";break;case \"connectionType\":d=\"ct\";break;case \"homepage\":d=\"hp\";break;case \"plugins\":d=\"p\";break;case \"events\":k&&(f+=(f!=\"\"?\",\":\"\")+k);if(n){i=f.split(\",\");f=\"\";for(e=0;e<i.length;e++)j=i[e],w=j.indexOf(\"=\"),w>=0&&(j=j.substring(0,w)),w=j.indexOf(\":\"),w>=0&&(j=j.substring(0,w)),n.indexOf(\",\"+j+\",\")>=0&&(f+=(f?\",\":\"\")+i[e])}break;case \"events2\":f=\"\";break;case \"contextData\":b+=s.P(\"c\",s[d],g,d);f=\"\";break;case \"lightProfileID\":d=\r\n\"mtp\";break;case \"lightStoreForSeconds\":d=\"mtss\";s.lightProfileID||(f=\"\");break;case \"lightIncrementBy\":d=\"mti\";s.lightProfileID||(f=\"\");break;case \"retrieveLightProfiles\":d=\"mtsr\";break;case \"deleteLightProfiles\":d=\"mtsd\";break;case \"retrieveLightData\":s.retrieveLightProfiles&&(b+=s.P(\"mts\",s[d],g,d));f=\"\";break;default:s.ba(i)&&(e==\"prop\"?d=\"c\"+i:e==\"eVar\"?d=\"v\"+i:e==\"list\"?d=\"l\"+i:e==\"hier\"&&(d=\"h\"+i,f=f.substring(0,255)))}f&&(b+=\"&\"+d+\"=\"+(d.substring(0,3)!=\"pev\"?s.escape(f):f))}d==\"pev3\"&&s.g&&\r\n(b+=s.g)}return b};s.p=function(s){var a=s.tagName;if(\"\"+s.Ta!=\"undefined\"||\"\"+s.Ea!=\"undefined\"&&(\"\"+s.Ea).toUpperCase()!=\"HTML\")return\"\";a=a&&a.toUpperCase?a.toUpperCase():\"\";a==\"SHAPE\"&&(a=\"\");a&&((a==\"INPUT\"||a==\"BUTTON\")&&s.type&&s.type.toUpperCase?a=s.type.toUpperCase():!a&&s.href&&(a=\"A\"));return a};s.Y=function(s){var a=s.href?s.href:\"\",c,e,d;c=a.indexOf(\":\");e=a.indexOf(\"?\");d=a.indexOf(\"/\");if(a&&(c<0||e>=0&&c>e||d>=0&&c>d))e=s.protocol&&s.protocol.length>1?s.protocol:l.protocol?l.protocol:\r\n\"\",c=l.pathname.lastIndexOf(\"/\"),a=(e?e+\"//\":\"\")+(s.host?s.host:l.host?l.host:\"\")+(h.substring(0,1)!=\"/\"?l.pathname.substring(0,c<0?0:c)+\"/\":\"\")+a;return a};s.z=function(b){var a=s.p(b),c,e,d=\"\",f=0;if(a){c=b.protocol;e=b.onclick;if(b.href&&(a==\"A\"||a==\"AREA\")&&(!e||!c||c.toLowerCase().indexOf(\"javascript\")<0))d=s.Y(b);else if(e)d=s.replace(s.replace(s.replace(s.replace(\"\"+e,\"\\r\",\"\"),\"\\n\",\"\"),\"\\t\",\"\"),\" \",\"\"),f=2;else if(a==\"INPUT\"||a==\"SUBMIT\"){if(b.value)d=b.value;else if(b.innerText)d=b.innerText;\r\nelse if(b.textContent)d=b.textContent;f=3}else if(b.src&&a==\"IMAGE\")d=b.src;if(d)return{id:d.substring(0,100),type:f}}return 0};s.Qa=function(b){for(var a=s.p(b),c=s.z(b);b&&!c&&a!=\"BODY\";)if(b=b.parentElement?b.parentElement:b.parentNode)a=s.p(b),c=s.z(b);if(!c||a==\"BODY\")b=0;if(b&&(a=b.onclick?\"\"+b.onclick:\"\",a.indexOf(\".tl(\")>=0||a.indexOf(\".trackLink(\")>=0))b=0;return b};s.Ca=function(){var b,a,c=s.linkObject,e=s.linkType,d=s.linkURL,f,i;s.K=1;if(!c)s.K=0,c=s.j;if(c){b=s.p(c);for(a=s.z(c);c&&\r\n!a&&b!=\"BODY\";)if(c=c.parentElement?c.parentElement:c.parentNode)b=s.p(c),a=s.z(c);if(!a||b==\"BODY\")c=0;if(c){var j=c.onclick?\"\"+c.onclick:\"\";if(j.indexOf(\".tl(\")>=0||j.indexOf(\".trackLink(\")>=0)c=0}}else s.K=1;!d&&c&&(d=s.Y(c));d&&!s.linkLeaveQueryString&&(f=d.indexOf(\"?\"),f>=0&&(d=d.substring(0,f)));if(!e&&d){var g=0,n=0,k;if(s.trackDownloadLinks&&s.linkDownloadFileTypes){j=d.toLowerCase();f=j.indexOf(\"?\");i=j.indexOf(\"#\");f>=0?i>=0&&i<f&&(f=i):f=i;f>=0&&(j=j.substring(0,f));f=s.linkDownloadFileTypes.toLowerCase().split(\",\");\r\nfor(i=0;i<f.length;i++)(k=f[i])&&j.substring(j.length-(k.length+1))==\".\"+k&&(e=\"d\")}if(s.trackExternalLinks&&!e&&(j=d.toLowerCase(),s.aa(j))){if(!s.linkInternalFilters)s.linkInternalFilters=w.location.hostname;f=0;s.linkExternalFilters?(f=s.linkExternalFilters.toLowerCase().split(\",\"),g=1):s.linkInternalFilters&&(f=s.linkInternalFilters.toLowerCase().split(\",\"));if(f){for(i=0;i<f.length;i++)k=f[i],j.indexOf(k)>=0&&(n=1);n?g&&(e=\"e\"):g||(e=\"e\")}}}s.linkObject=c;s.linkURL=d;s.linkType=e;if(s.trackClickMap||\r\ns.trackInlineStats)if(s.g=\"\",c){e=s.pageName;d=1;c=c.sourceIndex;if(!e)e=s.pageURL,d=0;if(w.s_objectID)a.id=w.s_objectID,c=a.type=1;if(e&&a&&a.id&&b)s.g=\"&pid=\"+s.escape(e.substring(0,255))+(d?\"&pidt=\"+d:\"\")+\"&oid=\"+s.escape(a.id.substring(0,100))+(a.type?\"&oidt=\"+a.type:\"\")+\"&ot=\"+b+(c?\"&oi=\"+c:\"\")}};s.ta=function(){var b=s.K,a=s.linkType,c=s.linkURL,e=s.linkName;if(a&&(c||e))a=a.toLowerCase(),a!=\"d\"&&a!=\"e\"&&(a=\"o\"),s.pe=\"lnk_\"+a,s.pev1=c?s.escape(c):\"\",s.pev2=e?s.escape(e):\"\",b=1;s.abort&&(b=0);\r\nif(s.trackClickMap||s.trackInlineStats){a={};c=0;var d=s.cookieRead(\"s_sq\"),f=d?d.split(\"&\"):0,i,j,w;d=0;if(f)for(i=0;i<f.length;i++)j=f[i].split(\"=\"),e=s.unescape(j[0]).split(\",\"),j=s.unescape(j[1]),a[j]=e;e=s.account.split(\",\");if(b||s.g){b&&!s.g&&(d=1);for(j in a)if(!Object.prototype[j])for(i=0;i<e.length;i++){d&&(w=a[j].join(\",\"),w==s.account&&(s.g+=(j.charAt(0)!=\"&\"?\"&\":\"\")+j,a[j]=[],c=1));for(f=0;f<a[j].length;f++)w=a[j][f],w==e[i]&&(d&&(s.g+=\"&u=\"+s.escape(w)+(j.charAt(0)!=\"&\"?\"&\":\"\")+j+\"&u=0\"),\r\na[j].splice(f,1),c=1)}b||(c=1);if(c){d=\"\";i=2;!b&&s.g&&(d=s.escape(e.join(\",\"))+\"=\"+s.escape(s.g),i=1);for(j in a)!Object.prototype[j]&&i>0&&a[j].length>0&&(d+=(d?\"&\":\"\")+s.escape(a[j].join(\",\"))+\"=\"+s.escape(j),i--);s.cookieWrite(\"s_sq\",d)}}}return b};s.ua=function(){if(!s.Ka){var b=new Date,a=n.location,c,e,d,f=d=e=c=\"\",i=\"\",w=\"\",g=\"1.2\",k=s.cookieWrite(\"s_cc\",\"true\",0)?\"Y\":\"N\",o=\"\",p=\"\",r=0;if(b.setUTCDate&&(g=\"1.3\",r.toPrecision&&(g=\"1.5\",c=[],c.forEach))){g=\"1.6\";d=0;e={};try{d=new Iterator(e),\r\nd.next&&(g=\"1.7\",c.reduce&&(g=\"1.8\",g.trim&&(g=\"1.8.1\",Date.parse&&(g=\"1.8.2\",Object.create&&(g=\"1.8.5\")))))}catch(t){}}c=screen.width+\"x\"+screen.height;d=navigator.javaEnabled()?\"Y\":\"N\";e=screen.pixelDepth?screen.pixelDepth:screen.colorDepth;i=s.w.innerWidth?s.w.innerWidth:s.d.documentElement.offsetWidth;w=s.w.innerHeight?s.w.innerHeight:s.d.documentElement.offsetHeight;b=navigator.plugins;try{s.b.addBehavior(\"#default#homePage\"),o=s.b.Ra(a)?\"Y\":\"N\"}catch(u){}try{s.b.addBehavior(\"#default#clientCaps\"),\r\np=s.b.connectionType}catch(x){}if(b)for(;r<b.length&&r<30;){if(a=b[r].name)a=a.substring(0,100)+\";\",f.indexOf(a)<0&&(f+=a);r++}s.resolution=c;s.colorDepth=e;s.javascriptVersion=g;s.javaEnabled=d;s.cookiesEnabled=k;s.browserWidth=i;s.browserHeight=w;s.connectionType=p;s.homepage=o;s.plugins=f;s.Ka=1}};s.B={};s.loadModule=function(b,a){s.B[b]||(s[b]=w[\"AppMeasurement_Module_\"+b]?new w[\"AppMeasurement_Module_\"+b](s):{},s.B[b]=s[b]);a&&(s[b+\"_onLoad\"]=a,delayCall(b+\"_onLoad\",[s,m],1)||a(s,m))};s.u=function(b){var a,\r\nc;for(a in s.B)if(!Object.prototype[a]&&(c=s.B[a])&&c[b]&&c[b]())return 1;return 0};s.xa=function(){var b=Math.floor(Math.random()*1E13),a=s.visitorSampling,c=s.visitorSamplingGroup;c=\"s_vsn_\"+(s.visitorNamespace?s.visitorNamespace:s.account)+(c?\"_\"+c:\"\");var e=s.cookieRead(c);if(a){e&&(e=parseInt(e));if(!e){if(!s.cookieWrite(c,b))return 0;e=b}if(e%1E4>v)return 0}return 1};s.Q=function(b,a){var c,e,d,f,i,w;for(c=0;c<2;c++){e=c>0?s.R:s.e;for(d=0;d<e.length;d++)if(f=e[d],(i=b[f])||b[\"!\"+f]){if(!a&&\r\n(f==\"contextData\"||f==\"retrieveLightData\")&&s[f])for(w in s[f])i[w]||(i[w]=s[f][w]);s[f]=i}}};s.La=function(b){var a,c,e,d;for(a=0;a<2;a++){c=a>0?s.R:s.e;for(e=0;e<c.length;e++)d=c[e],b[d]=s[d],b[d]||(b[\"!\"+d]=1)}};s.oa=function(s){var a,c,e,d,f,w=0,g,n=\"\",k=\"\";if(s&&s.length>255&&(a=\"\"+s,c=a.indexOf(\"?\"),c>0&&(g=a.substring(c+1),a=a.substring(0,c),d=a.toLowerCase(),e=0,d.substring(0,7)==\"http://\"?e+=7:d.substring(0,8)==\"https://\"&&(e+=8),c=d.indexOf(\"/\",e),c>0&&(d=d.substring(e,c),f=a.substring(c),\r\na=a.substring(0,c),d.indexOf(\"google\")>=0?w=\",q,ie,start,search_key,word,kw,cd,\":d.indexOf(\"yahoo.co\")>=0&&(w=\",p,ei,\"),w&&g)))){if((s=g.split(\"&\"))&&s.length>1){for(e=0;e<s.length;e++)d=s[e],c=d.indexOf(\"=\"),c>0&&w.indexOf(\",\"+d.substring(0,c)+\",\")>=0?n+=(n?\"&\":\"\")+d:k+=(k?\"&\":\"\")+d;n&&k?g=n+\"&\"+k:k=\"\"}c=253-(g.length-k.length)-a.length;s=a+(c>0?f.substring(0,c):\"\")+\"?\"+g}return s};s.qa=function(){var b=s.cookieRead(\"s_fid\"),a=\"\",c=\"\",e;e=8;var d=4;if(!b||b.indexOf(\"-\")<0){for(b=0;b<16;b++)e=Math.floor(Math.random()*\r\ne),a+=\"0123456789ABCDEF\".substring(e,e+1),e=Math.floor(Math.random()*d),c+=\"0123456789ABCDEF\".substring(e,e+1),e=d=16;b=a+\"-\"+c}s.cookieWrite(\"s_fid\",b,1)||(b=0);return b};s.t=s.track=function(b){var a,c=new Date,e=\"s\"+Math.floor(c.getTime()/108E5)%10+Math.floor(Math.random()*1E13),d=c.getYear();d=\"t=\"+s.escape(c.getDate()+\"/\"+c.getMonth()+\"/\"+(d<1900?d+1900:d)+\" \"+c.getHours()+\":\"+c.getMinutes()+\":\"+c.getSeconds()+\" \"+c.getDay()+\" \"+c.getTimezoneOffset());if(!s.V(\"track\",arguments)){b&&(a={},s.La(a),\r\ns.Q(b));if(s.xa()&&(s.fid=s.qa(),s.Ca(),s.usePlugins&&s.doPlugins&&s.doPlugins(s),s.account)){if(!s.abort){if(s.trackOffline&&!s.timestamp)s.timestamp=Math.floor(c.getTime()/1E3);c=w.location;if(!s.pageURL)s.pageURL=c.href?c.href:c;if(!s.referrer&&!s.ia)s.referrer=n.document.referrer,s.ia=1;s.referrer=s.oa(s.referrer);s.u(\"_g\")}s.ta()&&!s.abort&&(s.ua(),d+=s.ra(),s.Ba(e,d));s.abort||s.u(\"_t\")}b&&s.Q(a,1);s.timestamp=s.linkObject=s.j=s.linkURL=s.linkName=s.linkType=w.Sa=s.pe=s.pev1=s.pev2=s.pev3=s.g=\r\n0}};s.tl=s.trackLink=function(b,a,c,e,d){s.linkObject=b;s.linkType=a;s.linkName=c;if(d)s.i=b,s.l=d;return s.track(e)};s.trackLight=function(b,a,c,e){s.lightProfileID=b;s.lightStoreForSeconds=a;s.lightIncrementBy=c;return s.track(e)};s.clearVars=function(){var b,a;for(b=0;b<s.e.length;b++)if(a=s.e[b],a.substring(0,4)==\"prop\"||a.substring(0,4)==\"eVar\"||a.substring(0,4)==\"hier\"||a.substring(0,4)==\"list\"||a==\"channel\"||a==\"events\"||a==\"eventList\"||a==\"products\"||a==\"productList\"||a==\"purchaseID\"||a==\r\n\"transactionID\"||a==\"state\"||a==\"zip\"||a==\"campaign\")s[a]=void 0};s.Ba=function(b,a){var c,e=s.trackingServer;c=\"\";var d=s.dc,f=\"sc.\",w=s.visitorNamespace;if(e){if(s.trackingServerSecure&&s.ssl)e=s.trackingServerSecure}else{if(!w)w=s.account,e=w.indexOf(\",\"),e>=0&&(w=w.Oa(0,e)),w=w.replace(/[^A-Za-z0-9]/g,\"\");c||(c=\"2o7.net\");d=d?(\"\"+d).toLowerCase():\"d1\";c==\"2o7.net\"&&(d==\"d1\"?d=\"112\":d==\"d2\"&&(d=\"122\"),f=\"\");e=w+\".\"+d+\".\"+f+c}c=s.ssl?\"https://\":\"http://\";c+=e+\"/b/ss/\"+s.account+\"/\"+(s.mobile?\"5.\":\r\n\"\")+\"1/JS-\"+s.version+(s.Ja?\"T\":\"\")+\"/\"+b+\"?AQB=1&ndh=1&\"+a+\"&AQE=1\";s.wa&&(c=c.substring(0,2047));s.ma(c);s.H()};s.ma=function(b){s.c||s.va();s.c.push(b);s.I=s.o();s.ha()};s.va=function(){s.c=s.ya();if(!s.c)s.c=[]};s.ya=function(){var b,a;if(s.M()){try{(a=w.localStorage.getItem(s.L()))&&(b=w.JSON.parse(a))}catch(c){}return b}};s.M=function(){var b=!0;if(!s.trackOffline||!s.offlineFilename||!w.localStorage||!w.JSON)b=!1;return b};s.Z=function(){var b=0;if(s.c)b=s.c.length;s.q&&b++;return b};s.H=function(){if(!s.q)if(s.$=\r\nnull,s.fa)s.I>s.A&&s.ga(s.c),s.O(500);else{var b=s.ja();if(b>0)s.O(b);else if(b=s.X())s.q=1,s.Aa(b),s.Fa(b)}};s.O=function(b){if(!s.$)b||(b=0),s.$=setTimeout(s.H,b)};s.ja=function(){var b;if(!s.trackOffline||s.offlineThrottleDelay<=0)return 0;b=s.o()-s.da;if(s.offlineThrottleDelay<b)return 0;return s.offlineThrottleDelay-b};s.X=function(){if(s.c.length>0)return s.c.shift()};s.Aa=function(b){if(s.debugTracking){var a=\"AppMeasurement Debug: \"+b;b=b.split(\"&\");var c;for(c=0;c<b.length;c++)a+=\"\\n\\t\"+\r\ns.unescape(b[c]);s.za(a)}};s.Fa=function(b){var a;a||(a=new Image);a.T=function(){try{if(s.N)clearTimeout(s.N),s.N=0;if(a.timeout)clearTimeout(a.timeout),a.timeout=0}catch(b){}};a.onload=a.Ia=function(){a.T();s.la();s.D();s.q=0;s.H()};a.onabort=a.onerror=a.na=function(){a.T();s.q&&s.c.unshift(s.ka);s.q=0;s.I>s.A&&s.ga(s.c);s.D();s.O(500)};a.onreadystatechange=function(){a.readyState==4&&(a.status==200?a.Ia():a.na())};s.da=s.o();a.src=b;if(a.abort)s.N=setTimeout(a.abort,5E3);s.ka=b;s.Pa=w[\"s_i_\"+s.replace(s.account,\r\n\",\",\"_\")]=a;if(s.useForcedLinkTracking&&s.r||s.l){if(!s.forcedLinkTrackingTimeout)s.forcedLinkTrackingTimeout=250;s.F=setTimeout(s.D,s.forcedLinkTrackingTimeout)}};s.la=function(){if(s.M()&&!(s.ca>s.A))try{w.localStorage.removeItem(s.L()),s.ca=s.o()}catch(b){}};s.ga=function(b){if(s.M()){s.ha();try{w.localStorage.setItem(s.L(),w.JSON.stringify(b)),s.A=s.o()}catch(a){}}};s.ha=function(){if(s.trackOffline){if(!s.offlineLimit||s.offlineLimit<=0)s.offlineLimit=10;for(;s.c.length>s.offlineLimit;)s.X()}};\r\ns.forceOffline=function(){s.fa=!0};s.forceOnline=function(){s.fa=!1};s.L=function(){return s.offlineFilename+\"-\"+s.visitorNamespace+s.account};s.o=function(){return(new Date).getTime()};s.aa=function(s){s=s.toLowerCase();if(s.indexOf(\"#\")!=0&&s.indexOf(\"about:\")!=0&&s.indexOf(\"javascript:\")!=0)return!0;return!1};s.setTagContainer=function(b){var a,c,e;s.Ja=b;for(a=0;a<s._il.length;a++)if((c=s._il[a])&&c._c==\"s_l\"&&c.tagContainerName==b){s.Q(c);if(c.lmq)for(a=0;a<c.lmq.length;a++)e=c.lmq[a],s.loadModule(e.n);\r\nif(c.ml)for(e in c.ml)if(s[e])for(a in b=s[e],e=c.ml[e],e)if(!Object.prototype[a]&&(typeof e[a]!=\"function\"||(\"\"+e[a]).indexOf(\"s_c_il\")<0))b[a]=e[a];if(c.mmq)for(a=0;a<c.mmq.length;a++)e=c.mmq[a],s[e.m]&&(b=s[e.m],b[e.f]&&typeof b[e.f]==\"function\"&&(e.a?b[e.f].apply(b,e.a):b[e.f].apply(b)));if(c.tq)for(a=0;a<c.tq.length;a++)s.track(c.tq[a]);c.s=s;break}};s.Util={urlEncode:s.escape,urlDecode:s.unescape,cookieRead:s.cookieRead,cookieWrite:s.cookieWrite,getQueryParam:function(b,a,c){var e;a||(a=s.pageURL?\r\ns.pageURL:w.location);c||(c=\"&\");if(b&&a&&(a=\"\"+a,e=a.indexOf(\"?\"),e>=0&&(a=c+a.substring(e+1)+c,e=a.indexOf(c+b+\"=\"),e>=0&&(a=a.substring(e+c.length+b.length+1),e=a.indexOf(c),e>=0&&(a=a.substring(0,e)),a.length>0))))return s.unescape(a);return\"\"}};s.C=[\"timestamp\",\"dynamicVariablePrefix\",\"visitorID\",\"anonymousVisitorID\",\"globalVisitorID\",\"globalLocationHint\",\"fid\",\"vmk\",\"visitorMigrationKey\",\"visitorMigrationServer\",\"visitorMigrationServerSecure\",\"charSet\",\"visitorNamespace\",\"cookieDomainPeriods\",\r\n\"fpCookieDomainPeriods\",\"cookieLifetime\",\"pageName\",\"pageURL\",\"referrer\",\"contextData\",\"currencyCode\",\"lightProfileID\",\"lightStoreForSeconds\",\"lightIncrementBy\",\"retrieveLightProfiles\",\"deleteLightProfiles\",\"retrieveLightData\",\"pe\",\"pev1\",\"pev2\",\"pev3\",\"pageURLRest\"];s.e=s.C.concat([\"purchaseID\",\"variableProvider\",\"channel\",\"server\",\"pageType\",\"transactionID\",\"campaign\",\"state\",\"zip\",\"events\",\"events2\",\"products\",\"tnt\"]);s.ea=[\"timestamp\",\"charSet\",\"visitorNamespace\",\"cookieDomainPeriods\",\"cookieLifetime\",\r\n\"contextData\",\"lightProfileID\",\"lightStoreForSeconds\",\"lightIncrementBy\"];s.J=s.ea.slice(0);s.R=[\"account\",\"allAccounts\",\"debugTracking\",\"visitor\",\"trackOffline\",\"offlineLimit\",\"offlineThrottleDelay\",\"offlineFilename\",\"usePlugins\",\"doPlugins\",\"configURL\",\"visitorSampling\",\"s.visitorSamplingGroup\",\"linkObject\",\"linkURL\",\"linkName\",\"linkType\",\"trackDownloadLinks\",\"trackExternalLinks\",\"trackClickMap\",\"trackInlineStats\",\"linkLeaveQueryString\",\"linkTrackVars\",\"linkTrackEvents\",\"linkDownloadFileTypes\",\r\n\"linkExternalFilters\",\"linkInternalFilters\",\"useForcedLinkTracking\",\"forcedLinkTrackingTimeout\",\"trackingServer\",\"trackingServerSecure\",\"ssl\",\"abort\",\"mobile\",\"dc\",\"lightTrackVars\",\"maxDelay\"];for(g=0;g<=75;g++)s.e.push(\"prop\"+g),s.J.push(\"prop\"+g),s.e.push(\"eVar\"+g),s.J.push(\"eVar\"+g),g<6&&s.e.push(\"hier\"+g),g<4&&s.e.push(\"list\"+g);g=[\"resolution\",\"colorDepth\",\"javascriptVersion\",\"javaEnabled\",\"cookiesEnabled\",\"browserWidth\",\"browserHeight\",\"connectionType\",\"homepage\",\"plugins\"];s.e=s.e.concat(g);\r\ns.C=s.C.concat(g);s.ssl=w.location.protocol.toLowerCase().indexOf(\"https\")>=0;s.charSet=\"UTF-8\";s.contextData={};s.offlineThrottleDelay=0;s.offlineFilename=\"AppMeasurement.offline\";s.da=0;s.I=0;s.A=0;s.ca=0;s.linkDownloadFileTypes=\"exe,zip,wav,mp3,mov,mpg,avi,wmv,pdf,doc,docx,xls,xlsx,ppt,pptx\";s.w=w;s.d=w.document;try{s.wa=navigator.appName==\"Microsoft Internet Explorer\"}catch(p){}s.D=function(){if(s.F)w.clearTimeout(s.F),s.F=null;s.i&&s.r&&s.i.dispatchEvent(s.r);if(s.l)if(typeof s.l==\"function\")s.l();\r\nelse if(s.i&&s.i.href)s.d.location=s.i.href;s.i=s.r=s.l=0};s.Ga=function(){s.b=s.d.body;if(s.b)if(s.k=function(b){var a,c,e,d,f;if(!(s.d&&s.d.getElementById(\"cppXYctnr\")||b&&b.Da)){if(s.S)if(s.useForcedLinkTracking)s.b.removeEventListener(\"click\",s.k,!1);else{s.b.removeEventListener(\"click\",s.k,!0);s.S=s.useForcedLinkTracking=0;return}else s.useForcedLinkTracking=0;s.j=b.srcElement?b.srcElement:b.target;try{if(s.j&&(s.j.tagName||s.j.parentElement||s.j.parentNode))if(e=s.Z(),s.track(),e<s.Z()&&s.useForcedLinkTracking&&\r\nb.target){for(d=b.target;d&&d!=s.b&&d.tagName.toUpperCase()!=\"A\"&&d.tagName.toUpperCase()!=\"AREA\";)d=d.parentNode;if(d&&(f=d.href,s.aa(f)||(f=0),c=d.target,b.target.dispatchEvent&&f&&(!c||c==\"_self\"||c==\"_top\"||c==\"_parent\"||w.name&&c==w.name))){try{a=s.d.createEvent(\"MouseEvents\")}catch(g){a=new w.MouseEvent}if(a){try{a.initMouseEvent(\"click\",b.bubbles,b.cancelable,b.view,b.detail,b.screenX,b.screenY,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget)}catch(j){a=\r\n0}if(a)a.Da=1,b.stopPropagation(),b.Ha&&b.Ha(),b.preventDefault(),s.i=b.target,s.r=a}}}}catch(k){}s.j=0}},s.b&&s.b.attachEvent)s.b.attachEvent(\"onclick\",s.k);else{if(s.b&&s.b.addEventListener){if(navigator&&(navigator.userAgent.indexOf(\"WebKit\")>=0&&s.d.createEvent||navigator.userAgent.indexOf(\"Firefox/2\")>=0&&w.MouseEvent))s.S=1,s.useForcedLinkTracking=1,s.b.addEventListener(\"click\",s.k,!0);s.b.addEventListener(\"click\",s.k,!1)}}else setTimeout(setupBody,30)};s.Ga()}", "function getVersion(){return _VERSION}", "InitVsaEngine() {\n\n }", "constructor() {\n this.systemLog = false\n this.appName = '@codedungeon/messenger'\n this.logToFile = false\n this.methods = [\n 'write',\n 'critical',\n 'lblCritical',\n 'danger',\n 'lblDanger',\n 'debug',\n 'error',\n 'lblError',\n 'important',\n 'lblImportant',\n 'info',\n 'lblInfo',\n 'log',\n 'note',\n 'notice',\n 'lblNotice',\n 'status',\n 'success',\n 'lblSuccess',\n 'warn',\n 'lblWarn',\n 'warning',\n 'lblWarning'\n ]\n }", "function WebSocketRpcConnection()\n{\nvar self = this;\n\nvar isNodeJs = (typeof window === \"undefined\" ? true : false);\n\nvar lib = null;\nvar SpaceifyError = null;\nvar SpaceifyUtility = null;\nvar RpcCommunicator = null;\n//var SpaceifyLogger = null;\nvar WebSocketConnection = null;\n\nif (isNodeJs)\n\t{\n\tlib = \"/var/lib/spaceify/code/\";\n\n\tSpaceifyError = require(lib + \"spaceifyerror\");\n\t//SpaceifyLogger = require(lib + \"spaceifylogger\");\n\tSpaceifyUtility = require(lib + \"spaceifyutility\");\n\tRpcCommunicator = require(lib + \"rpccommunicator\");\n\tWebSocketConnection = require(lib + \"websocketconnection\");\n\t}\nelse\n\t{\n\tlib = (window.WEBPACK_MAIN_LIBRARY ? window.WEBPACK_MAIN_LIBRARY : window);\n\n\t//SpaceifyLogger = lib.SpaceifyLogger;\n\tSpaceifyError = lib.SpaceifyError;\n\tSpaceifyUtility = lib.SpaceifyUtility;\n\tRpcCommunicator = lib.RpcCommunicator;\n\tWebSocketConnection = lib.WebSocketConnection;\n\t}\n\nvar errorc = new SpaceifyError();\nvar utility = new SpaceifyUtility();\nvar communicator = new RpcCommunicator();\nvar connection = new WebSocketConnection();\n//var logger = new SpaceifyLogger(\"WebSocketRpcConnection\");\n\nself.connect = function(options, callback)\n\t{\n\tconnection.connect(options, function(err, data)\n\t\t{\n\t\tif(!err)\n\t\t\t{\n\t\t\tcommunicator.addConnection(connection);\n\n\t\t\tif(callback)\n\t\t\t\tcallback(null, true);\n\t\t\t}\n\t\telse\n\t\t\t{\n\t\t\tif(callback)\n\t\t\t\tcallback(errorc.makeErrorObject(\"wsrpcc\", \"Failed to open WebsocketRpcConnection.\", \"WebSocketRpcConnection::connect\"), null);\n\t\t\t}\n\t\t});\n\t};\n\nself.close = function()\n\t{\n\t};\n\nself.getCommunicator = function()\n\t{\n\treturn communicator;\n\t};\n\nself.getConnection = function()\n\t{\n\treturn connection;\n\t};\n\n// Inherited methods\nself.getIsOpen = function()\n\t{\n\treturn connection.getIsOpen();\n\t}\n\nself.getIsSecure = function()\n\t{\n\treturn connection.getIsSecure();\n\t}\n\nself.getPort = function()\n\t{\n\treturn connection.getPort();\n\t}\n\nself.getId = function()\n\t{\n\treturn connection.getId();\n\t}\n\nself.connectionExists = function(connectionId)\n\t{\n\treturn communicator.connectionExists(connectionId);\n\t}\n\nself.exposeRpcMethod = function(name, object, method)\n\t{\n\tcommunicator.exposeRpcMethod(name, object, method);\n\t}\n\nself.exposeRpcMethodSync = function(name, object, method)\n\t{\n\tcommunicator.exposeRpcMethodSync(name, object, method);\n\t}\n\nself.callRpc = function(method, params, object, listener)\n\t{\n\treturn communicator.callRpc(method, params, object, listener, connection.getId());\n\t}\n\n// External event listeners\nself.setConnectionListener = function(listener)\n\t{\n\tcommunicator.setConnectionListener(listener);\n\t};\n\nself.setDisconnectionListener = function(listener)\n\t{\n\tcommunicator.setDisconnectionListener(listener);\n\t};\n\n}", "private internal function m248() {}", "heartbeat () {\n }", "function getString(key, params) {\n var result = WEB_PLATFORM.getString(\"org_opensds_storage_devices\", key, params);\n if(result == null){\n return key;\n }else{\n return result;\n }\n }", "function _____SHARED_functions_____(){}", "onShareAppMessage() {\n\n }", "componentDidMount(){\n console.info(this.constructor.name+ 'Component mount process finished');\n }", "requestThumbnails() {\n let position = this.state.position;\n let ed = this.state.ed;\n let ts = position == 'start' ? ed.start : ed.end;\n\n this.props.socket.emit('frameSelect',{ ts: ts } );\n }", "onMessage() {}", "onMessage() {}", "static get tag(){return\"hal-9000\"}", "get EXTERNAL_API() {\n return ['setUsageMode',\n 'setBackupMode',\n 'setLocationMode',\n 'setUsageOptinHidden',\n ];\n }", "constructor(t){const e={...t};this.connectionState=new h,this.server=\"https://hub-server-2.heatgenius.co.uk\",this.username=\"\",this.signature=\"\",this.auth={header:{}},this.lastQueryTime=null,this._axios=i.a.create({}),this.logger=e.logger?e.logger:console,this.debug=!!e.debug&&e.debug}", "started() {\r\n\r\n\t}", "getVideoDataBuffer() {\n return this.videoDataBuffer;\n }", "addTPKLayer(){\n //<editor-fold desc=\"old code to eliminate\">\n /* if (typeof local == 'undefined') {\n\n //todo: maybe based on this url we could decide if taking the tpk from File API or form URL\n var xhrRequest = new XMLHttpRequest();\n var _this = this;\n xhrRequest.open(\"GET\", url, true);\n xhrRequest.responseType = \"blob\";\n xhrRequest.onprogress = function(evt){\n var percent = 0;\n if(/!*evt.hasOwnProperty(\"total\")*!/typeof evt[\"total\"] !== 'undefined'){\n percent = (parseFloat(evt.loaded / evt.total) * 100).toFixed(0);\n }\n else{\n percent = (parseFloat(evt.loaded / evt.totalSize) * 100).toFixed(0);\n }\n\n console.log(\"Get file via url \" + percent + \"%\");\n console.log(\"Begin downloading remote tpk file...\");\n };\n\n xhrRequest.error = function(err){\n console.log(\"ERROR retrieving TPK file: \" + err.toString());\n alert(\"There was a problem retrieve the file.\");\n };\n var __this = _this;\n xhrRequest.onload = function(oEvent) {\n if(this.status === 200) {\n console.log(\"Remote tpk download finished.\" + oEvent);\n __this.zipParser(this.response);\n }\n else{\n alert(\"There was a problem loading the file. \" + this.status + \": \" + this.statusText );\n }\n };\n xhrRequest.send();\n }\n*/\n //</editor-fold>\n if (this.get('ermesCordova').isNative()){\n\n var basemapName = this.get('parcels').get('basemapName');\n var store = cordova.file.dataDirectory;\n var fileName = basemapName;\n this.set(\"loading\", true);\n this.getBaseMapZip (store, fileName).then((binary)=>{\n if (binary!== null) {\n this.zipParser(binary);\n }\n else {\n Ember.debug(\"getBaseMapZip: error loading the zip file\");\n }\n });\n }\n\n }", "private public function m246() {}", "async onReady() {\n try {\n // Initialize your adapter here\n //Logging of adapter start\n this.log.info('start fb-checkpresence: ip-address: \"' + this.config.ipaddress + '\" - interval devices: ' + this.config.interval + ' Min.' + ' - interval members: ' + this.config.intervalFamily + ' s');\n this.log.debug('configuration user: <' + this.config.username + '>');\n this.log.debug('configuration history: <' + this.config.history + '>');\n this.log.debug('configuration dateformat: <' + this.config.dateformat + '>');\n this.log.debug('configuration familymembers: ' + JSON.stringify(this.config.familymembers));\n this.log.debug('configuration fb-devices ' + this.config.fbdevices);\n this.log.debug('configuratuion mesh info: ' + this.config.meshinfo); \n\n //decrypt fritzbox password\n const sysObj = await this.getForeignObjectAsync('system.config');\n if (sysObj && sysObj.native && sysObj.native.secret) {\n this.config.password = this.decrypt(sysObj.native.secret, this.config.password);\n } else {\n this.config.password = this.decrypt('SdoeQ85NTrg1B0FtEyzf', this.config.password);\n }\n\n //Configuration changes if needed\n let adapterObj = (await this.getForeignObjectAsync(`system.adapter.${this.namespace}`));\n let adapterObjChanged = false; //for changes\n \n //if interval <= 0 than set to 1\n if (this.config.interval <= 0) {\n adapterObj.native.interval = 1;\n adapterObjChanged = true;\n this.config.interval = 1;\n this.log.warn('interval is less than 1. Set to 1 Min.');\n }\n\n //if interval <= 0 than set to 1\n if (this.config.intervalFamily <= 9) {\n adapterObj.native.intervalFamily = 10;\n adapterObjChanged = true;\n this.config.intervalFamily = 10;\n this.log.warn('interval is less than 10. Set to 10s.');\n }\n\n //create new configuration items -> workaround for older versions\n for(let i=0;i<this.config.familymembers.length;i++){\n if (this.config.familymembers[i].useip == undefined) {\n adapterObj.native.familymembers[i].useip = false;\n adapterObj.native.familymembers[i].ipaddress = '';\n adapterObjChanged = true;\n }\n }\n\n if (adapterObjChanged === true){ //Save changes\n await this.setForeignObjectAsync(`system.adapter.${this.namespace}`, adapterObj);\n }\n\n const cfg = {\n ip: this.config.ipaddress,\n port: '49000',\n iv: this.config.interval,\n history: this.config.history,\n dateFormat: this.config.dateformat,\n uid: this.config.username,\n pwd: this.config.password,\n members: this.config.familymembers,\n wl: this.config.whitelist\n };\n \n const cron = cfg.iv * 60;\n const cronFamily = this.config.intervalFamily;\n \n const devInfo = {\n host: this.config.ipaddress,\n port: '49000',\n sslPort: null,\n uid: this.config.username,\n pwd: this.config.password\n };\n\n this.Fb = await fb.Fb.init(devInfo, this);\n if(this.Fb.services === null) {\n this.log.error('Can not get services! Adapter stops');\n this.stopAdapter();\n }\n\n //Check if services/actions are supported\n this.GETPATH = await this.Fb.chkService('X_AVM-DE_GetHostListPath', 'Hosts1', 'X_AVM-DE_GetHostListPath');\n this.GETMESHPATH = await this.Fb.chkService('X_AVM-DE_GetMeshListPath', 'Hosts1', 'X_AVM-DE_GetMeshListPath');\n this.GETBYMAC = await this.Fb.chkService('GetSpecificHostEntry', 'Hosts1', 'GetSpecificHostEntry');\n this.GETBYIP = await this.Fb.chkService('X_AVM-DE_GetSpecificHostEntryByIP', 'Hosts1', 'X_AVM-DE_GetSpecificHostEntryByIP');\n this.GETPORT = await this.Fb.chkService('GetSecurityPort', 'DeviceInfo1', 'GetSecurityPort');\n this.GETEXTIP = await this.Fb.chkService('GetInfo', 'WANPPPConnection1', 'GetInfo');\n if ( this.GETEXTIP == false) this.GETEXTIP = await this.Fb.chkService('GetInfo', 'WANIPConnection1', 'GetInfo');\n this.SETENABLE = await this.Fb.chkService('SetEnable', 'WLANConfiguration3', 'SetEnable');\n this.WLAN3INFO = await this.Fb.chkService('GetInfo', 'WLANConfiguration3', 'WLANConfiguration3-GetInfo');\n this.DEVINFO = await this.Fb.chkService('GetInfo', 'DeviceInfo1', 'DeviceInfo1-GetInfo');\n this.DISALLOWWANACCESSBYIP = await this.Fb.chkService('DisallowWANAccessByIP', 'X_AVM-DE_HostFilter', 'DisallowWANAccessByIP');\n this.GETWANACCESSBYIP = await this.Fb.chkService('GetWANAccessByIP', 'X_AVM-DE_HostFilter', 'GetWANAccessByIP');\n this.REBOOT = await this.Fb.chkService('Reboot', 'DeviceConfig1', 'Reboot');\n \n //const test = await Fb.soapAction(Fb, '/upnp/control/deviceconfig', 'urn:dslforum-org:service:DeviceConfig:1', 'X_AVM-DE_CreateUrlSID', null);\n\n //Create global objects\n await obj.createGlobalObjects(this, this.HTML+this.HTML_END, this.HTML_GUEST+this.HTML_END, this.enabled);\n await obj.createMemberObjects(this, cfg, this.HTML_HISTORY + this.HTML_END, this.enabled);\n\n //create Fb devices\n if (this.GETPATH != null && this.GETPATH == true && this.config.fbdevices == true){\n const items = await this.Fb.getDeviceList(this, cfg, this.Fb);\n if (items != null){\n let res = await obj.createFbDeviceObjects(this, items, this.enabled);\n if (res === true) this.log.info('createFbDeviceObjects finished successfully');\n res = await obj.createMeshObjects(this, items, 0, this.enabled); //create channel 0 as default interface\n if (res === true) this.log.info('createMeshObjects finished successfully');\n }else{\n this.log.error('createFbDeviceObjects -> ' + \"can't read devices from fritzbox! Adapter stops\");\n adapterObj = await this.getForeignObjectAsync(`system.adapter.${this.namespace}`);\n adapterObj.common.enabled = false; // Adapter ausschalten\n await this.setForeignObjectAsync(`system.adapter.${this.namespace}`, adapterObj);\n }\n await this.resyncFbObjects(items);\n }\n\n // states changes inside the adapters namespace are subscribed\n if (this.SETENABLE === true && this.WLAN3INFO === true) this.subscribeStates(`${this.namespace}` + '.guest.wlan');\n if (this.DISALLOWWANACCESSBYIP === true && this.GETWANACCESSBYIP === true) this.subscribeStates(`${this.namespace}` + '.fb-devices.*.disabled'); \n if (this.REBOOT === true) this.subscribeStates(`${this.namespace}` + '.reboot'); \n\n //get uuid for transaction\n //const sSid = await Fb.soapAction(Fb, '/upnp/control/deviceconfig', urn + 'DeviceConfig:1', 'X_GenerateUUID', null);\n //const uuid = sSid['NewUUID'].replace('uuid:', '');\n this.loop(10, 55, cronFamily, cron, cfg);\n } catch (error) {\n this.showError('onReady: ' + error);\n }\n }", "started () {\n\n }", "started () {\n\n }", "started () {\n\n }", "async onReady() {\n // Initialize your adapter here\n\n this.setState(\"info.connection\", false, true);\n // Reset the connection indicator during startup\n this.type = \"VW\";\n this.country = \"DE\";\n this.clientId = \"9496332b-ea03-4091-a224-8c746b885068%40apps_vw-dilab_com\";\n this.xclientId = \"38761134-34d0-41f3-9a73-c4be88d7d337\";\n this.scope = \"openid%20profile%20mbb%20email%20cars%20birthdate%20badge%20address%20vin\";\n this.redirect = \"carnet%3A%2F%2Fidentity-kit%2Flogin\";\n this.xrequest = \"de.volkswagen.carnet.eu.eremote\";\n this.responseType = \"id_token%20token%20code\";\n this.xappversion = \"5.1.2\";\n this.xappname = \"eRemote\";\n if (this.config.type === \"id\") {\n this.type = \"Id\";\n this.country = \"DE\";\n this.clientId = \"a24fba63-34b3-4d43-b181-942111e6bda8@apps_vw-dilab_com\";\n this.xclientId = \"\";\n this.scope = \"openid profile badge cars dealers birthdate vin\";\n this.redirect = \"weconnect://authenticated\";\n this.xrequest = \"com.volkswagen.weconnect\";\n this.responseType = \"code id_token token\";\n this.xappversion = \"\";\n this.xappname = \"\";\n }\n if (this.config.type === \"skoda\") {\n this.type = \"Skoda\";\n this.country = \"CZ\";\n this.clientId = \"7f045eee-7003-4379-9968-9355ed2adb06%40apps_vw-dilab_com\";\n this.xclientId = \"28cd30c6-dee7-4529-a0e6-b1e07ff90b79\";\n this.scope = \"openid%20profile%20phone%20address%20cars%20email%20birthdate%20badge%20dealers%20driversLicense%20mbb\";\n this.redirect = \"skodaconnect%3A%2F%2Foidc.login%2F\";\n this.xrequest = \"cz.skodaauto.connect\";\n this.responseType = \"code%20id_token\";\n this.xappversion = \"3.2.6\";\n this.xappname = \"cz.skodaauto.connect\";\n }\n if (this.config.type === \"seat\") {\n this.type = \"Seat\";\n this.country = \"ES\";\n this.clientId = \"50f215ac-4444-4230-9fb1-fe15cd1a9bcc@apps_vw-dilab_com\";\n this.xclientId = \"9dcc70f0-8e79-423a-a3fa-4065d99088b4\";\n this.scope = \"openid profile mbb cars birthdate nickname address phone\";\n this.redirect = \"seatconnect://identity-kit/login\";\n this.xrequest = \"cz.skodaauto.connect\";\n this.responseType = \"code%20id_token\";\n this.xappversion = \"1.1.29\";\n this.xappname = \"SEATConnect\";\n }\n if (this.config.type === \"audi\") {\n this.type = \"Audi\";\n this.country = \"DE\";\n this.clientId = \"09b6cbec-cd19-4589-82fd-363dfa8c24da@apps_vw-dilab_com\";\n this.xclientId = \"77869e21-e30a-4a92-b016-48ab7d3db1d8\";\n this.scope = \"address profile badge birthdate birthplace nationalIdentifier nationality profession email vin phone nickname name picture mbb gallery openid\";\n this.redirect = \"myaudi:///\";\n this.xrequest = \"de.myaudi.mobile.assistant\";\n this.responseType = \"token%20id_token\";\n // this.responseType = \"code\";\n this.xappversion = \"3.22.0\";\n this.xappname = \"myAudi\";\n }\n if (this.config.type === \"go\") {\n this.type = \"\";\n this.country = \"\";\n this.clientId = \"ac42b0fa-3b11-48a0-a941-43a399e7ef84@apps_vw-dilab_com\";\n this.xclientId = \"\";\n this.scope = \"openid%20profile%20address%20email%20phone\";\n this.redirect = \"vwconnect%3A%2F%2Fde.volkswagen.vwconnect%2Foauth2redirect%2Fidentitykit\";\n this.xrequest = \"\";\n this.responseType = \"code\";\n this.xappversion = \"\";\n this.xappname = \"\";\n }\n if (this.config.interval === 0) {\n this.log.info(\"Interval of 0 is not allowed reset to 1\");\n this.config.interval = 1;\n }\n this.login()\n .then(() => {\n this.log.debug(\"Login successful\");\n this.setState(\"info.connection\", true, true);\n this.getPersonalData()\n .then(() => {\n this.getVehicles()\n .then(() => {\n if (this.config.type !== \"go\") {\n this.vinArray.forEach((vin) => {\n if (this.config.type === \"id\") {\n this.getIdStatus(vin).catch(() => {\n this.log.error(\"get id status Failed\");\n });\n } else {\n this.getHomeRegion(vin)\n .catch(() => {\n this.log.debug(\"get home region Failed\");\n })\n .finally(() => {\n this.getVehicleData(vin).catch(() => {\n this.log.error(\"get vehicle data Failed\");\n });\n this.getVehicleRights(vin).catch(() => {\n this.log.error(\"get vehicle rights Failed\");\n });\n this.requestStatusUpdate(vin)\n .finally(() => {\n this.statesArray.forEach((state) => {\n this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2, state.element3, state.element4).catch(() => {\n this.log.debug(\"error while getting \" + state.url);\n });\n });\n })\n .catch(() => {\n this.log.error(\"status update Failed\");\n });\n })\n .catch(() => {\n this.log.error(\"Error getting home region\");\n });\n }\n });\n }\n\n this.updateInterval = setInterval(() => {\n if (this.config.type === \"go\") {\n this.getVehicles();\n return;\n } else if (this.config.type === \"id\") {\n this.vinArray.forEach((vin) => {\n this.getIdStatus(vin).catch(() => {\n this.log.error(\"get id status Failed\");\n this.refreshIDToken().catch(() => {});\n });\n this.getWcData();\n });\n return;\n } else {\n this.vinArray.forEach((vin) => {\n this.statesArray.forEach((state) => {\n this.getVehicleStatus(vin, state.url, state.path, state.element, state.element2).catch(() => {\n this.log.debug(\"error while getting \" + state.url);\n });\n });\n });\n }\n }, this.config.interval * 60 * 1000);\n\n if (this.config.forceinterval > 0) {\n this.fupdateInterval = setInterval(() => {\n if (this.config.type === \"go\") {\n this.getVehicles();\n return;\n }\n this.vinArray.forEach((vin) => {\n this.requestStatusUpdate(vin).catch(() => {\n this.log.error(\"force status update Failed\");\n });\n });\n }, this.config.forceinterval * 60 * 1000);\n }\n })\n .catch(() => {\n this.log.error(\"Get Vehicles Failed\");\n });\n })\n .catch(() => {\n this.log.error(\"get personal data Failed\");\n });\n })\n .catch(() => {\n this.log.error(\"Login Failed\");\n });\n this.subscribeStates(\"*\");\n }", "started () {}", "loadComponent(nodeURI, baseURI, callback_async /* nodeDescriptor */, errback_async /* errorMessage */) { // TODO: turn this into a generic xhr loader exposed as a kernel function?\n\n let self = this;\n\n if (nodeURI == self.kutility.protoNodeURI) {\n\n callback_async(self.kutility.protoNodeDescriptor);\n\n } else if (nodeURI.match(RegExp(\"^data:application/json;base64,\"))) {\n\n // Primarly for testing, parse one specific form of data URIs. We need to parse\n // these ourselves since Chrome can't load data URIs due to cross origin\n // restrictions.\n\n callback_async(JSON.parse(atob(nodeURI.substring(29)))); // TODO: support all data URIs\n\n } else {\n\n self.virtualTime.suspend(\"while loading \" + nodeURI); // suspend the queue\n\n let fetchUrl = self.remappedURI(nodeURI, baseURI);\n let dbName = fetchUrl.split(\".\").join(\"_\");\n\n const parseComp = function (f) {\n\n let result = JSON.parse(f);\n\n let nativeObject = result;\n // console.log(nativeObject);\n\n if (nativeObject) {\n callback_async(nativeObject);\n self.virtualTime.resume(\"after loading \" + nodeURI); // resume the queue; may invoke dispatch(), so call last before returning to the host\n\n } else {\n\n self.logger.warnx(\"loadComponent\", \"error loading\", nodeURI + \":\", error);\n errback_async(error);\n self.virtualTime.resume(\"after loading \" + nodeURI); // resume the queue; may invoke dispatch(), so call last before returning to the host\n }\n\n }\n\n\n //var fileName = \"\";\n // let userDB = _LCSDB.user(_LCS_WORLD_USER.pub); \n if (dbName.includes(\"proxy\")) {\n //userDB = await window._LCS_SYS_USER.get('proxy').then();\n let proxyDB = self.proxy ? _LCSDB.user(self.proxy) : _LCSDB.user(_LCS_WORLD_USER.pub);\n let fileName = dbName + '_json';\n let dbNode = proxyDB.get('proxy').get(fileName);\n let nodeProm = new Promise(res => dbNode.once(res));\n\n nodeProm.then(comp => {\n parseComp(comp);\n })\n\n // (function(r){\n // //console.log(r);\n // parseComp(r);\n\n // });\n\n } else {\n var worldName = dbName.split('/')[1];\n var fileName = dbName.split('/')[2];\n //+ '_json';\n\n if (!fileName) {\n worldName = self.helpers.appPath\n fileName = dbName + '_json';\n } else {\n fileName = fileName + '_json';\n }\n\n let dbNode = _LCSDB.user(_LCS_WORLD_USER.pub).get('worlds').path(worldName).get(fileName);\n\n let nodeProm = new Promise(res => dbNode.once(res))\n nodeProm.then(comp => {\n parseComp(comp);\n })\n\n // (function(r){\n // //console.log(r);\n // parseComp(r);\n\n // });\n }\n\n //console.log(source);\n\n //userDB.get(fileName).once(async function(res) {\n\n\n\n\n // }, {wait: 1000})\n }\n\n }", "_specializedInitialisation()\r\n\t{\r\n\t\tLogger.log(\"Specialisation for service AVTransport\", LogType.Info);\r\n\t\tvar relativeTime = this.getVariableByName(\"RelativeTimePosition\");\r\n\t\t//Implémentation pour OpenHome\r\n\t\tif (!relativeTime)\r\n\t\t\trelativeTime = this.getVariableByName(\"A_ARG_TYPE_GetPositionInfo_RelTime\");\r\n\t\tvar transportState = this.getVariableByName(\"TransportState\");\r\n\t\t//Implémentation pour OpenHome\r\n\t\tif (!transportState)\r\n\t\t\ttransportState = this.getVariableByName(\"A_ARG_TYPE_GetTransportInfo_CurrentTransportState\");\r\n\r\n\t\tif (transportState)\r\n\t\t{\r\n\t\t\ttransportState.on('updated', (variable, newVal) =>\r\n\t\t\t{\r\n\t\t\t\tLogger.log(\"On transportStateUpdate : \" + newVal, LogType.DEBUG);\r\n\t\t\t\tvar actPosInfo = this.getActionByName(\"GetPositionInfo\");\r\n\t\t\t\tvar actMediaInfo = this.getActionByName(\"GetMediaInfo\");\r\n\t\t\t\t/*\r\n\t\t\t\t“STOPPED” R\r\n\t\t\t\t“PLAYING” R\r\n\t\t\t\t“TRANSITIONING” O\r\n\t\t\t\t”PAUSED_PLAYBACK” O\r\n\t\t\t\t“PAUSED_RECORDING” O\r\n\t\t\t\t“RECORDING” O\r\n\t\t\t\t“NO_MEDIA_PRESENT”\r\n\t\t\t\t */\r\n\t\t\t\tif (relativeTime && !relativeTime.SendEvent && actPosInfo)\r\n\t\t\t\t{\r\n\t\t\t\t\tif (this._intervalUpdateRelativeTime)\r\n\t\t\t\t\t\tclearInterval(this._intervalUpdateRelativeTime);\r\n\t\t\t\t\tif (newVal == \"PLAYING\" || newVal == \"RECORDING\")\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tactPosInfo.execute(\t{\tInstanceID: 0\t} );\r\n\t\t\t\t\t\t//Déclenche la maj toutes les 4 secondes\r\n\t\t\t\t\t\tthis._intervalUpdateRelativeTime = setInterval(() =>{\r\n\t\t\t\t\t\t\t\t//Logger.log(\"On autoUpdate\", LogType.DEBUG);\r\n\t\t\t\t\t\t\t\tactPosInfo.execute(\t{\tInstanceID: 0\t}\t);\r\n\t\t\t\t\t\t\t}, 4000);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//else if (newVal == \"STOPPED\" || newVal == \"PAUSED_PLAYBACK\" || newVal == \"PAUSED_RECORDING\" || newVal == \"NO_MEDIA_PRESENT\")\r\n\t\t\t\t//{\r\n\t\t\t\t//\r\n\t\t\t\t//}\r\n\t\t\t\t//On met a jour les media info et position info pour etre sur de mettre a jour les Metadata(par defaut la freebox ne le fait pas ou plutot le fait mal)\r\n\t\t\t\tif (newVal == \"TRANSITIONING\")\r\n\t\t\t\t{\r\n\t\t\t\t\tif (actPosInfo)\r\n\t\t\t\t\t\tactPosInfo.execute(\t{InstanceID: 0}\t);\r\n\t\t\t\t\tif (actMediaInfo)\r\n\t\t\t\t\t\tactMediaInfo.execute(\t{InstanceID: 0} );\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (newVal == \"STOPPED\")\r\n\t\t\t\t{\r\n\t\t\t\t\tif (actPosInfo)\r\n\t\t\t\t\t\tactPosInfo.execute(\t{\tInstanceID: 0\t});\r\n\t\t\t\t\tif (actMediaInfo)\r\n\t\t\t\t\t\tactMediaInfo.execute(\t{\tInstanceID: 0 });\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t);\r\n\t\t}\r\n\t}", "async onReady() {\n // Initialize your adapter here\n await this.setObjectNotExistsAsync('speed', {\n type: 'channel',\n common: {\n name: 'speed'\n },\n native: {},\n });\n await this.setObjectNotExistsAsync('speed.download', {\n type: 'state',\n common: {\n name: 'download',\n role: 'info.status',\n type: 'number',\n desc: 'Download speed',\n def: 0,\n read: true,\n write: false,\n unit: 'Mbit/s',\n },\n native: {},\n });\n await this.setObjectNotExistsAsync('speed.upload', {\n type: 'state',\n common: {\n name: 'upload',\n role: 'info.status',\n type: 'number',\n desc: 'Upload speed',\n def: 0,\n read: true,\n write: false,\n unit: 'Mbit/s',\n },\n native: {},\n });\n await this.setObjectNotExistsAsync('speed.ping', {\n type: 'state',\n common: {\n name: 'ping',\n role: 'info.status',\n type: 'number',\n desc: 'Ping Latency',\n def: 0,\n read: true,\n write: false,\n unit: 'ms',\n },\n native: {},\n });\n await this.setObjectNotExistsAsync('speed.progress', {\n type: 'state',\n common: {\n name: 'progress',\n role: 'info.status',\n type: 'number',\n desc: 'Progress',\n def: 0,\n read: true,\n write: false,\n unit: '%',\n },\n native: {},\n });\n await this.setObjectNotExistsAsync('speed.speedcheck', {\n type: 'state',\n common: {\n name: 'Run speed test',\n type: 'boolean',\n read: true,\n role: 'button',\n write: true,\n def: false\n },\n native: {},\n });\n await this.setObjectNotExistsAsync('progress', {\n type: 'channel',\n common: {\n name: 'speed'\n },\n native: {},\n });\n await this.setObjectNotExistsAsync('progress.download', {\n type: 'state',\n common: {\n name: 'download',\n role: 'info.status',\n type: 'number',\n desc: 'Download speed',\n def: 0,\n read: true,\n write: false,\n unit: 'Mbit/s',\n },\n native: {},\n });\n await this.setObjectNotExistsAsync('progress.upload', {\n type: 'state',\n common: {\n name: 'upload',\n role: 'info.status',\n type: 'number',\n desc: 'Upload speed',\n def: 0,\n read: true,\n write: false,\n unit: 'Mbit/s',\n },\n native: {},\n });\n await this.setObjectNotExistsAsync('progress.ping', {\n type: 'state',\n common: {\n name: 'ping',\n role: 'info.status',\n type: 'number',\n desc: 'Ping Latency',\n def: 0,\n read: true,\n write: false,\n unit: 'ms',\n },\n native: {},\n });\n await this.setObjectNotExistsAsync('progress.progress', {\n type: 'state',\n common: {\n name: 'progress',\n role: 'info.status',\n type: 'number',\n desc: 'Progress',\n def: 0,\n read: true,\n write: false,\n unit: '%',\n },\n native: {},\n });\n await this.setObjectNotExistsAsync('progress.speedcheck', {\n type: 'state',\n common: {\n name: 'Run speed test',\n type: 'boolean',\n read: true,\n role: 'button',\n write: true,\n def: false\n },\n native: {},\n });\n await this.setObjectNotExistsAsync('info', {\n type: 'channel',\n common: {\n name: 'Information'\n },\n native: {},\n });\n await this.setObjectNotExistsAsync('info.externalip', {\n type: 'state',\n common: {\n name: 'External IP',\n role: 'info.status',\n type: 'string',\n desc: 'External IP',\n read: true,\n write: false,\n },\n native: {},\n });\n await this.setObjectNotExistsAsync('info.internalip', {\n type: 'state',\n common: {\n name: 'Internal IP',\n role: 'info.status',\n type: 'string',\n desc: 'Internal IP',\n read: true,\n write: false,\n },\n native: {},\n });\n this.subscribeStates('*');\n await this.setStateAsync('info.connection', { val: true, ack: true });\n // let result = await this.checkPasswordAsync('admin', 'iobroker');\n // this.log.info('check user admin pw iobroker: ' + result);\n // result = await this.checkGroupAsync('admin', 'admin');\n // this.log.info('check group user admin group admin: ' + result);\n if (this.config.polltime > 1) {\n this.log.info('Checking internet speed every ' + this.config.polltime + ' minutes');\n } else {\n this.log.info('Checking internet speed every ' + this.config.polltime + ' minute');\n }\n await this.start(this.config.polltime);\n }", "enqueue() {\n\n }", "started() { }", "onBrowserStart(browser) {\n\n }", "getPort2() {\n return 0;\n }", "requestReceived(request,response){\n if(this.config.log){\n const logData={\n method : request.method,\n url : request.url,\n headers : request.headers\n };\n\n this.config.logFunction(\n logData\n );\n }\n\n let uri = url.parse(request.url);\n uri.protocol='http';\n uri.host=uri.hostname=request.headers.host;\n uri.port=80;\n uri.query=querystring.parse(uri.query);\n\n if(request.connection.encrypted){\n uri.protocol='https';\n uri.port=443;\n }\n\n (\n function(){\n if(!uri.host){\n return;\n }\n const host=uri.host.split(':');\n\n if(!host[1]){\n return;\n }\n uri.host=uri.hostname=host[0];\n uri.port=host[1];\n }\n )();\n\n for(let key in uri){\n if(uri[key]!==null){\n continue;\n }\n uri[key]='';\n }\n\n request.uri=uri;\n\n if(\n this.onRawRequest(\n request,\n response,\n completeServing.bind(this)\n )\n ){\n return;\n };\n\n uri=uri.pathname;\n\n if (uri=='/'){\n uri=`/${this.config.server.index}`;\n }\n\n let hostname= [];\n\n if (request.headers.host !== undefined){\n hostname = request.headers.host.split(':');\n }\n\n let root = this.config.root;\n\n if(this.config.verbose){\n console.log(`${this.config.logID} REQUEST ###\\n\\n`,\n request.headers,'\\n',\n uri,'\\n\\n',\n hostname,'\\n\\n'\n );\n }\n\n if(this.config.domain!='0.0.0.0' && hostname.length > 0 && hostname[0]!=this.config.domain){\n if(!this.config.domains[hostname[0]]){\n if(this.config.verbose){\n console.log(`${this.config.logID} INVALID HOST ###\\n\\n`);\n }\n this.serveFile(hostname[0],false,response);\n return;\n }\n root=this.config.domains[hostname[0]];\n }\n\n\n if(this.config.verbose){\n console.log(`${this.config.logID} USING ROOT : ${root}###\\n\\n`);\n }\n\n if(uri.slice(-1)=='/'){\n uri+=this.config.server.index;\n }\n\n request.url=uri;\n request.serverRoot=root;\n\n request.body='';\n\n request.on(\n 'data',\n function(chunk){\n request.body+=chunk;\n }.bind(this)\n ).on(\n 'end',\n function(){\n if(this.config.verbose){\n console.log(`###REQUEST BODY :\n ${request.body}\n ###\n `);\n }\n\n requestBodyComplete.bind(this,request,response)();\n }.bind(this)\n );\n }", "function OnChannelOpen()\n{\n}", "constructor() {\n throw new Error('Not implemented');\n }", "connect() {\n throw new Error(\n 'The Message Bus is not currently supported in browser environments'\n );\n }", "constructor() {\n this._connectionResolver = new pip_services3_components_node_1.ConnectionResolver();\n this._maxKeySize = 250;\n this._maxExpiration = 2592000;\n this._maxValue = 1048576;\n this._poolSize = 5;\n this._reconnect = 10000;\n this._timeout = 5000;\n this._retries = 5;\n this._failures = 5;\n this._retry = 30000;\n this._remove = false;\n this._idle = 5000;\n this._client = null;\n }", "componentDidMount()\n {\n\n }", "function OfflineStreamProcessor(config) {\n config = config || {};\n var context = this.context;\n var eventBus = config.eventBus;\n var events = config.events;\n var errors = config.errors;\n var debug = config.debug;\n var constants = config.constants;\n var settings = config.settings;\n var dashConstants = config.dashConstants;\n var manifestId = config.id;\n var type = config.type;\n var streamInfo = config.streamInfo;\n var errHandler = config.errHandler;\n var mediaPlayerModel = config.mediaPlayerModel;\n var abrController = config.abrController;\n var playbackController = config.playbackController;\n var adapter = config.adapter;\n var dashMetrics = config.dashMetrics;\n var baseURLController = config.baseURLController;\n var timelineConverter = config.timelineConverter;\n var bitrate = config.bitrate;\n var offlineStoreController = config.offlineStoreController;\n var completedCb = config.callbacks && config.callbacks.completed;\n var progressCb = config.callbacks && config.callbacks.progression;\n var instance, logger, mediaInfo, indexHandler, representationController, fragmentModel, updating, downloadedSegments, isInitialized, segmentsController, isStopped;\n\n function setup() {\n resetInitialSettings();\n logger = debug.getLogger(instance);\n segmentsController = Object(_dash_controllers_SegmentsController__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(context).create({\n events: events,\n eventBus: eventBus,\n streamInfo: streamInfo,\n timelineConverter: timelineConverter,\n dashConstants: dashConstants,\n segmentBaseController: config.segmentBaseController,\n type: type\n });\n indexHandler = Object(_dash_DashHandler__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(context).create({\n streamInfo: streamInfo,\n type: type,\n timelineConverter: timelineConverter,\n dashMetrics: dashMetrics,\n mediaPlayerModel: mediaPlayerModel,\n baseURLController: baseURLController,\n errHandler: errHandler,\n settings: settings,\n // boxParser: boxParser,\n eventBus: eventBus,\n events: events,\n debug: debug,\n requestModifier: Object(_streaming_utils_RequestModifier__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(context).getInstance(),\n dashConstants: dashConstants,\n constants: constants,\n segmentsController: segmentsController,\n urlUtils: Object(_streaming_utils_URLUtils__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(context).getInstance()\n });\n representationController = Object(_dash_controllers_RepresentationController__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(context).create({\n streamInfo: streamInfo,\n type: type,\n abrController: abrController,\n dashMetrics: dashMetrics,\n playbackController: playbackController,\n timelineConverter: timelineConverter,\n dashConstants: dashConstants,\n events: events,\n eventBus: eventBus,\n errors: errors,\n segmentsController: segmentsController\n });\n fragmentModel = Object(_streaming_models_FragmentModel__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(context).create({\n streamInfo: streamInfo,\n dashMetrics: dashMetrics,\n fragmentLoader: Object(_streaming_FragmentLoader__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(context).create({\n dashMetrics: dashMetrics,\n mediaPlayerModel: mediaPlayerModel,\n errHandler: errHandler,\n requestModifier: Object(_streaming_utils_RequestModifier__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(context).getInstance(),\n settings: settings,\n eventBus: eventBus,\n events: events,\n errors: errors,\n constants: constants,\n dashConstants: dashConstants,\n urlUtils: Object(_streaming_utils_URLUtils__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(context).getInstance()\n }),\n debug: debug,\n eventBus: eventBus,\n events: events\n });\n eventBus.on(events.STREAM_REQUESTING_COMPLETED, onStreamRequestingCompleted, instance);\n eventBus.on(events.FRAGMENT_LOADING_COMPLETED, onFragmentLoadingCompleted, instance);\n }\n\n function initialize(_mediaInfo) {\n mediaInfo = _mediaInfo;\n indexHandler.initialize(false);\n updateRepresentation(mediaInfo);\n }\n\n function isInitRequest(request) {\n return request.type === 'InitializationSegment';\n }\n\n function onFragmentLoadingCompleted(e) {\n if (e.sender !== fragmentModel) {\n return;\n }\n\n if (e.request !== null) {\n var isInit = isInitRequest(e.request);\n var suffix = isInit ? 'init' : e.request.index;\n var fragmentName = e.request.representationId + '_' + suffix;\n offlineStoreController.storeFragment(manifestId, fragmentName, e.response).then(function () {\n if (!isInit) {\n // store current index and downloadedSegments number\n offlineStoreController.setRepresentationCurrentState(manifestId, e.request.representationId, {\n index: e.request.index,\n downloaded: downloadedSegments\n });\n }\n });\n }\n\n if (e.error && e.request.serviceLocation && !isStopped) {\n fragmentModel.executeRequest(e.request);\n } else {\n downloadedSegments++;\n download();\n }\n }\n\n function onStreamRequestingCompleted(e) {\n if (e.fragmentModel !== fragmentModel) {\n return;\n }\n\n logger.info(\"[\".concat(manifestId, \"] Stream is complete\"));\n stop();\n completedCb();\n }\n\n function getRepresentationController() {\n return representationController;\n }\n\n function getRepresentationId() {\n return representationController.getCurrentRepresentation().id;\n }\n /**\n * Stops download of fragments\n * @memberof OfflineStreamProcessor#\n */\n\n\n function stop() {\n if (isStopped) {\n return;\n }\n\n isStopped = true;\n }\n\n function removeExecutedRequestsBeforeTime(time) {\n if (fragmentModel) {\n fragmentModel.removeExecutedRequestsBeforeTime(time);\n }\n }\n /**\n * Execute init request for the represenation\n * @memberof OfflineStreamProcessor#\n */\n\n\n function getInitRequest() {\n if (!representationController.getCurrentRepresentation()) {\n return null;\n }\n\n return indexHandler.getInitRequest(getMediaInfo(), representationController.getCurrentRepresentation());\n }\n /**\n * Get next request\n * @memberof OfflineStreamProcessor#\n */\n\n\n function getNextRequest() {\n return indexHandler.getNextSegmentRequest(getMediaInfo(), representationController.getCurrentRepresentation());\n }\n /**\n * Start download\n * @memberof OfflineStreamProcessor#\n */\n\n\n function start() {\n if (representationController) {\n if (!representationController.getCurrentRepresentation()) {\n throw new Error('Start denied to OfflineStreamProcessor');\n }\n\n isStopped = false;\n offlineStoreController.getRepresentationCurrentState(manifestId, representationController.getCurrentRepresentation().id).then(function (state) {\n if (state) {\n indexHandler.setCurrentIndex(state.index);\n downloadedSegments = state.downloaded;\n }\n\n download();\n })[\"catch\"](function () {\n // start from beginining\n download();\n });\n }\n }\n /**\n * Performs download of fragment according to type\n * @memberof OfflineStreamProcessor#\n */\n\n\n function download() {\n if (isStopped) {\n return;\n }\n\n if (isNaN(representationController.getCurrentRepresentation())) {\n var request = null;\n\n if (!isInitialized) {\n request = getInitRequest();\n isInitialized = true;\n } else {\n request = getNextRequest(); // update progression : done here because availableSegmentsNumber is done in getNextRequest from dash handler\n\n updateProgression();\n }\n\n if (request) {\n logger.info(\"[\".concat(manifestId, \"] download request : \").concat(request.url));\n fragmentModel.executeRequest(request);\n } else {\n logger.info(\"[\".concat(manifestId, \"] no request to be downloaded\"));\n }\n }\n }\n /**\n * Update representation\n * @param {Object} mediaInfo - mediaInfo\n * @memberof OfflineStreamProcessor#\n */\n\n\n function updateRepresentation(mediaInfo) {\n updating = true;\n var voRepresentations = adapter.getVoRepresentations(mediaInfo); // get representation VO according to id.\n\n var quality = voRepresentations.findIndex(function (representation) {\n return representation.id === bitrate.id;\n });\n\n if (type !== constants.VIDEO && type !== constants.AUDIO && type !== constants.TEXT) {\n updating = false;\n return;\n }\n\n representationController.updateData(null, voRepresentations, type, mediaInfo.isFragmented, quality);\n }\n\n function isUpdating() {\n return updating;\n }\n\n function getType() {\n return type;\n }\n\n function getMediaInfo() {\n return mediaInfo;\n }\n\n function getAvailableSegmentsNumber() {\n return representationController.getCurrentRepresentation().availableSegmentsNumber + 1; // do not forget init segment\n }\n\n function updateProgression() {\n if (progressCb) {\n progressCb(instance, downloadedSegments, getAvailableSegmentsNumber());\n }\n }\n\n function resetInitialSettings() {\n isInitialized = false;\n downloadedSegments = 0;\n updating = false;\n }\n /**\n * Reset\n * @memberof OfflineStreamProcessor#\n */\n\n\n function reset() {\n resetInitialSettings();\n indexHandler.reset();\n eventBus.off(events.STREAM_REQUESTING_COMPLETED, onStreamRequestingCompleted, instance);\n eventBus.off(events.FRAGMENT_LOADING_COMPLETED, onFragmentLoadingCompleted, instance);\n }\n\n instance = {\n initialize: initialize,\n getMediaInfo: getMediaInfo,\n getRepresentationController: getRepresentationController,\n removeExecutedRequestsBeforeTime: removeExecutedRequestsBeforeTime,\n getType: getType,\n getRepresentationId: getRepresentationId,\n isUpdating: isUpdating,\n start: start,\n stop: stop,\n getAvailableSegmentsNumber: getAvailableSegmentsNumber,\n reset: reset\n };\n setup();\n return instance;\n}", "constructor() {\r\n }", "constructor() {\n\t\t// ...\n\t}", "onReady() {\n return __awaiter(this, void 0, void 0, function* () {\n this.logger = new log_1.ioBrokerLogger(this.log);\n yield this.setObjectNotExistsAsync(\"verify_code\", {\n type: \"state\",\n common: {\n name: \"2FA verification code\",\n type: \"number\",\n role: \"state\",\n read: true,\n write: true,\n },\n native: {},\n });\n yield this.setObjectNotExistsAsync(\"info\", {\n type: \"channel\",\n common: {\n name: \"info\"\n },\n native: {},\n });\n yield this.setObjectNotExistsAsync(\"info.connection\", {\n type: \"state\",\n common: {\n name: \"Global connection\",\n type: \"boolean\",\n role: \"indicator.connection\",\n read: true,\n write: false,\n },\n native: {},\n });\n yield this.setStateAsync(\"info.connection\", { val: false, ack: true });\n yield this.setObjectNotExistsAsync(\"info.push_connection\", {\n type: \"state\",\n common: {\n name: \"Push notification connection\",\n type: \"boolean\",\n role: \"indicator.connection\",\n read: true,\n write: false,\n },\n native: {},\n });\n // Remove old states of previous adapter versions\n try {\n const schedule_modes = yield this.getStatesAsync(\"*.schedule_mode\");\n Object.keys(schedule_modes).forEach((id) => __awaiter(this, void 0, void 0, function* () {\n yield this.delObjectAsync(id);\n }));\n }\n catch (error) {\n }\n try {\n const push_notifications = yield this.getStatesAsync(\"push_notification.*\");\n Object.keys(push_notifications).forEach((id) => __awaiter(this, void 0, void 0, function* () {\n yield this.delObjectAsync(id);\n }));\n yield this.delObjectAsync(\"push_notification\");\n }\n catch (error) {\n }\n try {\n const last_camera_url = yield this.getStatesAsync(\"*.last_camera_url\");\n Object.keys(last_camera_url).forEach((id) => __awaiter(this, void 0, void 0, function* () {\n yield this.delObjectAsync(id);\n }));\n }\n catch (error) {\n }\n try {\n const captured_pic_url = yield this.getStatesAsync(\"*.captured_pic_url\");\n Object.keys(captured_pic_url).forEach((id) => __awaiter(this, void 0, void 0, function* () {\n yield this.delObjectAsync(id);\n }));\n }\n catch (error) {\n }\n try {\n const person_identified = yield this.getStatesAsync(\"*.person_identified\");\n Object.keys(person_identified).forEach((id) => __awaiter(this, void 0, void 0, function* () {\n yield this.delObjectAsync(id);\n }));\n }\n catch (error) {\n }\n try {\n const last_captured_pic_url = yield this.getStatesAsync(\"*.last_captured_pic_url\");\n Object.keys(last_captured_pic_url).forEach((id) => __awaiter(this, void 0, void 0, function* () {\n yield this.delObjectAsync(id);\n }));\n }\n catch (error) {\n }\n try {\n const last_captured_pic_html = yield this.getStatesAsync(\"*.last_captured_pic_html\");\n Object.keys(last_captured_pic_html).forEach((id) => __awaiter(this, void 0, void 0, function* () {\n yield this.delObjectAsync(id);\n }));\n }\n catch (error) {\n }\n // End\n // Reset event states if necessary (for example because of an unclean exit)\n yield this.initializeEvents(types_1.CameraStateID.PERSON_DETECTED);\n yield this.initializeEvents(types_1.CameraStateID.MOTION_DETECTED);\n yield this.initializeEvents(types_1.DoorbellStateID.RINGING);\n yield this.initializeEvents(types_1.IndoorCameraStateID.CRYING_DETECTED);\n yield this.initializeEvents(types_1.IndoorCameraStateID.SOUND_DETECTED);\n yield this.initializeEvents(types_1.IndoorCameraStateID.PET_DETECTED);\n try {\n if (fs.statSync(this.persistentFile).isFile()) {\n const fileContent = fs.readFileSync(this.persistentFile, \"utf8\");\n this.persistentData = JSON.parse(fileContent);\n }\n }\n catch (err) {\n this.logger.debug(\"No stored data from last exit found.\");\n }\n //TODO: Temporary Test to be removed!\n /*await this.setObjectNotExistsAsync(\"test_button\", {\n type: \"state\",\n common: {\n name: \"Test button\",\n type: \"boolean\",\n role: \"button\",\n read: false,\n write: true,\n },\n native: {},\n });\n this.subscribeStates(\"test_button\");\n await this.setObjectNotExistsAsync(\"test_button2\", {\n type: \"state\",\n common: {\n name: \"Test button2\",\n type: \"boolean\",\n role: \"button\",\n read: false,\n write: true,\n },\n native: {},\n });\n this.subscribeStates(\"test_button2\");*/\n // END\n this.subscribeStates(\"verify_code\");\n const systemConfig = yield this.getForeignObjectAsync(\"system.config\");\n let countryCode = undefined;\n let languageCode = undefined;\n if (systemConfig) {\n countryCode = i18n_iso_countries_1.getAlpha2Code(systemConfig.common.country, \"en\");\n if (i18n_iso_languages_1.isValid(systemConfig.common.language))\n languageCode = systemConfig.common.language;\n }\n try {\n const adapter_info = yield this.getForeignObjectAsync(`system.adapter.${this.namespace}`);\n if (adapter_info && adapter_info.common && adapter_info.common.version) {\n if (this.persistentData.version !== adapter_info.common.version) {\n const currentVersion = Number.parseFloat(utils_1.removeLastChar(adapter_info.common.version, \".\"));\n const previousVersion = this.persistentData.version !== \"\" && this.persistentData.version !== undefined ? Number.parseFloat(utils_1.removeLastChar(this.persistentData.version, \".\")) : 0;\n this.logger.debug(`Handling of adapter update - currentVersion: ${currentVersion} previousVersion: ${previousVersion}`);\n if (previousVersion < currentVersion) {\n yield utils_1.handleUpdate(this, this.logger, previousVersion);\n this.persistentData.version = adapter_info.common.version;\n this.writePersistentData();\n }\n }\n }\n }\n catch (error) {\n this.logger.error(`Handling of adapter update - Error:`, error);\n }\n this.eufy = new EufySecurityAPI.EufySecurity(this, this.logger, countryCode, languageCode);\n this.eufy.on(\"stations\", (stations) => this.handleStations(stations));\n this.eufy.on(\"devices\", (devices) => this.handleDevices(devices));\n this.eufy.on(\"push message\", (messages) => this.handlePushNotification(messages));\n this.eufy.on(\"connect\", () => this.onConnect());\n this.eufy.on(\"close\", () => this.onClose());\n this.eufy.on(\"livestream start\", (station, device, url) => this.onStartLivestream(station, device, url));\n this.eufy.on(\"livestream stop\", (station, device) => this.onStopLivestream(station, device));\n this.eufy.on(\"push connect\", () => this.onPushConnect());\n this.eufy.on(\"push close\", () => this.onPushClose());\n const api = this.eufy.getApi();\n if (this.persistentData.api_base && this.persistentData.api_base != \"\") {\n this.logger.debug(`Load previous api_base: ${this.persistentData.api_base}`);\n api.setAPIBase(this.persistentData.api_base);\n }\n if (this.persistentData.login_hash && this.persistentData.login_hash != \"\") {\n this.logger.debug(`Load previous login_hash: ${this.persistentData.login_hash}`);\n if (utils_1.md5(`${this.config.username}:${this.config.password}`) != this.persistentData.login_hash) {\n this.logger.info(`Authentication properties changed, invalidate saved cloud token.`);\n this.persistentData.cloud_token = \"\";\n this.persistentData.cloud_token_expiration = 0;\n this.persistentData.api_base = \"\";\n }\n }\n else {\n this.persistentData.cloud_token = \"\";\n this.persistentData.cloud_token_expiration = 0;\n }\n if (this.persistentData.cloud_token && this.persistentData.cloud_token != \"\") {\n this.logger.debug(`Load previous token: ${this.persistentData.cloud_token} token_expiration: ${this.persistentData.cloud_token_expiration}`);\n api.setToken(this.persistentData.cloud_token);\n api.setTokenExpiration(new Date(this.persistentData.cloud_token_expiration));\n }\n if (!this.persistentData.openudid || this.persistentData.openudid == \"\") {\n this.persistentData.openudid = utils_1.generateUDID();\n this.logger.debug(`Generated new openudid: ${this.persistentData.openudid}`);\n }\n api.setOpenUDID(this.persistentData.openudid);\n if (!this.persistentData.serial_number || this.persistentData.serial_number == \"\") {\n this.persistentData.serial_number = utils_1.generateSerialnumber(12);\n this.logger.debug(`Generated new serial_number: ${this.persistentData.serial_number}`);\n }\n api.setSerialNumber(this.persistentData.serial_number);\n yield this.eufy.logon();\n });\n }", "static get STATUS() {\n return 0;\n }", "_recordingCompatibility() {\n // Detect audio recording capabilities.\n // http://caniuse.com/#feat=stream\n // https://developer.mozilla.org/en-US/docs/Web/API/Navigator.getUserMedia\n navigator.getUserMedia = (navigator.getUserMedia ||\n navigator.webkitGetUserMedia ||\n navigator.mozGetUserMedia ||\n navigator.msGetUserMedia);\n this.canGetUserMedia = Boolean(navigator.getUserMedia);\n console.log('Native deprecated navigator.getUserMedia API capability: ' +\n this.canGetUserMedia);\n\n // https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/mediaDevices.getUserMedia\n this.canMediaDevicesGetUserMedia = false;\n if (navigator.mediaDevices) {\n navigator.mediaDevices.getUserMedia = navigator.mediaDevices.getUserMedia || navigator.mediaDevices.webkitGetUserMedia || navigator.mediaDevices.mozGetUserMedia;\n this.canMediaDevicesGetUserMedia = Boolean(navigator.mediaDevices.getUserMedia);\n }\n console.log('Native navigator.mediaDevices.getUserMedia API capability:',\n this.canMediaDevicesGetUserMedia);\n\n // Detect MediaStream Recording\n // It allows recording audio using the MediaStream from the above\n // getUserMedia directly with a native codec better than Wave.\n // http://www.w3.org/TR/mediastream-recording/\n this.canUseMediaRecorder = Boolean(window.MediaRecorder);\n console.log('Native MediaRecorder recording capability: ' +\n this.canUseMediaRecorder);\n\n // Web Audio API\n // High-level JavaScript API for processing and synthesizing audio\n // http://caniuse.com/#feat=audio-api\n window.AudioContext = window.AudioContext ||\n window.webkitAudioContext || window.mozAudioContext;\n var canCreateAudioContext = Boolean(window.AudioContext);\n console.log('Native Web Audio API (AudioContext) processing capability: ' +\n canCreateAudioContext);\n\n // Detect Cordova Media Recording\n // It allows recording audio using the native bridge inside WebView Apps.\n // Note that it may also require native playback when codecs were used for\n // recording that are not yet supported in the WebView.\n // https://github.com/apache/cordova-plugin-media/blob/master/doc/index.md\n this.canUseCordovaMedia = Boolean(window.Media);\n console.log('Cordova Media recording capability: ' +\n this.canUseCordovaMedia);\n\n if (!(this.canGetUserMedia || this.canUseCordovaMedia)) {\n throw new Error(\n 'Some form of audio recording capability is required');\n }\n\n window.URL = (window.URL || window.webkitURL);\n var hasWindowURL = Boolean(window.URL);\n console.log('Native window.URL capability: ' +\n hasWindowURL);\n if (!hasWindowURL) {\n throw new Error(\n 'No window.URL blob conversion capabilities');\n }\n }" ]
[ "0.47163445", "0.46584114", "0.45273763", "0.45036152", "0.448429", "0.44346538", "0.43841133", "0.4362977", "0.4333602", "0.43013042", "0.42535996", "0.42417178", "0.42218232", "0.42189214", "0.41818306", "0.41804415", "0.4179575", "0.41772082", "0.41758674", "0.41746357", "0.41729844", "0.41645744", "0.41409218", "0.41409218", "0.41248086", "0.4119414", "0.4119171", "0.41116208", "0.41086638", "0.4108044", "0.41061", "0.41053793", "0.4102025", "0.41017646", "0.41016397", "0.40947947", "0.40918016", "0.40808365", "0.40797257", "0.40781054", "0.4077613", "0.40756986", "0.40750656", "0.40738243", "0.40694946", "0.40600455", "0.40542144", "0.4053162", "0.40487152", "0.40486646", "0.40476045", "0.40436408", "0.40428442", "0.40415418", "0.40402153", "0.40385923", "0.40334603", "0.40256238", "0.4020882", "0.4018672", "0.40179121", "0.40143794", "0.4013364", "0.4012688", "0.40110162", "0.4010018", "0.40062585", "0.40060434", "0.40060434", "0.40040717", "0.3991394", "0.39912733", "0.3990626", "0.39878824", "0.39843145", "0.39805657", "0.39803058", "0.39801094", "0.39801094", "0.39801094", "0.39764443", "0.3976021", "0.3975312", "0.39746568", "0.39738244", "0.3973245", "0.39689064", "0.39649746", "0.3960977", "0.39609686", "0.39590856", "0.3957125", "0.39569685", "0.39549816", "0.39504528", "0.3946225", "0.39447936", "0.39438543", "0.39406016", "0.39402705", "0.3938285" ]
0.0
-1
performance in scenarios of large amount text.
function renderPlainText(hostEl, ctx, text, style, rect, prevEl) { 'use strict'; var needDrawBg = needDrawBackground(style); var prevStyle; var checkCache = false; var cachedByMe = ctx.__attrCachedBy === ContextCachedBy.PLAIN_TEXT; // Only take and check cache for `Text` el, but not RectText. if (prevEl !== WILL_BE_RESTORED) { if (prevEl) { prevStyle = prevEl.style; checkCache = !needDrawBg && cachedByMe && prevStyle; } // Prevent from using cache in `Style::bind`, because of the case: // ctx property is modified by other properties than `Style::bind` // used, and Style::bind is called next. ctx.__attrCachedBy = needDrawBg ? ContextCachedBy.NONE : ContextCachedBy.PLAIN_TEXT; } // Since this will be restored, prevent from using these props to check cache in the next // entering of this method. But do not need to clear other cache like `Style::bind`. else if (cachedByMe) { ctx.__attrCachedBy = ContextCachedBy.NONE; } var styleFont = style.font || DEFAULT_FONT; // PENDING // Only `Text` el set `font` and keep it (`RectText` will restore). So theoretically // we can make font cache on ctx, which can cache for text el that are discontinuous. // But layer save/restore needed to be considered. // if (styleFont !== ctx.__fontCache) { // ctx.font = styleFont; // if (prevEl !== WILL_BE_RESTORED) { // ctx.__fontCache = styleFont; // } // } if (!checkCache || styleFont !== (prevStyle.font || DEFAULT_FONT)) { ctx.font = styleFont; } // Use the final font from context-2d, because the final // font might not be the style.font when it is illegal. // But get `ctx.font` might be time consuming. var computedFont = hostEl.__computedFont; if (hostEl.__styleFont !== styleFont) { hostEl.__styleFont = styleFont; computedFont = hostEl.__computedFont = ctx.font; } var textPadding = style.textPadding; var textLineHeight = style.textLineHeight; var contentBlock = hostEl.__textCotentBlock; if (!contentBlock || hostEl.__dirtyText) { contentBlock = hostEl.__textCotentBlock = textContain.parsePlainText(text, computedFont, textPadding, textLineHeight, style.truncate); } var outerHeight = contentBlock.outerHeight; var textLines = contentBlock.lines; var lineHeight = contentBlock.lineHeight; var boxPos = getBoxPosition(_tmpBoxPositionResult, hostEl, style, rect); var baseX = boxPos.baseX; var baseY = boxPos.baseY; var textAlign = boxPos.textAlign || 'left'; var textVerticalAlign = boxPos.textVerticalAlign; // Origin of textRotation should be the base point of text drawing. applyTextRotation(ctx, style, rect, baseX, baseY); var boxY = textContain.adjustTextY(baseY, outerHeight, textVerticalAlign); var textX = baseX; var textY = boxY; if (needDrawBg || textPadding) { // Consider performance, do not call getTextWidth util necessary. var textWidth = textContain.getWidth(text, computedFont); var outerWidth = textWidth; textPadding && (outerWidth += textPadding[1] + textPadding[3]); var boxX = textContain.adjustTextX(baseX, outerWidth, textAlign); needDrawBg && drawBackground(hostEl, ctx, style, boxX, boxY, outerWidth, outerHeight); if (textPadding) { textX = getTextXForPadding(baseX, textAlign, textPadding); textY += textPadding[0]; } } // Always set textAlign and textBase line, because it is difficute to calculate // textAlign from prevEl, and we dont sure whether textAlign will be reset if // font set happened. ctx.textAlign = textAlign; // Force baseline to be "middle". Otherwise, if using "top", the // text will offset downward a little bit in font "Microsoft YaHei". ctx.textBaseline = 'middle'; // Set text opacity ctx.globalAlpha = style.opacity || 1; // Always set shadowBlur and shadowOffset to avoid leak from displayable. for (var i = 0; i < SHADOW_STYLE_COMMON_PROPS.length; i++) { var propItem = SHADOW_STYLE_COMMON_PROPS[i]; var styleProp = propItem[0]; var ctxProp = propItem[1]; var val = style[styleProp]; if (!checkCache || val !== prevStyle[styleProp]) { ctx[ctxProp] = fixShadow(ctx, ctxProp, val || propItem[2]); } } // `textBaseline` is set as 'middle'. textY += lineHeight / 2; var textStrokeWidth = style.textStrokeWidth; var textStrokeWidthPrev = checkCache ? prevStyle.textStrokeWidth : null; var strokeWidthChanged = !checkCache || textStrokeWidth !== textStrokeWidthPrev; var strokeChanged = !checkCache || strokeWidthChanged || style.textStroke !== prevStyle.textStroke; var textStroke = getStroke(style.textStroke, textStrokeWidth); var textFill = getFill(style.textFill); if (textStroke) { if (strokeWidthChanged) { ctx.lineWidth = textStrokeWidth; } if (strokeChanged) { ctx.strokeStyle = textStroke; } } if (textFill) { if (!checkCache || style.textFill !== prevStyle.textFill) { ctx.fillStyle = textFill; } } // Optimize simply, in most cases only one line exists. if (textLines.length === 1) { // Fill after stroke so the outline will not cover the main part. textStroke && ctx.strokeText(textLines[0], textX, textY); textFill && ctx.fillText(textLines[0], textX, textY); } else { for (var i = 0; i < textLines.length; i++) { // Fill after stroke so the outline will not cover the main part. textStroke && ctx.strokeText(textLines[i], textX, textY); textFill && ctx.fillText(textLines[i], textX, textY); textY += lineHeight; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "analyze(text) {\n this.text = this.purify(text);\n this.index = 0;\n this.list = [];\n this.buffer = \"\";\n\n while (this.index < this.text.length) {\n this.state.transference(this.index, true);\n }\n return this.list;\n }", "_drawSourceText(text) {\n let context = this.getContext();\n context.font = COMPARE_TEXT_FONT;\n\n let yPos = this.cellSize - 25;\n let xPos;\n let textSize;\n for (let i = 0; i < text.length; i++) {\n textSize = context.measureText(text.charAt(i));\n xPos = (this.cellSize * (i + 2)) - Math.round(textSize.width / 2);\n context.fillText(text.charAt(i), xPos, yPos);\n }\n }", "function FsDb_GetLorem(size) {\n var lorem = \"Lorem ipsum dolor sit amet, at mei habemus nostrum scriptorem, dictas repudiare nec at, an his duis omittam. Ne hinc ornatus sententiae qui, quot necessitatibus ut vel. In vocent prompta voluptua mea, an duo agam definitionem. An diam habeo decore his, delenit lobortis ea vis.\\\nVix ea ponderum voluptaria. Ius fuisset lucilius indoctum ea. Vix ex debitis tractatos intellegam. Pro tation veritus recteque at, mel inani voluptua id. Perpetua omittantur ea pro, ex vidit utroque propriae has. Et accusamus deseruisse voluptatibus vel. An qui graece doming definiebas.\\\nErat adipisci salutatus vim eu, nam gloriatur moderatius in. Aperiri noluisse ad qui, eius fabellas repudiandae ne has. Ne pro ferri eirmod, ex altera eripuit mei. Ea odio solet necessitatibus vim, at velit augue duo. Et qui ridens assueverit, soluta principes conclusionemque in sit.\\\nAt augue utinam iuvaret pro, posse qualisque id per, no erat viris aliquid eam. Sed et inermis verterem repudiandae. No his ubique gloriatur. Inani causae ad sit, ex cum mucius causae conceptam, cum consul comprehensam no. Eu sea inimicus evertitur.\\\nMalorum ancillae no mel, intellegam consectetuer nec te. Mei cu modo molestiae hendrerit, ut torquatos suscipiantur usu. Pri cetero prompta vituperatoribus id, dicam meliore ex vim. Eu vix eros illud munere, cu vis laoreet appetere.\";\n\n return GetRandomPieceOfText(lorem, size);\n}", "function read(txt){\n\t\n //this part is going to be sweet because I have to separate the txt string into chunks of 100 chars in order for the google tts service\n //to provide me with texts longer than 100 chars translated to voice.\n play_sound(\"http://translate.google.com/translate_tts?ie=UTF-8&q=\"+encodeURI(txt)+\"&tl=\"+languages[language]+\"&total=1&idx=0prev=input\"); \n}", "updateText()\n {\n const data = BitmapText.fonts[this._font.name];\n const scale = this._font.size / data.size;\n const pos = new core.Point();\n const chars = [];\n const lineWidths = [];\n\n let prevCharCode = null;\n let lastLineWidth = 0;\n let maxLineWidth = 0;\n let line = 0;\n let lastSpace = -1;\n let lastSpaceWidth = 0;\n let maxLineHeight = 0;\n\n for (let i = 0; i < this.text.length; i++)\n {\n const charCode = this.text.charCodeAt(i);\n\n if (/(\\s)/.test(this.text.charAt(i)))\n {\n lastSpace = i;\n lastSpaceWidth = lastLineWidth;\n }\n\n if (/(?:\\r\\n|\\r|\\n)/.test(this.text.charAt(i)))\n {\n lineWidths.push(lastLineWidth);\n maxLineWidth = Math.max(maxLineWidth, lastLineWidth);\n line++;\n\n pos.x = 0;\n pos.y += data.lineHeight;\n prevCharCode = null;\n continue;\n }\n\n if (lastSpace !== -1 && this.maxWidth > 0 && pos.x * scale > this.maxWidth)\n {\n core.utils.removeItems(chars, lastSpace, i - lastSpace);\n i = lastSpace;\n lastSpace = -1;\n\n lineWidths.push(lastSpaceWidth);\n maxLineWidth = Math.max(maxLineWidth, lastSpaceWidth);\n line++;\n\n pos.x = 0;\n pos.y += data.lineHeight;\n prevCharCode = null;\n continue;\n }\n\n const charData = data.chars[charCode];\n\n if (!charData)\n {\n continue;\n }\n\n if (prevCharCode && charData.kerning[prevCharCode])\n {\n pos.x += charData.kerning[prevCharCode];\n }\n\n chars.push({\n texture: charData.texture,\n line,\n charCode,\n position: new core.Point(pos.x + charData.xOffset, pos.y + charData.yOffset),\n });\n lastLineWidth = pos.x + (charData.texture.width + charData.xOffset);\n pos.x += charData.xAdvance;\n maxLineHeight = Math.max(maxLineHeight, (charData.yOffset + charData.texture.height));\n prevCharCode = charCode;\n }\n\n lineWidths.push(lastLineWidth);\n maxLineWidth = Math.max(maxLineWidth, lastLineWidth);\n\n const lineAlignOffsets = [];\n\n for (let i = 0; i <= line; i++)\n {\n let alignOffset = 0;\n\n if (this._font.align === 'right')\n {\n alignOffset = maxLineWidth - lineWidths[i];\n }\n else if (this._font.align === 'center')\n {\n alignOffset = (maxLineWidth - lineWidths[i]) / 2;\n }\n\n lineAlignOffsets.push(alignOffset);\n }\n\n const lenChars = chars.length;\n const tint = this.tint;\n\n for (let i = 0; i < lenChars; i++)\n {\n let c = this._glyphs[i]; // get the next glyph sprite\n\n if (c)\n {\n c.texture = chars[i].texture;\n }\n else\n {\n c = new core.Sprite(chars[i].texture);\n this._glyphs.push(c);\n }\n\n c.position.x = (chars[i].position.x + lineAlignOffsets[chars[i].line]) * scale;\n c.position.y = chars[i].position.y * scale;\n c.scale.x = c.scale.y = scale;\n c.tint = tint;\n\n if (!c.parent)\n {\n this.addChild(c);\n }\n }\n\n // remove unnecessary children.\n for (let i = lenChars; i < this._glyphs.length; ++i)\n {\n this.removeChild(this._glyphs[i]);\n }\n\n this.textWidth = maxLineWidth * scale;\n this.textHeight = (pos.y + data.lineHeight) * scale;\n\n // apply anchor\n if (this.anchor.x !== 0 || this.anchor.y !== 0)\n {\n for (let i = 0; i < lenChars; i++)\n {\n this._glyphs[i].x -= this.textWidth * this.anchor.x;\n this._glyphs[i].y -= this.textHeight * this.anchor.y;\n }\n }\n this.maxLineHeight = maxLineHeight * scale;\n }", "_p() {\n // s = strings\n this._s = [];\n this._d = false;\n let context = this.context;\n\n context.font = this.font;\n\n if (!this._s.length && this._fw) {\n let parts = this.text.split(' ');\n let start = 0;\n let i = 2;\n\n // split the string into lines that all fit within the fixed width\n for (; i <= parts.length; i++) {\n let str = parts.slice(start, i).join(' ');\n let width = context.measureText(str).width;\n\n if (width > this._fw) {\n this._s.push(parts.slice(start, i - 1).join(' '));\n start = i - 1;\n }\n }\n\n this._s.push(parts.slice(start, i).join(' '));\n }\n\n if (!this._s.length && this.text.includes('\\n')) {\n let width = 0;\n this.text.split('\\n').map(str => {\n this._s.push(str);\n width = Math.max(width, context.measureText(str).width);\n });\n\n this._w = this._fw || width;\n }\n\n if (!this._s.length) {\n this._s.push(this.text);\n this._w = this._fw || context.measureText(this.text).width;\n }\n\n this.height = this._fs + ((this._s.length - 1) * this._fs * this.lineHeight);\n this._uw();\n }", "function analyzeText(loadedFile, tabID){\n\n//variables for each text\nvar sentenceCount = 0;\nvar wordCount = 0;\nvar charsWhite = 0;\nvar charsNoWhite = 0;\nvar charsAlphaNum = 0;\n\nvar sentences = [];\nvar firstLetterSentence = 0;\n\nvar wordLengths = [];\nvar avgWordLength = 0;\nvar avgSentenceCharsLength = 0;\nvar longestWord = \"\";\n\nvar words = {};\nvar txt = loadedFile.data;\n\n//Removes special cases\ntxt = txt.replace(/Mr./g, \"Mr\");\ntxt = txt.replace(/Mrs./g, \"Mrs\");\ntxt = txt.replace(/Ms./g, \"Ms\");\ntxt = txt.replace(/\\r?\\n|\\r/g, \" \");\n\ntxt = txt.replace(/--/g, \" \");\ntxt = txt.replace(/-/g, \" \");\ntxt = txt.replace(/_/g, \"\");\n\n\n//runs through each character\nfor(var i = 0; i<txt.length; i++){\n\n//If character is punctuation, count as sentence\n if(txt.charCodeAt(i) == 63 || txt.charCodeAt(i) == 33 || txt.charCodeAt(i) == 46){\n sentences.push(txt.slice(firstLetterSentence, i+1));\n firstLetterSentence = i+2;\n sentenceCount += 1;\n }\n\n \n }\n\n //Runs through sentences and counts sentence length\n for(var x = 0; x<sentences.length; x++){\n avgSentenceCharsLength += sentences[x].length;\n \n }\n avgSentenceCharsLength = round(avgSentenceCharsLength / sentences.length * 100) / 100;\n\n\n\n txt = sentences.join(\" \");\n var tokens = txt.split(' ');// split by whitespace\n\n\n//Runs through each word\nfor(var c = 0; c<tokens.length; c++){\n var lowerCaseWord = tokens[c].toLowerCase();\n\n //If last character is alphanumerical\n if(tokens[c].charCodeAt(tokens[c].length-1) <= 90 && tokens[c].charCodeAt(tokens[c].length-1) >= 65 || tokens[c].charCodeAt(tokens[c].length-1) >= 97 && tokens[c].charCodeAt(tokens[c].length-1) <= 122){\n \n //Checks to see if word is already in word object\n if(words[lowerCaseWord] === undefined)\n {\n isInWords = false;\n words[lowerCaseWord] = 1;\n }\n\n else\n {\n words[lowerCaseWord] += 1;\n }\n\n //Counts word lengths\n wordLengths.push(tokens[c].length);\n\n //Tracks longest word\n if(tokens[c].length > longestWord.length)\n {\n longestWord = tokens[c];\n }\n }\n\n //If character is not alphannumerical\n else\n {\n\n //Checks to see if word is already in word object\n if(words[lowerCaseWord.slice(0, lowerCaseWord.length-1)] === undefined)\n {\n isInWords = false;\n words[lowerCaseWord.slice(0, lowerCaseWord.length-1)] = 1;\n }\n\n else\n {\n \n words[lowerCaseWord.slice(0, lowerCaseWord.length-1)] += 1;\n }\n\n //Counts word lengths\n wordLengths.push(tokens[c].length-1);\n\n //Tracks longest word\n if((tokens[c].length - 1) > longestWord.length)\n {\n longestWord = tokens[c].substring(0, tokens[c].length-1);\n }\n }\n }\n\n\n//gets avg word length\n for(var n = 0; n<wordLengths.length; n++){\n\n avgWordLength += wordLengths[n];\n }\n avgWordLength = avgWordLength / wordLengths.length;\n avgWordLength = round(avgWordLength*100)/100;\n\n\n//Runs through each word\nfor(var a = 0; a<tokens.length; a++){\n\n//Runs through each leter in each word and counts alphanums\n for(var b = 0; b<tokens[a].length; b++){\n charsNoWhite += 1;\n if(tokens[a].charCodeAt(b) <= 90 && tokens[a].charCodeAt(b) >= 65 || tokens[a].charCodeAt(b) >= 97 && tokens[a].charCodeAt(b) <= 122){\n charsAlphaNum += 1;\n }\n }\n}\n\nwordCount = tokens.length;\n\n\n\nvar wordsArray =[];\nvar wordsNumArray = [];\n\n//Adds words and occurences to table\nfor (var checkWord in words) {\n\n var addedWord = false;\n var wordsArrayLength = wordsArray.length;\n\n\nif(checkWord.length == 0)\n{\n addedWord = true;\n}\n\n//Removes special cases\ncheckWord = checkWord.replace(/\\r?\\n|\\r/g, \"UHUH\");\ncheckWord = checkWord.replace(String.fromCharCode(32), \"UHUH\");\n \n//If word occurs only once\nif(words[checkWord] === 1 && addedWord == false)\n{\n\n addedWord = true;\n wordsArray.push(checkWord);\n wordsNumArray.push(words[checkWord]); \n}\n\n \n else\n {\n for(var i = 0; i < wordsArrayLength; i++)\n {\n //If checkWord occurs more than the word in array\n if(words[checkWord] > wordsNumArray[i] && addedWord == false)\n {\n addedWord = true;\n \n wordsArray.splice(i, 0, checkWord);\n wordsNumArray.splice(i, 0, words[checkWord]);\n }\n\n\n\n }\n\n //If word occurs less than all other words in array\n if(addedWord == false)\n {\n wordsArray.push(checkWord);\n wordsNumArray.push(words[checkWord]);\n }\n }\n}\n\n//RiTa No stops\nvar params = {\n ignoreStopWords: true, ignoreCase: true,\n ignorePunctuation: true\n};\n\nvar wordsNoStops = RiTa.concordance(txt, params);\n\n\n\nvar wordsNoStopsArray = [];\nvar wordsNoStopsNums = [];\n\n//RiTa no stops\nfor (var checkWord in wordsNoStops){\n\n var addedWord = false;\n var wordsArrayLength = wordsArray.length;\n\n\nif(checkWord.length == 0)\n{\n addedWord = true;\n}\n\n\nif(words[checkWord] === 1 && addedWord == false)\n{\n //console.log(checkWord + \" length is 1\");\n\n addedWord = true;\n //console.log(\"1Adding \" + checkWord + \" : \" + words[checkWord])\n wordsNoStopsArray.push(checkWord);\n wordsNoStopsNums.push(words[checkWord]); \n}\n\n \n else\n {\n for(var i = 0; i < wordsArrayLength; i++)\n {\n if(words[checkWord] > wordsNoStopsNums[i] && addedWord == false)\n {\n addedWord = true;\n \n wordsNoStopsArray.splice(i, 0, checkWord);\n wordsNoStopsNums.splice(i, 0, words[checkWord]);\n }\n\n \n \n\n }\n\n if(addedWord == false)\n {\n wordsArray.push(checkWord);\n wordsNoStopsNums.push(words[checkWord]);\n }\n }\n \n\n}\n\n//Table with stops\nvar table = \"<table><tr><th>Words<br>(w/ Stop-word)</th><th>Occurences</th></tr>\";\nvar tableNoStops = \"<table><tr><th>Words<br>(w/o Stop-word)</th><th>Occurences</th></tr>\";\n\n\nvar tableLength = 20;\nvar tableNoStopsLength = 20;\n \nif(wordsArray.length < 20){\n tableLength = wordsArray.length;\n}\n\nif(wordsNoStopsArray.length<20){\n tableNoStopsLength = wordsNoStopsArray.length;\n}\nfor(var i=0; i<tableNoStopsLength; i++){\n tableNoStops += (\"<tr><td>\"+wordsNoStopsArray[i]+\"</td><td> \"+round(wordsNoStopsNums[i]/wordCount*10000)/100+\"%</td></tr>\")\n \n}\n//tableLength = wordsArray.length;\nfor(var i = 0; i<tableLength; i++){\n\n \n table += (\"<tr><td>\"+wordsArray[i]+\"</td><td> \"+round(wordsNumArray[i]/wordCount*10000)/100+\"%</td></tr>\");\n\n}\n\n//Displays table\n table += \"</table>\";\n tableNoStops += \"</table>\";\n \n var tableDiv = createDiv(table).class(tabID).parent(\"left\");\n var tableDiv2 = createDiv(tableNoStops).class(tabID).parent(\"left\");\n\n\"<table><tr><th>Words<br>(w/o Stop-word)</th><th>Occurences</th></tr>\";\n\n\n//Tables with information\nvar sentenceTable = \"<table>\";\n\nsentenceTable += \"<tr><td>Sentences</td> <td>\" + sentenceCount + \"</td></tr>\";\nsentenceTable += \"<tr><td>Average characters<br>per sentences</td> <td>\" + avgSentenceCharsLength + \"</td></tr>\";\nsentenceTable += \"<tr><td>Average words<br>per sentence</td> <td>\" + round(tokens.length/sentences.length * 100)/100 + \"</td></tr>\";\nsentenceTable += \"<tr><td>Sentences</td> <td>\" + sentenceCount + \"</td></tr>\";\n\nsentenceTable += \"</table><br>\";\ncreateDiv(sentenceTable).class(tabID).parent(\"right\");\n \n \nvar wordTable = \"<table>\";\n\nwordTable += \"<tr><td>Word Count</td> <td>\" + wordCount + \"</td></tr>\";\nwordTable += \"<tr><td>Unique Word Count</td> <td>\" + wordsArray.length + \"</td></tr>\";\nwordTable += \"<tr><td>Vocab Richness Ratio</td> <td>\" + round(wordsArray.length/wordCount*100)/100 + \"</td></tr>\";\nwordTable += \"<tr><td>Average word length</td> <td>\" + avgWordLength + \"</td></tr>\";\nwordTable += \"<tr><td>Longest word</td> <td>\" + longestWord + \"</td></tr>\";\n\nwordTable += \"</table><br>\";\ncreateDiv(wordTable).class(tabID).parent(\"right\");\n\nvar charsTable = \"<table>\";\n\ncharsTable += \"<tr><td>Alphanumerical Characters</td> <td>\" + charsAlphaNum + \"</td></tr>\";\ncharsTable += \"<tr><td>Character Count,<br>excluding white spaces</td> <td>\" + charsNoWhite + \"</td></tr>\";\ncharsTable += \"<tr><td>Character Count,<br>including white spaces</td> <td>\" + (charsNoWhite + tokens.length - sentences.length) + \"</td></tr>\";\n\ncharsTable += \"</table>\";\ncreateDiv(charsTable).class(tabID).parent(\"right\");\n\n \n tabNumber += 1;\n}", "function balanceText(elements) {\n forEach(getElementsList(elements), function (el) {\n // In a lower level language, this algorithm takes time\n // comparable to normal text layout other than the fact\n // that we do two passes instead of one, so we should\n // be able to do without this limit.\n var maxTextWidth = 5000;\n\n removeTags(el); // strip balance-text tags\n\n // save settings\n var oldWS = el.style.whiteSpace;\n var oldFloat = el.style.float;\n var oldDisplay = el.style.display;\n var oldPosition = el.style.position;\n var oldLH = el.style.lineHeight;\n\n // remove line height before measuring container size\n el.style.lineHeight = 'normal';\n\n var containerWidth = el.offsetWidth;\n var containerHeight = el.offsetHeight;\n\n // temporary settings\n el.style.whiteSpace = 'nowrap';\n el.style.float = 'none';\n el.style.display = 'inline';\n el.style.position = 'static';\n\n var nowrapWidth = el.offsetWidth;\n var nowrapHeight = el.offsetHeight;\n\n // An estimate of the average line width reduction due\n // to trimming trailing space that we expect over all\n // lines other than the last.\n\n var spaceWidth = ((oldWS === 'pre-wrap') ? 0 : getSpaceWidth(el, nowrapHeight));\n\n if (containerWidth > 0 && // prevent divide by zero\n nowrapWidth > containerWidth && // text is more than 1 line\n nowrapWidth < maxTextWidth) { // text is less than arbitrary limit (make this a param?)\n\n var remainingText = el.innerHTML;\n var newText = \"\";\n var lineText = \"\";\n var shouldJustify = isJustified(el);\n var totLines = Math.round(containerHeight / nowrapHeight);\n var remLines = totLines;\n\n // loop vars\n var desiredWidth, guessIndex, le, ge, splitIndex;\n\n // Determine where to break:\n while (remLines > 1) {\n\n // clear whitespace match cache for each line\n wsMatches = null;\n\n desiredWidth = Math.round((nowrapWidth + spaceWidth) / remLines - spaceWidth);\n\n // Guessed char index\n guessIndex = Math.round((remainingText.length + 1) / remLines) - 1;\n\n le = new NextWS_params();\n\n // Find a breaking space somewhere before (or equal to) desired width,\n // not necessarily the closest to the desired width.\n findBreakOpportunity(el, remainingText, containerWidth, desiredWidth, -1, guessIndex, le);\n\n // Find first breaking char after (or equal to) desired width.\n ge = new NextWS_params();\n guessIndex = le.index;\n findBreakOpportunity(el, remainingText, containerWidth, desiredWidth, +1, guessIndex, ge);\n\n // Find first breaking char before (or equal to) desired width.\n le.reset();\n guessIndex = ge.index;\n findBreakOpportunity(el, remainingText, containerWidth, desiredWidth, -1, guessIndex, le);\n\n // Find closest string to desired length\n if (le.index === 0) {\n splitIndex = ge.index;\n } else if ((containerWidth < ge.width) || (le.index === ge.index)) {\n splitIndex = le.index;\n } else {\n splitIndex = ((Math.abs(desiredWidth - le.width) < Math.abs(ge.width - desiredWidth))\n ? le.index\n : ge.index);\n }\n\n // Break string\n lineText = remainingText.substr(0, splitIndex);\n if (shouldJustify) {\n newText += justify(el, lineText, containerWidth);\n } else {\n newText += lineText.replace(/\\s$/, \"\");\n newText += '<br data-owner=\"balance-text\" />';\n }\n remainingText = remainingText.substr(splitIndex);\n\n // update counters\n remLines--;\n el.innerHTML = remainingText;\n nowrapWidth = el.offsetWidth;\n }\n\n if (shouldJustify) {\n el.innerHTML = newText + justify(el, remainingText, containerWidth);\n } else {\n el.innerHTML = newText + remainingText;\n }\n }\n\n // restore settings\n el.style.whiteSpace = oldWS;\n el.style.float = oldFloat;\n el.style.display = oldDisplay;\n el.style.position = oldPosition;\n el.style.lineHeight = oldLH;\n });\n }", "extractTextData(content){\n\t\t// get the second page context (the first page do not have the cpu)\n\t\tvar pageIdx = content.indexOf(\"top -\", 100) + 1;\n\t\tcontent = content.substring(pageIdx);\n\n\t\tsuper.extractTextData(content);\t\t\n\t}", "wrapText(textTextureRender, text, wordWrapWidth) {\n // Greedy wrapping algorithm that will wrap words as the line grows longer.\n // than its horizontal bounds.\n let lines = text.split(/\\r?\\n/g);\n let allLines = [];\n let realNewlines = [];\n for (let i = 0; i < lines.length; i++) {\n let resultLines = [];\n let result = '';\n let spaceLeft = wordWrapWidth;\n let words = lines[i].split(' ');\n for (let j = 0; j < words.length; j++) {\n let wordWidth = textTextureRender._context.measureText(words[j]).width;\n let wordWidthWithSpace = wordWidth + textTextureRender._context.measureText(' ').width;\n if (j === 0 || wordWidthWithSpace > spaceLeft) {\n // Skip printing the newline if it's the first word of the line that is.\n // greater than the word wrap width.\n if (j > 0) {\n resultLines.push(result);\n result = '';\n }\n result += words[j];\n spaceLeft = wordWrapWidth - wordWidth;\n }\n else {\n spaceLeft -= wordWidthWithSpace;\n result += ' ' + words[j];\n }\n }\n\n if (result) {\n resultLines.push(result);\n result = '';\n }\n\n allLines = allLines.concat(resultLines);\n\n if (i < lines.length - 1) {\n realNewlines.push(allLines.length);\n }\n }\n\n return {l: allLines, n: realNewlines};\n }", "function process(text)\r\n{\r\n var lines = text.split(\"\\n\"),\r\n line = \"\",\r\n processed = \"\";\r\n\r\n for(var i = 0; i < lines.length; i++)\r\n {\r\n line = parseLine(lines[i]);\r\n processed += line + \"\\n\";\r\n }\r\n\r\n // remove not needed \\n\r\n processed = processed.replace(/^\\s+|\\s+$/g, '');\r\n return processed;\r\n}", "function textBuilding() {\n if (i < textFull.length) {\n i = i + 1;\n //Building the text on each itteration\n textBuild += (textFull.charAt(i));\n //Posting the current build into the page\n postMessage(textBuild);\n } else {\n w.terminate();\n w = undefined;\n }\n setTimeout(\"textBuilding()\", 250);\n}", "extractTextData(content){\n\t\t// get the second page context (the first page do not have the cpu)\n\t\tvar pageIdx = content.indexOf(\"\\nProcesses:\", 100) + 1;\n\t\tcontent = content.substring(pageIdx);\n\n\t\tsuper.extractTextData(content);\t\t\n\t}", "async function analyzeText(res) {\n\n // GRAB SUBJECT OF TEXT\n let subject = res.data.payload.headers;\n subject.forEach( (name) => {\n if(name['name'] == 'Subject') {\n subject = name['value'];\n }\n });\n\n // PUT CONTENT INTO READABLE TEXT\n let text = null; //used later\n if (res.data.payload.parts[0].body.data != null) {\n text = new Buffer.from(res.data.payload.parts[0].body.data, 'base64').toString();\n } else { //email has multimedia so its pushed to somewhere else\n text = new Buffer.from(res.data.payload.parts[0].parts[0].body.data, 'base64').toString();\n }\n\n //Only get emails with \"Position\" or \"Intern\" in the email\n let internREGEX = /intern|position/i;\n if(!internREGEX.test(text)) {\n //dont want to execute rest of the function :^)\n return ;\n }\n\n // INITIALIZE EMAILOBJECT TO STORE LATER\n let emailObject = {};\n let document = {\n content: text,\n type: 'PLAIN_TEXT'\n };\n\n // ANALYZE SENTIMENT OF EACH TEXT\n const [result] = await languageClient.analyzeSentiment({document:document});\n //console.log(result);\n const sentiment = result.documentSentiment;\n\n //regex to find Capital words\n // first way: look for positions\n // second way: look for number (before and after)\n let senderREGEX = /(?<=\\s)([A-Z])+[a-z]*(?=\\s)/gm;\n //possibleOrgs = nlp(possibleOrgs[0]).organizations().out('topk'); // organizations\n //console.log(\"POSSIBLE ORGS:\");\n //console.log(possibleOrgs);\n\n emailObject.subject = subject; //possible ORG\n emailObject.text = text;\n emailObject.sentiment = sentiment;\n\n //append to big array which parentObject contains\n arrayOfEmails.push(emailObject);\n\n // CLASSIFY TEXT INTO CATEGORIES\n let nextStageRegex = /Congratulation|challenge|problem|algorithm/;\n if(nextStageRegex.test(text)) {\n //probably a bad review\n emailObject.status = 'NEXT STAGE';\n } else {\n //probably a good review\n emailObject.status = 'DECLINED';\n }\n\n arrayOfLines = text.split('\\n');\n emailObject.position = arrayOfLines[arrayOfLines.length - 4];\n emailObject.company = arrayOfLines[arrayOfLines.length - 2];\n\n search = emailObject.company;\n let engineID = '005572698672398171083:ivrztdlnswq';\n let apiKEY = 'AIzaSyD3LznTS-2wAG8JP0AV_2g7HTO94ycY1pM';\n const Url = `https://www.googleapis.com/customsearch/v1?${apiKEY}&cx=${engineID}&q=${search}`;\n const request = await new Request(Url);\n console.log(request.uri.query);\n\n //WRITE TO FILE OUTPUT\n await new Promise((resolve, reject) => {\n fs.writeFile('emailOUTPUT.json', JSON.stringify(arrayOfEmails, null, 2), function (err) {\n if (err)\n reject(err);\n else\n resolve();\n });\n\n }); //REMOVE COMMENT LATER\n}", "function findText()\n{\n\t$( \"p\" ).each(function( index ) {\n\t\tvar paragraph = $( this ).text();\n\t\tif (wordCount($( this ).text()) > 20)\n\t\t{\n\t\t\ttextNodes.push($( this ).text());\n\t\t}\n\t});\n\n\tpickWords();\n}", "function inimes()\r\n{ \r\n jQuery.ajax({\r\n async: false,\r\n url: \"text.adv\",\r\n dataType: 'text',\r\n success: function (val) { \r\n textA = val; \r\n }\r\n });\r\n textAdv = textA.split(\"\");\r\n for(var i = 0; i < textAdv.length; i++ )\r\n {\r\n if(textAdv[i].charCodeAt(0) == 10)\r\n {\r\n textAdv[i] = \" \";\r\n }\r\n if (textAdv[i].charCodeAt(0) == 13) {\r\n //textAdv[i] = \" \";\r\n }\r\n }\r\n}", "sentanceExtractor({ numSentances = 1, startIndex = false, text = fakeData.loremIpsum } = {}) {\n //Works only with big Chunks of text\n //Specifically made for the loremIpsum text from fakeData\n let start = startIndex ? startIndex : math.rand(0, Math.floor(text.length / 2));\n let outputText = '';\n function findNextSentance() {\n let temp = start;\n //The 'or' might be error prone\n while (text[start] !== '.' || (start - temp) < 4) {\n start++;\n }\n }\n\n //Search for beginning of next sentance\n if (text[start] !== '.') {\n findNextSentance();\n start += 2;\n } else {\n start += 2;\n }\n\n for (numSentances; numSentances != 0; numSentances--) {\n let sentStartIndex = start;\n findNextSentance();\n outputText += text.substring(sentStartIndex, start++) + '.';\n }\n return outputText;\n\n //String.indexOf(); maybe?\n }", "function processText(text) {\n text = _.chain(text)\n .words(\"\\n\\n\")\n .map(function(par) {\n // Replace newlines with spaces\n return par.replace(/(\\r\\n|\\n|\\r)/gm,\" \");\n })\n .value();\n //console.log(text);\n return text;\n}", "function chunk(text) {\n //185 characters seems to be longest discord tts reads\n let ii, lastSpaceIndex;\n const maxChunkSize = 184;\n let chunks = [];\n if (text.length > maxChunkSize) {\n for (ii = 0; ii < text.length; ii += lastSpaceIndex) {\n let temp = text.substring(ii, ii + maxChunkSize);\n lastSpaceIndex = temp.lastIndexOf(\" \");\n // need to check for the last \"part\" otherwise last index of space\n // will mean ii is always less than text.length\n if (ii + maxChunkSize > text.length) {\n chunks.push(text.substring(ii, ii + maxChunkSize));\n break;\n } else {\n chunks.push(text.substring(ii, ii + lastSpaceIndex));\n }\n }\n } else {\n chunks.push(text);\n }\n return chunks;\n}", "function measureText(description) {\n const splitted = description.split(\"~~\");\n const ctx = document.createElement(\"canvas\").getContext(\"2d\");\n return Math.max(\n ctx.measureText(splitted[0]).width,\n ctx.measureText(splitted[1]).width\n );\n}", "function longText(ctx, text, x, y, maxWidth, lineHeight){\n for(var p = 0; p < text.length; p++){\n var words = text[p].split(' ');\n var line = '';\n for(var n = 0; n < words.length; n++) {\n var testLine = line + words[n] + ' ';\n var metrics = ctx.measureText(testLine);\n var testWidth = metrics.width;\n if (testWidth > maxWidth && n > 0) {\n ctx.fillText(line, x, y);\n line = words[n] + ' ';\n y += lineHeight;\n }\n else {\n line = testLine;\n }\n }\n ctx.fillText(line, x, y);\n y += (lineHeight*1.5);\n }\n }", "constructor(text) {\n let words = text.split(/[ \\r\\n]+/);\n this.words = words.filter(c => c !== \"\");\n this.makeChains();\n this.makeBigrams();\n }", "textSize (style, text, {transform, text_wrap, max_lines, stroke_width = 0, supersample}) {\n // Check cache first\n TextCanvas.cache.text[style] = TextCanvas.cache.text[style] || {};\n if (TextCanvas.cache.text[style][text]) {\n TextCanvas.cache.stats.text_hits++;\n return TextCanvas.cache.text[style][text];\n }\n TextCanvas.cache.stats.text_misses++;\n TextCanvas.cache.text_count++;\n\n // Calc and store in cache\n let dpr = Utils.device_pixel_ratio * supersample;\n let str = this.applyTextTransform(text, transform);\n let ctx = this.context;\n let vertical_buffer = this.vertical_text_buffer * dpr;\n let horizontal_buffer = dpr * (stroke_width + this.horizontal_text_buffer);\n let leading = 2 * dpr; // make configurable and/or use Canvas TextMetrics when available\n let line_height = this.px_size + leading; // px_size already in device pixels\n\n // Parse string into series of lines if it exceeds the text wrapping value or contains line breaks\n let multiline = MultiLine.parse(str, text_wrap, max_lines, line_height, ctx);\n\n // Final dimensions of text\n let height = multiline.height;\n let width = multiline.width;\n let lines = multiline.lines;\n\n let collision_size = [\n width / dpr,\n height / dpr\n ];\n\n let texture_size = [\n width + 2 * horizontal_buffer,\n height + 2 * vertical_buffer\n ];\n\n let logical_size = [\n texture_size[0] / dpr,\n texture_size[1] / dpr,\n ];\n\n // Returns lines (w/per-line info for drawing) and text's overall bounding box + canvas size\n TextCanvas.cache.text[style][text] = {\n lines,\n size: { collision_size, texture_size, logical_size, line_height }\n };\n return TextCanvas.cache.text[style][text];\n }", "function logText(str) {\n\t\tif (str.length === 0) return;\n\t\tconst strings = wordWrap(str, process.stdout.columns - 6).split(\"\\n\");\n\t\tfor (const string of strings) if (string !== \"\") textLines.push(string);\n\t\tstartIndex = textLines.length - (process.stdout.rows - 4);\n\t\tif (startIndex < 0) startIndex = 0;\n\t\tlogTextBuffer.setText(textLines.slice(startIndex).join(\"\\n\"));\n\t\tlogDraw();\n\t}", "function onFileLoaded(result){ //result is an array of strings; each string is 1 sentence\n var str = \"\";\n for(var i = 0; i < result.length; i++){\n str += result[i]; //put entire file into 1 string\n }\n console.log(str);\n\n n2digit = numberOfMatches(str, reg2digit);\n n3digit = numberOfMatches(str, reg3digit);\n n4digit = numberOfMatches(str, reg4digit);\n\n\n var matches = str.match(regItalics); //get chunks of italicized text\n console.log(matches);\n for(var i =0; i < matches.length; i++){ //go through each chunk of italics, count # words\n nItalics += numberOfMatches(matches[i], regWords);\n }\n\n console.log(\"n italicized: \" + nItalics);\n console.log(\"n 2 digits: \" + n2digit);\n console.log(\"n 3 digits: \" + n3digit);\n console.log(\"n 4 digits: \" + n4digit);\n}", "text(text) {\n // act as getter\n if (text === undefined) {\n var children = this.node.childNodes;\n var firstLine = 0;\n text = '';\n\n for (var i = 0, len = children.length; i < len; ++i) {\n // skip textPaths - they are no lines\n if (children[i].nodeName === 'textPath') {\n if (i === 0) firstLine = 1;\n continue;\n } // add newline if its not the first child and newLined is set to true\n\n\n if (i !== firstLine && children[i].nodeType !== 3 && adopt(children[i]).dom.newLined === true) {\n text += '\\n';\n } // add content of this node\n\n\n text += children[i].textContent;\n }\n\n return text;\n } // remove existing content\n\n\n this.clear().build(true);\n\n if (typeof text === 'function') {\n // call block\n text.call(this, this);\n } else {\n // store text and make sure text is not blank\n text = text.split('\\n'); // build new lines\n\n for (var j = 0, jl = text.length; j < jl; j++) {\n this.tspan(text[j]).newLine();\n }\n } // disable build mode and rebuild lines\n\n\n return this.build(false).rebuild();\n }", "function initText(text){\n document.getElementById(\"textToReadWrapper\").innerHTML = \"\" \n for (i = 0; i < textToAdd.length; i++){\n document.getElementById(\"textToReadWrapper\").innerHTML +='<span>' + text[i] + \" \"\n }\n }", "function textContent(text) {\n text[that._html ? \"html\" : \"text\"](function (t) {\n return trimRight(t).replace(/&([^\\;&]*)/g, function (str, a) {\n return a === \"amp\" ? str : \"&amp;\".concat(a);\n }) // replaces all non-HTML ampersands with escaped entity\n .replace(/<([^A-z^/]+)/g, function (str, a) {\n return \"&lt;\".concat(a);\n }).replace(/<$/g, \"&lt;\") // replaces all non-HTML left angle brackets with escaped entity\n .replace(/(<[^>^\\/]+>)([^<^>]+)$/g, function (str, a, b) {\n return \"\".concat(a).concat(b).concat(a.replace(\"<\", \"</\"));\n }) // ands end tag to lines before mid-HTML break\n .replace(/^([^<^>]+)(<\\/[^>]+>)/g, function (str, a, b) {\n return \"\".concat(b.replace(\"</\", \"<\")).concat(a).concat(b);\n }) // ands start tag to lines after mid-HTML break\n .replace(/<([A-z]+)[^>]*>([^<^>]+)<\\/[^>]+>/g, function (str, a, b) {\n var tag = that._html[a] ? \"<tspan style=\\\"\".concat(that._html[a], \"\\\">\") : \"\";\n return \"\".concat(tag.length ? tag : \"\").concat(b).concat(tag.length ? \"</tspan>\" : \"\");\n });\n });\n }", "render(): void {\n // Render text for current page\n const startAt = (this._page - 1) * this._numCharsPage;\n const pageText = this._text.substr(startAt, this._numCharsPage);\n output.cursorTo(0, output.contentStartRow);\n console.log(pageText);\n }", "function processText(text) {\n var displayText = \"\";\n var offset = 0;\n var start = -1;\n var positiveRanges = [];\n var negativeRanges = [];\n var marked = [];\n\n for (var i = 0; i < text.length; i++) {\n var char = text[i];\n var array = null;\n\n switch (char) {\n case Importance.POSITIVE:\n array = positiveRanges;\n break;\n case Importance.NEGATIVE:\n array = negativeRanges;\n break;\n default:\n displayText += char;\n marked.push(false);\n continue;\n }\n\n var relIndex = i - offset;\n if (start === -1) {\n start = relIndex;\n } else {\n array.push({\n start: start,\n end: relIndex\n });\n start = -1;\n }\n offset++;\n }\n\n vm.game.displayText = displayText;\n vm.game.marked = marked;\n vm.game.ranges = {\n positive: positiveRanges,\n negative: negativeRanges\n };\n }", "function chunkText(context, text)\n\t{\n\t\tvar tag = text.ctor;\n\t\tif (tag === 'Text:Append')\n\t\t{\n\t\t\tvar leftChunks = chunkText(context, text._0);\n\t\t\tvar rightChunks = chunkText(context, text._1);\n\t\t\treturn leftChunks.concat(rightChunks);\n\t\t}\n\t\tif (tag === 'Text:Text')\n\t\t{\n\t\t\treturn [{\n\t\t\t\ttext: text._0,\n\t\t\t\tcolor: context.color,\n\t\t\t\theight: context['font-size'].slice(0,-2) | 0,\n\t\t\t\tfont: toFont(context)\n\t\t\t}];\n\t\t}\n\t\tif (tag === 'Text:Meta')\n\t\t{\n\t\t\tvar newContext = freshContext(text._0, context);\n\t\t\treturn chunkText(newContext, text._1);\n\t\t}\n\t}", "function ExtractText() \r\n{ \r\n\ttry {\r\n\t\tvar p = this.pageNum; \r\n\t\tvar n = this.getPageNumWords(p);\r\n\t\tapp.alert(\"Number of words in the page: \" + n);\r\n\r\n\t\tvar str = \"\";\r\n\t\tfor(var i=0;i<n;i++) {\r\n\t\t\tvar wd = this.getPageNthWord(p, i, false); \r\n\t\t\tif(wd != \"\") str = str + wd; \r\n\t\t}\r\n\r\n\t\t// save the string into a data object\r\n\t\tthis.createDataObject(\"dobj1.txt\",str); \r\n\r\n\t\t// pop up a file selection box to export the data \r\n\t\tthis.exportDataObject(\"dobj1.txt\"); \r\n\t\t \r\n\t\t// clean up\r\n\t\tthis.removeDataObject(\"dobj1.txt\"); \r\n\r\n\t} catch (e) { \r\n\t\tapp.alert(e)\r\n\t}; \r\n}", "function processTextInversePower(text) {\r\n\t// Initialization settings\r\n\tsettings = {\r\n\t\tinitSize: 25,\r\n\t\tshrinkRate: 0.02,\r\n\t\tpower: 1\r\n\t}\r\n\t\r\n\tnewText = \"\"\r\n\tcurrSize = settings.initSize\r\n\tfor(var i=0; i<text.length; i++) {\r\n\t\tcurrChar = text.charAt(i)\r\n\t\teffCurrSize = settings.initSize\r\n\t\t\r\n\t\tnewText += '<span style=\"font-size:'+String(effCurrSize)+'\">'\r\n\t\tnewText += currChar\r\n\t\tnewText += \"</span>\"\r\n\t\t\r\n\t\t// Adjusts the next size\r\n\t\tcurrSize *= settings.sizeRatio\r\n\t}\r\n\t\r\n\treturn newText\r\n}", "function TextData() {}", "function TextData() {}", "function TextData() {}", "async function analyzeEntitiesOfText(array_text) {\n let result = [];\n try {\n for (let t of array_text) {\n const document = {\n content: t,\n type: \"PLAIN_TEXT\"\n };\n\n let results = await client.analyzeEntities({ document });\n\n const entities = results[0].entities;\n // console.log(\"Entities:\", JSON.stringify(entities));\n for (let entity of entities) {\n if (isPronoun(entity.name)) {\n if (\n (result[entity.name] == null) |\n (result[entity.name] == undefined)\n ) {\n result[entity.name] = { name: entity.name, salience: new Array() };\n result[entity.name].salience.push(entity.salience);\n result[entity.name].type = entity.type;\n } else {\n result[entity.name].salience.push(entity.salience);\n }\n if (entity.metadata && entity.metadata.wikipedia_url) {\n result[entity.name].wiki = entity.metadata.wikipedia_url;\n // console.log(` - Wikipedia URL: ${entity.metadata.wikipedia_url}$`);\n }\n }\n\n console.log(JSON.stringify(entity));\n }\n }\n } catch (err) {\n console.log(err);\n }\n\n return scoreAggregation(result);\n}", "function chunkText(context, text)\n\t{\n\t\tvar tag = text.ctor;\n\t\tif (tag === 'Text:Append')\n\t\t{\n\t\t\tvar leftChunks = chunkText(context, text._0);\n\t\t\tvar rightChunks = chunkText(context, text._1);\n\t\t\treturn leftChunks.concat(rightChunks);\n\t\t}\n\t\tif (tag === 'Text:Text')\n\t\t{\n\t\t\treturn [{\n\t\t\t\ttext: text._0,\n\t\t\t\tcolor: context.color,\n\t\t\t\theight: context['font-size'].slice(0, -2) | 0,\n\t\t\t\tfont: toFont(context)\n\t\t\t}];\n\t\t}\n\t\tif (tag === 'Text:Meta')\n\t\t{\n\t\t\tvar newContext = freshContext(text._0, context);\n\t\t\treturn chunkText(newContext, text._1);\n\t\t}\n\t}", "function addText() {\n var length = indoc.length - offset;\n\n if (0 === length) {\n return;\n }\n\n output.push(indoc.substr(offset, length));\n}", "function renderTextBase(text, model, promise, viewParent) {\n var view = $View(text, model, promise, viewParent);\n\n viewPromiseLock(view);\n\n var i = 0;\n while ( i < text.length ) {\n var iChar = text.charAt(i);\n\n var tmp = textTaglibMaybe(text, i);\n if ( isValid(tmp) ) {\n\n // r is on ':', ie: <taglibName:\n var taglibName = textTaglibNameParseOut(text, i+1, tmp);\n tmp += taglibName.length;\n\n // :methodName\n var methodName = textMethodNameParseOut(text, tmp);\n tmp += methodName.length;\n\n var tag = textParseOutAttrsAndBody(text, tmp, view, i, taglibName, methodName);\n viewLoadTaglib(view, viewOutReplaces(view, tag.starts, tag.ends), tag );\n\n i = tag.ends;\n }\n\n else if ( textInlineCodeOrCommentMaybe(text, i) ) {\n // On beginning of \"<%\" or \"<%--\"\n\n if ( textInlineCommentMaybe(text, i+2) ) {\n i = textInlineCommentEndIndex(text, i);\n }\n else {\n // Must be inline code then\n tmp = textInlineCodeParseOut(text, i);\n\n var o = {\n out : viewOutReplaces(view, i, tmp.i)\n };\n\n if ( tmp.out ) {\n var returns = evalsafeContextedReturns.call(view.context, tmp.code, view.model, o);\n if ( returns ) { viewOut(view, returns); }\n } else {\n evalsafeContexted.call(view.context, tmp.code, tmp.code, view.model, o);\n }\n\n i = tmp.i;\n }\n }\n\n else if ( textDollarMaybe(text, i) ) {\n tmp = textDollarParseOut(text, i, view);\n viewOut(view, tmp.dollar.evaluate() );\n\n i = tmp.i + 1;\n }\n else {\n viewOut(view, iChar);\n\n i++;\n }\n\n }\n\n // Unlock\n viewPromiseUnlock(view);\n\n return view.promise;\n }", "function processTextExponential(text) {\r\n\t// Initialization settings\r\n\tsettings = {\r\n\t\tinitSize: 25,\r\n\t\tsizeRatio: 0.987\r\n\t}\r\n\t\r\n\tnewText = \"\"\r\n\tcurrSize = settings.initSize\r\n\tfor(var i=0; i<text.length; i++) {\r\n\t\tcurrChar = text.charAt(i)\r\n\t\t\r\n\t\teffCurrSize = currSize // Room to round it if needed\r\n\t\t\r\n\t\tnewText += '<span style=\"font-size:'+String(effCurrSize)+'\">'\r\n\t\tnewText += currChar\r\n\t\tnewText += \"</span>\"\r\n\t\t\r\n\t\t// Adjusts the next size\r\n\t\tcurrSize *= settings.sizeRatio\r\n\t}\r\n\t\r\n\treturn newText\r\n}", "shortenText(text){\n return text.substr(0, 270) + \"...\";\n }", "async function getLongPostContent(post) {\n let content = [];\n let text = await post.selftext;\n // split the string into 2000 character strings (to fit in a discord message)\n const SPLIT_AMOUNT = 2000;\n for (var index = 0; index < await text.length - SPLIT_AMOUNT; index += SPLIT_AMOUNT) {\n content.push(text.substr(index, SPLIT_AMOUNT));\n }\n // last piece is < 2000 long and goes to the end of the string.\n content.push(text.slice(index, await text.length));\n return content;\n}", "function read_in_document_text()\n{\n var content = fs.readFileSync(\"filtered_merged_file.json\");\n content = JSON.parse(content);\n var count = 0;\n \n for(var i = 0; i < content.length; i++)\n {\n var current = content[i];\n for(var j = 0; j < current.length; j++)\n {\n var this_doc = current[j];\n var data = {};\n data.date = this_doc[\"date\"];\n data.text = this_doc[\"body\"];\n data.url = this_doc[\"link\"];\n data.title = this_doc[\"title\"];\n document_text[count] = data;\n count++;\n }\n }\n}", "function Text2D(text,settings){var _this=this;if(!settings){settings={};}_this=_super.call(this,settings)||this;if(settings.bitmapFontTexture!=null){_this._fontTexture=settings.bitmapFontTexture;_this._fontName=null;_this._fontSuperSample=false;_this._fontSDF=false;_this._textureIsPremulAlpha=_this._fontTexture.isPremultipliedAlpha;var ft=_this._fontTexture;if(ft!=null&&!ft.isReady()){ft.onLoadObservable.add(function(){_this._positioningDirty();_this._setLayoutDirty();_this._instanceDirtyFlags|=BABYLON.Prim2DBase.originProperty.flagId;// To make sure the Text2D is issued again for render\n});}}else{_this._fontName=settings.fontName==null?\"12pt Arial\":settings.fontName;_this._fontSuperSample=settings.fontSuperSample!=null&&settings.fontSuperSample;_this._fontSDF=settings.fontSignedDistanceField!=null&&settings.fontSignedDistanceField;}_this._defaultFontColor=settings.defaultFontColor==null?new BABYLON.Color4(1,1,1,1):settings.defaultFontColor.clone();_this._tabulationSize=settings.tabulationSize==null?4:settings.tabulationSize;_this._textureIsPremulAlpha=true;//settings.fontTexturePremulAlpha === true;\n_this._textSize=null;_this.text=text;if(settings.size!=null){_this.size=settings.size;_this._sizeSetByUser=true;}else{_this.size=null;}_this._useBilinearFiltering=settings.useBilinearFiltering!=null?settings.useBilinearFiltering:null;_this._fontBilinearFiltering=false;// Text rendering must always be aligned to the target's pixel to ensure a good quality\n_this.alignToPixel=true;_this.textAlignmentH=settings.textAlignmentH==null?Text2D_1.AlignLeft:settings.textAlignmentH;_this.textAlignmentV=settings.textAlignmentV==null?Text2D_1.AlignTop:settings.textAlignmentV;_this.textAlignment=settings.textAlignment==null?\"\":settings.textAlignment;_this._wordWrap=settings.wordWrap==null?false:settings.wordWrap;_this._updateRenderMode();return _this;}", "_parseTextTemplate() {\n\n let figureRows = this._textTemplate.split('\\n');\n\n figureRows.forEach(row => {\n this._width = row.trim().length;\n this._height += 1;\n\n row.split('').forEach((char) => {\n if (char === DIED_CHAR) {\n this._dataTemplate.push(false);\n } else if (char === ALIVE_CHAR) {\n this._dataTemplate.push(true);\n }\n })\n\n });\n\n }", "function generateText() {\n console.log(textLength);\n let easyText = [\"a\", \"s\", \"d\", \"w\", \"r\", \"t\", \"h\", \"j\", \"n\", \"m\", \"i\", \"o\", \"v\", \"e\", \"f\"];\n let hardText = [\"g\", \"h\", \"z\", \"x\", \"c\", \"b\", \"k\", \"y\", \"q\", \"p\", \"u\", \"n\", \"m\", \"v\", \"l\"];\n let string = \"\";\n letterCount = 0;\n while (true) {\n if (letterCount > textLength) {\n break;\n }\n if (easy) {\n string = createWords(easyText, string);\n } else {\n string = createWords(hardText, string);\n }\n }\n if (string.length > textLength) {\n string = string.slice(0, textLength);\n }\n\n displayText(string);\n}", "function setNewText(newText){\n\twordCounter = 0;\n\tcharCounter = 0;\n\ttxt = newText.trim().split(\" \");\n\n}", "function MeasureText(text, bold, font, size) {\n // This global variable is used to cache repeated calls with the same arguments\n var str = text + ':' + bold + ':' + font + ':' + size;\n if (typeof(__measuretext_cache__) == 'object' && __measuretext_cache__[str]) {\n return __measuretext_cache__[str];\n }\n\n var div = document.createElement('DIV');\n div.innerHTML = text;\n div.style.position = 'absolute';\n div.style.top = '-100px';\n div.style.left = '-100px';\n div.style.fontFamily = font;\n div.style.fontWeight = bold ? 'bold' : 'normal';\n div.style.fontSize = size + 'pt';\n document.body.appendChild(div);\n\n var size = [div.offsetWidth, div.offsetHeight];\n\n document.body.removeChild(div);\n\n // Add the sizes to the cache as adding DOM elements is costly and can cause slow downs\n if (typeof(__measuretext_cache__) != 'object') {\n __measuretext_cache__ = [];\n }\n __measuretext_cache__[str] = size;\n\n return size;\n}", "function timedReading(maxLength, text) {\n // modify text to contain only the alphabetical chars (filtered out punctuation)\n text = text.split(' ').map(word => word.split('').filter(char => /[a-z]|[A-Z]/.test(char)).join(''));\n \n // text contains no words\n if(text[0] === '')\n return 0;\n \n return text.filter(word => word.length <= maxLength).length;\n}", "_measureLabel() {\r\n let drawContext = canvas._canvas.getContext(\"2d\");\r\n \r\n drawContext.save();\r\n this._setupText(drawContext);\r\n let measurements = drawContext.measureText(this._text);\r\n drawContext.restore();\r\n \r\n let numLines = 1 + (this._text.match(new RegExp(\"\\n\", \"g\")) || []).length;\r\n \r\n this._textWidth = measurements.width;\r\n this._textHeight = this._fontHeight * numLines;\r\n }", "function measureText(text,uclass,style)\n{\n var b = document.getElementById(\"ibiMeasureText\");\n if(b==null) {\n var bodyRef = document.getElementsByTagName('body')[0];\n b = document.createElement('div');\n b.setAttribute('id','ibiMeasureText');\n bodyRef.appendChild(b);\n }\n var bstyle = 'position:absolute;visibility:hidden;white-space:nowrap;top:0px;left:0px;';\n if(style) bstyle+=style;\n if(b_ie) b.style.setAttribute('cssText', bstyle, 0);\n else b.setAttribute('style',bstyle);\n b.setAttribute(ibiclassName,'');\n if(uclass) {\n b.setAttribute(ibiclassName,uclass);\n }\n b.innerHTML = text;\n var obj = { height: b.offsetHeight, width: b.offsetWidth };\n b.innerHTML = '';\n return obj;\n}", "generateMultilineHTMLfromString(text) {\n if (isNullOrUndefined(text)) {\n return \"\";\n }\n\n let spl = text.split(\"\\n\");\n if (spl.length == 1) {\n return text;\n } else {\n let output = \"\";\n for (let i = 0; i < spl.length; i++) {\n output += \"<div>\" + spl[i] + \"</div>\";\n }\n return output;\n }\n }", "function calculateReadingTime(text) {\n // average reading speed is around 200-300 words per minute\n const wordsPerMinute = 250;\n // split the text into an array of words\n const wordCount = text.split(' ').length;\n // calculate the reading time in minutes\n const readingTime = wordCount / wordsPerMinute;\n return Math.ceil(readingTime);\n}", "function textByteLength(text) {\n\tif (!text){\n\t\treturn 0;\n\t}\n\tlen = 0;\n\tfor(i=0; i<text.length;i++) {\n\t\tlen += text.charCodeAt(i) < 128 ? 1 : 3;\n\t}\n\treturn len;\n}", "function TextParser() {}", "function TextParser() {}", "function splitText(text) {\n let parts = textchunk.chunk(text, maxCharacterCount);\n var i = 0;\n parts = parts.map(str => {\n // Compress whitespace.\n // console.log(\"-----\");\n // console.log(str);\n // console.log(\"-----\");\n return str.replace(/\\s+/g, ' ');\n }).map(str => {\n // Trim whitespace from the ends.\n return str.trim();\n });\n return Promise.resolve(parts);\n}", "function fragmentText(text, maxWidth) {\n var words = text.split(' ');\n for (var i = 0; i < (words.length - 1); i++) {\n words[i] = words[i] + \" \";\n }\n var lines = [],\n line = \"\";\n if (c.measureText(text).width < maxWidth) {\n return [text];\n }\n while (words.length > 0) {\n while (c.measureText(words[0]).width >= maxWidth) {\n var tmp = words[0];\n words[0] = tmp.slice(0, -1);\n if (words.length > 1) {\n words[1] = tmp.slice(-1) + words[1];\n } else {\n words.push(tmp.slice(-1));\n }\n }\n if (c.measureText(line + words[0]).width < maxWidth) {\n //quotes are the spacer at end of line\n line += words.shift() + \"\";\n } else {\n lines.push(line);\n line = \"\";\n }\n if (words.length === 0) {\n lines.push(line);\n }\n }\n return lines;\n}", "function getPreview(text) {\n return `${text.slice(0, 100).trim()}...`;\n}", "async function getText(source) {\n // initialize cheerio obj\n const $ = cheerio.load(source, CHEERIO_OPTIONS);\n\n // todo -> encode/decode methods? utf8/ascii?\n\n // find all text data and remove white spaces\n // var page_text = $.text().trim().replace(/\\s+/g, \" \");\n // var page_text = $.html();\n \n var page_text = he.decode($.html(), HE_OPTIONS);\n page_text = page_text.trim().replace(/\\s+/g, \" \");\n\n\n return page_text;\n}", "function doChunk() {\n\t var origStart = start;\n\t var box, pos = text.substr(start).search(/\\S/);\n\t start += pos;\n\t if (pos < 0 || start >= end) {\n\t return true;\n\t }\n\t\n\t // Select a single character to determine the height of a line of text. The box.bottom\n\t // will be essential for us to figure out where the next line begins.\n\t range.setStart(node, start);\n\t range.setEnd(node, start + 1);\n\t box = actuallyGetRangeBoundingRect(range);\n\t\n\t // for justified text we must split at each space, because space has variable width.\n\t var found = false;\n\t if (isJustified || columnCount > 1) {\n\t pos = text.substr(start).search(/\\s/);\n\t if (pos >= 0) {\n\t // we can only split there if it's on the same line, otherwise we'll fall back\n\t // to the default mechanism (see findEOL below).\n\t range.setEnd(node, start + pos);\n\t var r = actuallyGetRangeBoundingRect(range);\n\t if (r.bottom == box.bottom) {\n\t box = r;\n\t found = true;\n\t start += pos;\n\t }\n\t }\n\t }\n\t\n\t if (!found) {\n\t // This code does three things: (1) it selects one line of text in `range`, (2) it\n\t // leaves the bounding rect of that line in `box` and (3) it returns the position\n\t // just after the EOL. We know where the line starts (`start`) but we don't know\n\t // where it ends. To figure this out, we select a piece of text and look at the\n\t // bottom of the bounding box. If it changes, we have more than one line selected\n\t // and should retry with a smaller selection.\n\t //\n\t // To speed things up, we first try to select all text in the node (`start` ->\n\t // `end`). If there's more than one line there, then select only half of it. And\n\t // so on. When we find a value for `end` that fits in one line, we try increasing\n\t // it (also in halves) until we get to the next line. The algorithm stops when the\n\t // right side of the bounding box does not change.\n\t //\n\t // One more thing to note is that everything happens in a single Text DOM node.\n\t // There's no other tags inside it, therefore the left/top coordinates of the\n\t // bounding box will not change.\n\t pos = (function findEOL(min, eol, max){\n\t range.setEnd(node, eol);\n\t var r = actuallyGetRangeBoundingRect(range);\n\t if (r.bottom != box.bottom && min < eol) {\n\t return findEOL(min, (min + eol) >> 1, eol);\n\t } else if (r.right != box.right) {\n\t box = r;\n\t if (eol < max) {\n\t return findEOL(eol, (eol + max) >> 1, max);\n\t } else {\n\t return eol;\n\t }\n\t } else {\n\t return eol;\n\t }\n\t })(start, Math.min(end, start + estimateLineLength), end);\n\t\n\t if (pos == start) {\n\t // if EOL is at the start, then no more text fits on this line. Skip the\n\t // remainder of this node entirely to avoid a stack overflow.\n\t return true;\n\t }\n\t start = pos;\n\t\n\t pos = range.toString().search(/\\s+$/);\n\t if (pos === 0) {\n\t return false; // whitespace only; we should not get here.\n\t }\n\t if (pos > 0) {\n\t // eliminate trailing whitespace\n\t range.setEnd(node, range.startOffset + pos);\n\t box = actuallyGetRangeBoundingRect(range);\n\t }\n\t }\n\t\n\t // another workaround for IE: if we rely on getBoundingClientRect() we'll overlap with the bullet for LI\n\t // elements. Calling getClientRects() and using the *first* rect appears to give us the correct location.\n\t // Note: not to be used in Chrome as it randomly returns a zero-width rectangle from the previous line.\n\t if (microsoft) {\n\t box = range.getClientRects()[0];\n\t }\n\t\n\t var str = range.toString();\n\t if (!/^(?:pre|pre-wrap)$/i.test(whiteSpace)) {\n\t // node with non-significant space -- collapse whitespace.\n\t str = str.replace(/\\s+/g, \" \");\n\t }\n\t else if (/\\t/.test(str)) {\n\t // with significant whitespace we need to do something about literal TAB characters.\n\t // There's no TAB glyph in a font so they would be rendered in PDF as an empty box,\n\t // and the whole text will stretch to fill the original width. The core PDF lib\n\t // does not have sufficient context to deal with it.\n\t\n\t // calculate the starting column here, since we initially discarded any whitespace.\n\t var cc = 0;\n\t for (pos = origStart; pos < range.startOffset; ++pos) {\n\t var code = text.charCodeAt(pos);\n\t if (code == 9) {\n\t // when we meet a TAB we must round up to the next tab stop.\n\t // in all browsers TABs seem to be 8 characters.\n\t cc += 8 - cc % 8;\n\t } else if (code == 10 || code == 13) {\n\t // just in case we meet a newline we must restart.\n\t cc = 0;\n\t } else {\n\t // ordinary character --> advance one column\n\t cc++;\n\t }\n\t }\n\t\n\t // based on starting column, replace any TAB characters in the string we actually\n\t // have to display with spaces so that they align to columns multiple of 8.\n\t while ((pos = str.search(\"\\t\")) >= 0) {\n\t var indent = \" \".substr(0, 8 - (cc + pos) % 8);\n\t str = str.substr(0, pos) + indent + str.substr(pos + 1);\n\t }\n\t }\n\t\n\t if (!found) {\n\t prevLineBottom = box.bottom;\n\t }\n\t drawText(str, box);\n\t }", "function handleText() {\n if (index < text.length) {\n id(\"output\").innerText = \"\";\n let curWord = text[index];\n id(\"output\").innerText = curWord;\n index++;\n } else {\n endGame();\n }\n }", "function myProcessText(myTextObject){\r\n var myDocument = app.documents.item(0);\r\n // conver to World Ready Composer?\r\n if (ConvertToWRC) {\r\n try {\r\n if (myTextObject.composer == \"Adobe Paragraph Composer\") {\r\n myTextObject.composer = \"Adobe World-Ready Paragraph Composer\";\r\n }\r\n if (myTextObject.composer == \"Adobe Single-line Composer\") {\r\n myTextObject.composer = \"Adobe World-Ready Single-line Composer\";\r\n }\r\n }\r\n catch (_){}\r\n }\r\n var c;\r\n var res = \"\";\r\n var lastisa = 0; // to know if the last encountered consonant is a\r\n for (var myCharCounter = 0; myCharCounter < myTextObject.characters.length; myCharCounter++) {\r\n c = myTextObject.characters.item(myCharCounter);\r\n // hack: we replace >ù in TibetanChogyal by a unicode OM\r\n //alert(c.contents);\r\n if((c.appliedFont.name.substring(0,14) == \"TibetanChogyal\" \r\n || c.appliedFont.name.substring(0,14) == \"TibetanClassic\")\r\n && c.appliedFont.name.substring(14,15) != \"S\" \r\n && c.contents == \">\" \r\n && myCharCounter+1 < myTextObject.characters.length\r\n && myTextObject.characters.item(myCharCounter+1).contents == \"ù\") {\r\n res+=\"ༀ\";\r\n myCharCounter = myCharCounter +1;\r\n } else {\r\n ct = ConvertChar(c.contents, c.appliedFont.name);\r\n if (ct != 0 && ct != null){\r\n res += ct[0];\r\n }\r\n }\r\n }\r\n if (res) {\r\n var unifont = app.fonts.item(UniTibetanFont);\r\n myTextObject.appliedFont = unifont;\r\n if (!ComplexFontSizeCor && UniTibetanFontSize) {\r\n myTextObject.pointSize = UniTibetanFontSize;\r\n }\r\n myTextObject.contents = res;\r\n } else {\r\n alert(\"Error: the script wasn't able to convert anything!\");\r\n exit();\r\n }\r\n if (!ComplexFontSizeCor) {return;}\r\n // This part is experimental, and strangely doesn't work at all... maybe \r\n for (var myCharCounter = 0; myCharCounter < myTextObject.characters.length; myCharCounter++) {\r\n //for (var myCharCounter = 0; myCharCounter < res.length; myCharCounter++) {\r\n // Now handling font size correspondances:\r\n var fs = FontSizeCor[c.pointSize];\r\n if (fs) {\r\n // if it's a number, then we apply this font size\r\n if (typeof fs === 'number') {\r\n c.pointSize = fs;\r\n } else {\r\n fs = String(fs);\r\n // else we consider it's a string, so we apply the character style corresponding to the string to it: \r\n // (next code is from Adobe's examples)\r\n try {\r\n myCharacterStyle = myDocument.characterStyles.item(fs);\r\n //If the style does not exist, trying to get its name will generate an error.\r\n myName = myCharacterStyle.name;\r\n }\r\n catch (myError){\r\n //The style did not exist, so create it.\r\n myCharacterStyle = myDocument.characterStyles.add({name:fs});\r\n }\r\n c.appliedCharacterStyle = myCharacterStyle;\r\n }\r\n } else {\r\n c.pointSize = UniTibetanFontSize;\r\n }\r\n }\r\n}", "function TextParser() { }", "function loadText(text) {\n $('#status').html(\"\");\n bwtIndex = getBWTIndex(text);\n bwtView.loadText(text);\n var suffixes = getSortedSuffixes(text);\n var suffixArray = this.bwtIndex.suffixArray;\n var ranks = this.bwtIndex.ranks;\n bwtView.load(text, suffixes, suffixArray, ranks);\n}", "function printText(c, _a, t1, t2, mx, my, cb){\n var process = false;\n loopdis(0, _a);\n \n function loopdis(i, a) {\n if (i == a.length) { cb(); return; }\n var chars = a[i].split('');\n if(!process){\n drawText(0, chars, [mx, my + (i * 30)], \"\");\n i=i+1;\n }\n setTimeout(function () {\n loopdis(i, a);\n }, t1);\n }\n \n function drawText(i, a, p, _p) {\n process=true;\n c.font = \"16px Share Tech Mono\";\n if (i == a.length) {\n process=false;\n return;\n }\n c.fillText(a[i], p[0]+c.measureText(_p).width, p[1]);\n _p=_p+a[i];\n setTimeout(function () {\n drawText(i + 1, a, p, _p);\n }, t2);\n }\n}", "function reduceTextContent(text,limit){\n\tlet index = text.indexOf(' ',limit);\n\treturn (index != -1)?text.substring(0,index):\n\t\t\t\t\t\t\t\t\t\t\ttext;\n}", "splitTextElementWordByWord(textElement) {\n let lineWidget = textElement.line;\n let indexOf = lineWidget.children.indexOf(textElement);\n let text = textElement.text;\n let format;\n let characterUptoWs = text.trim().indexOf(' ');\n if (characterUptoWs >= 0) {\n lineWidget.children.splice(indexOf, 1);\n format = textElement.characterFormat;\n let fontSize = format.fontSize;\n let index = textElement.length - HelperMethods.trimStart(text).length; //Trim start\n while (index < textElement.length) {\n index = this.getTextIndexAfterSpace(text, index);\n if (index === 0 || index === textElement.length) {\n break;\n }\n if (index < textElement.length) {\n let splittedElement = new TextElementBox();\n let splittedText = text.substring(0, index);\n text = text.substring(index);\n if (text.substring(0, 1) === ' ') {\n // start of the text is trimmed and its length is reduced from text length. \n index += text.length - HelperMethods.trimStart(text).length;\n }\n splittedElement.text = splittedText;\n splittedElement.characterFormat.copyFormat(textElement.characterFormat);\n splittedElement.line = lineWidget;\n splittedElement.width = this.viewer.textHelper.getWidth(splittedElement.text, format);\n splittedElement.height = textElement.height;\n splittedElement.baselineOffset = textElement.baselineOffset;\n lineWidget.children.splice(indexOf, 0, splittedElement);\n textElement.text = text;\n textElement.width -= splittedElement.width;\n if (textElement.width === 0) {\n lineWidget.children.splice(lineWidget.children.indexOf(textElement), 1);\n }\n index = 0;\n indexOf++;\n }\n }\n textElement.text = text;\n lineWidget.children.splice(indexOf, 0, textElement);\n }\n }", "function writing(text){\n\tlengthSentence = sections[i].sentence.length;\n\tvar body = $('body');\n\tif(!opening){ // first part\n\t\tsetTimeout(function(){\t\n\t\t\tif(k < beginning.length){\n\t\t\t\tif(beginning[k] === '<'){\n\t\t\t\t\tcurrentPart += ' <br id=\"brName\">';\n\t\t\t\t\tk=k+4;\n\t\t\t\t}\n\t\t\t\tcurrentPart += beginning[k];\n\t\t\t\ttext.html(currentPart);\n\t\t\t\tk++;\n\t\t\t\twriting(text);\t\t\t\n\t\t\t}else if(k === (beginning.length)){\n\t\t\t\tcurrentPart += '<br>';\n\t\t\t\ttext.html(currentPart);\n\t\t\t\topening = true;\n\t\t\t\twriting(text);\n\t\t\t}\n\t\t},interval);\n\t}else if(opening){ // sentences\n\t\tsetTimeout(function(){\n\t\t\tinterval = 65;\n\t\t\tif(j === lengthSentence){\n\t\t\t\tforward = false;\n\t\t\t}\n\t\t\tif(j === lengthSentence-2){\n\t\t\t\t$('.original').one().addClass('onScreen');\n\t\t\t}\n\t\t\tif( j === lengthSentence-1 && forward){\n\t\t\t\tinterval = pauseEnd;\n\t\t\t}\n\t\t\tif(j < lengthSentence && forward ){\n\t\t\t\tif(sections[i].sentence[j] === '&'){\n\t\t\t\t\tcurrentPart += '<strong>';\n\t\t\t\t}else if(sections[i].sentence[j] === '%'){\n\t\t\t\t\tcurrentPart += '</strong>';\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tcurrentPart += sections[i].sentence[j];\n\t\t\t\t}\n\t\t\t\ttext.html(currentPart);\n\t\t\t\tj++;\n\t\t\t}else if(j > 0 && !forward){\n\t\t\t\tif(sections[i].sentence[j] === '&'){\n\t\t\t\t\tcurrentPart = currentPart.slice(0, - 8);\n\t\t\t\t}else if(sections[i].sentence[j] === '%'){\n\t\t\t\t\tcurrentPart = currentPart.slice(0, - 9);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tcurrentPart = currentPart.slice(0, - 1); \n\t\t\t\t}\n\t\t\t\ttext.html(currentPart);\n\t\t\t\tj--;\n\t\t\t}else if(j === 0){\n\t\t\t\tforward = true;\n\t\t\t\ti++; \n\t\t\t}\n\t\t\tif(i === lengthArray){\n\t\t\t\ti = 0;\n\t\t\t}\n\t\t\twriting(text);\n\t\t}, interval);\n\t}\n}", "function processLine(cm, text, state, startAt) {\n\t\t var mode = cm.doc.mode;\n\t\t var stream = new StringStream(text, cm.options.tabSize);\n\t\t stream.start = stream.pos = startAt || 0;\n\t\t if (text == \"\") callBlankLine(mode, state);\n\t\t while (!stream.eol()) {\n\t\t readToken(mode, stream, state);\n\t\t stream.start = stream.pos;\n\t\t }\n\t\t }", "function textGenerate() {\n var n = \"\";\n var text = \" Bé thương anh lắm, iu bae của em nữaaa..:333 \";\n var a = Array.from(text);\n var textVal = $('#txtReason').val() ? $('#txtReason').val() : \"\";\n var count = textVal.length;\n if (count > 0) {\n for (let i = 1; i <= count; i++) {\n n = n + a[i];\n if (i == text.length + 1) {\n $('#txtReason').val(\"\");\n n = \"\";\n break;\n }\n }\n }\n $('#txtReason').val(n);\n setTimeout(\"textGenerate()\", 1);\n}", "function textWrapPX (text) {\n var width = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Infinity;\n text.each(function () {\n var text = d3Selection.select(this),\n words = text.text().split(/\\s+/).reverse(),\n word,\n line = [],\n lineNumber = 0,\n lineHeight = 1.1,\n // ems\n y = parseFloat(text.attr('y')) || 0,\n dy = parseFloat(text.attr('dy')) || 0,\n tspan = text.text(null).append('tspan').attr('x', 0).attr('y', y).attr('dy', dy + 'em');\n word = words.pop();\n\n while (word) {\n line.push(word);\n tspan.text(line.join(' '));\n\n if (tspan.node().getComputedTextLength() > width) {\n line.pop();\n tspan.text(line.join(' '));\n line = [word];\n tspan = text.append('tspan').attr('x', 0).attr('y', y).attr('dy', ++lineNumber * lineHeight + dy + 'em').text(word);\n }\n\n word = words.pop();\n }\n });\n}", "function wikitext_to_plain_text(wikitext) {\r\n\t\tif (!wikitext || !(wikitext = wikitext.trim())) {\r\n\t\t\t// 一般 template 中之 parameter 常有設定空值的狀況,因此首先篩選以加快速度。\r\n\t\t\treturn wikitext;\r\n\t\t}\r\n\t\t// TODO: \"《茶花女》维基百科词条'''(法语)'''\"\r\n\t\twikitext = wikitext\r\n\t\t// 去除註解 comments。\r\n\t\t// e.g., \"親会社<!-- リダイレクト先の「[[子会社]]」は、[[:en:Subsidiary]] とリンク -->\"\r\n\t\t// \"ロイ・トーマス<!-- 曖昧さ回避ページ -->\"\r\n\t\t.replace(/<\\!--[\\s\\S]*?-->/g, '')\r\n\t\t// 沒先處理的話,也會去除 <br />\r\n\t\t.replace(/<br(?:\\s[^<>]*)?>/ig, '\\n').replace(/<\\/?[a-z][^>]*>/g, '')\r\n\t\t// \"{{=}}\" → \"=\"\r\n\t\t.replace(/{{=\\s*}}/ig, '=')\r\n\t\t// e.g., remove \"{{En icon}}\"\r\n\t\t.replace(/{{[a-z\\s]+}}/ig, '')\r\n\t\t// e.g., \"[[link]]\" → \"link\"\r\n\t\t// 警告:應處理 \"[[ [[link]] ]]\" → \"[[ link ]]\" 之特殊情況\r\n\t\t// 警告:應處理 \"[[text | [[ link ]] ]]\", \"[[ link | a[1] ]]\" 之特殊情況\r\n\t\t.replace(\r\n\t\t\t\tPATTERN_wikilink_global,\r\n\t\t\t\tfunction(all_link, page_and_section, page_name, section_title,\r\n\t\t\t\t\t\tdisplayed_text) {\r\n\t\t\t\t\treturn displayed_text || page_and_section;\r\n\t\t\t\t})\r\n\t\t// e.g., \"ABC (英文)\" → \"ABC \"\r\n\t\t// e.g., \"ABC (英文)\" → \"ABC \"\r\n\t\t.replace(/[((][英中日德法西義韓諺俄独原][語语國国]?文?[名字]?[))]/g, '')\r\n\t\t// e.g., \"'''''title'''''\" → \" title \"\r\n\t\t// .remove_head_tail(): function remove_head_tail() @ CeL.data.native\r\n\t\t.remove_head_tail(\"'''\", 0, ' ').remove_head_tail(\"''\", 0, ' ')\r\n\t\t// 有時因為原先的文本有誤,還是會有 ''' 之類的東西留下來。\r\n\t\t.replace(/'{2,}/g, ' ').trim()\r\n\t\t// 此處之 space 應為中間之空白。\r\n\t\t.replace(/\\s{2,}/g, function(space) {\r\n\t\t\t// trim tail\r\n\t\t\treturn space.replace(/[^\\n]{2,}/g, ' ')\r\n\t\t\t// 避免連\\n都被刪掉。\r\n\t\t\t.replace(/[^\\n]+\\n/g, '\\n').replace(/\\n{3,}/g, '\\n\\n');\r\n\t\t}).replace(/[((] /g, '(').replace(/ [))]/g, ')');\r\n\r\n\t\treturn wikitext;\r\n\t}", "function utf8Text(buf,i){var total=utf8CheckIncomplete(this,buf,i);if(!this.lastNeed)return buf.toString(\"utf8\",i);this.lastTotal=total;var end=buf.length-(total-this.lastNeed);buf.copy(this.lastChar,0,end);return buf.toString(\"utf8\",i,end)}", "function processLine(cm, text, context, startAt) {\n\t\t var mode = cm.doc.mode;\n\t\t var stream = new StringStream(text, cm.options.tabSize, context);\n\t\t stream.start = stream.pos = startAt || 0;\n\t\t if (text == \"\") { callBlankLine(mode, context.state); }\n\t\t while (!stream.eol()) {\n\t\t readToken(mode, stream, context.state);\n\t\t stream.start = stream.pos;\n\t\t }\n\t\t }", "function unhumanizeSize(text) {\n const powers = {\n k: 1, m: 2, g: 3, t: 4,\n };\n const regex = /(\\d+(?:\\.\\d+)?)\\s?(k|m|g|t)?b?/i;\n const res = regex.exec(text);\n return res[1] * (1024 ** powers[res[2].toLowerCase()]);\n}", "function scroll_text(text, interval, repeat) {\n if(!interval) {\n interval = 100;\n }\n var raw_chars = [];\n if(repeat) {\n text = ' ' + text.trim();\n } else {\n text = ' ' + text.trim() + ' ';\n }\n for(i=0; i<text.length; i++) {\n var c = text[i];\n raw_chars.push(font[c]);\n }\n var row0 = [];\n var row1 = [];\n var row2 = [];\n var row3 = [];\n var row4 = [];\n for(i=0; i<raw_chars.length; i++) {\n var c = raw_chars[i];\n row0.extend(c[0])\n row1.extend(c[1])\n row2.extend(c[2])\n row3.extend(c[3])\n row4.extend(c[4])\n }\n var left = 0;\n var right = 5;\n var when = interval;\n for(i=0; i<row0.length; i++) {\n var image = []\n image[0] = row0.slice(left, right);\n image[1] = row1.slice(left, right);\n image[2] = row2.slice(left, right);\n image[3] = row3.slice(left, right);\n image[4] = row4.slice(left, right);\n TIMEOUTS.push(window.setTimeout(show, when, image));\n left++;\n right++;\n when+=interval;\n }\n if(repeat) {\n TIMEOUTS.push(window.setTimeout(scroll_text, when, text, interval, repeat));\n }\n}", "function wordReport(text) {\n var words = splitText(text);\n var avgWordLength = averageWordLength(words);\n var countedWords = words.length;\n var uniqueWords = uniqueWordCount(words);\n\n var textReport = $(\".js-text-report\");\n textReport.find('.js-word-count').text(countedWords);\n textReport.find('.js-unique-word-count').text(uniqueWords);\n textReport.find('.js-avg-word-length').text(avgWordLength + \" characters\");\n\n textReport.removeClass('hidden');\n\n}", "function fetchFullText() {\n return fetchFullTextfor( getTeemaSana() );\n}", "function stringToWords(sentence, box) {\n\tvar fontSize = 20;\n\tvar fontHeight = 24;\n\tvar space = 6; //blank space is 5 pixels\n\tvar splits = new Array();\n\tvar wordBundle = { words: [], parsed: \"\", boxHeight:0};\n\tvar x = 0; var y = 0;\n\t\n\tsplits = sentence.split(\" \");\n\tfor (var i = 0; i < splits.length(); i++) {\n\t\tvar text = splits[i];\n\t\t$(\"tempOut\").update(\"<span style='position: absolute; height: auto; \\\n\t\t\t\t\t\t\twidth: auto; font-size: \"+text+\"px; visibility: \\\n\t\t\t\t\t\t\t'hidden' id='measure'>\"+wordtext+\"</span>\");\n\t\tvar test = $(\"measure\");\n\t\tvar height = test.clientHeight + 1;\n\t\tvar width = test.clientWidth + 1;\n\t\twordBundle.parsed += \"<span id='\"+box.id+\".\"+i+\"'>\"+text+\"</span>\";\n\t\twordBundle.words[i] = text;\n\t\tif (x+width > box.maxWidth) { //out of bounds, new line\n\t\t\tx = 0;\n\t\t\ty += fontHeight;\n\t\t}\n\t\twordBundle.words.x = x;\n\t\twordBundle.words.y = y;\n\t\twordBundle.words.width = width;\n\t\twordBundle.words.height = height;\n\t\tx += width + space;\n\t}\n\twordBundle.maxHeight = y + height;\n\treturn wordBundle\n}", "function utf8Text(buf,i){var total=utf8CheckIncomplete(this,buf,i);if(!this.lastNeed)return buf.toString('utf8',i);this.lastTotal=total;var end=buf.length-(total-this.lastNeed);buf.copy(this.lastChar,0,end);return buf.toString('utf8',i,end);}// For UTF-8, a replacement character is added when ending on a partial", "function utf8Text(buf,i){var total=utf8CheckIncomplete(this,buf,i);if(!this.lastNeed)return buf.toString('utf8',i);this.lastTotal=total;var end=buf.length-(total-this.lastNeed);buf.copy(this.lastChar,0,end);return buf.toString('utf8',i,end);}// For UTF-8, a replacement character is added when ending on a partial", "_adjustLengthText(stText, limit) {\n if (stText.length > limit)\n return stText.slice(0, limit) + \"...\";\n else\n return stText;\n }", "_adjustLengthText(stText, limit) {\n if (stText.length > limit)\n return stText.slice(0, limit) + \"...\";\n else\n return stText;\n }", "function TextData() { }", "function TextData() { }", "function cleanText(text) {\n return text.split(/\\r\\n|\\r|\\n/)[0].replace(/[^a-zA-Z]/g, '')\n .substring(0, 50).toLowerCase();\n }", "function textToObjs(l) {\n var textObj = {};\n var textDocument = l.property(\"ADBE Text Properties\").property(\"ADBE Text Document\").value;\n \n //temporarily unparent the layer (if it is actually parented) to get accurate scale\n try{\n var tempParent = l.parent;\n l.parent = \"\";\n var scaleV = l.property(\"ADBE Transform Group\").property(\"ADBE Scale\").value;\n l.parent = tempParent;\n } catch (e) {\n var scaleV = l.property(\"ADBE Transform Group\").property(\"ADBE Scale\").value;\n }\n //\n\n textObj.layerName= l.name;\n textObj.layerScale= [scaleV[0],scaleV[1]];\n textObj.rotation = l.property(\"ADBE Transform Group\").property(\"ADBE Rotate Z\").value;\n \n //NOTE: position is handled in the main recurse() function, because i'm either lazy, stupid, or STPUD LIKE A FOX. guess which! \n\n //textObj.anchorPoint = l.transform.anchorPoint.value;\n\n textObj.font= textDocument.font;\n textObj.fontSize= textDocument.fontSize;\n textObj.fillColor= textDocument.fillColor;\n textObj.justification= textJustVal(textDocument);\n textObj.applyFill= textDocument.applyFill;\n textObj.text= textDocument.text;\n textObj.tracking= textDocument.tracking;\n try {\n if(textDocument.boxText) textObj.kind = \"PARAGRAPHTEXT\";\n textObj.boxTextSize= textDocument.boxTextSize;\n \n } catch(e) {\n if(textDocument.pointText) textObj.kind = \"POINTTEXT\";\n }\n \n // replace line returns with no characters/whitespace with line returns WITH whitespace\n l.property(\"Source Text\").setValue(textDocument.text.replace(\"\\r\\r\",\"\\rQ\\r\")); // cheat to make certain the second line always has a valid baselineLocs value (doesn't work with \\r)\n textObj.baselineLocs = l.property(\"ADBE Text Properties\").property(\"ADBE Text Document\").value.baselineLocs;\n l.property(\"Source Text\").setValue(textObj.text);\n return textObj;\n\n }", "string_ify(text) {\n var result = \"\";\n for (var i = 0; i < text.length; i++) {\n result += text[i];\n }\n \n return result;\n }", "function flowText(ctx, text, width) {\n const breakChars = [\"\\n\", \" \", \"-\", \".\", \",\", \"(\", \")\", \"/\", \";\", \":\"];\n let output = \"\";\n while (text) { // Loop while text remains\n let line = \"\"; // Current line fits in here\n let next = false; // true = stop trying\n let c = 0;\n while (c < breakChars.length) { // Try many breaking characters in order\n next = false;\n while (!next) {\n let measured = ctx.measureText(line+text.split(breakChars[c])[0]+(breakChars[c] == \"\\n\" ? \"\" : breakChars[c])).actualBoundingBoxRight;\n if (measured <= width) { // If next word is narrower than width,\n line += text.split(breakChars[c])[0]+breakChars[c]; // Add word to line\n //console.log(`> ${line}`);\n text = text.split(breakChars[c]).slice(1).join(breakChars[c]); // Remove word from text;\n if (breakChars[c] == \"\\n\") {\n c = breakChars.length;\n next = true;\n } else {\n c = 0;\n }\n } else { // Otherwise,\n next = true; // stop trying;\n //console.log(`Can't fit \"${text.split(breakChars[c])[0]+breakChars[c]}\" onto \"${line}\". (${measured} > ${width})`);\n }\n if (text == \"\") { // Quit once out of text\n next = true;\n c = breakChars.length;\n }\n }\n c++;\n }\n if (line == \"\") { // If nothing fit in\n next = false;\n while (!next) {\n if (ctx.measureText(line+text.charAt(0)).actualBoundingBoxRight <= width) { // If next letter is narrower than width,\n line += text.charAt(0); // Add letter to line\n text = text.slice(1); // Remove letter from text\n } else { // Otherwise,\n next = true; // stop trying\n }\n }\n }\n line = line.split(\"\\n\").filter(l => l).join(\"\\n\");\n output += line+\"\\n\"; // Add line to output\n }\n console.log(\"Finished:\\n\"+output);\n return output;\n}", "autowriterText() {\n // clear the interval of alternating text\n clearInterval(this.interval);\n this.counter = 0;\n this._interval = setInterval(() => {\n this.displayText += this.text.charAt(this.counter);\n this.counter++;\n // to display alternating text\n if (this.counter === this.text.length) {\n this.alternatingWriterText();\n }\n }, this.speed);\n }", "function text$6(str, x, y, width, height, z) {\n // 'fail' on 0-valued dimensions\n if (str.length === 0 || width === 0 || height === 0) {\n return;\n }\n // also 'fail' if the text height is larger than the bounding height\n if(curTextSize > height) {\n return;\n }\n\n var spaceMark = -1;\n var start = 0;\n var lineWidth = 0;\n var drawCommands = [];\n\n // run through text, character-by-character\n for (var charPos=0, len=str.length; charPos < len; charPos++)\n {\n var currentChar = str[charPos];\n var spaceChar = (currentChar === \" \");\n var letterWidth = curTextFont.measureTextWidth(currentChar);\n\n // if we aren't looking at a newline, and the text still fits, keep processing\n if (currentChar !== \"\\n\" && (lineWidth + letterWidth <= width)) {\n if (spaceChar) { spaceMark = charPos; }\n lineWidth += letterWidth;\n }\n\n // if we're looking at a newline, or the text no longer fits, push the section that fit into the drawcommand list\n else\n {\n if (spaceMark + 1 === start) {\n if(charPos>0) {\n // Whole line without spaces so far.\n spaceMark = charPos;\n } else {\n // 'fail', because the line can't even fit the first character\n return;\n }\n }\n\n if (currentChar === \"\\n\") {\n drawCommands.push({text:str.substring(start, charPos), width: lineWidth});\n start = charPos + 1;\n } else {\n // current is not a newline, which means the line doesn't fit in box. push text.\n // In Processing 1.5.1, the space is also pushed, so we push up to spaceMark+1,\n // rather than up to spaceMark, as was the case for Processing 1.5 and earlier.\n drawCommands.push({text:str.substring(start, spaceMark+1), width: lineWidth});\n start = spaceMark + 1;\n }\n\n // newline + return\n lineWidth = 0;\n charPos = start - 1;\n }\n }\n\n // push the remaining text\n if (start < len) {\n drawCommands.push({text:str.substring(start), width: lineWidth});\n }\n\n // resolve horizontal alignment\n var xOffset = 1,\n yOffset = curTextAscent;\n if (horizontalTextAlignment === PConstants.CENTER) {\n xOffset = width/2;\n } else if (horizontalTextAlignment === PConstants.RIGHT) {\n xOffset = width;\n }\n\n // resolve vertical alignment\n var linesCount = drawCommands.length,\n visibleLines = Math.min(linesCount, Math.floor(height/curTextLeading));\n if(verticalTextAlignment === PConstants.TOP) {\n yOffset = curTextAscent + curTextDescent;\n } else if(verticalTextAlignment === PConstants.CENTER) {\n yOffset = (height/2) - curTextLeading * (visibleLines/2 - 1);\n } else if(verticalTextAlignment === PConstants.BOTTOM) {\n yOffset = curTextDescent + curTextLeading;\n }\n\n var command,\n drawCommand,\n leading;\n for (command = 0; command < linesCount; command++) {\n leading = command * curTextLeading;\n // stop if not enough space for one more line draw\n if (yOffset + leading > height - curTextDescent) {\n break;\n }\n drawCommand = drawCommands[command];\n drawing.text$line(drawCommand.text, x + xOffset, y + yOffset + leading, z, horizontalTextAlignment);\n }\n }", "async words(contentText) {\n //TODO\n let words = [];\n let splitWords;\n let noiseWords = [];\n await db.collection(noise_table).find({}).forEach(function (u) {\n noiseWords.push(u.word);\n });\n while (splitWords = WORD_REGEX.exec(contentText)) {\n let [word, offset] = [splitWords[0], splitWords.index];\n word = normalize(word);\n word = stem(word);\n if(!(noiseWords.indexOf(word) > -1)) {\n words.push([word, offset]);\n }\n }\n return await words;\n\n }", "function longSubString(){\n\t\n}", "getTextContent() {}", "function getStats(txt) {\n //convert everything to lower case\n sampleText = txt.toLowerCase();\n //Question 1:\n q1 = sampleText.length;\n //Question 2:\n //Remove all white spaces\n oneSpace = sampleText.replace(/\\s/g, \" \");\n //https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions\n //Splits into array\n wordsArray = oneSpace.split(/\\W+/);\n //remove any blank elements\n for(index in wordsArray){\n if (wordsArray[index].length < 1){\n wordsArray.splice(index, 1);\n }\n }\n q2 = wordsArray.length;\n //return 0 if 1 element is empty\n if (wordsArray.length < 2){\n if (wordsArray[0] !== undefined && wordsArray[0].length < 1){\n q2 = 0;\n }\n }\n //question 3:\n //split on lines\n linesArray = sampleText.split(/\\n/);\n //compute the number of lines\n q3 = linesArray.length;\n //be 0 if nothing exists in first line\n if (linesArray.length < 2){\n if (linesArray[0].length < 1){\n q3 = 0;\n }\n }\n //question 4:\n //Go from end of line array and computer line by line, removing all lines that are blank\n for (i = linesArray.length - 1; i > -1; i--){\n line = linesArray[i].replace(/\\s/g,\"\");\n if (line.length < 1){\n //remove blank line\n linesArray.splice(i, 1);\n }\n }\n q4 = linesArray.length;\n //make sure array has atleast 1 line\n if (linesArray.length < 2){\n if (linesArray[0] !== undefined && linesArray[0].replace(/\\s/g,\"\").length < 1){\n q4 = 0;\n }\n }\n //question 5:\n //Get lines\n linesArrayQ5 = sampleText.split(\"\\n\");\n q5 = 0;\n //go though lines and get longest line length\n for (index in linesArrayQ5){\n if (linesArrayQ5[index].length > q5){\n q5 = linesArrayQ5[index].length;\n }\n }\n //question 6:\n lengthOfWords = 0;\n //go though all words and add their length together\n for (index in wordsArray){\n lengthOfWords += wordsArray[index].length;\n }\n //if there is words then divide by number of words\n if (lengthOfWords !== 0){\n q6 = lengthOfWords / wordsArray.length;\n }\n else{\n q6 = 0;\n }\n //question 7:\n reversedArray = [];\n //reverse the word and add it to a new array\n for (index in wordsArray){\n pal = \"\";\n for (x = wordsArray[index].length - 1; x >= 0; x--){\n pal += wordsArray[index][x];\n }\n reversedArray.push(pal);\n }\n q7 = [];\n //check if words are palindromes by comparing two lists\n for (index in wordsArray){\n if (wordsArray[index] === reversedArray[index]){\n //remove duplicates....\n if (wordsArray[index].length > 1 && !(wordsArray[index] in q7)){\n q7.push(wordsArray[index]);\n }\n }\n }\n //Question 8:\n sortedArray = wordsArray.concat();\n sortedArray.sort(function (a, b) {\n //sort by size and alphabetically\n return b.length - a.length || a.localeCompare(b);\n })\n q8 = [];\n //add 10 words to array\n for (i = 0; i < 10; i++){\n if (sortedArray.length > i){\n //only add word if it hasnt been added before\n if(i > 0 && sortedArray[i] === q8[i-1]){\n sortedArray.splice(i,1);\n i--;\n }\n else{\n q8.push(sortedArray[i]);\n }\n }\n }\n //for empty list\n if (q8[0] === \"\"){\n q8 = [];\n }\n //question 9:\n wordFreq = {};\n //make dictonary of words\n for (index in wordsArray){\n if(wordsArray[index] in wordFreq){\n wordFreq[wordsArray[index]] += 1;\n }\n else{\n wordFreq[wordsArray[index]] = 1;\n }\n }\n //convert dictonary to array\n freqArray = [];\n for (value in wordFreq){\n x = {};\n x.word = value;\n x.number = wordFreq[value];\n freqArray.push(x);\n }\n //sort array\n freqArray.sort(function (a, b) {\n return b.number-a.number || a.word.localeCompare(b.word);\n })\n q9 = [];\n //only add 10 elements\n for (index in freqArray){\n if (q9.length < 10){\n endVal = freqArray[index].word + \"(\" + freqArray[index].number + \")\";\n q9.push(endVal);\n }\n }\n //if it was empty of a space then remove it\n if (q9[0] === \"(1)\"){\n q9 = [];\n }\n\n return {\n nChars: q1,\n nWords: q2,\n nLines: q3,\n nNonEmptyLines: q4,\n maxLineLength: q5,\n averageWordLength: q6,\n palindromes: q7,\n longestWords: q8,\n mostFrequentWords: q9\n };\n}", "async function detectText(fileName) {\n // Read a local image as a text document\n const [result] = await client.documentTextDetection(fileName);\n const fullTextAnnotation = result.fullTextAnnotation;\n // let fullText = fullTextAnnotation.text;\n let content = '';\n // let content = fullTextAnnotation.text + '\\n';\n // let blockconfidence = 0;\n // console.log(`Full text: ${fullTextAnnotation.text}`);\n fullTextAnnotation.pages.forEach(page => {\n page.blocks.forEach(block => {\n content += `Block confidence: ${block.confidence}\\n`\n // console.log(`Block confidence: ${block.confidence}`);\n block.paragraphs.forEach(paragraph => {\n content += `Paragraph confidence: ${paragraph.confidence}\\n`\n // console.log(`Paragraph confidence: ${paragraph.confidence}`);\n paragraph.words.forEach(word => {\n const wordText = word.symbols.map(s => s.text).join('');\n content += `Word text: ${wordText}\\n`\n content += `Word confidence: ${word.confidence}\\n`\n // console.log(`Word text: ${wordText}`);\n // console.log(`Word confidence: ${word.confidence}`);\n // word.symbols.forEach(symbol => {\n // content += `Symbol text: ${symbol.text}\\n`\n // content += `Symbol confidence: ${symbol.confidence}\\n`\n // // console.log(`Symbol text: ${symbol.text}`);\n // // console.log(`Symbol confidence: ${symbol.confidence}`);\n // });\n });\n });\n });\n });\n // console.log('content:'+content);\n return {content, fullText: fullTextAnnotation.text, json: result}\n}", "function fitText(ctx, text, font_size, width) {\n //Lower the font size until the text fits the canvas\n do {\n font_size -= 1;\n ctx.font = 'normal normal 400 ' + font_size + 'px ' + font_family;\n } while (ctx.measureText(text).width > width);\n return font_size;\n } //function fitText", "function message(in_text) {\n\t// Join the buffer with the new text\n\tvar split_buffer = vamp_object.buffer.split('<br>').concat(in_text.split('<br>'));\n\t// Only want the last 10 lines\n\tif (split_buffer.length > 10) {\n\t\tsplit_buffer = split_buffer.slice(-10);\n\t}\n\t// Rejoin and update buffer\n\tvamp_object.buffer = split_buffer.join('<br>');\n\tdocument.getElementById(\"center_panel\").innerHTML = vamp_object.buffer;\n}", "get textContent() {\n return this.isLeaf && this.type.spec.leafText ? this.type.spec.leafText(this) : this.textBetween(0, this.content.size, \"\");\n }" ]
[ "0.6015067", "0.5988325", "0.5911306", "0.5894167", "0.58776987", "0.57967967", "0.57963806", "0.5777366", "0.5755295", "0.5726947", "0.5698994", "0.5686076", "0.5652949", "0.5641966", "0.5626645", "0.56076276", "0.55978674", "0.5589345", "0.5588015", "0.55834883", "0.5572972", "0.556781", "0.55573255", "0.5555203", "0.55416256", "0.55341434", "0.55311394", "0.5514687", "0.55095446", "0.5456032", "0.5454903", "0.5452864", "0.54490024", "0.5448766", "0.5448766", "0.5448766", "0.54446197", "0.54362977", "0.5434887", "0.54312706", "0.5424817", "0.5416272", "0.54062635", "0.54038805", "0.53992563", "0.5395701", "0.53927386", "0.53915644", "0.539057", "0.5379536", "0.5371261", "0.5370042", "0.53641963", "0.5362838", "0.5353327", "0.5348828", "0.5348828", "0.5345454", "0.5340336", "0.53287333", "0.53275114", "0.5324375", "0.53239733", "0.5320324", "0.5317943", "0.5317323", "0.5309456", "0.5308919", "0.5281198", "0.5276676", "0.5275745", "0.5271126", "0.52710176", "0.5266632", "0.52632964", "0.52629375", "0.52615786", "0.5261393", "0.5257482", "0.5255638", "0.5242219", "0.5236492", "0.5236492", "0.523353", "0.523353", "0.5225651", "0.5225651", "0.5225311", "0.52247286", "0.52221346", "0.5219132", "0.5215342", "0.52083486", "0.5207336", "0.51998633", "0.5198344", "0.51982373", "0.5197594", "0.519519", "0.5194382", "0.51935416" ]
0.0
-1
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
function _default(option) { createParallelIfNeeded(option); mergeAxisOptionFromParallel(option); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get Android() {}", "function SBRecordsetPHP_analyzePlatformSpecific()\r\n{\r\n\r\n\r\n}", "onChildAppStart () {\n\n }", "private internal function m248() {}", "private public function m246() {}", "onMessageStart() { }", "createStream () {\n\n }", "_playbackCompatibility() {\n // Detect audio playback capabilities.\n\n // Detect HTML5 Audio playback.\n // http://caniuse.com/#feat=audio\n this.canUseAudio = Boolean(new Audio());\n console.log('Native HTML5 Audio playback capability: ' +\n this.canUseAudio);\n\n // Detect Cordova Media Playback\n // It allows playing audio using the native bridge inside WebView Apps.\n // https://github.com/apache/cordova-plugin-media/blob/master/doc/index.md\n this.canUseCordovaMedia = Boolean(window.Media);\n console.log('Cordova Media playback capability: ' +\n this.canUseCordovaMedia);\n\n if (!(this.canUseAudio || this.canUseCordovaMedia)) {\n throw new Error(\n 'Some form of audio playback capability is required');\n }\n\n var _audio = new Audio();\n if (_audio.canPlayType === 'function') {\n throw new Error(\n 'Unable to detect audio playback capabilities');\n }\n\n var canPlayOggVorbis = _audio.canPlayType(\n 'audio/ogg; codecs=\"vorbis\"') !== '';\n var canPlayOggOpus = _audio.canPlayType(\n 'audio/ogg; codecs=\"opus\"') !== '';\n var canPlayWave = _audio.canPlayType('audio/wav') !== '';\n var canPlayMP3 = _audio.canPlayType('audio/mpeg; codecs=\"mp3\"') !== '';\n var canPlayAAC = _audio.canPlayType(\n 'audio/mp4; codecs=\"mp4a.40.2\"') !== '';\n var canPlay3GPP = _audio.canPlayType(\n 'audio/3gpp; codecs=\"samr\"') !== '';\n\n console.log('Native Vorbis audio in Ogg container playback capability: ' +\n canPlayOggVorbis);\n console.log('Native Opus audio in Ogg container playback capability: ' +\n canPlayOggOpus);\n console.log('Native PCM audio in Waveform Audio File Format (WAVE) ' +\n 'playback capability: ' + canPlayWave);\n console.log('Native MPEG Audio Layer 3 (MP3) playback capability: ' +\n canPlayMP3);\n console.log('Native Low-Complexity AAC audio in MP4 container playback ' +\n 'capability: ' + canPlayAAC);\n console.log('Native AMR audio in 3GPP container playback capability: ' +\n canPlay3GPP);\n\n if (!(canPlayWave || canPlayMP3)) {\n throw new Error(\n 'Native Wave or MP3 playback is required');\n }\n }", "constructor() {\n\t}", "constructor() {\n\t}", "constructor() {\n\n\t}", "onComponentMount() {\n\n }", "constructor() {\n throw new Error('Not implemented');\n }", "supportsPlatform() {\n return true;\n }", "function _____SHARED_functions_____(){}", "constructor() {\n }", "constructor() {\n\t\t// ...\n\t}", "static get tag(){return\"hal-9000\"}", "static getDeviceModel() {\n return \"zhimi.fan.za4\";\n }", "requestContainerInfo() {}", "constructor () { super() }", "function BaseDeviceProfile() {\n \n this.audioNeedsTranscodingCodecs = []; // fill these with audio codecs that the implemented device can handle natively\n this.videoNeedsTranscodingCodecs = []; // fill these with video codecs that the implemented device can handle natively\n this.validFormats = []; // fill these with video formats that the implemented device can handle natively\n\n this.transcodeOptions = {\n rescaleVideo : false, // BaseDeviceProfile.prototype.rescale\n subtitle : false, // BaseDeviceProfile.prototype.hardCodeSubtitle\n audioShiftCorrect : false // BaseDeviceProfile.prototype.correctAudioOffset\n };\n\n /**\n * @todo: whutz this?\n * @param {[type]} probeData [description]\n * @return {[type]} [description]\n */\n this.canPlayContainer = function (probeData) {\n throw new Error(\"canPlayContainer : Not Implemented\");\n };\n\n /**\n * Implement this method to return device specific ffmpeg flags for a probed media\n * @param {object} probeData ffmpeg probe data\n * @param {[type]} forceTranscode force transcode even if native format?\n * @return {Promise} [description]\n */\n this.getFFmpegFlags = function (probeData, forceTranscode) {\n throw new Error(\"getFFmpegFlags : Not Implemented!\");\n };\n\n}", "static get STATUS() {\n return 0;\n }", "static create () {}", "get() {}", "didMount() {\n }", "_onMessage() {\n throw new Error(\"not implemented\");\n }", "onReady() {}", "native() {\n throw new Error('NOT_IMPLEMENTED_EXCEPTION: you must override this method in order to use it')\n }", "function sdk(){\n}", "constructor () {\r\n\t\t\r\n\t}", "transient private protected internal function m182() {}", "function version(){ return \"0.13.0\" }", "static getDeviceModel() {\n return \"zhimi.fan.za5\";\n }", "started () {}", "function getVersion(){return _VERSION}", "transient private internal function m185() {}", "constructor() {\r\n }", "started() { }", "InitVsaEngine() {\n\n }", "started() {\r\n\r\n\t}", "function SigV4Utils() { }", "static get NOT_READY () {return 0}", "started () {\n\n }", "started () {\n\n }", "started () {\n\n }", "initialize() {\n\n }", "onMessageReceive() {}", "initialize()\n {\n }", "_get () {\n throw new Error('_get not implemented')\n }", "get () {\n }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "function getImplementation( cb ){\n\n }", "started() {}", "started() {}", "started() {}", "started() {}", "started() {}", "started() {}", "started() {}", "started() {}", "started() {}", "started() {}", "heartbeat () {\n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "initleancloud() {\n AV.init({\n appId: keys.appId,\n appKey: keys.appKey\n })\n this.globalData.AV = AV\n }", "static final private internal function m106() {}", "getStreamPosition() {\n return Native.getStreamPosition();\n }", "onMessage() {}", "onMessage() {}", "constructor() {\n super();\n this._logger = new pip_services3_components_node_3.CompositeLogger();\n this._connectionResolver = new connect_1.AwsConnectionResolver();\n this._connectTimeout = 30000;\n this._client = null; //AmazonCloudWatchClient\n this._opened = false;\n }", "get WSAPlayerX64() {}" ]
[ "0.5349978", "0.48933455", "0.48501366", "0.48083982", "0.4772584", "0.474481", "0.47349635", "0.47027457", "0.46929818", "0.46929818", "0.4673667", "0.4644517", "0.46389893", "0.46253318", "0.4618249", "0.4582536", "0.45813942", "0.45742747", "0.45687214", "0.45623618", "0.45563498", "0.45493752", "0.45489514", "0.45457798", "0.4538844", "0.45218396", "0.45187637", "0.4498104", "0.44946006", "0.44832855", "0.44729492", "0.44691566", "0.44642788", "0.44588575", "0.44554883", "0.4453296", "0.44531393", "0.4443642", "0.44374335", "0.44267404", "0.44238108", "0.44228086", "0.4407407", "0.44043022", "0.44043022", "0.44043022", "0.44035548", "0.4393825", "0.43761918", "0.43697277", "0.4364149", "0.43530616", "0.43530616", "0.43530616", "0.43530616", "0.43530616", "0.43530616", "0.43530616", "0.43530616", "0.43530616", "0.43530616", "0.43530616", "0.43517888", "0.43511248", "0.43511248", "0.43511248", "0.43511248", "0.43511248", "0.43511248", "0.43511248", "0.43511248", "0.43511248", "0.43511248", "0.43502304", "0.43493763", "0.43493763", "0.43493763", "0.43493763", "0.43493763", "0.43493763", "0.43493763", "0.43493763", "0.43493763", "0.43493763", "0.43493763", "0.43493763", "0.43493763", "0.43493763", "0.43493763", "0.43493763", "0.43493763", "0.43493763", "0.43493763", "0.43493763", "0.43440503", "0.43416435", "0.43375877", "0.43357816", "0.43357816", "0.43336093", "0.43330038" ]
0.0
-1
Create a parallel coordinate if not exists.
function createParallelIfNeeded(option) { if (option.parallel) { return; } var hasParallelSeries = false; zrUtil.each(option.series, function (seriesOpt) { if (seriesOpt && seriesOpt.type === 'parallel') { hasParallelSeries = true; } }); if (hasParallelSeries) { option.parallel = [{}]; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createNewCoordinate() {\n var randCoordArr = generateXY();\n coordinates = new CurrentPicturePosition(randCoordArr[0], randCoordArr[1]);\n}", "function makePnt( x, y ) {\n return { x: x, y: y }\n}", "function spawnLocation(xPos, yPos) {\n \n return { x: xPos, y: yPos };\n\n}", "function createParallelIfNeeded(option) {\n\t if (option.parallel) {\n\t return;\n\t }\n\t\n\t var hasParallelSeries = false;\n\t each(option.series, function (seriesOpt) {\n\t if (seriesOpt && seriesOpt.type === 'parallel') {\n\t hasParallelSeries = true;\n\t }\n\t });\n\t\n\t if (hasParallelSeries) {\n\t option.parallel = [{}];\n\t }\n\t }", "function createParallelIfNeeded(option) {\n\t if (option.parallel) {\n\t return;\n\t }\n\n\t var hasParallelSeries = false;\n\n\t zrUtil.each(option.series, function (seriesOpt) {\n\t if (seriesOpt && seriesOpt.type === 'parallel') {\n\t hasParallelSeries = true;\n\t }\n\t });\n\n\t if (hasParallelSeries) {\n\t option.parallel = [{}];\n\t }\n\t}", "function createParallelIfNeeded(option) {\n if (option.parallel) {\n return;\n }\n\n var hasParallelSeries = false;\n\n zrUtil.each(option.series, function (seriesOpt) {\n if (seriesOpt && seriesOpt.type === 'parallel') {\n hasParallelSeries = true;\n }\n });\n\n if (hasParallelSeries) {\n option.parallel = [{}];\n }\n }", "function f_addVertex(id, x, y, sizeX, sizeY) {\n mxElements[id] = mxGraph.insertVertex(mxParent, id, null, x, y, sizeX, sizeY, 'task_' + f_getClassificationType(id));\n }", "function create(ecModel, api) {\n var coordSysList = [];\n ecModel.eachComponent('parallel', function (parallelModel, idx) {\n var coordSys = new Parallel(parallelModel, ecModel, api);\n coordSys.name = 'parallel_' + idx;\n coordSys.resize(parallelModel, api);\n parallelModel.coordinateSystem = coordSys;\n coordSys.model = parallelModel;\n coordSysList.push(coordSys);\n }); // Inject the coordinateSystems into seriesModel\n\n ecModel.eachSeries(function (seriesModel) {\n if (seriesModel.get('coordinateSystem') === 'parallel') {\n var parallelModel = ecModel.queryComponents({\n mainType: 'parallel',\n index: seriesModel.get('parallelIndex'),\n id: seriesModel.get('parallelId')\n })[0];\n seriesModel.coordinateSystem = parallelModel.coordinateSystem;\n }\n });\n return coordSysList;\n}", "function create(ecModel, api) {\n var coordSysList = [];\n ecModel.eachComponent('parallel', function (parallelModel, idx) {\n var coordSys = new Parallel(parallelModel, ecModel, api);\n coordSys.name = 'parallel_' + idx;\n coordSys.resize(parallelModel, api);\n parallelModel.coordinateSystem = coordSys;\n coordSys.model = parallelModel;\n coordSysList.push(coordSys);\n }); // Inject the coordinateSystems into seriesModel\n\n ecModel.eachSeries(function (seriesModel) {\n if (seriesModel.get('coordinateSystem') === 'parallel') {\n var parallelModel = ecModel.queryComponents({\n mainType: 'parallel',\n index: seriesModel.get('parallelIndex'),\n id: seriesModel.get('parallelId')\n })[0];\n seriesModel.coordinateSystem = parallelModel.coordinateSystem;\n }\n });\n return coordSysList;\n}", "function create(ecModel, api) {\n var coordSysList = [];\n ecModel.eachComponent('parallel', function (parallelModel, idx) {\n var coordSys = new Parallel(parallelModel, ecModel, api);\n coordSys.name = 'parallel_' + idx;\n coordSys.resize(parallelModel, api);\n parallelModel.coordinateSystem = coordSys;\n coordSys.model = parallelModel;\n coordSysList.push(coordSys);\n }); // Inject the coordinateSystems into seriesModel\n\n ecModel.eachSeries(function (seriesModel) {\n if (seriesModel.get('coordinateSystem') === 'parallel') {\n var parallelModel = ecModel.queryComponents({\n mainType: 'parallel',\n index: seriesModel.get('parallelIndex'),\n id: seriesModel.get('parallelId')\n })[0];\n seriesModel.coordinateSystem = parallelModel.coordinateSystem;\n }\n });\n return coordSysList;\n}", "function create(ecModel, api) {\n var coordSysList = [];\n ecModel.eachComponent('parallel', function (parallelModel, idx) {\n var coordSys = new Parallel(parallelModel, ecModel, api);\n coordSys.name = 'parallel_' + idx;\n coordSys.resize(parallelModel, api);\n parallelModel.coordinateSystem = coordSys;\n coordSys.model = parallelModel;\n coordSysList.push(coordSys);\n }); // Inject the coordinateSystems into seriesModel\n\n ecModel.eachSeries(function (seriesModel) {\n if (seriesModel.get('coordinateSystem') === 'parallel') {\n var parallelModel = ecModel.queryComponents({\n mainType: 'parallel',\n index: seriesModel.get('parallelIndex'),\n id: seriesModel.get('parallelId')\n })[0];\n seriesModel.coordinateSystem = parallelModel.coordinateSystem;\n }\n });\n return coordSysList;\n}", "function create(ecModel, api) {\n var coordSysList = [];\n ecModel.eachComponent('parallel', function (parallelModel, idx) {\n var coordSys = new Parallel(parallelModel, ecModel, api);\n coordSys.name = 'parallel_' + idx;\n coordSys.resize(parallelModel, api);\n parallelModel.coordinateSystem = coordSys;\n coordSys.model = parallelModel;\n coordSysList.push(coordSys);\n }); // Inject the coordinateSystems into seriesModel\n\n ecModel.eachSeries(function (seriesModel) {\n if (seriesModel.get('coordinateSystem') === 'parallel') {\n var parallelModel = ecModel.queryComponents({\n mainType: 'parallel',\n index: seriesModel.get('parallelIndex'),\n id: seriesModel.get('parallelId')\n })[0];\n seriesModel.coordinateSystem = parallelModel.coordinateSystem;\n }\n });\n return coordSysList;\n}", "function create(ecModel, api) {\n var coordSysList = [];\n ecModel.eachComponent('parallel', function (parallelModel, idx) {\n var coordSys = new Parallel(parallelModel, ecModel, api);\n coordSys.name = 'parallel_' + idx;\n coordSys.resize(parallelModel, api);\n parallelModel.coordinateSystem = coordSys;\n coordSys.model = parallelModel;\n coordSysList.push(coordSys);\n }); // Inject the coordinateSystems into seriesModel\n\n ecModel.eachSeries(function (seriesModel) {\n if (seriesModel.get('coordinateSystem') === 'parallel') {\n var parallelModel = ecModel.queryComponents({\n mainType: 'parallel',\n index: seriesModel.get('parallelIndex'),\n id: seriesModel.get('parallelId')\n })[0];\n seriesModel.coordinateSystem = parallelModel.coordinateSystem;\n }\n });\n return coordSysList;\n}", "function pointCreation() {\n var point = new Point(10, 10);\n pointsCollection.add(point);\n point.create();\n }", "function createParallelCoordSys(ecModel, api) {\n var coordSysList = [];\n ecModel.eachComponent('parallel', function (parallelModel, idx) {\n var coordSys = new parallel_Parallel(parallelModel, ecModel, api);\n coordSys.name = 'parallel_' + idx;\n coordSys.resize(parallelModel, api);\n parallelModel.coordinateSystem = coordSys;\n coordSys.model = parallelModel;\n coordSysList.push(coordSys);\n }); // Inject the coordinateSystems into seriesModel\n\n ecModel.eachSeries(function (seriesModel) {\n if (seriesModel.get('coordinateSystem') === 'parallel') {\n var parallelModel = seriesModel.getReferringComponents('parallel', util_model[\"b\" /* SINGLE_REFERRING */]).models[0];\n seriesModel.coordinateSystem = parallelModel.coordinateSystem;\n }\n });\n return coordSysList;\n}", "function createParallelogram(points){\n var parlgrm = new createjs.Shape();\n parlgrm.graphics.beginStroke(\"blue\");\n parlgrm.graphics.moveTo(points[0], points[1]).lineTo(points[4], points[5]).lineTo(points[2], points[3]).lineTo(points[6], points[7]).lineTo(points[0], points[1]);\n parlgrm.name=\"parallelogram\";\n var centroidx = (points[0]+points[2]+points[4]+points[6])/4;\n centroid.push(centroidx);\n var centroidy = (points[1]+points[3]+points[5]+points[7])/4; //Center of mass =(centroidx,centroidy)\n centroid.push(centroidy);\n stage.addChild(parlgrm);\n}", "function CreatePointInSpace(x, y, z){\n this.xPoint = x;\n this.yPoint = y;\n this.zPoint = z;\n}", "function createParallelIfNeeded(option){if(option.parallel){return;}var hasParallelSeries=false;zrUtil.each(option.series,function(seriesOpt){if(seriesOpt && seriesOpt.type === 'parallel'){hasParallelSeries = true;}});if(hasParallelSeries){option.parallel = [{}];}}", "function coordonneesPoint(x,y)\n {\n this.x = x;\n this.y = y;\n }", "function createParallelIfNeeded(option) {\n if (option.parallel) {\n return;\n }\n\n var hasParallelSeries = false;\n util[\"k\" /* each */](option.series, function (seriesOpt) {\n if (seriesOpt && seriesOpt.type === 'parallel') {\n hasParallelSeries = true;\n }\n });\n\n if (hasParallelSeries) {\n option.parallel = [{}];\n }\n}", "create(cp0, cp1, cp2, cp3) {\n\n const cp = this.cp;\n\n cp[0] = new PVector();\n cp[0].x = cp0.x;\n cp[0].y = cp0.y;\n\n\n cp[1] = new PVector();\n cp[1].x = cp1.x;\n cp[1].y = cp1.y;\n\n cp[2] = new PVector();\n cp[2].x = cp2.x;\n cp[2].y = cp2.y;\n\n cp[3] = new PVector();\n cp[3].x = cp3.x;\n cp[3].y = cp3.y;\n\n\n }", "function createPoint(x, y) {\n\tif (isNaN(x) || isNaN(y)) {\n\t\treturn null;\n\t}\n\n\treturn {\n\t\tx: parseFloat(x),\n\t\ty: parseFloat(y),\n\t\ttoString: function() {\n\t\t\treturn '(' + this.x + ', ' + this.y + ')';\n\t\t}\n\t};\n}", "function createPoint(x, y) {\n var point = new Object();\n point.x = parseInt(x);\n point.y = parseInt(y);\n \n return point;\n}", "assignCoords () {\n let assignedCoord = this.generateRandomCoords();\n\n // If the coordinates is already in gameState.numCoordinates, then other set of coordinates are generated until there is one not in use\n while (gameState.numCoordinates[`x${assignedCoord.x}y${assignedCoord.y}`]) {\n assignedCoord = this.generateRandomCoords()\n }\n\n gameState.numCoordinates[`x${assignedCoord.x}y${assignedCoord.y}`] = true\n\n return assignedCoord\n }", "function computeSpawnPointFromPosition(center, position) {\n let dist = Math.sqrt(position.lat*position.lat + position.lng*position.lng);\n let directionX = position.lat / dist;\n let directionY = position.lng / dist;\n let distFromOrigen = 0.01 * Panorama.getDistanceBetween(center, position);\n return {x: directionX * distFromOrigen, y: directionY * distFromOrigen, z: 0};\n}", "function WritablePoint(x, y) {\n // skip x and y initialization here for performance\n // because typically reset after instantiation\n}", "function WritablePoint(x, y) {\n // skip x and y initialization here for performance\n // because typically reset after instantiation\n}", "function assignNewPosition() {\n\tvar pos = {};\n\tdo {\n\t\tpos.x = Math.floor(Math.random() * gridW);\n\t\tpos.y = Math.floor(Math.random() * gridH);\n\t} while (filledPositions[pos.x][pos.y]);\n\t\n\tfilledPositions[pos.x][pos.y] = true;\n\t\n\tpos.x=pos.x*40+30+Math.floor(Math.random()*26-13);\n\tpos.y=pos.y*40+30+Math.floor(Math.random()*26-13);\n\t\n\treturn pos;\n}", "function insertParks(response){\n var parks = response.data;\n for(var i = 0; i < parks.length; i++) {\n var obj = parks[i];\n\n var x = obj.GeographicalPosition.X;\n var y = obj.GeographicalPosition.Y;\n\n var ch = new CoordinateHandler();\n var pos = ch.gridToGeodetic(x, y);\n\n\n obj.GeographicalPosition = pos;\n //console.log(obj.GeographicalPosition);\n\n Parks.insert({obj});\n }\n}", "static newCartesionPoint(x, y) {\n return new PointFM(x, y);\n }", "static newCartesionPoint(x, y) {\n return new PointFM(x, y);\n }", "function createParcel(shape, color) {\n var newShape = google.maps.Polygon;\n markerNumber++\n return new newShape({\n paths: shape.getPath(),\n strokeColor: \"#000000\",\n strokeOpacity: 0.8,\n strokeWeight: 1.5,\n fillColor: color,\n fillOpacity: 0.35,\n name: name,\n type: \"POLYGON\",\n markerNum: markerNumber,\n deletable: false,\n editable: false,\n zIndex: markerNumber,\n userCreated: false,\n category: \"parcel\",\n });\n}", "function determinePosition(x, y) {\n return new Point(x, y);\n}", "function positionCreator(lon, lat, userId, dateInFuture) {\n let posDetails = { user: userId, loc: { coordinates: [lon, lat] } };\n if (dateInFuture) {\n posDetails.created = \"2022-09-25T20:40:21.899Z\";\n }\n let pos = new Position(posDetails);\n return pos.save();\n}", "function positionCreator(lon, lat, userId, dateInFuture) {\n var posDetail = {\n user: userId,\n loc: {\n coordinates: [lon, lat]\n }\n }\n if (dateInFuture) {\n posDetail.created = \"2022-09-25T20:40:21.899Z\"\n }\n var pos = new Position(posDetail);\n return pos.save();\n}", "function pt(x, y) { \n return new Point(x, y);\n}", "function createGeometry (type, coordinates) {\n return {\n type: getTypeString(type),\n coordinates: coordinates\n }\n}", "function createCoordinates() {\n\twhile (coordinates30.length < 20) {\n\t\taddNumber();\n\t}\n}", "function allocateNE(x, y) {\n\t\tif (x != null && y != null) {\n\t\t\tthis.x = x;\n\t\t\tthis.y = y;\n\t\t}\n\t\tdocument.getElementById(this.id).style.pixelLeft = this.x;\n\t\tdocument.getElementById(this.id).style.pixelTop = this.y;\n\t}", "addSpawnPoint(from_, x_, y_) {\n this.spawnPoints.push({\n from: from_,\n x: x_,\n y: y_\n });\n }", "createObstacleAt(position) {\n this.worldCubes[toKey(position)] = true //data not that important I think\n if (this.hasCubeAt(position)) {\n this.respawnParentsOfCubeAt(position)\n }\n }", "function createEmptyStrict(coords, map) {\n map.empty.push(coords);\n map.occupied.push(coords);\n}", "function generatePosition(event)\n{\n var x = event.clientX;\n var y = event.clientY;\n var canvas = document.getElementById(\"canvas\");\n x = x - canvas.offsetLeft;\n y = y - canvas.offsetTop; //(x,y) is the center of the circle\n if(clickCount < 6){\n coordinates.push(x);\n coordinates.push(y);\n createCircle(x,y,5.5,'red',clickCount);\n //display the parallelogram on after selection of third point\n if(clickCount == 4){\n var mx = (coordinates[0]+coordinates[2])/2;\n var my = (coordinates[1]+coordinates[3])/2;\n var xl = 2*mx-coordinates[4]; //midpoint formula\n var yl = 2*my-coordinates[5]; //(xl,yl) is the fourth co-ordinate of the parallelogram\n coordinates.push(xl);\n coordinates.push(yl); // save the last co-ordinate in the same array\n createCircle(xl,yl,5.5,'red',clickCount+2);\n createParallelogram(coordinates);\n //find the area of parallelogram: absolute cross product of two adjacent sides vector\n var a1 = coordinates[0]-coordinates[6];\n var a2 = coordinates[1]-coordinates[7];\n var b1 = coordinates[0]-coordinates[4];\n var b2 = coordinates[1]-coordinates[5];\n var parArea = Math.abs(a1*b2-a2*b1); //area of parallelogram\n var radius = Math.sqrt(parArea/Math.PI); //radius of the last circle (A = PI*R*R)\n createCircle(centroid[0],centroid[1],radius,'yellow',clickCount+4); //Draw the final yellow circle\n area = new createjs.Text(\"Area of circle = area of parallelogram = \"+parArea+\" square units.\", \"13px Arial\", \"#000000\"); \n area.name = \"area\";\n area.textAlign = \"center\";\n area.textBaseline = \"middle\";\n area.x = 200;\n area.y = 370;\n stage.addChild(area);\n }\n clickCount = clickCount+2;\n }else{\n alert('You cannot select more than three points');\n return;\n }\n stage.update(); \n}", "function usePoint(p) {\n var i = pointToIdx(p);\n grid[i].push(p);\n return p;\n }", "spawnNewGameObjectAtStart(type) {\n\t\tlet xy = this.getRandomCoordinateAtStart();\n\t\tthis.spawnNewGameObject(type, xy.x, xy.y);\n\t}", "function Coordinate(x,y){\n this.x = x;\n this.y = y;\n}", "mapCoordsToNode(x, y) {\n\n\t}", "function isParallel(v1, v2) {\n return v1.x * v2.y === v1.y * v2.x;\n}", "newPosition(x, y)\n {\n this.x = x;\n this.y = y;\n }", "function GridPosition(nx, ny, nz) {\n \"use strict\";\n this.nx = nx;\n this.ny = ny;\n this.nz = nz;\n}", "constructor(x, y) {\n this.x = x;\n this.y = y;\n this.x = x;\n this.y = y;\n }", "place_pins(start_x, start_y, end_x, end_y, normx, normy, pin_nb){\n\n var i;\n\n var increment_x = (start_x == end_x ? 0 : 1);\n var increment_y = (start_y == end_y ? 0 : 1);\n\n for(i = 0; i < pin_nb; i++){\n if(Math.random() > 0.4){ //prob to have a pin here\n this.pins.push(new Pin(start_x+increment_x*i, start_y+increment_y*i, normx, normy, 0));\n occupation[start_x+increment_x*i][start_y+increment_y*i] = 1;\n }\n }\n }", "function Coordinate(props) {\n var type = props.type,\n transpose = props.transpose,\n rotate = props.rotate,\n scale = props.scale,\n reflect = props.reflect,\n actions = props.actions,\n options = __rest(props, [\"type\", \"transpose\", \"rotate\", \"scale\", \"reflect\", \"actions\"]);\n\n var view = Object(_hooks_useChartView__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])();\n var coordIns = view.coordinate(); // 重置\n\n coordIns.update({});\n\n if (type) {\n view.coordinate(type, object_assign__WEBPACK_IMPORTED_MODULE_1___default()({}, options));\n } else {\n view.coordinate('rect', object_assign__WEBPACK_IMPORTED_MODULE_1___default()({}, options));\n }\n\n if (rotate) {\n coordIns.rotate(rotate);\n }\n\n if (scale) {\n coordIns.scale.apply(coordIns, _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0___default()(scale));\n }\n\n if (!_antv_util_lib_is_nil__WEBPACK_IMPORTED_MODULE_2___default()(reflect)) {\n coordIns.reflect(reflect);\n }\n\n if (transpose) {\n coordIns.transpose();\n }\n\n if (_antv_util_lib_is_function__WEBPACK_IMPORTED_MODULE_3___default()(actions)) {\n actions(coordIns);\n }\n\n return null;\n}", "position(obj, coord) {\n let x = coord[0];\n let y = coord[1];\n this.grid[x][y] = obj;\n }", "function createPoint(x, y, color){\n\treturn board.create('point', [x,y], {fixed:true, fillColor: color, strokeColor: color});\n}", "setCoordinates() {\n while (this.coordinates == null || !this.isWithinShape(this.coordinates)) {\n // Position the circle within the shape\n this.coordinates = createVector(random(width), random(height)); \n } \n }", "function Posn(x, y) {\n\tthis.x = x;\n \tthis.y = y;\n}", "function generatePositions() {\n rows = [];\n columns = [];\n if (gridOption.enableRow) {\n //use coordinate.y to generate rows\n if (coordinate.y && coordinate.y.model.rotate == 90) {\n coordinate.y.forEach(function(i,length){\n rows.push(coordinate.y.model.beginY-length)\n });\n gridOption._x = coordinate.x.model.beginX;\n } else if (coordinate.x && coordinate.x.model.rotate == 90) {\n coordinate.x.forEach(function (i, length) {\n rows.push(coordinate.x.model.beginY - length)\n });\n\n gridOption._x = coordinate.y.model.beginX;\n }\n gridOption.width = coordinate.size().width || 0;\n gridOption.rows = rows;\n }\n if (gridOption.enableColumn) {\n if (coordinate.y && coordinate.y.model.rotate == 0) {\n coordinate.y.forEach(function(i,length){\n columns.push(coordinate.y.model.beginX+length)\n });\n gridOption._y = coordinate.x.model.beginY;\n } else if (coordinate.x && coordinate.x.model.rotate == 0) {\n coordinate.x.forEach(function (i, length) {\n columns.push(coordinate.x.model.beginX + length)\n });\n gridOption._y = coordinate.y.model.beginY;\n }\n gridOption.height = coordinate.size().height || 0;\n gridOption.columns = columns;\n }\n\n }", "function Plat(x, y, x2, y2, width, height, box1, box2, box3){\n this.x = x;\n this.y = y;\n this.width = width;\n this.height = height;\n this.x2 = x2;\n this.y2 = y2;\n this.box1 = box1;\n this.box2 = box2;\n this.box3 = box3;\n}", "function Punto(x, y) {\n this.x = x\n this.y = y\n}", "function addCoordinatesColumn(callback) {\n pool.query(\n `\n\t\tDO $$\n\t\t\tBEGIN\n\t\t\t\tDECLARE\n \t\t\t\tresult text;\n\t\t\t\tBEGIN\n\t\t\t\t\tSELECT AddGeometryColumn('public', 'placemarks', 'coordinates', 4326, 'POINT', 2) INTO result;\n\t\t\t\tEXCEPTION\n\t\t\t\t\tWHEN duplicate_column THEN RAISE NOTICE 'column coordinates already exists in placemarks.';\n\t\t\t\tEND;\n\t\t\tEND;\n\t\t$$\n\t`,\n function(err, res) {\n if (err)\n console.log(\n \"An error occurred when adding the location column: \" + err\n );\n }\n );\n}", "function placePickupMarker(xCoordinate, yCoordinate) {\n pickupMarker = document.createElement(\"div\");\n pickupMarker.classList.add(\"pickup-marker\");\n pickupMarker.style.top = (yCoordinate - markerRadius).toString() + \"px\";\n pickupMarker.style.left = (xCoordinate - markerRadius).toString() + \"px\";\n document.querySelector(\"#map\").appendChild(pickupMarker);\n}", "function createInitialShips() {\n\n entityManager.generateShip({\n cx : 200,\n cy : 200\n });\n \n}", "function createInitialShips() {\n entityManager.generateShip({\n cx: 200,\n cy: 200,\n });\n}", "function spawnLocation() {\n // Breaking the entire canvas into a grid of tiles.\n let rows = width / tileSize;\n let cols = (height - 40) / tileSize;\n let xPos, yPos;\n let overlap = false;\n // To prevent an overlap of the food/barrier and the snake's body.\n do {\n xPos = Math.floor(Math.random() * rows) * tileSize;\n yPos = Math.floor(Math.random() * cols) * tileSize;\n overlap = elementsOverlap({ x: xPos, y: yPos });\n } while (overlap);\n return { x: xPos, y: yPos };\n}", "function Coord(x, y) {\n this.x = x;\n this.y = y;\n}", "function create_site(position) {\n sites.push(position);\n\n sitesg.append(\"circle\")\n .attr(\"cx\", position[0])\n .attr(\"cy\", position[1])\n .attr(\"r\", RADIUS)\n .attr(\"index\", site_current_avaible_key);\n\n site_current_avaible_key += 1;\n add_vertex();\n}", "function getSpawnPoint(id){\r\n\tvar x;\r\n\tvar y;\r\n\tswitch(id){\r\n\t\tcase 0:\r\n\t\t\tx = 40;\r\n\t\t\ty = 40;\r\n\t\t\tbreak;\r\n\t\tcase 1:\r\n\t\t\tx = 960;\r\n\t\t\ty = 560;\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tx = 40;\r\n\t\t\ty = 560;\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tx = 960;\r\n\t\t\ty = 40;\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tx = 40;\r\n\t\t\ty = 40;\r\n\t\t\tbreak;\r\n\t}\r\n\tvar position = {\r\n\t\tx: x,\r\n\t\ty: y\r\n\t}\r\n\treturn position;\r\n}", "function newCoordsXY(x, y){\n if (!Number.isInteger(x) || !Number.isInteger(y)){\n throw Error(`class_coords.js: function newCoords: coordinates must be integer`);\n }\n return new Coords(x, y, undefined, undefined);\n}", "_set_point(pos_x, pos_y) {\n if (typeof pos_x !== 'number') {\n console.error(\"[ERROR] invalid parameter: 'pos_x' sholud be a number\");\n }\n if (typeof pos_y !== 'number') {\n console.error(\"[ERROR] invalid parameter: 'pos_y' sholud be a number\");\n }\n\n return {\n x : pos_x,\n y : pos_y,\n };\n }", "function CreateCoordArray() {\n let xR = 0,\n yR = 19;\n let i = 0,\n j = 0;\n for (let y = 9; y <= 446; y += 23) {\n for (let x = 11; x <= 264; x += 23) {\n coordinateArray[i][j] = new Coordinates(x, y);\n i++;\n }\n j++;\n i = 0;\n }\n}", "createGridPoints() {\n\n\t\tconst gridPoints = this.gridPoints;\n\n\t\tconst s = this.cellSize;\n\t\tconst n = HermiteData.resolution;\n\n\t\tconst base = this.cellPosition;\n\t\tconst offset = new Vector3();\n\t\tconst gridPointGeometry = new SphereBufferGeometry(0.05, 8, 8);\n\t\tconst gridPointMaterial = this.gridPointMaterials[0];\n\n\t\tfor(let z = 0; z <= n; ++z) {\n\n\t\t\toffset.z = z * s / n;\n\n\t\t\tfor(let y = 0; y <= n; ++y) {\n\n\t\t\t\toffset.y = y * s / n;\n\n\t\t\t\tfor(let x = 0; x <= n; ++x) {\n\n\t\t\t\t\toffset.x = x * s / n;\n\n\t\t\t\t\tconst gridPoint = new Mesh(gridPointGeometry, gridPointMaterial);\n\t\t\t\t\tgridPoint.position.copy(base).add(offset);\n\t\t\t\t\tgridPoints.add(gridPoint);\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t}", "function makePoint() {\n // Pull start time from req and log responseTime\n var responseTime = Date.now() - req.start;\n var ip = req.headers['X-Real-IP'] || req.connection.remoteAddress;\n var geo = geoip.lookup(ip);\n \n if(!geo) {\n geo = {\n country: 'n/a',\n region: 'n/a',\n city: 'n/a',\n metro: 0,\n zip: 0,\n ll: [0.0, 0.0]\n }\n }\n \n var coords = geo.ll;\n var latitude = coords[0];\n var longitude = coords[1];\n \n var point = {\n measurement: \"requests\",\n \"tags\": {\n \"path\": req.path,\n \"host\": req.hostname,\n \"verb\": req.method,\n \"status\": res.statusCode,\n \"user\" : (req.user && req.user.email)? req.user.email || 'n/a';\n \"ip\": ip,\n \"geohash\": geohash.encode(latitude, longitude),\n \"country\": geo.country || 'n/a',\n \"region\": geo.region || 'n/a',\n \"city\": geo.city || 'n/a',\n \"metro\": geo.metro || 0,\n \"zip\" : geo.zip || 0\n },\n \"fields\": {\n \"responseTime\": responseTime,\n },\n }\n\n if (process.env.POINT_LABEL_NAME) {\n point.tags[process.env.POINT_LABEL_NAME] = process.env.POINT_LABEL_VALUE;\n }\n\n // Add the new point to the batch of points\n batch.points.push(point)\n\n // Emit the 'addPoint' event\n batch.emit(\"addPoint\")\n }", "function Coordinate (xCoord, yCoord) {\n this.xCoord = xCoord;\n this.yCoord = yCoord;\n}", "function CreateCoordArray() {\n let xR = 0, yR = 19;\n let i = 0, j = 0;\n for (let y = 9; y <= 446; y += 23) {\n // 12 * 23 = 276 - 12 = 264 Max X value\n for (let x = 11; x <= 264; x += 23) {\n coordinateArray[i][j] = new Coordinates(x, y);\n // console.log(i + \":\" + j + \" = \" + coordinateArray[i][j].x + \":\" + coordinateArray[i][j].y);\n i++;\n }\n j++;\n i = 0;\n }\n}", "function point(x, y) {\n return { x, y };\n}", "function preparePoint(row) {\n return new mxn.LatLonPoint(Number(row.latitude), Number(row.longitude));\n }", "function Point(x, y) {\n return {x: x, y: y};\n}", "function createPositionObject(lat, lon, time) {\n\tvar position = {\n\t\tcoords: {\n\t\t\tlatitude: null,\n\t\t\tlongitude: null,\n\t\t\taccuracy: 999,\n\t\t\taltitude: null,\n\t\t\taltitudeAccuracy: null,\n\t\t\theading: null,\n\t\t\tspeed: null,\n\t\t},\n\t\ttimestamp: null,\n\t};\n\t\n\tposition.coords.latitude = lat;\n\tposition.coords.longitude = lon;\n\tposition.timestamp = time;\n\n\treturn position;\n}", "Point( x, y ) {\n return { x, y }\n }", "constructor(x, y) {\n this.x = x;\n this.y = y;\n }", "constructor(x, y) {\n this.x = x;\n this.y = y;\n }", "constructor(x, y) {\n this.x = x;\n this.y = y;\n }", "function Coordinate(x, y, z) {\n this.x = x\n this.y = y\n this.z = z\n}", "function Point(x, y) {\n return {x: x, y: y}\n}", "Point(x, y) {\n\t\treturn { x: x, y: y };\n\t}", "static ProjectPointLine() {}", "static createInstance(mall, shop, phone, count, createTime, updateTime) {\n return new Point({ mall, shop, phone, count, createTime, updateTime });\n }", "function generateCoordinates() {\n if (navigator.geolocation) {\n navigator.geolocation.getCurrentPosition(\n addPosition, \n geoError,\n { timeout: 10000, enableHighAccuracy: true }\n );\n } else {\n program.showMessage(\"\", \"Vafrinn styður ekki staðsetningartækni\");\n }\n }", "addPlace(x, y) {\n const place = { x: x, y: y, empty: true };\n\n this.map.push(place);\n }", "function setCoords(position) {\n let lat = position.coords.latitude;\n let lon = position.coords.longitude;\n\n if (lat != null && lon != null) {\n createLocationData(lat, lon, \"undetected\", getName(lat, lon));\n updatePage();\n } else {\n console.log(\"Error: The coordinates were registered as null.\");\n }\n}", "function newSVGPoint( x, y ) {\n var point = svgRoot.createSVGPoint();\n point.x = x;\n point.y = y;\n return point;\n }", "createPointGraphic (coordinates) {\n var point = new Point(coordinates);\n\n var pointGraphic = new Graphic({\n geometry: point,\n symbol: this.createSimpleMarkerSymbol()\n });\n\n return pointGraphic;\n }", "function Punto(x, y){\n\tthis.x = x;\n\tthis.y = y;\n}", "constructor(x, y) {\n this.x = x\n this.y = y\n }" ]
[ "0.5736917", "0.5534941", "0.5400069", "0.53862494", "0.53512824", "0.52708775", "0.52664405", "0.5262102", "0.5262102", "0.5262102", "0.5262102", "0.5262102", "0.5262102", "0.5234713", "0.5223697", "0.5219703", "0.52052766", "0.5165972", "0.5103115", "0.50738263", "0.50712717", "0.50673175", "0.50497097", "0.504931", "0.5044659", "0.50244296", "0.50244296", "0.50176406", "0.49818552", "0.49408895", "0.49408895", "0.49384025", "0.4923517", "0.49154294", "0.4904683", "0.48150814", "0.4805055", "0.48042974", "0.47967422", "0.47934315", "0.47902167", "0.47890666", "0.47763637", "0.47611538", "0.47290555", "0.47168964", "0.47069573", "0.47060326", "0.46935695", "0.4693051", "0.4686139", "0.46780157", "0.46716934", "0.4670149", "0.46677297", "0.46669823", "0.46620297", "0.46497405", "0.46429324", "0.46323717", "0.4616772", "0.46136165", "0.4612026", "0.4610511", "0.45855284", "0.45853102", "0.4581139", "0.4569736", "0.45653832", "0.45553243", "0.4538603", "0.4532428", "0.4531638", "0.4523809", "0.45230147", "0.45216793", "0.4516793", "0.45156348", "0.45138943", "0.4510138", "0.44939664", "0.44939664", "0.44939664", "0.4492242", "0.44913647", "0.44911298", "0.4491034", "0.4480686", "0.4473847", "0.44674015", "0.4467096", "0.44667667", "0.44627458", "0.44559273", "0.44462264" ]
0.5276588
10
Merge aixs definition from parallel option (if exists) to axis option.
function mergeAxisOptionFromParallel(option) { var axes = modelUtil.normalizeToArray(option.parallelAxis); zrUtil.each(axes, function (axisOption) { if (!zrUtil.isObject(axisOption)) { return; } var parallelIndex = axisOption.parallelIndex || 0; var parallelOption = modelUtil.normalizeToArray(option.parallel)[parallelIndex]; if (parallelOption && parallelOption.parallelAxisDefault) { zrUtil.merge(axisOption, parallelOption.parallelAxisDefault, false); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function mergeAxisOptionFromParallel(option){var axes=modelUtil.normalizeToArray(option.parallelAxis);zrUtil.each(axes,function(axisOption){if(!zrUtil.isObject(axisOption)){return;}var parallelIndex=axisOption.parallelIndex || 0;var parallelOption=modelUtil.normalizeToArray(option.parallel)[parallelIndex];if(parallelOption && parallelOption.parallelAxisDefault){zrUtil.merge(axisOption,parallelOption.parallelAxisDefault,false);}});}", "function mergeAxisOptionFromParallel(option) {\n\t var axes = normalizeToArray(option.parallelAxis);\n\t each(axes, function (axisOption) {\n\t if (!isObject(axisOption)) {\n\t return;\n\t }\n\t\n\t var parallelIndex = axisOption.parallelIndex || 0;\n\t var parallelOption = normalizeToArray(option.parallel)[parallelIndex];\n\t\n\t if (parallelOption && parallelOption.parallelAxisDefault) {\n\t merge(axisOption, parallelOption.parallelAxisDefault, false);\n\t }\n\t });\n\t }", "function mergeAxisOptionFromParallel(option) {\n var axes = util_model[\"r\" /* normalizeToArray */](option.parallelAxis);\n util[\"k\" /* each */](axes, function (axisOption) {\n if (!util[\"z\" /* isObject */](axisOption)) {\n return;\n }\n\n var parallelIndex = axisOption.parallelIndex || 0;\n var parallelOption = util_model[\"r\" /* normalizeToArray */](option.parallel)[parallelIndex];\n\n if (parallelOption && parallelOption.parallelAxisDefault) {\n util[\"I\" /* merge */](axisOption, parallelOption.parallelAxisDefault, false);\n }\n });\n}", "function mergeAxisOptionFromParallel(option) {\n\t var axes = modelUtil.normalizeToArray(option.parallelAxis);\n\n\t zrUtil.each(axes, function (axisOption) {\n\t if (!zrUtil.isObject(axisOption)) {\n\t return;\n\t }\n\n\t var parallelIndex = axisOption.parallelIndex || 0;\n\t var parallelOption = modelUtil.normalizeToArray(option.parallel)[parallelIndex];\n\n\t if (parallelOption && parallelOption.parallelAxisDefault) {\n\t zrUtil.merge(axisOption, parallelOption.parallelAxisDefault, false);\n\t }\n\t });\n\t}", "function mergeAxisOptionFromParallel(option) {\n var axes = modelUtil.normalizeToArray(option.parallelAxis);\n\n zrUtil.each(axes, function (axisOption) {\n if (!zrUtil.isObject(axisOption)) {\n return;\n }\n\n var parallelIndex = axisOption.parallelIndex || 0;\n var parallelOption = modelUtil.normalizeToArray(option.parallel)[parallelIndex];\n\n if (parallelOption && parallelOption.parallelAxisDefault) {\n zrUtil.merge(axisOption, parallelOption.parallelAxisDefault, false);\n }\n });\n }", "combineOptions(options) {\n let defaults = {\n fitPosition: 'center center',\n addContainer: true\n };\n\n this.options = {\n ...defaults,\n ...options\n };\n }", "function parallelPreprocessor(option) {\n createParallelIfNeeded(option);\n mergeAxisOptionFromParallel(option);\n}", "function configureOneAxe(axisName, inputChartDef, c3Axes) {\r\n var axisMap = inputChartDef.axisMap;\r\n if (!axisMap) {\r\n return;\r\n }\r\n var series = axisMap[axisName];\r\n if (!series) {\r\n return;\r\n }\r\n for (var _i = 0, series_1 = series; _i < series_1.length; _i++) {\r\n var seriesConfig = series_1[_i];\r\n c3Axes[seriesConfig.series] = axisName;\r\n }\r\n}", "function _default(option) {\n createParallelIfNeeded(option);\n mergeAxisOptionFromParallel(option);\n}", "function _default(option) {\n createParallelIfNeeded(option);\n mergeAxisOptionFromParallel(option);\n}", "function _default(option) {\n createParallelIfNeeded(option);\n mergeAxisOptionFromParallel(option);\n}", "function buildMultipleAxes() {\n if (multipleAxes && !horizontal && !stack && seriesData.length > 1) {\n stackLayout.yaxis = [];\n\n seriesData.forEach((row, index) => {\n if (index != 0) {\n if (!settings[`seriesAxis_${index}`]) {\n changed = true;\n settings[`seriesAxis_${index}`] = {\n label: `Set ${row.name} on the second axis`,\n order: 10 + index,\n section: `Multiple Axes`,\n type: `boolean`,\n default: false,\n hidden: false\n };\n }\n }\n });\n\n // Apply the config settings to the chart\n let nameA = seriesData[0].name;\n let nameB = seriesData[1].name;\n let passShow = false;\n seriesData.forEach((row, index) => {\n let sTitle = row.name;\n let seriesName = nameA;\n let axisOrientation = false;\n let show = false;\n\n if (config[`seriesAxis_${index}`] == true) {\n seriesName = nameB;\n axisOrientation = true;\n if (config.yTitle2 != ``) sTitle = yTitle2;\n } else {\n seriesName = nameA;\n axisOrientation = false;\n if (config.yTitle != ``) sTitle = yTitle;\n }\n\n // Configuration to show the axes\n if (index == 0) show = true;\n if (config[`seriesAxis_${index}`] && passShow == false) {\n passShow = true;\n show = true;\n }\n\n let obj = {\n seriesName: seriesName,\n opposite: axisOrientation,\n show: show,\n name: row.name,\n labels: {\n formatter: function(val) {\n if (typeof val == `number` && !horizontal)\n return formatAxes(val, row.value_format);\n else return val;\n }\n }\n };\n\n // Axis based label\n if (seriesName == nameA) {\n if (showTitleY) obj[`title`] = { text: sTitle };\n }\n if (seriesName == nameB) {\n if (showSecondTitleY) obj[`title`] = { text: sTitle };\n }\n\n console.log(`iteration: ${index} object`, obj);\n stackLayout.yaxis.push(obj);\n });\n }\n }", "function configureOneAxis(axisName, inputChartDef, c3Axis) {\r\n var axisMap = inputChartDef.axisMap;\r\n if (!axisMap) {\r\n return;\r\n }\r\n c3Axis[axisName] = { show: false };\r\n var axisDef = inputChartDef.plotConfig[axisName];\r\n var c3AxisDef = c3Axis[axisName];\r\n var series = axisMap[axisName];\r\n if (!series) {\r\n return;\r\n }\r\n if (Array.isArray(series)) {\r\n series.forEach(function (seriesConfig) {\r\n configureOneSeries(seriesConfig, inputChartDef, axisDef, c3AxisDef);\r\n });\r\n }\r\n else {\r\n configureOneSeries(series, inputChartDef, axisDef, c3AxisDef);\r\n }\r\n}", "function addToAxlist(axid) {\n\t var axName = Plotly.Axes.id2name(axid);\n\t if(axlist.indexOf(axName) === -1) axlist.push(axName);\n\t }", "function addToAxlist(axid) {\n\t var axName = Plotly.Axes.id2name(axid);\n\t if(axlist.indexOf(axName) === -1) { axlist.push(axName); }\n\t }", "function ticksAndAnnotations() {\n var activeAxIds = [];\n var i;\n function pushActiveAxIds(axList) {\n for (i = 0; i < axList.length; i++) {\n if (!axList[i].fixedrange) activeAxIds.push(axList[i]._id);\n }\n }\n function pushActiveAxIdsSynced(axList, axisType) {\n for (i = 0; i < axList.length; i++) {\n var axListI = axList[i];\n var axListIType = axListI[axisType];\n if (!axListI.fixedrange && axListIType.tickmode === 'sync') activeAxIds.push(axListIType._id);\n }\n }\n if (editX) {\n pushActiveAxIds(xaxes);\n pushActiveAxIds(links.xaxes);\n pushActiveAxIds(matches.xaxes);\n pushActiveAxIdsSynced(plotinfo.overlays, 'xaxis');\n }\n if (editY) {\n pushActiveAxIds(yaxes);\n pushActiveAxIds(links.yaxes);\n pushActiveAxIds(matches.yaxes);\n pushActiveAxIdsSynced(plotinfo.overlays, 'yaxis');\n }\n updates = {};\n for (i = 0; i < activeAxIds.length; i++) {\n var axId = activeAxIds[i];\n var ax = getFromId(gd, axId);\n Axes.drawOne(gd, ax, {\n skipTitle: true\n });\n updates[ax._name + '.range[0]'] = ax.range[0];\n updates[ax._name + '.range[1]'] = ax.range[1];\n }\n Axes.redrawComponents(gd, activeAxIds);\n }", "addAutofixes(...ars) {\n this.autofixRegistrations.push(...ars);\n return this;\n }", "function extractXS(axisName, inputChartDef, xs) {\r\n var axisMap = inputChartDef.axisMap;\r\n if (!axisMap) {\r\n return;\r\n }\r\n var series = axisMap[axisName];\r\n if (!series) {\r\n return;\r\n }\r\n for (var _i = 0, series_2 = series; _i < series_2.length; _i++) {\r\n var seriesConfig = series_2[_i];\r\n var ySeriesName = seriesConfig.series;\r\n if (xs[ySeriesName]) {\r\n return; // Already set.\r\n }\r\n if (seriesConfig.x) {\r\n xs[ySeriesName] = seriesConfig.x.series; // X explicitly associated with Y.\r\n }\r\n else if (inputChartDef.axisMap && inputChartDef.axisMap.x) {\r\n xs[ySeriesName] = inputChartDef.axisMap.x.series; // Default X.\r\n }\r\n }\r\n}", "function addToAxlist(axid) {\n var axName = Plotly.Axes.id2name(axid);\n if(axlist.indexOf(axName) === -1) axlist.push(axName);\n }", "function addToAxlist(axid) {\n var axName = Plotly.Axes.id2name(axid);\n if(axlist.indexOf(axName) === -1) axlist.push(axName);\n }", "addAxisCheckBox() {\n this.gui.add(this.scene, \"axisDisplay\").name('Axis');\n }", "applyOptions(options, x) {\n Point.prototype.applyOptions.call(this, options, x);\n // Treat point.level as a synonym of point.column\n if (defined(this.options.level)) {\n this.options.column = this.column = this.options.level;\n }\n return this;\n }", "function extendAliases () {\n Array.prototype.slice.call(arguments).forEach(function (obj) {\n Object.keys(obj || {}).forEach(function (key) {\n // short-circuit if we've already added a key\n // to the aliases array, for example it might\n // exist in both 'opts.default' and 'opts.key'.\n if (flags.aliases[key]) return\n \n flags.aliases[key] = [].concat(aliases[key] || [])\n // For \"--option-name\", also set argv.optionName\n flags.aliases[key].concat(key).forEach(function (x) {\n if (/-/.test(x) && configuration['camel-case-expansion']) {\n var c = camelCase(x)\n if (flags.aliases[key].indexOf(c) === -1) {\n flags.aliases[key].push(c)\n }\n newAliases[c] = true\n }\n })\n flags.aliases[key].forEach(function (x) {\n flags.aliases[x] = [key].concat(flags.aliases[key].filter(function (y) {\n return x !== y\n }))\n })\n })\n })\n }", "function getYaxisOptions(){\n scale = new Array();\n\n if(generate_param_1){\n y1_scale = {\n type: \"linear\",\n\n display: show_scale_1,\n position: \"left\",\n id: \"y-axis-1\",\n scaleLabel: {\n display: true,\n labelString: label_1,\n },\n };\n\n if(same_scale) {\n y1_scale[\"ticks\"] = {\n min: min_scale_value,\n max: max_scale_value\n }\n }\n\n scale.push(y1_scale);\n }\n\n\n if(generate_param_2){\n y2_scale = {\n type: \"linear\",\n display: show_scale_2,\n position: \"right\",\n id: \"y-axis-2\",\n scaleLabel: {\n display: true,\n labelString: label_2,\n },\n gridLines: {\n drawOnChartArea: false,\n }\n };\n\n if(same_scale) {\n y2_scale[\"ticks\"] = {\n min: min_scale_value,\n max: max_scale_value\n }\n }\n\n scale.push(y2_scale);\n }\n\n if(generate_param_3){\n y3_scale = {\n type: \"linear\",\n display: show_scale_3,\n position: \"right\",\n id: \"y-axis-3\",\n scaleLabel: {\n display: true,\n labelString: label_3\n },\n gridLines: {\n drawOnChartArea: false,\n }\n };\n scale.push(y3_scale);\n }\n\n\n\n return scale;\n}", "function extendAliases () {\n Array.prototype.slice.call(arguments).forEach(function (obj) {\n Object.keys(obj || {}).forEach(function (key) {\n // short-circuit if we've already added a key\n // to the aliases array, for example it might\n // exist in both 'opts.default' and 'opts.key'.\n if (flags.aliases[key]) return\n\n flags.aliases[key] = [].concat(aliases[key] || [])\n // For \"--option-name\", also set argv.optionName\n flags.aliases[key].concat(key).forEach(function (x) {\n if (/-/.test(x) && configuration['camel-case-expansion']) {\n var c = camelCase(x)\n if (c !== key && flags.aliases[key].indexOf(c) === -1) {\n flags.aliases[key].push(c)\n newAliases[c] = true\n }\n }\n })\n flags.aliases[key].forEach(function (x) {\n flags.aliases[x] = [key].concat(flags.aliases[key].filter(function (y) {\n return x !== y\n }))\n })\n })\n })\n }", "function extendAliases () {\n Array.prototype.slice.call(arguments).forEach(function (obj) {\n Object.keys(obj || {}).forEach(function (key) {\n // short-circuit if we've already added a key\n // to the aliases array, for example it might\n // exist in both 'opts.default' and 'opts.key'.\n if (flags.aliases[key]) return\n\n flags.aliases[key] = [].concat(aliases[key] || [])\n // For \"--option-name\", also set argv.optionName\n flags.aliases[key].concat(key).forEach(function (x) {\n if (/-/.test(x) && configuration['camel-case-expansion']) {\n var c = camelCase(x)\n if (c !== key && flags.aliases[key].indexOf(c) === -1) {\n flags.aliases[key].push(c)\n newAliases[c] = true\n }\n }\n })\n flags.aliases[key].forEach(function (x) {\n flags.aliases[x] = [key].concat(flags.aliases[key].filter(function (y) {\n return x !== y\n }))\n })\n })\n })\n }", "function addDimensionOptions() {\n var i,\n iMax,\n dimensionsArray = [],\n j,\n jMax,\n option,\n input,\n label,\n text,\n br,\n half;\n // clear existing dimension checkboxes\n dimensionsCol1.innerHTML = '';\n dimensionsCol2.innerHTML = '';\n // add the return field options\n dimensionsArray = aapi_model.dimensions;\n i = dimensionsArray.length;\n while (i > 0) {\n i--;\n if (isItemInArray(aapi_model.combinations.video.incompatible_dimensions, dimensionsArray[i].name)) {\n dimensionsArray.splice(i, 1);\n }\n }\n iMax = dimensionsArray.length;\n half = Math.ceil(iMax / 2);\n for (i = 0; i < half; i += 1) {\n input = document.createElement('input');\n label = document.createElement('lable');\n input.setAttribute('name', 'dimensionsChk');\n input.setAttribute('id', 'dim' + dimensionsArray[i].name);\n input.setAttribute('data-index', 'i');\n input.setAttribute('type', 'checkbox');\n input.setAttribute('value', dimensionsArray[i].name);\n label.setAttribute('for', 'dim' + dimensionsArray[i].name);\n text = document.createTextNode(' ' + dimensionsArray[i].name);\n br = document.createElement('br');\n dimensionsCol1.appendChild(input);\n dimensionsCol1.appendChild(label);\n label.appendChild(text);\n dimensionsCol1.appendChild(br);\n }\n for (i = half; i < iMax; i += 1) {\n input = document.createElement('input');\n label = document.createElement('lable');\n input.setAttribute('name', 'dimensionsChk');\n input.setAttribute('id', 'dim' + dimensionsArray[i].name);\n input.setAttribute('data-index', 'i');\n input.setAttribute('type', 'checkbox');\n input.setAttribute('value', dimensionsArray[i].name);\n label.setAttribute('for', 'dim' + dimensionsArray[i].name);\n text = document.createTextNode(' ' + dimensionsArray[i].name);\n br = document.createElement('br');\n dimensionsCol2.appendChild(input);\n dimensionsCol2.appendChild(label);\n label.appendChild(text);\n dimensionsCol2.appendChild(br);\n }\n // get a reference to the checkbox collection\n dimensionCheckboxes = document.getElementsByName('dimensionsChk');\n }", "applyOtherOptions(options) {\n let ic = this.icn3d,\n me = ic.icn3dui\n if (options === undefined) options = ic.opts\n\n // if(ic.lines !== undefined) {\n // contact lines\n ic.hBondCls.setHbondsContacts(options, 'contact')\n\n // halogen lines\n ic.hBondCls.setHbondsContacts(options, 'halogen')\n // pi-cation lines\n ic.hBondCls.setHbondsContacts(options, 'pi-cation')\n // pi-stacking lines\n ic.hBondCls.setHbondsContacts(options, 'pi-stacking')\n\n // hbond lines\n ic.hBondCls.setHbondsContacts(options, 'hbond')\n // salt bridge lines\n ic.hBondCls.setHbondsContacts(options, 'saltbridge')\n if (ic.pairArray !== undefined && ic.pairArray.length > 0) {\n this.updateStabilizer() // to update ic.stabilizerpnts\n\n let color = '#FFFFFF'\n let pnts = ic.stabilizerpnts\n ic.lines['stabilizer'] = [] // reset\n for (let i = 0, lim = Math.floor(pnts.length / 2); i < lim; i++) {\n let line = {}\n line.position1 = pnts[2 * i]\n line.position2 = pnts[2 * i + 1]\n line.color = color\n line.dashed = false // if true, there will be too many cylinders in the dashed lines\n\n ic.lines['stabilizer'].push(line)\n }\n }\n\n ic.lineCls.createLines(ic.lines)\n // }\n\n // distance sets\n if (ic.distPnts && ic.distPnts.length > 0) {\n for (let i = 0, il = ic.distPnts.length; i < il; ++i) {\n ic.boxCls.createBox_base(ic.distPnts[i], ic.originSize, ic.hColor, false)\n }\n }\n\n // maps\n if (ic.prevMaps !== undefined) {\n for (let i = 0, il = ic.prevMaps.length; i < il; ++i) {\n ic.mdl.add(ic.prevMaps[i])\n }\n }\n\n // EM map\n if (ic.prevEmmaps !== undefined) {\n for (let i = 0, il = ic.prevEmmaps.length; i < il; ++i) {\n ic.mdl.add(ic.prevEmmaps[i])\n }\n }\n\n if (ic.prevPhimaps !== undefined) {\n for (let i = 0, il = ic.prevPhimaps.length; i < il; ++i) {\n ic.mdl.add(ic.prevPhimaps[i])\n }\n }\n\n // surfaces\n if (ic.prevSurfaces !== undefined) {\n for (let i = 0, il = ic.prevSurfaces.length; i < il; ++i) {\n ic.mdl.add(ic.prevSurfaces[i])\n }\n }\n\n // symmetry axes and polygon\n if (ic.symmetryHash !== undefined && ic.symmetrytitle !== undefined) {\n ic.applySymdCls.applySymmetry(ic.symmetrytitle)\n }\n\n if (ic.symdArray !== undefined && ic.symdArray.length > 0) {\n //var bSymd = true;\n //ic.applySymmetry(ic.symdtitle, bSymd);\n ic.applySymdCls.applySymd()\n }\n\n // other meshes\n if (ic.prevOtherMesh !== undefined) {\n for (let i = 0, il = ic.prevOtherMesh.length; i < il; ++i) {\n ic.mdl.add(ic.prevOtherMesh[i])\n }\n }\n\n if (me.htmlCls.setHtmlCls.getCookie('glycan') != '') {\n let bGlycansCartoon = parseInt(me.htmlCls.setHtmlCls.getCookie('glycan'))\n\n if (ic.bGlycansCartoon != bGlycansCartoon) {\n me.htmlCls.clickMenuCls.setLogCmd('set glycan ' + bGlycansCartoon, true)\n }\n\n ic.bGlycansCartoon = bGlycansCartoon\n }\n\n // add cartoon for glycans\n if (ic.bGlycansCartoon && !ic.bAlternate) {\n ic.glycanCls.showGlycans()\n }\n\n ic.applyCenterCls.applyCenterOptions(options)\n\n ic.axesCls.buildAllAxes(undefined, true)\n\n switch (options.axis.toLowerCase()) {\n case 'yes':\n ic.axis = true\n ic.axesCls.buildAxes(ic.maxD / 2)\n\n break\n case 'no':\n ic.axis = false\n break\n }\n switch (options.pk.toLowerCase()) {\n case 'atom':\n ic.pk = 1\n break\n case 'no':\n ic.pk = 0\n break\n case 'residue':\n ic.pk = 2\n break\n case 'strand':\n ic.pk = 3\n break\n }\n }", "function createParallelIfNeeded(option){if(option.parallel){return;}var hasParallelSeries=false;zrUtil.each(option.series,function(seriesOpt){if(seriesOpt && seriesOpt.type === 'parallel'){hasParallelSeries = true;}});if(hasParallelSeries){option.parallel = [{}];}}", "numericalMapping(axis) {\n const solver = this.solver;\n const state = this.plotSegment.state;\n const props = this.plotSegment.object.properties;\n const attrs = state.attributes;\n const dataIndices = state.dataRowIndices;\n const table = this.getTableContext();\n switch (axis) {\n case \"x\":\n {\n const data = props.xData;\n if (data.type == \"numerical\") {\n const [x1, x2] = solver.attrs(attrs, [this.x1Name, this.x2Name]);\n const expr = this.getExpression(data.expression);\n const interp = axis_1.getNumericalInterpolate(data);\n for (const [index, markState] of state.glyphs.entries()) {\n const rowContext = table.getGroupedContext(dataIndices[index]);\n const value = expr.getNumberValue(rowContext);\n const t = interp(value);\n solver.addLinear(solver_1.ConstraintStrength.HARD, (1 - t) * props.marginX1 - t * props.marginX2, [[1 - t, x1], [t, x2]], [[1, solver.attr(markState.attributes, \"x\")]]);\n }\n }\n if (data.type == \"categorical\") {\n const [x1, x2, gapX] = solver.attrs(attrs, [\n this.x1Name,\n this.x2Name,\n \"gapX\"\n ]);\n const expr = this.getExpression(data.expression);\n for (const [index, markState] of state.glyphs.entries()) {\n const rowContext = table.getGroupedContext(dataIndices[index]);\n const value = expr.getStringValue(rowContext);\n this.gapX(data.categories.length, data.gapRatio);\n const i = data.categories.indexOf(value);\n solver.addLinear(solver_1.ConstraintStrength.HARD, (data.categories.length - i - 0.5) * props.marginX1 -\n (i + 0.5) * props.marginX2, [\n [i + 0.5, x2],\n [data.categories.length - i - 0.5, x1],\n [-data.categories.length / 2 + i + 0.5, gapX]\n ], [\n [\n data.categories.length,\n solver.attr(markState.attributes, \"x\")\n ]\n ]);\n }\n }\n // solver.addEquals(ConstraintWeight.HARD, x, x1);\n }\n break;\n case \"y\": {\n const data = props.yData;\n if (data.type == \"numerical\") {\n const [y1, y2] = solver.attrs(attrs, [this.y1Name, this.y2Name]);\n const expr = this.getExpression(data.expression);\n const interp = axis_1.getNumericalInterpolate(data);\n for (const [index, markState] of state.glyphs.entries()) {\n const rowContext = table.getGroupedContext(dataIndices[index]);\n const value = expr.getNumberValue(rowContext);\n const t = interp(value);\n solver.addLinear(solver_1.ConstraintStrength.HARD, (t - 1) * props.marginY2 + t * props.marginY1, [[1 - t, y1], [t, y2]], [[1, solver.attr(markState.attributes, \"y\")]]);\n }\n }\n if (data.type == \"categorical\") {\n const [y1, y2, gapY] = solver.attrs(attrs, [\n this.y1Name,\n this.y2Name,\n \"gapY\"\n ]);\n const expr = this.getExpression(data.expression);\n for (const [index, markState] of state.glyphs.entries()) {\n const rowContext = table.getGroupedContext(dataIndices[index]);\n const value = expr.getStringValue(rowContext);\n this.gapY(data.categories.length, data.gapRatio);\n const i = data.categories.indexOf(value);\n solver.addLinear(solver_1.ConstraintStrength.HARD, (data.categories.length - i - 0.5) * props.marginY1 -\n (i + 0.5) * props.marginY2, [\n [i + 0.5, y2],\n [data.categories.length - i - 0.5, y1],\n [-data.categories.length / 2 + i + 0.5, gapY]\n ], [[data.categories.length, solver.attr(markState.attributes, \"y\")]]);\n }\n }\n // solver.addEquals(ConstraintWeight.HARD, y, y2);\n }\n }\n }", "updateConfig(payload, option) {\n this._dirty = true;\n // When no option it is a base object\n // so merge object\n if (!option) {\n this._config = {\n ...this._config,\n ...payload\n };\n } else {\n this._config[option] = this._config[option] || {};\n Object.keys(payload).forEach((attribut) => {\n // If the attribut is an array\n if (Array.isArray(this._config[option][attribut])) {\n if (Array.isArray(payload[attribut])) {\n // If this is a scale object merge using the uuid\n if (Object.prototype.hasOwnProperty.call(this._scales, attribut)) {\n this._scales[attribut][payload[attribut][0].uuid] =\n payload[attribut][0];\n this._config[option][attribut] = Object.values(\n this._scales[attribut]\n );\n } else {\n // add the array to the current array\n this._config[option][attribut].push(...payload[attribut]);\n }\n } else {\n // add the option\n this._config[option][attribut].push(payload[attribut]);\n }\n } else if (\n // the attribut is an object we know\n typeof this._config[option][attribut] === 'object' &&\n this._config[option][attribut] !== null\n ) {\n // merge it\n this._config[option][attribut] = {\n ...this._config[option][attribut],\n ...payload[attribut]\n };\n } else {\n // the attribut is an object we don't know\n this._config[option][attribut] = payload[attribut]; // store it\n\n // If this is a scale object with data, add it to the scales property\n if (\n Object.prototype.hasOwnProperty.call(this._scales, attribut) &&\n payload[attribut] !== undefined\n ) {\n this._scales[attribut][payload[attribut][0].uuid] =\n payload[attribut][0];\n }\n }\n });\n }\n }", "function extendAliases (...args) {\n args.forEach(function (obj) {\n Object.keys(obj || {}).forEach(function (key) {\n // short-circuit if we've already added a key\n // to the aliases array, for example it might\n // exist in both 'opts.default' and 'opts.key'.\n if (flags.aliases[key]) return\n\n flags.aliases[key] = [].concat(aliases[key] || [])\n // For \"--option-name\", also set argv.optionName\n flags.aliases[key].concat(key).forEach(function (x) {\n if (/-/.test(x) && configuration['camel-case-expansion']) {\n var c = camelCase(x)\n if (c !== key && flags.aliases[key].indexOf(c) === -1) {\n flags.aliases[key].push(c)\n newAliases[c] = true\n }\n }\n })\n // For \"--optionName\", also set argv['option-name']\n flags.aliases[key].concat(key).forEach(function (x) {\n if (x.length > 1 && /[A-Z]/.test(x) && configuration['camel-case-expansion']) {\n var c = decamelize(x, '-')\n if (c !== key && flags.aliases[key].indexOf(c) === -1) {\n flags.aliases[key].push(c)\n newAliases[c] = true\n }\n }\n })\n flags.aliases[key].forEach(function (x) {\n flags.aliases[x] = [key].concat(flags.aliases[key].filter(function (y) {\n return x !== y\n }))\n })\n })\n })\n }", "function extendAliases (...args) {\n args.forEach(function (obj) {\n Object.keys(obj || {}).forEach(function (key) {\n // short-circuit if we've already added a key\n // to the aliases array, for example it might\n // exist in both 'opts.default' and 'opts.key'.\n if (flags.aliases[key]) return\n\n flags.aliases[key] = [].concat(aliases[key] || [])\n // For \"--option-name\", also set argv.optionName\n flags.aliases[key].concat(key).forEach(function (x) {\n if (/-/.test(x) && configuration['camel-case-expansion']) {\n var c = camelCase(x)\n if (c !== key && flags.aliases[key].indexOf(c) === -1) {\n flags.aliases[key].push(c)\n newAliases[c] = true\n }\n }\n })\n // For \"--optionName\", also set argv['option-name']\n flags.aliases[key].concat(key).forEach(function (x) {\n if (x.length > 1 && /[A-Z]/.test(x) && configuration['camel-case-expansion']) {\n var c = decamelize(x, '-')\n if (c !== key && flags.aliases[key].indexOf(c) === -1) {\n flags.aliases[key].push(c)\n newAliases[c] = true\n }\n }\n })\n flags.aliases[key].forEach(function (x) {\n flags.aliases[x] = [key].concat(flags.aliases[key].filter(function (y) {\n return x !== y\n }))\n })\n })\n })\n }", "addAxes () {\n }", "function mergeOptions(optionObjs){return util_1.mergeProps(optionObjs,complexOptions);}", "function appendAxes() {\n graphImg\n .append(\"g\")\n .call(xAxis)\n .attr(\"class\", \"xAxis\")\n .attr(\n \"transform\",\n \"translate(0,\" + (displayHeight - margin - labelArea) + \")\"\n );\n graphImg\n .append(\"g\")\n .call(yAxis)\n .attr(\"class\", \"yAxis\")\n .attr(\"transform\", \"translate(\" + (margin + labelArea) + \", 0)\");\n }", "function autoSetAxis(ctx, axis) {\n\t/* get the user specified axis range */\n\tlet xLeftValue = idName('x-left-value').value;\n\tlet xRightValue = idName('x-right-value').value;\n\tlet yLeftValue = idName('y-left-value').value;\n\tlet yRightValue = idName('y-right-value').value;\n\n\tsetAxis(ctx, axis, canvasWidth, canvasHeight, xLeftValue,\n\t\txRightValue, yLeftValue, yRightValue);\n}", "function zMultiSelectAxis (orders, t, e, b, w) {\r\n\treturn new zSelectAxis(zo.extend({\r\n\t\ttype:\"zMultiSelectAxis\",\r\n\t\tselected:{a:[], r:[]}, // For zMultiSelectAxis, selected must ALWAYS be an array, even when empty\r\n\t\taxisSelect:function (x, t, e, b, w) { // Like normal axisSelect, except allows nothing to be selected\r\n\t\t\tvar S = this;\r\n\t\t\tS.select(x, t, e, b, w);\r\n\t\t\tS.forOwnedSwarm(\"setSpace\", x); // Set space, but not for itself\r\n\t\t\tS.forSwarms(\"refresh\", \"all\", t, e, null, S.K); // Redraw\r\n\t\t\tif (S.onSelect) S.onSelect(t, e, null, w || S.K); // Specified actions to execute on select\r\n\t\t},\r\n\t\tselect:function (x, t, e, b, w) {\r\n\t\t\tvar i, S = this, aPos = S.asAPos(x); // Select based on rPos\r\n\t\t\tif (za.isEmpty(aPos)) return; // None are to be selected/deselected\r\n\t\t\taPos = za.asArray(aPos);\r\n\t\t\tfor (i = 0; i < aPos.length; i++) {\r\n\t\t\t\tif (za.contains(S.selected.a, aPos[i])) {\r\n\t\t\t\t\tza.remove(S.selected.a, aPos[i]);\r\n\t\t\t\t\tS.forDrones({a:aPos[i]}, \"deselect\", t, e, null, w || S.K);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tS.selected.a.push(aPos[i]);\r\n\t\t\t\t\tS.forDrones({a:aPos[i]}, \"select\", t, e, null, w || S.K);\r\n\t\t\t\t};\r\n\t\t\t};\r\n\t\t\tS.selected.r = S.asRPos({d:S.selected.d, a:S.selected.a}); // Update selected.r\r\n\t\t\tif (!w || b) S.G.redraw(t, e, b, w); // Only redraw guide if there is no key, or if a callback has been specified\r\n \t\t}\r\n\t}, orders), t, e, b, w);\r\n}", "function setupInteractions (container, options) {\n\n\t\t// ZOOMING\n\t $(getElementSelector(container, elementIds.msmsplot)).bind(\"plotselected\", function (event, ranges) {\n\t \tcontainer.data(\"zoomRange\", ranges);\n\t \tcreatePlot(container, getDatasets(container));\n\t });\n\t \n\t // ZOOM AXES\n\t $(getElementSelector(container, elementIds.zoom_x)).click(function() {\n\t \tresetAxisZoom(container);\n\t });\n\t $(getElementSelector(container, elementIds.zoom_y)).click(function() {\n\t \tresetAxisZoom(container);\n\t });\n\t \n\t\t// RESET ZOOM\n\t\t$(getElementSelector(container, elementIds.resetZoom)).click(function() {\n\t\t\tresetZoom(container);\n\t \t});\n\t\t\n\t\t// UPDATE\n\t\t$(getElementSelector(container, elementIds.update)).click(function() {\n\t\t\tcontainer.data(\"zoomRange\", null); // zoom out fully\n\t\t\tsetMassError(container);\n calculatePrecursorPeak(container);\n calculateImmoniumIons(container);\n calculateReporterIons(container);\n\t\t\tcreatePlot(container, getDatasets(container));\n\t\t\tmakeIonTable(container);\n\t\t\t\n\t\t\tcalculateSequenceMassAndPutOnPage(container);\n\t \t});\n\t\t\n\t\t// TOOLTIPS\n\t\t$(getElementSelector(container, elementIds.msmsplot)).bind(\"plothover\", function (event, pos, item) {\n\n displayTooltip(item, container, options, \"m/z\", \"intensity\");\n\t });\n\t\t$(getElementSelector(container, elementIds.enableTooltip)).click(function() {\n\t\t\t$(getElementSelector(container, elementIds.msmstooltip)).remove();\n\t\t});\n\n // PLOT MASS ERROR CHECKBOX\n $(getElementSelector(container, elementIds.massErrorPlot_option)).click(function() {\n var plotDiv = $(getElementSelector(container, elementIds.massErrorPlot));\n if($(this).is(':checked'))\n {\n plotDiv.show();\n }\n else\n {\n plotDiv.hide();\n }\n });\n\n\t\t\n\t\t// SHOW / HIDE ION SERIES; UPDATE ON MASS TYPE CHANGE; \n\t\t// PEAK ASSIGNMENT TYPE CHANGED; PEAK LABEL TYPE CHANGED\n\t\tvar ionChoiceContainer = $(getElementSelector(container, elementIds.ion_choice));\n\t\tionChoiceContainer.find(\"input\").click(function() {\n plotAccordingToChoices(container)\n });\n\n $(getElementSelector(container, elementIds.immoniumIons)).click(function() {\n plotAccordingToChoices(container);\n });\n\n $(getElementSelector(container, elementIds.reporterIons)).click(function() {\n plotAccordingToChoices(container);\n });\n\n\t\t\n\t\tvar neutralLossContainer = $(getElementSelector(container, elementIds.nl_choice));\n\t\tneutralLossContainer.find(\"input\").click(function() {\n\t\t\tcontainer.data(\"selectedNeutralLossChanged\", true);\n var selectedNeutralLosses = getNeutralLosses(container);\n container.data(\"options\").peptide.recalculateLossOptions(selectedNeutralLosses, container.data(\"options\").maxNeutralLossCount);\n\t\t\tplotAccordingToChoices(container);\n\t\t});\n\t\t\n\t container.find(\"input[name='\"+getRadioName(container, \"massTypeOpt\")+\"']\").click(function() {\n\t \tcontainer.data(\"massTypeChanged\", true);\n\t \tplotAccordingToChoices(container);\n\t });\n $(getElementSelector(container, elementIds.peakDetect)).click(function() {\n container.data(\"peakAssignmentTypeChanged\", true);\n plotAccordingToChoices(container);\n });\n\n\t container.find(\"input[name='\"+getRadioName(container, \"peakAssignOpt\")+\"']\").click(function() {\n\t \tcontainer.data(\"peakAssignmentTypeChanged\", true);\n calculatePrecursorPeak(container);\n calculateImmoniumIons(container);\n calculateReporterIons(container);\n\t \tplotAccordingToChoices(container);\n\t });\n\n $(getElementSelector(container, elementIds.deselectIonsLink)).click(function() {\n\t\t\tionChoiceContainer.find(\"input:checkbox:checked\").each(function() {\n\t\t\t\t$(this).attr('checked', \"\");\n\t\t\t});\n\t\t\t\n\t\t\tplotAccordingToChoices(container);\n\t\t});\n\n\t container.find(\"input[name='\"+getRadioName(container, \"peakLabelOpt\")+\"']\").click(function() {\n\t \tcontainer.data(\"peakLabelTypeChanged\", true);\n\t \tplotAccordingToChoices(container);\n\t });\n\n\t \n\t \n\t // MOVING THE ION TABLE\n\t makeIonTableMovable(container, options);\n\t \n\t // CHANGING THE PLOT SIZE\n\t makePlotResizable(container);\n\t \n\t // PRINT SPECTRUM\n\t printPlot(container);\n\t\t\n\t}", "function displayAxisTitles (options) {\n var xTitle = $(\"<h3></h3\").attr( {\"id\": \"xtitle\",\n \"class\": \"axistitle\"});\n xTitle.text(options.xaxistitle);\n var yTitle = $(\"<h3></h3\").attr( {\"id\": \"ytitle\",\n \"class\": \"axistitle\"});\n yTitle.text(options.yaxistitle);\n $(\"#chartarea\").append(xTitle,yTitle);\n\n $(\"#xtitle\").css({\n \"align-self\": \"center\",\n \"margin\": \"2px\",\n \"padding\": \"5px\",\n \"position\": \"absolute\",\n \"top\": \"105%\",\n \"font-size\": \"medium\"\n });\n\n$(\"#ytitle\").css( {\n \"left\": \"-20%\",\n \"margin\": \"2px\",\n \"padding\": \"2px\",\n \"position\": \"absolute\",\n \"top\":\"50%\",\n \"transform\": \"rotate(-90deg)\",\n \"font-size\": \"medium\"\n });\n\n}", "addOutputOptions() {\n const { conf, creator } = this;\n const outputOptions = [];\n // default\n const defaultOpts = this.getDefaultOutputOptions(conf);\n FFmpegUtil.concatOpts(outputOptions, defaultOpts);\n\n // audio\n const audio = conf.getVal('audio');\n if (!isEmpty(audio)) {\n let apro = '';\n if (ScenesUtil.hasTransition(creator)) {\n const index = ScenesUtil.getLength(creator);\n apro += `-map ${index}:a `;\n }\n\n FFmpegUtil.concatOpts(outputOptions, `${apro}-c:a aac -shortest`.split(' '));\n }\n this.command.outputOptions(outputOptions);\n }", "function makeChartsOptions()\n {\n //contCharts.length = 1;\n contCharts.forEach( function( chartRack ) {\n var widgetDef = chartRack.widgetDef;\n var options = chartRack.options;\n if( widgetDef && widgetDef.time ) {\n options.series[0].data =\n chartRack.dataTable.map( function( row ) {\n return [ row[ widgetDef.time ], row[ chartRack.fieldName ] ]; \n });\n //.outputs assembled chart to html-page nicely formatted\n //$$.c('pre').to( document.body ).ch(\n // $$.div().html( JSON.stringify( chartRack.options, null, ' ' )));\n\n }\n });\n }", "function addProcessingConfig(ds) {\n const polarity_dict = {'Positive': '+', 'Negative': '-'},\n polarity = polarity_dict[ds.metadata['MS_Analysis']['Polarity']],\n instrument = ds.metadata['MS_Analysis']['Analyzer'],\n rp = ds.metadata['MS_Analysis']['Detector_Resolving_Power'],\n rp_mz = parseFloat(rp['mz']),\n rp_resolution = parseFloat(rp['Resolving_Power']);\n\n let rp200, params;\n\n if (instrument === 'FTICR')\n rp200 = rp_resolution * rp_mz / 200.0;\n else if (instrument === 'Orbitrap')\n rp200 = rp_resolution * Math.pow(rp_mz / 200.0, 0.5);\n else\n rp200 = rp_resolution;\n\n if (rp200 < 85000) params = RESOL_POWER_PARAMS['70K'];\n else if (rp200 < 120000) params = RESOL_POWER_PARAMS['100K'];\n else if (rp200 < 195000) params = RESOL_POWER_PARAMS['140K'];\n else if (rp200 < 265000) params = RESOL_POWER_PARAMS['250K'];\n else if (rp200 < 390000) params = RESOL_POWER_PARAMS['280K'];\n else if (rp200 < 625000) params = RESOL_POWER_PARAMS['500K'];\n else if (rp200 < 875000) params = RESOL_POWER_PARAMS['750K'];\n else params = RESOL_POWER_PARAMS['1000K'];\n\n const molDBs = ds.molDBs;\n for (let defaultMolDBName of config.defaults.moldb_names) {\n if (molDBs.indexOf(defaultMolDBName) < 0)\n molDBs.push(defaultMolDBName);\n }\n let adducts = config.defaults.adducts[polarity];\n if (Array.isArray(ds.adducts)) {\n if (ds.adducts.length > 0)\n adducts = ds.adducts;\n }\n\n ds.config = {\n \"databases\": molDBs,\n \"isotope_generation\": {\n \"adducts\": adducts,\n \"charge\": {\n \"polarity\": polarity,\n \"n_charges\": 1\n },\n \"isocalc_sigma\": Number(params['sigma'].toFixed(6)),\n \"isocalc_pts_per_mz\": params['pts_per_mz']\n },\n \"image_generation\": {\n \"ppm\": 3,\n \"nlevels\": 30,\n \"q\": 99,\n \"do_preprocessing\": false\n }\n };\n}", "changeAxis() {\n this.showAxis = !this.showAxis;\n }", "_makeCompatible() {\n if (typeof (this.options.configGroups) !== 'undefined') return;\n\n const compatible = this._factorize();\n compatible.configGroups = this._splitConfig();\n this.options = compatible;\n this.compatibleOptions = compatible;\n }", "function createParallelIfNeeded(option) {\n\t if (option.parallel) {\n\t return;\n\t }\n\t\n\t var hasParallelSeries = false;\n\t each(option.series, function (seriesOpt) {\n\t if (seriesOpt && seriesOpt.type === 'parallel') {\n\t hasParallelSeries = true;\n\t }\n\t });\n\t\n\t if (hasParallelSeries) {\n\t option.parallel = [{}];\n\t }\n\t }", "function addSet(axisStr,at) {\n\t\n\tvar axisSets = workview_definition['row_sets'];\n\tvar axisStart = workview_definition['row_start'];\n\tif( typeof axisStart === 'undefined' ) {\n\t\taxisStart = 0;\n\t\tworkview_definition['row_start'] = 0;\n\t}\n\tif( axisStr == \"columns\" ) {\n\t\taxisSets = workview_definition['column_sets'];\n\t\taxisStart = workview_definition['column_start'];\n\t\tif( typeof axisStart === 'undefined' ) {\n\t\t\taxisStart = 0;\n\t\t\tworkview_definition['column_start'] = 0;\n\t\t}\n\t}\n\t\n\t//add the set to the dimension set list.\n\tvar axis = workview_definition['positioning'][axisStr];\n\tfor(var i=0;i<axis.length;i++) {\t//loop through dimensions on this axis.\n\t\tif( axis[i].id ) {\n\t\t\tvar dim = dimById(axis[i].id);\n\t\t\t\n\t\t\tstandardDimensionChecks(dim.id);\n\t\t\n\t\t\tvar len = workview_definition['dimensions'][dim.id]['set'].length;\n\t\t\tif( len == 0 )\n\t\t\t\tlen++;\n\t\t\tvar insert = at + Math.abs(axisStart);\n\t\t\tworkview_definition['dimensions'][dim.id]['set'].splice(insert,0,{\"instructions\":[],\"element\":null});\n\t\t\t\n\t\t\tif( len + 1 > workview_definition['dimensions'][dim.id]['set'].length) {\n\t\t\t\tworkview_definition['dimensions'][dim.id]['set'].splice(insert,0,{\"instructions\":[],\"element\":null});\n\t\t\t}\n\t\t} \n\t}\n\t\n\tif( axisStr == \"columns\" ) {\n\t\tworkview_definition['column_sets']++;\n\t\tif( at < 0 )\n\t\t\tworkview_definition['column_start']--;\n\t} else {\n\t\tworkview_definition['row_sets']++;\n\t\tif( at < 0 )\n\t\t\tworkview_definition['row_start']--;\n\t}\n\t\n\tworkviewSave();\n}", "function apply_axis_values(variable_element, data, axis_settings){\n if(data.type == \"common\"){\n if(data.options){\n for(var i in data.options){\n variable_element.append('<option var_type=\"'+ data.options[i].type +'\" value=\"' + data.options[i].value + '\"> ' + data.options[i].text + '</option>');\n }\n }\n\n disable_invalid_variable_options(variable_element);\n variable_element.val(data.variable);\n axis_select_change(variable_element);\n } else if(data.type == \"gene\") {\n variable_element.val(data.variable);\n axis_select_change(variable_element);\n var parent = variable_element.parents(\".variable-container\");\n parent.find('.spec-select').val(data.specification);\n axis_attribute_change(parent.find('.spec-select'));\n vizhelpers.get_datatype_search_interfaces(parent.find('.spec-select'), parent.find('.spec-select').val());\n\n var keys = Object.keys(data);\n parent.find('.'+ data.specification).find('.field-options').each(function(i, ele){\n if($.inArray(ele.id, keys) != -1){\n if($(ele).hasClass('select2')){\n $(ele).parent().find('.select2-selection__rendered').empty();\n $(ele).parent().find('.select2-selection__rendered').append('<option value=\"' + data[ele.id].options[0].value + '\"> '+ data[ele.id].options[0].text + '</option>');\n } else {\n $(ele).empty();\n for (var i in data[ele.id].options) {\n $(ele).append('<option value=\"' + data[ele.id].options[i].value + '\"> '+ data[ele.id].options[i].text + '</option>');\n }\n $(ele).val(data[ele.id].selected);\n }\n }\n });\n parent.find('.'+ data.specification).find('#search-term-select').empty();\n for(var i in data[\"selection\"].options) {\n if (data[\"selection\"].options[i].value == data[\"selection\"].selected) {\n parent.find('.'+ data.specification).find('#search-term-select').append('<option value=\"' + data[\"selection\"].options[i].value + '\"> ' + data[\"selection\"].options[i].text + '</option>');\n }\n }\n parent.find('.'+ data.specification).find('#search-term-select').val(data[\"selection\"].selected);\n }\n }", "function toggleAxis(axis){\n\n }", "function toggleAxis(axis){\n\n }", "function mergeOptions(optionObjs) {\n return mergeProps(optionObjs, complexOptions);\n } // TODO: move this stuff to a \"plugin\"-related file...", "function mergeScaleConfig()\n /* config objects ... */\n {\n return helpers$1.merge({}, [].slice.call(arguments), {\n merger: function merger(key, target, source, options) {\n if (key === 'xAxes' || key === 'yAxes') {\n var slen = source[key].length;\n var i, type, scale;\n\n if (!target[key]) {\n target[key] = [];\n }\n\n for (i = 0; i < slen; ++i) {\n scale = source[key][i];\n type = valueOrDefault$9(scale.type, key === 'xAxes' ? 'category' : 'linear');\n\n if (i >= target[key].length) {\n target[key].push({});\n }\n\n if (!target[key][i].type || scale.type && scale.type !== target[key][i].type) {\n // new/untyped scale or type changed: let's apply the new defaults\n // then merge source scale to correctly overwrite the defaults.\n helpers$1.merge(target[key][i], [core_scaleService.getScaleDefaults(type), scale]);\n } else {\n // scales type are the same\n helpers$1.merge(target[key][i], scale);\n }\n }\n } else {\n helpers$1._merger(key, target, source, options);\n }\n }\n });\n }", "function prepareOptions(options, data) {\n options.canvas = true;\n var extraOptions = data.extraOptions;\n if(extraOptions !== undefined){\n var xOffset = options.xaxis.mode === \"time\" ? 19800000 : 0;\n var yOffset = options.yaxis.mode === \"time\" ? 19800000 : 0;\n\n if(!isNaN(extraOptions.minX))\n \toptions.xaxis.min = parseFloat(extraOptions.minX) + xOffset;\n \n if(!isNaN(extraOptions.maxX))\n \toptions.xaxis.max = parseFloat(extraOptions.maxX) + xOffset;\n \n if(!isNaN(extraOptions.minY))\n \toptions.yaxis.min = parseFloat(extraOptions.minY) + yOffset;\n \n if(!isNaN(extraOptions.maxY))\n \toptions.yaxis.max = parseFloat(extraOptions.maxY) + yOffset;\n }\n}", "function prepareOptions(options, data) {\n options.canvas = true;\n var extraOptions = data.extraOptions;\n if(extraOptions !== undefined){\n var xOffset = options.xaxis.mode === \"time\" ? 19800000 : 0;\n var yOffset = options.yaxis.mode === \"time\" ? 19800000 : 0;\n\n if(!isNaN(extraOptions.minX))\n \toptions.xaxis.min = parseFloat(extraOptions.minX) + xOffset;\n \n if(!isNaN(extraOptions.maxX))\n \toptions.xaxis.max = parseFloat(extraOptions.maxX) + xOffset;\n \n if(!isNaN(extraOptions.minY))\n \toptions.yaxis.min = parseFloat(extraOptions.minY) + yOffset;\n \n if(!isNaN(extraOptions.maxY))\n \toptions.yaxis.max = parseFloat(extraOptions.maxY) + yOffset;\n }\n}", "function prepareOptions(options, data) {\n options.canvas = true;\n var extraOptions = data.extraOptions;\n if(extraOptions !== undefined){\n var xOffset = options.xaxis.mode === \"time\" ? 19800000 : 0;\n var yOffset = options.yaxis.mode === \"time\" ? 19800000 : 0;\n\n if(!isNaN(extraOptions.minX))\n \toptions.xaxis.min = parseFloat(extraOptions.minX) + xOffset;\n \n if(!isNaN(extraOptions.maxX))\n \toptions.xaxis.max = parseFloat(extraOptions.maxX) + xOffset;\n \n if(!isNaN(extraOptions.minY))\n \toptions.yaxis.min = parseFloat(extraOptions.minY) + yOffset;\n \n if(!isNaN(extraOptions.maxY))\n \toptions.yaxis.max = parseFloat(extraOptions.maxY) + yOffset;\n }\n}", "function prepareOptions(options, data) {\n options.canvas = true;\n var extraOptions = data.extraOptions;\n if(extraOptions !== undefined){\n var xOffset = options.xaxis.mode === \"time\" ? 19800000 : 0;\n var yOffset = options.yaxis.mode === \"time\" ? 19800000 : 0;\n\n if(!isNaN(extraOptions.minX))\n \toptions.xaxis.min = parseFloat(extraOptions.minX) + xOffset;\n \n if(!isNaN(extraOptions.maxX))\n \toptions.xaxis.max = parseFloat(extraOptions.maxX) + xOffset;\n \n if(!isNaN(extraOptions.minY))\n \toptions.yaxis.min = parseFloat(extraOptions.minY) + yOffset;\n \n if(!isNaN(extraOptions.maxY))\n \toptions.yaxis.max = parseFloat(extraOptions.maxY) + yOffset;\n }\n}", "function prepareOptions(options, data) {\n options.canvas = true;\n var extraOptions = data.extraOptions;\n if(extraOptions !== undefined){\n var xOffset = options.xaxis.mode === \"time\" ? 19800000 : 0;\n var yOffset = options.yaxis.mode === \"time\" ? 19800000 : 0;\n\n if(!isNaN(extraOptions.minX))\n \toptions.xaxis.min = parseFloat(extraOptions.minX) + xOffset;\n \n if(!isNaN(extraOptions.maxX))\n \toptions.xaxis.max = parseFloat(extraOptions.maxX) + xOffset;\n \n if(!isNaN(extraOptions.minY))\n \toptions.yaxis.min = parseFloat(extraOptions.minY) + yOffset;\n \n if(!isNaN(extraOptions.maxY))\n \toptions.yaxis.max = parseFloat(extraOptions.maxY) + yOffset;\n }\n}", "function prepareOptions(options, data) {\n options.canvas = true;\n var extraOptions = data.extraOptions;\n if(extraOptions !== undefined){\n var xOffset = options.xaxis.mode === \"time\" ? 19800000 : 0;\n var yOffset = options.yaxis.mode === \"time\" ? 19800000 : 0;\n\n if(!isNaN(extraOptions.minX))\n \toptions.xaxis.min = parseFloat(extraOptions.minX) + xOffset;\n \n if(!isNaN(extraOptions.maxX))\n \toptions.xaxis.max = parseFloat(extraOptions.maxX) + xOffset;\n \n if(!isNaN(extraOptions.minY))\n \toptions.yaxis.min = parseFloat(extraOptions.minY) + yOffset;\n \n if(!isNaN(extraOptions.maxY))\n \toptions.yaxis.max = parseFloat(extraOptions.maxY) + yOffset;\n }\n}", "function prepareOptions(options, data) {\n options.canvas = true;\n var extraOptions = data.extraOptions;\n if(extraOptions !== undefined){\n var xOffset = options.xaxis.mode === \"time\" ? 19800000 : 0;\n var yOffset = options.yaxis.mode === \"time\" ? 19800000 : 0;\n\n if(!isNaN(extraOptions.minX))\n \toptions.xaxis.min = parseFloat(extraOptions.minX) + xOffset;\n \n if(!isNaN(extraOptions.maxX))\n \toptions.xaxis.max = parseFloat(extraOptions.maxX) + xOffset;\n \n if(!isNaN(extraOptions.minY))\n \toptions.yaxis.min = parseFloat(extraOptions.minY) + yOffset;\n \n if(!isNaN(extraOptions.maxY))\n \toptions.yaxis.max = parseFloat(extraOptions.maxY) + yOffset;\n }\n}", "function prepareOptions(options, data) {\n options.canvas = true;\n var extraOptions = data.extraOptions;\n if(extraOptions !== undefined){\n var xOffset = options.xaxis.mode === \"time\" ? 19800000 : 0;\n var yOffset = options.yaxis.mode === \"time\" ? 19800000 : 0;\n\n if(!isNaN(extraOptions.minX))\n \toptions.xaxis.min = parseFloat(extraOptions.minX) + xOffset;\n \n if(!isNaN(extraOptions.maxX))\n \toptions.xaxis.max = parseFloat(extraOptions.maxX) + xOffset;\n \n if(!isNaN(extraOptions.minY))\n \toptions.yaxis.min = parseFloat(extraOptions.minY) + yOffset;\n \n if(!isNaN(extraOptions.maxY))\n \toptions.yaxis.max = parseFloat(extraOptions.maxY) + yOffset;\n }\n}", "function cartesianAxisHelper_layout(gridModel, axisModel, opt) {\n opt = opt || {};\n var grid = gridModel.coordinateSystem;\n var axis = axisModel.axis;\n var layout = {};\n var otherAxisOnZeroOf = axis.getAxesOnZeroOf()[0];\n var rawAxisPosition = axis.position;\n var axisPosition = otherAxisOnZeroOf ? 'onZero' : rawAxisPosition;\n var axisDim = axis.dim;\n var rect = grid.getRect();\n var rectBound = [rect.x, rect.x + rect.width, rect.y, rect.y + rect.height];\n var idx = {\n left: 0,\n right: 1,\n top: 0,\n bottom: 1,\n onZero: 2\n };\n var axisOffset = axisModel.get('offset') || 0;\n var posBound = axisDim === 'x' ? [rectBound[2] - axisOffset, rectBound[3] + axisOffset] : [rectBound[0] - axisOffset, rectBound[1] + axisOffset];\n\n if (otherAxisOnZeroOf) {\n var onZeroCoord = otherAxisOnZeroOf.toGlobalCoord(otherAxisOnZeroOf.dataToCoord(0));\n posBound[idx.onZero] = Math.max(Math.min(onZeroCoord, posBound[1]), posBound[0]);\n } // Axis position\n\n\n layout.position = [axisDim === 'y' ? posBound[idx[axisPosition]] : rectBound[0], axisDim === 'x' ? posBound[idx[axisPosition]] : rectBound[3]]; // Axis rotation\n\n layout.rotation = Math.PI / 2 * (axisDim === 'x' ? 0 : 1); // Tick and label direction, x y is axisDim\n\n var dirMap = {\n top: -1,\n bottom: 1,\n left: -1,\n right: 1\n };\n layout.labelDirection = layout.tickDirection = layout.nameDirection = dirMap[rawAxisPosition];\n layout.labelOffset = otherAxisOnZeroOf ? posBound[idx[rawAxisPosition]] - posBound[idx.onZero] : 0;\n\n if (axisModel.get(['axisTick', 'inside'])) {\n layout.tickDirection = -layout.tickDirection;\n }\n\n if (util[\"O\" /* retrieve */](opt.labelInside, axisModel.get(['axisLabel', 'inside']))) {\n layout.labelDirection = -layout.labelDirection;\n } // Special label rotation\n\n\n var labelRotate = axisModel.get(['axisLabel', 'rotate']);\n layout.labelRotate = axisPosition === 'top' ? -labelRotate : labelRotate; // Over splitLine and splitArea\n\n layout.z2 = 1;\n return layout;\n}", "function attachSideAxes(groups, transition, plotSize, paddedPlotSize, chartMargin) {\n var axisGroups = groups.filter(function(group) {if (group.axis) return true; });\n axisGroups.forEach(function(group) {\n var groupAxis = attachByClass(\"g\", transition, \"group-axis\");\n\n var axisGroup = {\n label: group.label,\n colors: group.colors,\n orient: group.orient,\n series: group.series,\n zeroLock: group.zeroLock,\n chartMargin: deepClone(chartMargin),\n plotSize: plotSize.slice(0),\n paddedPlotSize: paddedPlotSize.slice(0)\n };\n\n var selection = d3.select(groupAxis.node());\n selection.data([axisGroup]);\n\n groupAxis\n .call(group.axis);\n });\n }", "function GUI_extras(axis) {\n // Background\n var cdiv = $(\"<div/>\", {\"class\": \"colors\"});\n cdiv.append(\"BG: \");\n BGCOLORS.forEach(function(c) {\n cdiv.append(\n $(\"<a/>\", {\"class\": \"dummylink\"}).append(\n $(\"<div/>\", {\"id\": \"\",\n \"class\": \"cimg\"})\n .css(\"background-color\", c)\n .click(function(e) {stage.viewer.setBackground(c);})));\n });\n\n if(!axis) return cdiv;\n \n // Buttons\n var ddiv = $(\"<div/>\", {\"class\": \"buttons\"});\n ddiv.append(\n $(\"<input/>\", {\"type\": \"button\",\n \"value\": \"Reset orientation\"})\n .click(orient),\n $(\"<input/>\", {\"type\": \"button\",\n \"value\": \"Align Axis\"})\n .click(align),\n $(\"<br/>\")\n );\n align();\n return [cdiv, ddiv];\n}", "function prepareOptions(options, data) {\r\n options.canvas = true;\r\n var extraOptions = data.extraOptions;\r\n if(extraOptions !== undefined){\r\n var xOffset = options.xaxis.mode === \"time\" ? -14400000 : 0;\r\n var yOffset = options.yaxis.mode === \"time\" ? -14400000 : 0;\r\n\r\n if(!isNaN(extraOptions.minX))\r\n \toptions.xaxis.min = parseFloat(extraOptions.minX) + xOffset;\r\n \r\n if(!isNaN(extraOptions.maxX))\r\n \toptions.xaxis.max = parseFloat(extraOptions.maxX) + xOffset;\r\n \r\n if(!isNaN(extraOptions.minY))\r\n \toptions.yaxis.min = parseFloat(extraOptions.minY) + yOffset;\r\n \r\n if(!isNaN(extraOptions.maxY))\r\n \toptions.yaxis.max = parseFloat(extraOptions.maxY) + yOffset;\r\n }\r\n}", "function prepareOptions(options, data) {\n options.canvas = true;\n var extraOptions = data.extraOptions;\n if(extraOptions !== undefined){\n var xOffset = options.xaxis.mode === \"time\" ? -28800000 : 0;\n var yOffset = options.yaxis.mode === \"time\" ? -28800000 : 0;\n\n if(!isNaN(extraOptions.minX))\n \toptions.xaxis.min = parseFloat(extraOptions.minX) + xOffset;\n \n if(!isNaN(extraOptions.maxX))\n \toptions.xaxis.max = parseFloat(extraOptions.maxX) + xOffset;\n \n if(!isNaN(extraOptions.minY))\n \toptions.yaxis.min = parseFloat(extraOptions.minY) + yOffset;\n \n if(!isNaN(extraOptions.maxY))\n \toptions.yaxis.max = parseFloat(extraOptions.maxY) + yOffset;\n }\n}", "function init(plot) {\n plot.hooks.processOptions.push(processOptions);\n }", "function createParallelIfNeeded(option) {\n if (option.parallel) {\n return;\n }\n\n var hasParallelSeries = false;\n util[\"k\" /* each */](option.series, function (seriesOpt) {\n if (seriesOpt && seriesOpt.type === 'parallel') {\n hasParallelSeries = true;\n }\n });\n\n if (hasParallelSeries) {\n option.parallel = [{}];\n }\n}", "function addMissingMatchedAxis() {\n var matchesIn = axLayoutIn.matches;\n if (AX_ID_PATTERN.test(matchesIn) && allAxisIds.indexOf(matchesIn) === -1) {\n missingMatchedAxisIdsLookup[matchesIn] = axLayoutIn.type;\n missingMatchedAxisIds = Object.keys(missingMatchedAxisIdsLookup);\n }\n }", "function mergeOptions(target) {\n\t\tfunction mergeIntoTarget(name,value) {\n\t\t\tif($.isPlainObject(value) && $.isPlainObject(target[name]) && !isForcedAtomicOption(name)) {\n\t\t\t\t// merge into a new object to avoid destruction\n\t\t\t\ttarget[name] = mergeOptions({}, target[name], value); // combine. `value` object takes precedence\n\t\t\t} else if (value !== undefined) { // only use values that are set and not undefined\n\t\t\t\ttarget[name] = value;\n\t\t\t}//END if\n\t\t}//END function mergeIntoTarget\n\n\t\tfor(var i=1;i<arguments.length;i++) { $.each(arguments[i],mergeIntoTarget); }\n\t\treturn target;\n\t}//END function mergeOptions", "function copyAxisInto(axis, originAxis) {\n axis.min = originAxis.min;\n axis.max = originAxis.max;\n}", "function prepareOptions(options, data) {\n options.canvas = true;\n var extraOptions = data.extraOptions;\n if(extraOptions !== undefined){\n var xOffset = options.xaxis.mode === \"time\" ? -25200000 : 0;\n var yOffset = options.yaxis.mode === \"time\" ? -25200000 : 0;\n\n if(!isNaN(extraOptions.minX))\n \toptions.xaxis.min = parseFloat(extraOptions.minX) + xOffset;\n \n if(!isNaN(extraOptions.maxX))\n \toptions.xaxis.max = parseFloat(extraOptions.maxX) + xOffset;\n \n if(!isNaN(extraOptions.minY))\n \toptions.yaxis.min = parseFloat(extraOptions.minY) + yOffset;\n \n if(!isNaN(extraOptions.maxY))\n \toptions.yaxis.max = parseFloat(extraOptions.maxY) + yOffset;\n }\n}", "includeConfigOption(context, prevArgv) {\n const { primaryDriver } = context;\n const configPath = context.findConfigByName(primaryDriver.metadata.configName);\n const argv = [...prevArgv];\n if (configPath && primaryDriver.metadata.configOption) {\n argv.push(primaryDriver.metadata.configOption, configPath.path.path());\n }\n this.debug('Including config option to args');\n return argv;\n }", "function getXscaleOptions(){\n x_options = {\n type: x_type,\n position: 'bottom',\n scaleLabel: {\n display: true,\n labelString: x_label\n },\n };\n\n if(x_time){\n x_options[\"time\"] = getTimeOptions(x_type);\n }else{\n x_options[\"ticks\"] = {\n beginAtZero: true\n }\n }\n\n if(same_scale){\n x_options[\"ticks\"] = {\n min: min_scale_value,\n max: max_scale_value\n }\n }\n\n return x_options;\n}", "function prepareOptions(options, data) {\n options.canvas = true;\n var extraOptions = data.extraOptions;\n if(extraOptions !== undefined){\n var xOffset = options.xaxis.mode === \"time\" ? -36000000 : 0;\n var yOffset = options.yaxis.mode === \"time\" ? -36000000 : 0;\n\n if(!isNaN(extraOptions.minX))\n \toptions.xaxis.min = parseFloat(extraOptions.minX) + xOffset;\n \n if(!isNaN(extraOptions.maxX))\n \toptions.xaxis.max = parseFloat(extraOptions.maxX) + xOffset;\n \n if(!isNaN(extraOptions.minY))\n \toptions.yaxis.min = parseFloat(extraOptions.minY) + yOffset;\n \n if(!isNaN(extraOptions.maxY))\n \toptions.yaxis.max = parseFloat(extraOptions.maxY) + yOffset;\n }\n}", "function prepareOptions(options, data) {\n options.canvas = true;\n var extraOptions = data.extraOptions;\n if(extraOptions !== undefined){\n var xOffset = options.xaxis.mode === \"time\" ? -36000000 : 0;\n var yOffset = options.yaxis.mode === \"time\" ? -36000000 : 0;\n\n if(!isNaN(extraOptions.minX))\n \toptions.xaxis.min = parseFloat(extraOptions.minX) + xOffset;\n \n if(!isNaN(extraOptions.maxX))\n \toptions.xaxis.max = parseFloat(extraOptions.maxX) + xOffset;\n \n if(!isNaN(extraOptions.minY))\n \toptions.yaxis.min = parseFloat(extraOptions.minY) + yOffset;\n \n if(!isNaN(extraOptions.maxY))\n \toptions.yaxis.max = parseFloat(extraOptions.maxY) + yOffset;\n }\n}", "function prepareOptions(options, data) {\n options.canvas = true;\n var extraOptions = data.extraOptions;\n if(extraOptions !== undefined){\n var xOffset = options.xaxis.mode === \"time\" ? -36000000 : 0;\n var yOffset = options.yaxis.mode === \"time\" ? -36000000 : 0;\n\n if(!isNaN(extraOptions.minX))\n \toptions.xaxis.min = parseFloat(extraOptions.minX) + xOffset;\n \n if(!isNaN(extraOptions.maxX))\n \toptions.xaxis.max = parseFloat(extraOptions.maxX) + xOffset;\n \n if(!isNaN(extraOptions.minY))\n \toptions.yaxis.min = parseFloat(extraOptions.minY) + yOffset;\n \n if(!isNaN(extraOptions.maxY))\n \toptions.yaxis.max = parseFloat(extraOptions.maxY) + yOffset;\n }\n}", "function prepareOptions(options, data) {\n options.canvas = true;\n var extraOptions = data.extraOptions;\n if(extraOptions !== undefined){\n var xOffset = options.xaxis.mode === \"time\" ? -36000000 : 0;\n var yOffset = options.yaxis.mode === \"time\" ? -36000000 : 0;\n\n if(!isNaN(extraOptions.minX))\n \toptions.xaxis.min = parseFloat(extraOptions.minX) + xOffset;\n \n if(!isNaN(extraOptions.maxX))\n \toptions.xaxis.max = parseFloat(extraOptions.maxX) + xOffset;\n \n if(!isNaN(extraOptions.minY))\n \toptions.yaxis.min = parseFloat(extraOptions.minY) + yOffset;\n \n if(!isNaN(extraOptions.maxY))\n \toptions.yaxis.max = parseFloat(extraOptions.maxY) + yOffset;\n }\n}", "function prepareOptions(options, data) {\n options.canvas = true;\n var extraOptions = data.extraOptions;\n if(extraOptions !== undefined){\n var xOffset = options.xaxis.mode === \"time\" ? -36000000 : 0;\n var yOffset = options.yaxis.mode === \"time\" ? -36000000 : 0;\n\n if(!isNaN(extraOptions.minX))\n \toptions.xaxis.min = parseFloat(extraOptions.minX) + xOffset;\n \n if(!isNaN(extraOptions.maxX))\n \toptions.xaxis.max = parseFloat(extraOptions.maxX) + xOffset;\n \n if(!isNaN(extraOptions.minY))\n \toptions.yaxis.min = parseFloat(extraOptions.minY) + yOffset;\n \n if(!isNaN(extraOptions.maxY))\n \toptions.yaxis.max = parseFloat(extraOptions.maxY) + yOffset;\n }\n}", "function prepareOptions(options, data) {\n options.canvas = true;\n var extraOptions = data.extraOptions;\n if(extraOptions !== undefined){\n var xOffset = options.xaxis.mode === \"time\" ? 7200000 : 0;\n var yOffset = options.yaxis.mode === \"time\" ? 7200000 : 0;\n\n if(!isNaN(extraOptions.minX))\n \toptions.xaxis.min = parseFloat(extraOptions.minX) + xOffset;\n \n if(!isNaN(extraOptions.maxX))\n \toptions.xaxis.max = parseFloat(extraOptions.maxX) + xOffset;\n \n if(!isNaN(extraOptions.minY))\n \toptions.yaxis.min = parseFloat(extraOptions.minY) + yOffset;\n \n if(!isNaN(extraOptions.maxY))\n \toptions.yaxis.max = parseFloat(extraOptions.maxY) + yOffset;\n }\n}", "function setIconOptions(options) {\r\n _iconSettings.__options = tslib_es6[\"a\" /* __assign */]({}, _iconSettings.__options, options);\r\n}", "function prepareOptions(options, data) {\r\n options.canvas = true;\r\n var extraOptions = data.extraOptions;\r\n if(extraOptions !== undefined){\r\n var xOffset = options.xaxis.mode === \"time\" ? 7200000 : 0;\r\n var yOffset = options.yaxis.mode === \"time\" ? 7200000 : 0;\r\n\r\n if(!isNaN(extraOptions.minX))\r\n \toptions.xaxis.min = parseFloat(extraOptions.minX) + xOffset;\r\n \r\n if(!isNaN(extraOptions.maxX))\r\n \toptions.xaxis.max = parseFloat(extraOptions.maxX) + xOffset;\r\n \r\n if(!isNaN(extraOptions.minY))\r\n \toptions.yaxis.min = parseFloat(extraOptions.minY) + yOffset;\r\n \r\n if(!isNaN(extraOptions.maxY))\r\n \toptions.yaxis.max = parseFloat(extraOptions.maxY) + yOffset;\r\n }\r\n}", "function mergeOption(oldOption,newOption){newOption = newOption || {};each(newOption,function(newCptOpt,mainType){if(newCptOpt == null){return;}var oldCptOpt=oldOption[mainType];if(!ComponentModel.hasClass(mainType)){oldOption[mainType] = merge(oldCptOpt,newCptOpt,true);}else {newCptOpt = modelUtil.normalizeToArray(newCptOpt);oldCptOpt = modelUtil.normalizeToArray(oldCptOpt);var mapResult=modelUtil.mappingToExists(oldCptOpt,newCptOpt);oldOption[mainType] = map(mapResult,function(item){return item.option && item.exist?merge(item.exist,item.option,true):item.exist || item.option;});}});}", "toggleAxes() {\n if(this.options.axes){\n this.yAxisElement.style(\"opacity\", \"0\");\n this.xAxisElement.style(\"opacity\", \"0\");\n } else {\n this.yAxisElement.style(\"opacity\", \"1\");\n this.xAxisElement.style(\"opacity\", \"1\");\n }\n\n this.options.axes = !this.options.axes;\n }", "function prepareOptions(options, data) {\r\n options.canvas = true;\r\n var extraOptions = data.extraOptions;\r\n if(extraOptions !== undefined){\r\n var xOffset = options.xaxis.mode === \"time\" ? -10800000 : 0;\r\n var yOffset = options.yaxis.mode === \"time\" ? -10800000 : 0;\r\n\r\n if(!isNaN(extraOptions.minX))\r\n \toptions.xaxis.min = parseFloat(extraOptions.minX) + xOffset;\r\n \r\n if(!isNaN(extraOptions.maxX))\r\n \toptions.xaxis.max = parseFloat(extraOptions.maxX) + xOffset;\r\n \r\n if(!isNaN(extraOptions.minY))\r\n \toptions.yaxis.min = parseFloat(extraOptions.minY) + yOffset;\r\n \r\n if(!isNaN(extraOptions.maxY))\r\n \toptions.yaxis.max = parseFloat(extraOptions.maxY) + yOffset;\r\n }\r\n}", "function prepareOptions(options, data) {\r\n options.canvas = true;\r\n var extraOptions = data.extraOptions;\r\n if(extraOptions !== undefined){\r\n var xOffset = options.xaxis.mode === \"time\" ? -10800000 : 0;\r\n var yOffset = options.yaxis.mode === \"time\" ? -10800000 : 0;\r\n\r\n if(!isNaN(extraOptions.minX))\r\n \toptions.xaxis.min = parseFloat(extraOptions.minX) + xOffset;\r\n \r\n if(!isNaN(extraOptions.maxX))\r\n \toptions.xaxis.max = parseFloat(extraOptions.maxX) + xOffset;\r\n \r\n if(!isNaN(extraOptions.minY))\r\n \toptions.yaxis.min = parseFloat(extraOptions.minY) + yOffset;\r\n \r\n if(!isNaN(extraOptions.maxY))\r\n \toptions.yaxis.max = parseFloat(extraOptions.maxY) + yOffset;\r\n }\r\n}", "function prepareOptions(options, data) {\r\n options.canvas = true;\r\n var extraOptions = data.extraOptions;\r\n if(extraOptions !== undefined){\r\n var xOffset = options.xaxis.mode === \"time\" ? -10800000 : 0;\r\n var yOffset = options.yaxis.mode === \"time\" ? -10800000 : 0;\r\n\r\n if(!isNaN(extraOptions.minX))\r\n \toptions.xaxis.min = parseFloat(extraOptions.minX) + xOffset;\r\n \r\n if(!isNaN(extraOptions.maxX))\r\n \toptions.xaxis.max = parseFloat(extraOptions.maxX) + xOffset;\r\n \r\n if(!isNaN(extraOptions.minY))\r\n \toptions.yaxis.min = parseFloat(extraOptions.minY) + yOffset;\r\n \r\n if(!isNaN(extraOptions.maxY))\r\n \toptions.yaxis.max = parseFloat(extraOptions.maxY) + yOffset;\r\n }\r\n}", "function prepareOptions(options, data) {\r\n options.canvas = true;\r\n var extraOptions = data.extraOptions;\r\n if(extraOptions !== undefined){\r\n var xOffset = options.xaxis.mode === \"time\" ? -10800000 : 0;\r\n var yOffset = options.yaxis.mode === \"time\" ? -10800000 : 0;\r\n\r\n if(!isNaN(extraOptions.minX))\r\n \toptions.xaxis.min = parseFloat(extraOptions.minX) + xOffset;\r\n \r\n if(!isNaN(extraOptions.maxX))\r\n \toptions.xaxis.max = parseFloat(extraOptions.maxX) + xOffset;\r\n \r\n if(!isNaN(extraOptions.minY))\r\n \toptions.yaxis.min = parseFloat(extraOptions.minY) + yOffset;\r\n \r\n if(!isNaN(extraOptions.maxY))\r\n \toptions.yaxis.max = parseFloat(extraOptions.maxY) + yOffset;\r\n }\r\n}", "function prepareOptions(options, data) {\r\n options.canvas = true;\r\n var extraOptions = data.extraOptions;\r\n if(extraOptions !== undefined){\r\n var xOffset = options.xaxis.mode === \"time\" ? -10800000 : 0;\r\n var yOffset = options.yaxis.mode === \"time\" ? -10800000 : 0;\r\n\r\n if(!isNaN(extraOptions.minX))\r\n \toptions.xaxis.min = parseFloat(extraOptions.minX) + xOffset;\r\n \r\n if(!isNaN(extraOptions.maxX))\r\n \toptions.xaxis.max = parseFloat(extraOptions.maxX) + xOffset;\r\n \r\n if(!isNaN(extraOptions.minY))\r\n \toptions.yaxis.min = parseFloat(extraOptions.minY) + yOffset;\r\n \r\n if(!isNaN(extraOptions.maxY))\r\n \toptions.yaxis.max = parseFloat(extraOptions.maxY) + yOffset;\r\n }\r\n}", "function prepareOptions(options, data) {\r\n options.canvas = true;\r\n var extraOptions = data.extraOptions;\r\n if(extraOptions !== undefined){\r\n var xOffset = options.xaxis.mode === \"time\" ? -10800000 : 0;\r\n var yOffset = options.yaxis.mode === \"time\" ? -10800000 : 0;\r\n\r\n if(!isNaN(extraOptions.minX))\r\n \toptions.xaxis.min = parseFloat(extraOptions.minX) + xOffset;\r\n \r\n if(!isNaN(extraOptions.maxX))\r\n \toptions.xaxis.max = parseFloat(extraOptions.maxX) + xOffset;\r\n \r\n if(!isNaN(extraOptions.minY))\r\n \toptions.yaxis.min = parseFloat(extraOptions.minY) + yOffset;\r\n \r\n if(!isNaN(extraOptions.maxY))\r\n \toptions.yaxis.max = parseFloat(extraOptions.maxY) + yOffset;\r\n }\r\n}", "function prepareOptions(options, data) {\r\n options.canvas = true;\r\n var extraOptions = data.extraOptions;\r\n if(extraOptions !== undefined){\r\n var xOffset = options.xaxis.mode === \"time\" ? -10800000 : 0;\r\n var yOffset = options.yaxis.mode === \"time\" ? -10800000 : 0;\r\n\r\n if(!isNaN(extraOptions.minX))\r\n \toptions.xaxis.min = parseFloat(extraOptions.minX) + xOffset;\r\n \r\n if(!isNaN(extraOptions.maxX))\r\n \toptions.xaxis.max = parseFloat(extraOptions.maxX) + xOffset;\r\n \r\n if(!isNaN(extraOptions.minY))\r\n \toptions.yaxis.min = parseFloat(extraOptions.minY) + yOffset;\r\n \r\n if(!isNaN(extraOptions.maxY))\r\n \toptions.yaxis.max = parseFloat(extraOptions.maxY) + yOffset;\r\n }\r\n}", "function prepareOptions(options, data) {\n options.canvas = true;\n var extraOptions = data.extraOptions;\n if(extraOptions !== undefined){\n var xOffset = options.xaxis.mode === \"time\" ? 28800000 : 0;\n var yOffset = options.yaxis.mode === \"time\" ? 28800000 : 0;\n\n if(!isNaN(extraOptions.minX))\n \toptions.xaxis.min = parseFloat(extraOptions.minX) + xOffset;\n \n if(!isNaN(extraOptions.maxX))\n \toptions.xaxis.max = parseFloat(extraOptions.maxX) + xOffset;\n \n if(!isNaN(extraOptions.minY))\n \toptions.yaxis.min = parseFloat(extraOptions.minY) + yOffset;\n \n if(!isNaN(extraOptions.maxY))\n \toptions.yaxis.max = parseFloat(extraOptions.maxY) + yOffset;\n }\n}", "function prepareOptions(options, data) {\n options.canvas = true;\n var extraOptions = data.extraOptions;\n if(extraOptions !== undefined){\n var xOffset = options.xaxis.mode === \"time\" ? 28800000 : 0;\n var yOffset = options.yaxis.mode === \"time\" ? 28800000 : 0;\n\n if(!isNaN(extraOptions.minX))\n \toptions.xaxis.min = parseFloat(extraOptions.minX) + xOffset;\n \n if(!isNaN(extraOptions.maxX))\n \toptions.xaxis.max = parseFloat(extraOptions.maxX) + xOffset;\n \n if(!isNaN(extraOptions.minY))\n \toptions.yaxis.min = parseFloat(extraOptions.minY) + yOffset;\n \n if(!isNaN(extraOptions.maxY))\n \toptions.yaxis.max = parseFloat(extraOptions.maxY) + yOffset;\n }\n}", "function prepareOptions(options, data) {\n options.canvas = true;\n var extraOptions = data.extraOptions;\n if(extraOptions !== undefined){\n var xOffset = options.xaxis.mode === \"time\" ? 28800000 : 0;\n var yOffset = options.yaxis.mode === \"time\" ? 28800000 : 0;\n\n if(!isNaN(extraOptions.minX))\n \toptions.xaxis.min = parseFloat(extraOptions.minX) + xOffset;\n \n if(!isNaN(extraOptions.maxX))\n \toptions.xaxis.max = parseFloat(extraOptions.maxX) + xOffset;\n \n if(!isNaN(extraOptions.minY))\n \toptions.yaxis.min = parseFloat(extraOptions.minY) + yOffset;\n \n if(!isNaN(extraOptions.maxY))\n \toptions.yaxis.max = parseFloat(extraOptions.maxY) + yOffset;\n }\n}", "function prepareOptions(options, data) {\n options.canvas = true;\n var extraOptions = data.extraOptions;\n if(extraOptions !== undefined){\n var xOffset = options.xaxis.mode === \"time\" ? 28800000 : 0;\n var yOffset = options.yaxis.mode === \"time\" ? 28800000 : 0;\n\n if(!isNaN(extraOptions.minX))\n \toptions.xaxis.min = parseFloat(extraOptions.minX) + xOffset;\n \n if(!isNaN(extraOptions.maxX))\n \toptions.xaxis.max = parseFloat(extraOptions.maxX) + xOffset;\n \n if(!isNaN(extraOptions.minY))\n \toptions.yaxis.min = parseFloat(extraOptions.minY) + yOffset;\n \n if(!isNaN(extraOptions.maxY))\n \toptions.yaxis.max = parseFloat(extraOptions.maxY) + yOffset;\n }\n}", "function prepareOptions(options, data) {\n options.canvas = true;\n var extraOptions = data.extraOptions;\n if(extraOptions !== undefined){\n var xOffset = options.xaxis.mode === \"time\" ? 28800000 : 0;\n var yOffset = options.yaxis.mode === \"time\" ? 28800000 : 0;\n\n if(!isNaN(extraOptions.minX))\n \toptions.xaxis.min = parseFloat(extraOptions.minX) + xOffset;\n \n if(!isNaN(extraOptions.maxX))\n \toptions.xaxis.max = parseFloat(extraOptions.maxX) + xOffset;\n \n if(!isNaN(extraOptions.minY))\n \toptions.yaxis.min = parseFloat(extraOptions.minY) + yOffset;\n \n if(!isNaN(extraOptions.maxY))\n \toptions.yaxis.max = parseFloat(extraOptions.maxY) + yOffset;\n }\n}" ]
[ "0.68219596", "0.6635864", "0.6557229", "0.62749445", "0.6230679", "0.5393373", "0.5191035", "0.5138835", "0.507884", "0.507884", "0.507884", "0.47775602", "0.463865", "0.46238345", "0.46118924", "0.4597867", "0.45692158", "0.454332", "0.4505092", "0.4505092", "0.4477107", "0.44622585", "0.44056562", "0.43887973", "0.43800318", "0.43800318", "0.43664646", "0.43636218", "0.4353967", "0.4353722", "0.43270633", "0.43262106", "0.43262106", "0.4322694", "0.43159816", "0.4313492", "0.4310599", "0.43068355", "0.4299863", "0.42830613", "0.42577082", "0.42545265", "0.42464462", "0.42455432", "0.42372558", "0.42361736", "0.42337835", "0.4228559", "0.42269495", "0.42269495", "0.41767073", "0.4174292", "0.41630208", "0.41630208", "0.41630208", "0.41630208", "0.41630208", "0.41630208", "0.41630208", "0.41630208", "0.4162002", "0.41612443", "0.415578", "0.4151474", "0.41480747", "0.41349113", "0.41321647", "0.41317007", "0.41248855", "0.41230938", "0.4122814", "0.41224962", "0.41218588", "0.41217402", "0.41217402", "0.41217402", "0.41217402", "0.41217402", "0.41180596", "0.4117238", "0.41105768", "0.41104335", "0.41058734", "0.41053358", "0.41053358", "0.41053358", "0.41053358", "0.41053358", "0.41053358", "0.41053358", "0.41046825", "0.41046825", "0.41046825", "0.41046825", "0.41046825" ]
0.6199687
10
although it might be not accurate.
function getScales(xyMinMaxCurr, xyMinMaxOrigin) { var sizeCurr = getSize(xyMinMaxCurr); var sizeOrigin = getSize(xyMinMaxOrigin); var scales = [sizeCurr[0] / sizeOrigin[0], sizeCurr[1] / sizeOrigin[1]]; isNaN(scales[0]) && (scales[0] = 1); isNaN(scales[1]) && (scales[1] = 1); return scales; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private internal function m248() {}", "function returnsNonSmi(){ return 0.25; }", "get newLength() {\n let result = 0;\n for (let i = 0; i < this.sections.length; i += 2) {\n let ins = this.sections[i + 1];\n result += ins < 0 ? this.sections[i] : ins;\n }\n return result;\n }", "_calcMovePrecision() {\n let precision = (this.o.maxVal - this.o.minVal) / 127;\n return precision;\n }", "_getClosest(val) {\n return Math.floor(val / 17) * 17;\n }", "Ec(){\r\n return 57*Math.pow(this.fc,0.5)\r\n }", "snpMDG(v) {\n // console.log(v)\n // console.log(Math.round(v/this.cellSize/this.scale) * this.cellSize/this.scale)\n return Math.round(v/this.cellSize) * this.cellSize\n }", "value() {return 0}", "static getRefreshCost() {\n let notComplete = player.completedQuestList.filter((elem) => { return !elem(); }).length;\n return Math.floor(250000 * Math.LOG10E * Math.log(Math.pow(notComplete, 4) + 1));\n }", "lengthSq() {\n return this.w * this.w + this.xyz.clone().lengthSq();\n }", "function j(){var e=s.getBoundingClientRect(),r=\"offset\"+[\"Width\",\"Height\"][t.ort]\nreturn 0===t.ort?e.width||s[r]:e.height||s[r]}", "function k538(matches) { return 250 / Math.pow(matches + 5, .4); }", "getTopUnit(){return this.__topUnit}", "Cr(){\n return 0.721 + 0.00725*(this.Lj*12/this.Dj)\n }", "function t4(){\n return (dataArray[numPoints-1][1]-dataArray[0][1])/(numPoints-1);\n }", "static private internal function m121() {}", "computeBestSupportingPosition() {\n\n\t\tthis._supportSpotCalculator.computeBestSupportingPosition();\n\n\t}", "Fsv(){\n if(this.Fyv == 60){\n return 32000\n }\n else{\n return 20000\n }\n }", "get _physicalEnd(){return(this._physicalStart+this._physicalCount-1)%this._physicalCount;}", "get y() { return init.h - inProptn(1, 7) * 1.5; }", "p(pos) { return Math.ceil((pos-1)/this.d); }", "stringX() {return this.x - 0.5*this.r/2;}", "Nr(){\n return this.Lj*12/6+1\n }", "get estimatedHeight() { return -1; }", "get referencePixelsPerUnit() {}", "oblivionFactor() {\n return Math.pow(2, - this.timestep / this.HALFTIME);\n }", "promedio(){\n let promedio = 0;\n let i =0;\n for(let x of this._data){\n i = i++;\n promedio = promedio + x;\n }\n return promedio/i;\n }", "private public function m246() {}", "transient final private internal function m170() {}", "get normal (){\n\t\treturn this.dir.perp(1);\t\t\t\n\t}", "wu_nc(){\n return (1.2*this.DL + 1.6*this.CL)*(this.Sj/12)\n }", "function R(){var e=s.getBoundingClientRect(),n=\"offset\"+[\"Width\",\"Height\"][t.ort];return 0===t.ort?e.width||s[n]:e.height||s[n]}", "get _physicalEnd(){return(this._physicalStart+this._physicalCount-1)%this._physicalCount}", "function P(e,t){return e.line-t.line||e.ch-t.ch}", "function S(){var e=le.getBoundingClientRect(),t=\"offset\"+[\"Width\",\"Height\"][n.ort];return 0===n.ort?e.width||le[t]:e.height||le[t]}", "function q(){var e=p.getBoundingClientRect(),t=\"offset\"+[\"Width\",\"Height\"][r.ort];return 0===r.ort?e.width||p[t]:e.height||p[t]}", "function calcPerim() {\n\tthis.perimetr=0;\n\tfor(key in this){\n\t\tif(checkisNum(this[key])&&key!=='perimetr'){\n\t\t\tthis.perimetr+=this[key];\n\t\t}\n\t}\n\treturn this.perimetr;\n}", "function getOffset() {\n\t\t\tif (!vm.current) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\t//console.log(vm.getRank(vm.current));\n\t\t\treturn (vm.getRank(vm.current) - 2) * 17;\n\t\t}", "function N() {\n var t = p.getBoundingClientRect(),\n e = \"offset\" + [\"Width\", \"Height\"][i.ort];\n return 0 === i.ort ? t.width || p[e] : t.height || p[e]\n }", "Deff(){\n return 5*(this.wt()*this.Sj/(12*12))*Math.pow(this.Lj,4)*Math.pow(12,4)/(384*29000000*this.Ieff())\n }", "static approxEq(x, y) {\nvar DIFF, EPS, SIZE;\n//--------\nEPS = 5e-5;\nDIFF = Math.abs(x - y);\nSIZE = Math.max(Math.abs(x), Math.abs(y));\nif (SIZE <= 1) {\nreturn DIFF < EPS;\n} else {\nreturn DIFF / SIZE < EPS;\n}\n}", "static private protected internal function m118() {}", "enhetspris() {\n return this.pris / this.antall;\n }", "function calcPrestigeLevel() {\n\n}", "Ds(){\n return (12*Math.pow(this.hc+this.hd/2,3))/(12*this.n())\n }", "getBackendDataLen(x0,y0,x1,y1){\n\treturn Math.max(x1 - x0, y1 - y0);\n }", "_a(){\n\t\t\treturn Math.max(Math.min(0.1*this.B,0.4*this.z),0.04*this.B,3)\n }", "function countCoordinate (val){\n return (val * side ) + (side / 2);\n}", "get horizontalSpeed () { \n if (this.pointers.length > 0) \n return this.pointers.reduce((sum, pointer) => {return sum+pointer.horizontalSpeed}, 0) / this.pointers.length;\n else\n return 0;\n }", "get pointerMoveTolerance() {\n return 1;\n }", "get pointerMoveTolerance() {\n return 1;\n }", "function _findMeasurements () {\n // Capture the header height and the sub nav offset\n if ($header.length > 0 && $banner.length > 0) {\n // headerHeight = $header.outerHeight();\n subnavOffsetTop = $banner.outerHeight();\n }\n\n }", "wu_c(){\n return (1.2*(this.DL+this.SDL) + 1.6*this.LL)*(this.Sj/12)\n }", "function estimatedComparisons() {\n\tn = idList.length;\n\tresult = n * Math.log(n) - Math.pow(2, Math.log(n)) + 1;\n\treturn Math.floor(result);\n}", "blocksTravelled(){\n let horizontal = Math.abs(eastWest.indexOf(this.beginningLocation.horizontal) - eastWest.indexOf(this.endingLocation.horizontal))\n let vertical = Math.abs(parseInt(this.beginningLocation.vertical)-parseInt(this.endingLocation.vertical))\n return (horizontal + vertical);\n }", "length() {\n return Math.sqrt(this.w * this.w + this.xyz.clone().lengthSq() );\n }", "getPreviousIntervalTotalPoints() {\n let totalPoints = 0;\n this.previousIntervalPoints.forEach(element => {\n totalPoints += element.totalPoints;\n });\n return totalPoints;\n }", "function randomOffset() {\r\n\r\n\t\treturn ( Math.random() - 0.5 ) * 2 * 1e-6;\r\n\r\n\t}", "function getRatio() {\n\tlet TradePoint = findTradePoint()\n\tlet Close = findClosePoint()\n\n\tlet Ratio = TradePoint - Close\n\treturn Ratio\n}", "function getRemainingStomach() {\n return (0, _kolmafia.fullnessLimit)() - (0, _kolmafia.myFullness)();\n}", "calcValue() {\n const trackRatio = this.normalize(this.thumb.position().left, 0, this.track.innerWidth() - (this.thumbOffset * 2));\n return (trackRatio * (this.max - this.min)) + this.min;\n }", "static get THRESHOLD () {\n return 9;\n }", "function frameCorrected(value) {\n return Math.floor(value / numerator) * numerator;\n }", "lifeExpectancyJupiter() {\n let jovianLifeExpectancy = Math.floor(this.lifeExpectancy/11.86);\n return jovianLifeExpectancy;\n }", "function isCorrectPercentage(){\n let x = table.children[0];\n let theSpot;\n let leftD, leftM, leftU, upM, rightU, rightM, rightD, downM;\n for(let i=0; i<val; i++){\n for(let j=0; j<val; j++){\n let totalX = 0;\n let totalY = 0;\n theSpot = x.children[i].children[j];\n if(i!=0 && j!=0){\n leftD = x.children[i-1].children[j-1];\n }if(i!=0){\n leftM = x.children[i-1].children[j];\n }if(i!=0 && j<val-1){\n leftU = x.children[i-1].children[j+1];\n }if(j<val-1){\n upM = x.children[i].children[j+1];\n }if(i<val-1 && j!=0){\n rightU = x.children[i+1].children[j+1];\n }if(i<val-1){\n rightM = x.children[i+1].children[j];\n }if(i<val-1 && j!=0){\n rightD = x.children[i+1].children[j-1];\n }if(i!=0){\n downM = x.children[i].children[j-1];\n }\n if(theSpot.innerHTML == \"1\"){\n if(typeof(leftD) != \"undefined\"){\n if(leftD.innerHTML == \"1\"){\n totalX++;\n }}if(typeof(leftM) != \"undefined\"){\n if(leftM.innerHTML == \"1\"){\n totalX++;\n }}if(typeof(leftU) != \"undefined\"){\n if(leftU.innerHTML == \"1\"){\n totalX++;\n }}if(typeof(upM) != \"undefined\"){\n if(upM.innerHTML == \"1\"){\n totalX++;\n }}if(typeof(rightU) != \"undefined\"){\n if(rightU.innerHTML == \"1\"){\n totalX++;\n }}if(typeof(rightM) != \"undefined\"){\n if(rightM.innerHTML == \"1\"){\n totalX++;\n }}if(typeof(rightD) != \"undefined\"){\n if(rightD.innerHTML == \"1\"){\n totalX++;\n }}if(typeof(downM) != \"undefined\"){\n if(downM.innerHTML == \"1\"){\n totalX++;\n }}\n }if(theSpot.innerHTML == \"2\"){\n if(typeof(leftD) != \"undefined\"){\n if(leftD.innerHTML == \"2\"){\n totalY++;\n }}if(typeof(leftM) != \"undefined\"){\n if(leftM.innerHTML == \"2\"){\n totalY++;\n }}if(typeof(leftU) != \"undefined\"){\n if(leftU.innerHTML == \"2\"){\n totalY++;\n }}if(typeof(upM) != \"undefined\"){\n if(upM.innerHTML == \"2\"){\n totalY++;\n }}if(typeof(rightU) != \"undefined\"){\n if(rightU.innerHTML == \"2\"){\n totalY++;\n }}if(typeof(rightM) != \"undefined\"){\n if(rightM.innerHTML == \"2\"){\n totalY++;\n }}if(typeof(rightD) != \"undefined\"){\n if(rightD.innerHTML == \"2\"){\n totalY++;\n }}if(typeof(downM) != \"undefined\"){\n if(downM.innerHTML == \"2\"){\n totalY++;\n }}\n }\n console.log(totalX);\n console.log(totalY);\n if(totalX<(threshold.value*8)){\n theSpot.style.backgroundColor = \"#ffffff\";\n theSpot.innerHTML = \"0\";\n changeLocation(popXcolor.value);\n }if(totalY<(threshold.value*8)){\n theSpot.style.backgroundColor = \"#ffffff\";\n theSpot.innerHTML = \"0\";\n changeLocation(popYcolor.value);\n }\n }\n }\n /**\n * This function changes the location of the population to a vacant spot\n * @param {*} color \n */\n function changeLocation(color){\n let x = table.children[0];\n let theSpot;\n for (let i=0;i<val;i++){\n for(let j=0;j<val;j++){\n theSpot = x.children[i].children[j];\n if(theSpot.innerHTML == \"0\"){\n theSpot.style.backgroundColor = color;\n thePlace.style.color = \"#FFFFFF\";\n break;\n }\n }\n }\n }\n}", "offset() {\n if (this.overlap) return this.dot ? 8 : 12;\n return this.dot ? 2 : 4;\n }", "thresholdMet() {}", "thresholdMet() {}", "transient protected internal function m189() {}", "function randomOffset() {\n\t\t\treturn ( Math.random() - 0.5 ) * 2 * 1e-6;\n\t\t}", "function getI(name,un_name) \n{\n\tvar x=getVar(name);\n\tvar unit=getVtext(un_name);\n\tif(\"mA\"==unit) return x/=1e3;\n\tif(\"A\"==unit) return x;\n\tif(\"uA\"==unit) return x/=1e6;\n\tif(\"pA\"==unit) return x/=1e9;\n\treturn x;\n}", "get len() { // added to normailze the speed of the ball when it starts\n\t\treturn Math.sqrt(this.x * this.x + this.y * this.y);\n\t}", "function PropulsionUnit() {\n\t}", "overTime(){\n\t\t//\n\t}", "function findLow() {\n\n}", "epsilon() {\n return super.epsilon();\n }", "function ee(t){return t.length<3?0:Math.abs(function(t){for(var e=0,n=t.length-1;n>=0;--n)e+=t[n];return e}(t.map((function(e,n){var r=t[n+1]||t[0];return e[0]*r[1]-r[0]*e[1]}))))/2}", "function getaim() {\n\tvar aim = marks[misto]+markaim;\n\tif (aim > 16) {aim -= 16; }\n\tif (aim < 0) {aim += 16; }\n\treturn aim;\n}", "function absRotChange(sketch){\r\n var absSum = 0;\r\n for (var i = 0; i < sketch[\"strokes\"].length; i++){\r\n var stroke = sketch[\"strokes\"][i][\"points\"];\r\n for (var j = 1; j < stroke.length - 1; j++){\r\n var subSum = rotChangeHelper(sketch, stroke, j);\r\n absSum += isNaN(subSum) ? 0 : Math.abs(subSum);\r\n }\r\n }\r\n // console.log(\"abs Rot change is: \" + absSum);\r\n return absSum;\r\n}", "baseAmount() {return inChallenge(\"m\",11)?player.points:player.l1.points}", "function proFullhouse(pc, dc, numSame){\n\tif (numSame.num == 3){\n\t\tvar outAlready = 1 + contain(dc, numSame.rem1);\n\t\treturn (4.0 - outAlready)/43.0;\n\t}\n\telse if (numSame.twoPair) {\n\t\tvar out1Already = 2 + contain(dc, pc[0].value);\n\t\tvar out2Already = 2 + contain(dc, pc[2].value);\n\t\treturn (4.0+4.0-out1Already-out2Already)/43.0;\t\t\n\t} else {\n\t\treturn 0.0;\n\t}\n}", "function getNewUniformDotValue() {\n return 0.\n }", "estimatedTime(peak) {\n // The estimated time depends on the distance in blocks\n // and whether the trip is occurring during peak hours or off peak hours.\n\n if (peak === true) {\n // while during peak hours\n // - two blocks in a minute.\n console.log(this.blocksTravelled()/2)\n let blocksOnPeak = this.blocksTravelled()/ 2;\n return Math.ceil(blocksOnPeak)\n } else {\n // During off peak hours,\n // - three blocks in a minute,\n console.log(this.blocksTravelled()/3)\n let blocksOnPeak = this.blocksTravelled()/ 3;\n return Math.ceil(blocksOnPeak)\n }\n }", "getWidthUnit(){return this.__widthUnit}", "getSynergy(){\n return 0.25 + 0.75 * (this.getActivePlayingPlayers().length / 11) ** 2;\n }", "protected internal function m252() {}", "function t1(){\n return (1/3)*(dataArray[1][1]-dataArray[0][1])+(dataArray[2][1]-dataArray[1][1])+(dataArray[3][1]-dataArray[2][1]);\n }", "getBoneEndDistance(b) {\nreturn this.distance[b];\n}", "mag()\r\n {\r\n return Math.sqrt(this.magSq());\r\n }", "lifeExpectancyVenus() {\n let venusianLifeExpectancy = Math.floor(this.lifeExpectancy/0.62);\n return venusianLifeExpectancy;\n }", "function H(){var t=f.getBoundingClientRect(),e=\"offset\"+[\"Width\",\"Height\"][n.ort];return 0===n.ort?t.width||f[e]:t.height||f[e]}", "function X(){var t=c.getBoundingClientRect(),e=\"offset\"+[\"Width\",\"Height\"][i.ort];return 0===i.ort?t.width||c[e]:t.height||c[e]}", "quotaMysWPass(){\n return math.chain(+this.props.numLocalEmp || 0).multiply(0.666667).floor().done();\n }", "calculateByEnglish() {\n const result = ((this.weight) / Math.pow((this.height * 12), 2)) * 703.0704;\n return Math.round(result* 100) / 100;\n }", "_hash(pt) {\n return (15485867 + pt.X) * 15485867 + pt.Y;\n }", "static aThreatToHumanity(){\n return 0.75;\n }", "function t3(){\n return dataArray[1][1]-dataArray[0][1];\n }", "xpDiff (swapSkater) {\n let skaterOverall = this.props.selectedSkater.edges + this.props.selectedSkater.jumps + this.props.selectedSkater.form + this.props.selectedSkater.presentation;\n let swapSkaterOverall = swapSkater.edges + swapSkater.jumps + swapSkater.form + swapSkater.presentation;\n return swapSkaterOverall - skaterOverall;\n }", "function findCoordination(input) {\n\t\t// easy calculation, no need to write code \n}", "function calculateUnitRatios () {\n\n /************************\n Same Ratio Checks\n ************************/\n\n /* The properties below are used to determine whether the element differs sufficiently from this call's\n previously iterated element to also differ in its unit conversion ratios. If the properties match up with those\n of the prior element, the prior element's conversion ratios are used. Like most optimizations in Velocity,\n this is done to minimize DOM querying. */\n var sameRatioIndicators = {\n myParent: element.parentNode || document.body, /* GET */\n position: CSS.getPropertyValue(element, \"position\"), /* GET */\n fontSize: CSS.getPropertyValue(element, \"fontSize\") /* GET */\n },\n /* Determine if the same % ratio can be used. % is based on the element's position value and its parent's width and height dimensions. */\n samePercentRatio = ((sameRatioIndicators.position === callUnitConversionData.lastPosition) && (sameRatioIndicators.myParent === callUnitConversionData.lastParent)),\n /* Determine if the same em ratio can be used. em is relative to the element's fontSize. */\n sameEmRatio = (sameRatioIndicators.fontSize === callUnitConversionData.lastFontSize);\n\n /* Store these ratio indicators call-wide for the next element to compare against. */\n callUnitConversionData.lastParent = sameRatioIndicators.myParent;\n callUnitConversionData.lastPosition = sameRatioIndicators.position;\n callUnitConversionData.lastFontSize = sameRatioIndicators.fontSize;\n\n /***************************\n Element-Specific Units\n ***************************/\n\n /* Note: IE8 rounds to the nearest pixel when returning CSS values, thus we perform conversions using a measurement\n of 100 (instead of 1) to give our ratios a precision of at least 2 decimal values. */\n var measurement = 100,\n unitRatios = {};\n\n if (!sameEmRatio || !samePercentRatio) {\n var dummy = Data(element).isSVG ? document.createElementNS(\"http://www.w3.org/2000/svg\", \"rect\") : document.createElement(\"div\");\n\n Velocity.init(dummy);\n sameRatioIndicators.myParent.appendChild(dummy);\n\n /* To accurately and consistently calculate conversion ratios, the element's cascaded overflow and box-sizing are stripped.\n Similarly, since width/height can be artificially constrained by their min-/max- equivalents, these are controlled for as well. */\n /* Note: Overflow must be also be controlled for per-axis since the overflow property overwrites its per-axis values. */\n $.each([ \"overflow\", \"overflowX\", \"overflowY\" ], function(i, property) {\n Velocity.CSS.setPropertyValue(dummy, property, \"hidden\");\n });\n Velocity.CSS.setPropertyValue(dummy, \"position\", sameRatioIndicators.position);\n Velocity.CSS.setPropertyValue(dummy, \"fontSize\", sameRatioIndicators.fontSize);\n Velocity.CSS.setPropertyValue(dummy, \"boxSizing\", \"content-box\");\n\n /* width and height act as our proxy properties for measuring the horizontal and vertical % ratios. */\n $.each([ \"minWidth\", \"maxWidth\", \"width\", \"minHeight\", \"maxHeight\", \"height\" ], function(i, property) {\n Velocity.CSS.setPropertyValue(dummy, property, measurement + \"%\");\n });\n /* paddingLeft arbitrarily acts as our proxy property for the em ratio. */\n Velocity.CSS.setPropertyValue(dummy, \"paddingLeft\", measurement + \"em\");\n\n /* Divide the returned value by the measurement to get the ratio between 1% and 1px. Default to 1 since working with 0 can produce Infinite. */\n unitRatios.percentToPxWidth = callUnitConversionData.lastPercentToPxWidth = (parseFloat(CSS.getPropertyValue(dummy, \"width\", null, true)) || 1) / measurement; /* GET */\n unitRatios.percentToPxHeight = callUnitConversionData.lastPercentToPxHeight = (parseFloat(CSS.getPropertyValue(dummy, \"height\", null, true)) || 1) / measurement; /* GET */\n unitRatios.emToPx = callUnitConversionData.lastEmToPx = (parseFloat(CSS.getPropertyValue(dummy, \"paddingLeft\")) || 1) / measurement; /* GET */\n\n sameRatioIndicators.myParent.removeChild(dummy);\n } else {\n unitRatios.emToPx = callUnitConversionData.lastEmToPx;\n unitRatios.percentToPxWidth = callUnitConversionData.lastPercentToPxWidth;\n unitRatios.percentToPxHeight = callUnitConversionData.lastPercentToPxHeight;\n }\n\n /***************************\n Element-Agnostic Units\n ***************************/\n\n /* Whereas % and em ratios are determined on a per-element basis, the rem unit only needs to be checked\n once per call since it's exclusively dependant upon document.body's fontSize. If this is the first time\n that calculateUnitRatios() is being run during this call, remToPx will still be set to its default value of null,\n so we calculate it now. */\n if (callUnitConversionData.remToPx === null) {\n /* Default to browsers' default fontSize of 16px in the case of 0. */\n callUnitConversionData.remToPx = parseFloat(CSS.getPropertyValue(document.body, \"fontSize\")) || 16; /* GET */\n }\n\n /* Similarly, viewport units are %-relative to the window's inner dimensions. */\n if (callUnitConversionData.vwToPx === null) {\n callUnitConversionData.vwToPx = parseFloat(window.innerWidth) / 100; /* GET */\n callUnitConversionData.vhToPx = parseFloat(window.innerHeight) / 100; /* GET */\n }\n\n unitRatios.remToPx = callUnitConversionData.remToPx;\n unitRatios.vwToPx = callUnitConversionData.vwToPx;\n unitRatios.vhToPx = callUnitConversionData.vhToPx;\n\n if (Velocity.debug >= 1) console.log(\"Unit ratios: \" + JSON.stringify(unitRatios), element);\n\n return unitRatios;\n }", "function calculate_coordinates () {\n\t }" ]
[ "0.5847494", "0.56731975", "0.5660068", "0.5635036", "0.5554136", "0.5524072", "0.5523217", "0.54790395", "0.54574656", "0.5439404", "0.54353255", "0.5425063", "0.5412884", "0.5406545", "0.5394503", "0.5394145", "0.538786", "0.5378768", "0.53626317", "0.5361607", "0.53512156", "0.5331738", "0.5318826", "0.5308475", "0.5290843", "0.5288105", "0.52794456", "0.5278734", "0.5274156", "0.52684397", "0.5259871", "0.5255908", "0.5253264", "0.5241623", "0.5237215", "0.523431", "0.52262497", "0.52235305", "0.52221036", "0.522115", "0.5211173", "0.51992035", "0.5195169", "0.519062", "0.51886815", "0.5183899", "0.5181453", "0.5178074", "0.5174691", "0.5172988", "0.5172988", "0.5171433", "0.51685476", "0.5168452", "0.5164095", "0.51615846", "0.5156851", "0.5156264", "0.5153627", "0.5152963", "0.5152405", "0.514987", "0.5147324", "0.5146216", "0.51438034", "0.5142192", "0.51391304", "0.51391304", "0.5128294", "0.51276606", "0.512503", "0.5123397", "0.5123252", "0.5122357", "0.5120215", "0.5119387", "0.51134026", "0.51131415", "0.5108772", "0.51074815", "0.51069725", "0.51067793", "0.5105752", "0.51025623", "0.51015365", "0.5100558", "0.5097709", "0.50969493", "0.5091471", "0.50908196", "0.50885135", "0.508815", "0.5083366", "0.5082725", "0.5080906", "0.5078056", "0.5075872", "0.50711524", "0.5070764", "0.50695884", "0.50658804" ]
0.0
-1
Given a child DOM element, returns a queryselector statement describing that and its ancestors e.g. [HTMLElement] => body > div > inputfoo.btn[name=baz]
function htmlTreeAsString(elem) { // try/catch both: // - accessing event.target (see getsentry/raven-js#838, #768) // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly // - can throw an exception in some circumstances. try { var currentElem = elem; var MAX_TRAVERSE_HEIGHT = 5; var MAX_OUTPUT_LEN = 80; var out = []; var height = 0; var len = 0; var separator = ' > '; var sepLength = separator.length; var nextStr = void 0; // eslint-disable-next-line no-plusplus while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) { nextStr = _htmlElementAsString(currentElem); // bail out if // - nextStr is the 'html' element // - the length of the string that would be created exceeds MAX_OUTPUT_LEN // (ignore this limit if we are on the first iteration) if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN)) { break; } out.push(nextStr); len += nextStr.length; currentElem = currentElem.parentNode; } return out.reverse().join(separator); } catch (_oO) { return '<unknown>'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function generateSelector(el){\n var selector = \"\";\n var tree = $(el).parentsUntil(document);\n\n // generate full selector by traversing DOM from bottom-up\n for (var i = -1; i < tree.length; i++){\n var e = i < 0 ? el : tree[i];\n\n var eCSS = querifyElement(e);\n var query = eCSS.query + (selector.length ? ' > ' : '') + selector;\n\n var matches = $(query);\n\n if (matches.length === 1 && matches[0] === el){\n return query;\n }\n else if (matches.length > 1 && i + 1 < tree.length){\n\n var parentQuery = generateSelector(tree[i + 1]);\n var parentMatches = $(parentQuery).children(eCSS.tag);\n var nthQuery = eCSS.tag + ':nth-of-type(' + (parentMatches.index(el) + 1) + ')' + (selector.length ? ' > ' : '') + selector;\n var parentNthQuery = parentQuery + ' > ' + nthQuery;\n var nthMatches = $(parentNthQuery);\n\n if (nthMatches.length === 1 && nthMatches[0] === el){\n return parentNthQuery;\n }\n else {\n printError(\"----------\")\n return 'ERROR';\n }\n }\n else {\n if (matches.length === 1) printError(\"Matched incorrect element. (matches.length = \" + matches.length + \")\")\n else if (matches.length > 1) printError(\"Multiple matches, but traversed entire tree (algorithm not being specific enough).\")\n else printError(\"Could not find match for tag/id/class selector. (matches.length = \" + matches.length + \")\")\n return 'ERROR';\n }\n }\n\n return selector;\n}", "parentsWhileMatch(selector) {\n const retArr = [];\n let parent = this.parent().filter(item => item.matchesSelector(selector));\n while (parent.isPresent()) {\n retArr.push(parent);\n parent = parent.parent().filter(item => item.matchesSelector(selector));\n }\n return new DomQuery(...retArr);\n }", "parentsWhileMatch(selector) {\n const retArr = [];\n let parent = this.parent().filter(item => item.matchesSelector(selector));\n while (parent.isPresent()) {\n retArr.push(parent);\n parent = parent.parent().filter(item => item.matchesSelector(selector));\n }\n return new DomQuery(...retArr);\n }", "function findInChild(childElement){\n\n\t\tif(childElement.hasChildNodes()){\n\t\t\tvar children = childElement.firstChild;\n\t\t\t//had to use while loop beacuse could not use .length on some node types\n\t\t\twhile(children){\n\t\t\t\t//check to see if node is an HTMLElement\n\t\t\t\tif(children.nodeType === 1){\n\t\t\t\t\tif(children.classList.contains(className)){\n\t\t\t\t\t\tresults.push(children);\n\t\t\t\t\t}\n\t\t\t\t\t//recursively walk through the DOM tree(interested in only HTMLElement nodes)\n\t\t\t\t\tfindInChild(children);\n\t\t\t\t}\n\t\t\t\t//advance to next node of this branch\n\t\t\t\tchildren = children.nextSibling;\n\t\t\t}\n\t\t};\n\t}", "function getNodeSelector(el, win) {\n var parts = [el.tagName];\n if (el.id) parts.push('#' + el.id);\n if (el.className && el.className.length) parts.push(\".\" + el.className.split(' ').join('.')); // Can't get much more advanced with the current browser\n\n if (!win.document.querySelectorAll || !Array.prototype.indexOf) return parts.join('');\n\n try {\n if (win.document.querySelectorAll(parts.join('')).length === 1) return parts.join('');\n } catch (e) {\n // Sometimes the query selector can be invalid just return it as-is\n return parts.join('');\n } // try to get a more specific selector if this one matches more than one element\n\n\n if (el.parentNode.childNodes.length > 1) {\n var index = Array.prototype.indexOf.call(el.parentNode.childNodes, el) + 1;\n parts.push(\":nth-child(\" + index + \")\");\n }\n\n if (win.document.querySelectorAll(parts.join('')).length === 1) return parts.join(''); // try prepending the parent node selector\n\n if (el.parentNode) return getNodeSelector(el.parentNode, win) + \" > \" + parts.join('');\n return parts.join('');\n}", "findChild(el, query) {\n const matches =\n el.matches ||\n el.webkitMatchesSelector ||\n el.mozMatchesSelector ||\n el.msMatchesSelector;\n return Array.prototype.filter.call(el.children, child =>\n matches.call(child, query)\n )[0];\n }", "findChild(el, query) {\n const matches = el.matches || el.webkitMatchesSelector || el.mozMatchesSelector || el.msMatchesSelector;\n return Array.prototype.filter.call(el.children, child => matches.call(child, query))[0];\n }", "generateSelector() {\n /* root element cannot have a selector as it isn't a proper element */\n if (this.isRootElement()) {\n return null;\n }\n const parts = [];\n let root;\n for (root = this; root.parent; root = root.parent) {\n /* .. */\n }\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n for (let cur = this; cur.parent; cur = cur.parent) {\n /* if a unique id is present, use it and short-circuit */\n if (cur.id) {\n const escaped = escapeSelectorComponent(cur.id);\n const matches = root.querySelectorAll(`#${escaped}`);\n if (matches.length === 1) {\n parts.push(`#${escaped}`);\n break;\n }\n }\n const parent = cur.parent;\n const child = parent.childElements;\n const index = child.findIndex((it) => it.unique === cur.unique);\n const numOfType = child.filter((it) => it.is(cur.tagName)).length;\n const solo = numOfType === 1;\n /* if this is the only tagName in this level of siblings nth-child isn't needed */\n if (solo) {\n parts.push(cur.tagName.toLowerCase());\n continue;\n }\n /* this will generate the worst kind of selector but at least it will be accurate (optimizations welcome) */\n parts.push(`${cur.tagName.toLowerCase()}:nth-child(${index + 1})`);\n }\n return parts.reverse().join(\" > \");\n }", "function el(target, parent) {\n return (parent || doc).querySelector(target);\n }", "function nestedTarget(){\n return document.querySelector('#nested .target')\n }", "function findChildren(parent, selector) {\n var parents = parent instanceof HTMLElement ? [parent] : parent;\n var allMatches = [];\n\n for (var i = 0; i < parents.length; i++) {\n var childNodes = parents[i].children; // only ever elements\n\n for (var j = 0; j < childNodes.length; j++) {\n var childNode = childNodes[j];\n\n if (!selector || elementMatches(childNode, selector)) {\n allMatches.push(childNode);\n }\n }\n }\n\n return allMatches;\n } // Attributes", "function getAncestors(node, selector){\n\n var ancestors = [];\n\n while(( node = node.parentElement )){\n if( node.matches(selector) ){ ancestors.push(node); }\n }\n return ancestors;\n}", "allParents(selector) {\n let parent = this.parent();\n let ret = [];\n while (parent.isPresent()) {\n if (parent.matchesSelector(selector)) {\n ret.push(parent);\n }\n parent = parent.parent();\n }\n return new DomQuery(...ret);\n }", "allParents(selector) {\n let parent = this.parent();\n let ret = [];\n while (parent.isPresent()) {\n if (parent.matchesSelector(selector)) {\n ret.push(parent);\n }\n parent = parent.parent();\n }\n return new DomQuery(...ret);\n }", "function nestedTarget() {\n return document.querySelector('#nested .target');\n}", "function nestedTarget() {\n return document.querySelector('#nested .target');\n}", "function nestedTarget() {\n return document.querySelector('#nested .target');\n}", "function xpath(el) {\n if (typeof el == \"string\") return document.evaluate(el, document, null, 0, null)\n if (!el || el.nodeType != 1) return ''\n if (el.id) return \"//*[@id='\" + el.id + \"']\"\n var sames = [].filter.call(el.parentNode.children, function (x) { return x.tagName == el.tagName })\n return xpath(el.parentNode) + '/' + el.tagName.toLowerCase() + (sames.length > 1 ? '[' + ([].indexOf.call(sames, el) + 1) + ']' : '')\n}", "function getQuery (element, eltype) {\n if (element.id) return [{ id: element.id }]\n if (element.localName === 'html') return [{ type: 'html' }]\n\n var parent = element.parentNode\n var parentSelector = getQuery(parent)\n\n const type = element.localName || 'text'\n // ..\n let realindex = -1\n let offset = 0\n while (parent.childNodes[++realindex] && parent.childNodes[realindex] !== element) {\n if (eltype && parent.childNodes[realindex].className === HIGHLIGHT_CLASS) {\n offset += (parent.childNodes[realindex].previousSibling ? 2 : 1) // 1 for the span and 1 for the next text element\n }\n }\n const index = (parent.childNodes[realindex] === element) ? (realindex - offset) : -1\n // if (index<0) console.warn(\"DID NOT find the getQuery\")\n // let index = Array.prototype.indexOf.call(parent.childNodes, element);\n parentSelector.push({ type, index })\n return parentSelector\n }", "function deepestChild(){\n return document.querySelectorAll('div#grand-node div')[3];\n }", "function matchesSelectorAndParentsTo(el /*: Node*/, selector /*: string*/, baseNode /*: Node*/) /*: boolean*/ {\n var node = el;\n do {\n if (matchesSelector(node, selector)) return true;\n if (node === baseNode) return false;\n node = node.parentNode;\n } while (node);\n\n return false;\n}", "function getQuery (element, eltype) {\n if (element.id) return [{ id: element.id }]\n if (element.localName === 'html') return [{ type: 'html' }]\n\n var parent = element.parentNode\n var parentSelector = getQuery(parent)\n\n const type = element.localName || 'text'\n // ..\n let realindex = -1\n let offset = 0\n while (parent.childNodes[++realindex] && parent.childNodes[realindex] !== element) {\n if (eltype && parent.childNodes[realindex].className === HIGHLIGHT_CLASS) {\n offset += (parent.childNodes[realindex].previousSibling ? 2 : 1) // 1 for the span and 1 for the next text element\n }\n }\n const index = (parent.childNodes[realindex] === element) ? (realindex - offset) : -1\n // if (index<0) console.warn(\"DID NOT find the getQuery\")\n // let index = Array.prototype.indexOf.call(parent.childNodes, element);\n parentSelector.push({ type, index })\n return parentSelector\n}", "function getXpath(element) {\n var xPath, element_sibling, siblingTagName, siblings, cnt, sibling_count;\n var ELEMENT_NODE = 1\n var elementTagName = element.tagName.toLowerCase();\n if (element.id != '') {\n return 'id(\"' + element.id + '\")';\n // alternative : \n // return '*[@id=\"' + element.id + '\"]';\n } else if (element.name && document.getElementsByName(element.name).length === 1) {\n return '//' + elementTagName + '[@name=\"' + element.name + '\"]';\n }\n if (element === document.body) {\n return '/html/' + elementTagName;\n }\n sibling_count = 0;\n siblings = element.parentNode.childNodes;\n siblings_length = siblings.length;\n for (cnt = 0; cnt < siblings_length; cnt++) {\n var element_sibling = siblings[cnt];\n if (element_sibling.nodeType !== ELEMENT_NODE) { // not ELEMENT_NODE\n continue;\n }\n if (element_sibling === element) {\n return getXpath(element.parentNode) + '/' + elementTagName + '[' + (sibling_count + 1) + ']';\n }\n if (element_sibling.nodeType === 1 && element_sibling.tagName.toLowerCase() === elementTagName) {\n sibling_count++;\n }\n }\n return xPath;\n}", "function findChildren(parent, selector) {\n var parents = parent instanceof HTMLElement ? [parent] : parent;\n var allMatches = [];\n for (var i = 0; i < parents.length; i++) {\n var childNodes = parents[i].children; // only ever elements\n for (var j = 0; j < childNodes.length; j++) {\n var childNode = childNodes[j];\n if (!selector || elementMatches(childNode, selector)) {\n allMatches.push(childNode);\n }\n }\n }\n return allMatches;\n}", "function matchesSelectorAndParentsTo(el /*: Node*/, selector /*: string*/, baseNode /*: Node*/) /*: boolean*/ {\n\t var node = el;\n\t do {\n\t if (matchesSelector(node, selector)) return true;\n\t if (node === baseNode) return false;\n\t node = node.parentNode;\n\t } while (node);\n\t\n\t return false;\n\t}", "function getAncestorElementOfType(child, type) {\n if (!child) return null\n var parent = child.parentNode\n if (!parent) return null\n if (parent.nodeName.toUpperCase() == type.toUpperCase()) {\n return parent\n } else {\n return getAncestorElementOfType(parent, type)\n }\n}", "parent (selector = '*') {\n let result = new Set()\n let selectorData = cssParser(selector)\n\n for (let item of this) {\n let parent = item.parent\n\n if (!parent || !selectorData) {\n continue\n }\n\n if (cssMatch(parent, selectorData[0])) {\n result.add(parent)\n }\n }\n\n let $elements = new this.constructor([...result])\n\n return $elements\n }", "function matchesSelectorAndParentsTo(el /*: Node*/, selector /*: string*/, baseNode /*: Node*/) /*: boolean*/ {\n\t\t var node = el;\n\t\t do {\n\t\t if (matchesSelector(node, selector)) return true;\n\t\t if (node === baseNode) return false;\n\t\t node = node.parentNode;\n\t\t } while (node);\n\t\n\t\t return false;\n\t\t}", "function matchesSelectorAndParentsTo(el /*: Node*/, selector /*: string*/, baseNode /*: Node*/) /*: boolean*/ {\n\t var node = el;\n\t do {\n\t if (matchesSelector(node, selector)) return true;\n\t if (node === baseNode) return false;\n\t node = node.parentNode;\n\t } while (node);\n\n\t return false;\n\t}", "function matchesSelectorAndParentsTo(el /*: Node*/, selector /*: string*/, baseNode /*: Node*/) /*: boolean*/ {\n\t var node = el;\n\t do {\n\t if (matchesSelector(node, selector)) return true;\n\t if (node === baseNode) return false;\n\t node = node.parentNode;\n\t } while (node);\n\n\t return false;\n\t}", "function matchesSelectorAndParentsTo(el /*: Node*/, selector /*: string*/, baseNode /*: Node*/) /*: boolean*/ {\n\t var node = el;\n\t do {\n\t if (matchesSelector(node, selector)) return true;\n\t if (node === baseNode) return false;\n\t node = node.parentNode;\n\t } while (node);\n\n\t return false;\n\t}", "function matchesSelectorAndParentsTo(el /*: Node*/, selector /*: string*/, baseNode /*: Node*/) /*: boolean*/ {\n\t var node = el;\n\t do {\n\t if (matchesSelector(node, selector)) return true;\n\t if (node === baseNode) return false;\n\t node = node.parentNode;\n\t } while (node);\n\n\t return false;\n\t}", "function matchesSelectorAndParentsTo(el /*: Node*/, selector /*: string*/, baseNode /*: Node*/) /*: boolean*/ {\n\t var node = el;\n\t do {\n\t if (matchesSelector(node, selector)) return true;\n\t if (node === baseNode) return false;\n\t node = node.parentNode;\n\t } while (node);\n\n\t return false;\n\t}", "function matchesSelectorAndParentsTo(el /*: Node*/, selector /*: string*/, baseNode /*: Node*/) /*: boolean*/{\n\t\t\t\t\tvar node = el;\n\t\t\t\t\tdo {\n\t\t\t\t\t\tif (matchesSelector(node, selector)) return true;\n\t\t\t\t\t\tif (node === baseNode) return false;\n\t\t\t\t\t\tnode = node.parentNode;\n\t\t\t\t\t} while (node);\n\n\t\t\t\t\treturn false;\n\t\t\t\t}", "function findParent(element, selector) {\n // parse selector attributes\n var matches = selector.match(/^([a-z0-9]*)(?:\\.([a-z0-9-]+))?(?:#([a-z0-9-]+))?$/i);\n if (!matches) {\n throw new Error(\"Unexpected findParent selector format: \" + selector);\n }\n var maybeLowerCase = function (s) {\n return typeof s === 'string' ? s.toLowerCase() : undefined;\n };\n return _findParent(element,\n maybeLowerCase(matches[1]),\n maybeLowerCase(matches[2]),\n maybeLowerCase(matches[3]),\n 0,\n 10);\n}", "function qsa(parent, selector){return [].slice.call(parent.querySelectorAll(selector) )}", "function findDirectChildren(parent, selector) {\n var parents = parent instanceof HTMLElement ? [parent] : parent;\n var allMatches = [];\n for (var i = 0; i < parents.length; i += 1) {\n var childNodes = parents[i].children; // only ever elements\n for (var j = 0; j < childNodes.length; j += 1) {\n var childNode = childNodes[j];\n if (!selector || elementMatches(childNode, selector)) {\n allMatches.push(childNode);\n }\n }\n }\n return allMatches;\n }", "function selfOrDescendant( target , selector ){\n return $( target ).find( selector ).addBack( selector );\n }", "function findChildren(parent, selector) {\n var parents = parent instanceof HTMLElement ? [parent] : parent;\n var allMatches = [];\n\n for (var i = 0; i < parents.length; i++) {\n var childNodes = parents[i].children; // only ever elements\n\n for (var j = 0; j < childNodes.length; j++) {\n var childNode = childNodes[j];\n\n if (!selector || elementMatches(childNode, selector)) {\n allMatches.push(childNode);\n }\n }\n }\n\n return allMatches;\n }", "function parentwithClass(elem,nameclass){\r\n while(elem = elem.parentElement){\r\n if(elem.classList.contains(nameclass)){\r\n return elem;\r\n }\r\n }\r\n}", "function getVisibleChild(element,selector){\n\tvar children = element.querySelectorAll(selector);\n\tfor (var child of children){\n\t\tif (isVisible(child)){\n\t\t\treturn child;\n\t\t}\n\t}\n}", "function deepestChild() {\n var current = document.getElementById('grand-node')\n\n while (current.querySelector('div')) {\n current = current.querySelector('div')\n }\n return current\n}", "function findParent( selector, el, e ){\r\n var target = e.target\r\n switch( typeof selector ){\r\n case \"string\":\r\n while( target && target != el ){\r\n if( target.matches(selector) ) return target\r\n target = target.parentNode\r\n }\r\n break\r\n case \"function\":\r\n while( target && target != el ){\r\n if( selector.call(el, target) ) return target\r\n target = target.parentNode\r\n }\r\n break\r\n default:\r\n return null\r\n }\r\n return null\r\n}", "function findChildren(parent, selector) {\n var parents = parent instanceof HTMLElement ? [parent] : parent;\n var allMatches = [];\n for (var i = 0; i < parents.length; i++) {\n var childNodes = parents[i].children; // only ever elements\n for (var j = 0; j < childNodes.length; j++) {\n var childNode = childNodes[j];\n if (!selector || elementMatches$1(childNode, selector)) {\n allMatches.push(childNode);\n }\n }\n }\n return allMatches;\n }", "function findChildren(parent, selector) {\n var parents = parent instanceof HTMLElement ? [parent] : parent;\n var allMatches = [];\n for (var i = 0; i < parents.length; i++) {\n var childNodes = parents[i].children; // only ever elements\n for (var j = 0; j < childNodes.length; j++) {\n var childNode = childNodes[j];\n if (!selector || elementMatches(childNode, selector)) {\n allMatches.push(childNode);\n }\n }\n }\n return allMatches;\n }", "function findChildren(parent, selector) {\n var parents = parent instanceof HTMLElement ? [parent] : parent;\n var allMatches = [];\n for (var i = 0; i < parents.length; i++) {\n var childNodes = parents[i].children; // only ever elements\n for (var j = 0; j < childNodes.length; j++) {\n var childNode = childNodes[j];\n if (!selector || elementMatches(childNode, selector)) {\n allMatches.push(childNode);\n }\n }\n }\n return allMatches;\n }", "function getAncestorEl(elem, selector) {\n\tfor ( ; elem && elem !== document; elem = elem.parentNode ) {\n\t\tif ( elem.matches( selector ) ) return elem;\n\t}\n\treturn null;\n}", "function findParent(element, selector) {\n var matches = selector.match(/^([a-z0-9]*)(?:\\.([a-z0-9-]+))?(?:#([a-z0-9-]+))?$/i);\n if (matches) {\n var selectorName = matches[1] || null;\n var selectorClass = matches[2] || null;\n var selectorId = matches[3] || null;\n \n var candidate = element;\n while (candidate) {\n do {\n if (selectorName && candidate.tagName && selectorName.toLowerCase() !== candidate.tagName.toLowerCase()) {\n break;\n }\n if (selectorClass && selectorClass !== candidate.className) {\n break;\n }\n if (selectorId && selectorId !== candidate.id) {\n break;\n }\n return candidate;\n } while (false);\n candidate = candidate.parentNode;\n }\n } else {\n throw new Error(\"Unexpected findParent selector format: \" + selector);\n }\n return null;\n}", "function findParent(element, selector) {\n var matches = selector.match(/^([a-z0-9]*)(?:\\.([a-z0-9-]+))?(?:#([a-z0-9-]+))?$/i);\n if (matches) {\n var selectorName = matches[1] || null;\n var selectorClass = matches[2] || null;\n var selectorId = matches[3] || null;\n \n var candidate = element;\n while (candidate) {\n do {\n if (selectorName && candidate.tagName && selectorName.toLowerCase() !== candidate.tagName.toLowerCase()) {\n break;\n }\n if (selectorClass && selectorClass !== candidate.className) {\n break;\n }\n if (selectorId && selectorId !== candidate.id) {\n break;\n }\n return candidate;\n } while (false);\n candidate = candidate.parentNode;\n }\n } else {\n throw new Error(\"Unexpected findParent selector format: \" + selector);\n }\n return null;\n}", "function generateSelector(target) {\n var sel = '';\n target = $(target);\n var targetElement = target.get(0);\n\n var ancestors = target.parents().andSelf();\n ancestors.each(function(i, ancestorElement) {\n ancestor = $(ancestorElement);\n var subsel = ancestorElement.tagName.toLowerCase();;\n\n var id = ancestor.attr('id');\n if (id && id.length > 0) {\n subsel += '#' + id;\n } else {\n var classes = ancestor.attr('class');\n if (classes && classes.length > 0) {\n subsel += '.' + classes.replace(/\\s+/g, '.');\n }\n\n var index = ancestor.index(sel + subsel);\n if ($(sel + subsel).siblings(subsel).length > 0) {\n subsel += ':eq(' + index + ')';\n }\n }\n\n sel += subsel;\n\n if (i < ancestors.length - 1) {\n sel += ' > ';\n }\n });\n\n return sel;\n}", "function getXPath(element)\n{\n var xpath = '';\n for ( ; element && element.nodeType == 1; element = element.parentNode )\n {\n var id = $(element.parentNode).children(element.tagName).index(element) + 1;\n id > 1 ? (id = '[' + id + ']') : (id = '');\n xpath = '/' + element.tagName.toLowerCase() + id + xpath;\n }\n return xpath;\n}", "function isDescendantSelector( name )\n{\n\treturn ( name.charAt( 0 ) === '!' );\n}", "function getSiblings(elem, matchesSelector) {\n var siblings = [];\n var sibling = elem.parentNode.firstChild;\n for (; sibling; sibling = sibling.nextSibling) {\n if (sibling instanceof HTMLElement && sibling !== elem && sibling.matches(matchesSelector)) {\n siblings.push(sibling);\n }\n }\n return siblings;\n}", "function findParent(tagname,el){\n if ((el.nodeName || el.tagName).toLowerCase()===tagname.toLowerCase()){\n return el;\n }\n while (el = el.parentNode){\n if ((el.nodeName || el.tagName).toLowerCase()===tagname.toLowerCase()){\n return el;\n }\n }\n return null;\n}", "function _(elm) { return document.querySelector(elm); }", "function vanillaParents(element, selector) {\n\t\tlet parents = [];\n\t\tif (NodeList.prototype.isPrototypeOf(element)) {\n\t\t\telement.forEach(function (item) {\n\t\t\t\telement = item.parentElement.closest(selector);\n\t\t\t\tparents.push(element);\n\t\t\t});\n\t\t} else {\n\t\t\telement = item.parentElement.closest(selector);\n\t\t\tparents.push(element);\n\t\t}\n\t\treturn parents;\n\t}", "function checkAncestorByClass(el, selector) {\r\n var documentEl = document.querySelector(\".\" + selector);\r\n if (!documentEl) {\r\n return null;\r\n }\r\n if (el === documentEl) {\r\n return el;\r\n }\r\n var ancestor = el.parentElement;\r\n while (ancestor != null) {\r\n if (ancestor.classList != null && ancestor.classList.contains(selector)) {\r\n return ancestor;\r\n }\r\n ancestor = ancestor.parentElement;\r\n }\r\n return null;\r\n}", "function _selector(name, ancestor) {\n\t\treturn $('.' + BOXPLUS + '-' + name, ancestor);\n\t}", "function getHtmlElementAncestors(elem) {\n const elems = [];\n while (elem && elem instanceof HTMLElement) {\n elems.push(elem);\n if (elem.assignedSlot) {\n elem = elem.assignedSlot;\n } else if (!elem.parentElement) {\n const parentNode = elem.parentNode;\n if (parentNode instanceof DocumentFragment) {\n elem = parentNode.host;\n } else {\n // <html>.parentNode == <html>\n elem = parentNode !== elem ? parentNode : null;\n }\n } else {\n elem = elem.parentElement;\n }\n }\n return elems;\n }", "byTagName(tagName, includeRoot, deep) {\n var _a;\n let res = [];\n if (includeRoot) {\n res = new Es2019Array(...((_a = this === null || this === void 0 ? void 0 : this.rootNode) !== null && _a !== void 0 ? _a : []))\n .filter(element => (element === null || element === void 0 ? void 0 : element.tagName) == tagName)\n .reduce((reduction, item) => reduction.concat([item]), res);\n }\n (deep) ? res.push(this.querySelectorAllDeep(tagName)) : res.push(this.querySelectorAll(tagName));\n return new DomQuery(...res);\n }", "closest(el, selector) {\n let parent = el.parentElement;\n while(parent) {\n if (this.matches(parent, selector)) {\n break;\n }\n parent = parent.parentElement;\n }\n\n return parent;\n }", "function __(elm) { return document.querySelectorAll(elm) }", "byTagName(tagName, includeRoot, deep) {\n var _a;\n let res = [];\n if (includeRoot) {\n res = new Es2019Array_1.Es2019Array(...((_a = this === null || this === void 0 ? void 0 : this.rootNode) !== null && _a !== void 0 ? _a : []))\n .filter(element => (element === null || element === void 0 ? void 0 : element.tagName) == tagName)\n .reduce((reduction, item) => reduction.concat([item]), res);\n }\n (deep) ? res.push(this.querySelectorAllDeep(tagName)) : res.push(this.querySelectorAll(tagName));\n return new DomQuery(...res);\n }", "function selector(a,b){var a=a.match(/^(\\W)?(.*)/),b=b||document,c=b[\"getElement\"+(a[1]?\"#\"==a[1]?\"ById\":\"sByClassName\":\"sByTagName\")],d=c.call(b,a[2]),e=[];return null!==d&&(e=d.length||0===d.length?d:[d]),e}", "function selector(a,b){var a=a.match(/^(\\W)?(.*)/),b=b||document,c=b[\"getElement\"+(a[1]?\"#\"==a[1]?\"ById\":\"sByClassName\":\"sByTagName\")],d=c.call(b,a[2]),e=[];return null!==d&&(e=d.length||0===d.length?d:[d]),e}", "function selector(a,b){var a=a.match(/^(\\W)?(.*)/),b=b||document,c=b[\"getElement\"+(a[1]?\"#\"==a[1]?\"ById\":\"sByClassName\":\"sByTagName\")],d=c.call(b,a[2]),e=[];return null!==d&&(e=d.length||0===d.length?d:[d]),e}", "function scanChildren(element){var found;if(element){for(var i=0,len=element.length;i<len;i++){var target=element[i];if(!found){for(var j=0,numChild=target.childNodes.length;j<numChild;j++){found=found||scanTree([target.childNodes[j]]);}}}}return found;}", "_getChildNodeIndex(child, selector) {\n\n\t\t\tlet index = 0;\n\t\t\twhile(child.previousSibling) {\n\t\t\t\tif (child.previousSibling.matches(selector)) index++;\n\t\t\t\tchild = child.previousSibling;\n\t\t\t}\n\t\t\treturn index;\n\n\t\t}", "function deepestChild(){\n const list = document.querySelectorAll('#grand-node div');\n //could leave this line out, but technically a nodelist is not an array\n //best not to treat it as one & convert it instead\n const listArray= Array.from(list)\n return listArray[listArray.length-1];\n}", "function generateElementXPath(element) {\n var elementTagName = element.tagName.toLowerCase();\n if (element.id && isElementIdUnique(element.id)) {\n return '//' + elementTagName + '[@id=\\'' + element.id + '\\']';\n } else if (element.name &&\n isElementNameUnique(element.name)) {\n return '//' + elementTagName + '[@name=\\'' + element.getAttribute(\"name\") + '\\']';\n }\n\n if (element === document.body) return '//' + element.tagName.toLowerCase();\n\n var children = element.parentNode.childNodes;\n var targetElementSameTagNameCount = countTargetElementTagNameCount(children, element);\n\n if (targetElementSameTagNameCount[1] > 1) {\n return generateElementXPath(element.parentNode) + '/' + element.tagName.toLowerCase() + '['+(targetElementSameTagNameCount[0])+']';\n } else {\n return generateElementXPath(element.parentNode) + '/' + element.tagName.toLowerCase()\n }\n}", "function _getByTagName(selectorString, parent = document, limit =null){\n return [...parent.getElementsByTagName(selectorString)];\n}", "function parentMatch(target, selector, wrapper) {\n if (wrapper && !wrapper.contains(target)) {\n return;\n }\n\n while (target && target.matches) {\n if (target.matches(selector)) {\n return target;\n }\n\n target = target.parentNode;\n }\n}", "function querySelector(element) {\n return document.querySelector(element);\n}", "function q (el) {\n if (typeof el === 'string') return document.querySelector(el)\n else if (typeof el === 'object' && el[0]) return el[0]\n else return el\n}", "_getParentElement(element, selector) {\n\n\t\t\tlet match;\n\t\t\twhile(element.nodeName.toLowerCase() !== 'svg') {\n\t\t\t\tif (element.matches(selector)) {\n\t\t\t\t\tmatch = element;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telement = element.parentNode;\n\t\t\t}\n\n\t\t\treturn match;\n\n\t\t}", "function findParent(tagname, el) {\n while (el) {\n if ((el.nodeName || el.tagName).toLowerCase() === tagname.toLowerCase()) {\n return el;\n }\n el = el.parentNode;\n }\n return null;\n }", "function getElementPathSelector(context) {\n let pathSelector;\n let ctx = context;\n while (ctx.tagName) {\n let index = getIndex(ctx);\n if (ctx.id) {\n // If we reached a parent element with an id, the specificity is high enough\n pathSelector = `${ctx.localName}#${ctx.id}${(pathSelector ? ' > ' + pathSelector : '')}`;\n break;\n }\n else if (ctx.className)\n pathSelector = `${ctx.localName}${getElementClassSelector(ctx)}:nth-of-type(${index})${(pathSelector ? ' > ' + pathSelector : '')}`;\n else\n pathSelector = `${ctx.localName}:nth-of-type(${index})${(pathSelector ? ' > ' + pathSelector : '')}`;\n ctx = ctx.parentNode;\n }\n return `${pathSelector}`;\n}", "function query( elem, selector ) {\n // append to fragment if no parent\n if ( !elem.parentNode ) {\n appendToFragment( elem );\n }\n\n // match elem with all selected elems of parent\n var elems = elem.parentNode.querySelectorAll( selector );\n for ( var j=0, jLen = elems.length; j < jLen; j++ ) {\n // return true if match\n if ( elems[j] === elem ) {\n return true;\n }\n }\n // otherwise return false\n return false;\n }", "function query( elem, selector ) {\n // append to fragment if no parent\n checkParent( elem );\n\n // match elem with all selected elems of parent\n var elems = elem.parentNode.querySelectorAll( selector );\n for ( var i=0, len = elems.length; i < len; i++ ) {\n // return true if match\n if ( elems[i] === elem ) {\n return true;\n }\n }\n // otherwise return false\n return false;\n }", "function query( elem, selector ) {\n // append to fragment if no parent\n checkParent( elem );\n\n // match elem with all selected elems of parent\n var elems = elem.parentNode.querySelectorAll( selector );\n for ( var i=0, len = elems.length; i < len; i++ ) {\n // return true if match\n if ( elems[i] === elem ) {\n return true;\n }\n }\n // otherwise return false\n return false;\n }", "function query( elem, selector ) {\n // append to fragment if no parent\n checkParent( elem );\n\n // match elem with all selected elems of parent\n var elems = elem.parentNode.querySelectorAll( selector );\n for ( var i=0, len = elems.length; i < len; i++ ) {\n // return true if match\n if ( elems[i] === elem ) {\n return true;\n }\n }\n // otherwise return false\n return false;\n }", "function query( elem, selector ) {\n // append to fragment if no parent\n checkParent( elem );\n\n // match elem with all selected elems of parent\n var elems = elem.parentNode.querySelectorAll( selector );\n for ( var i=0, len = elems.length; i < len; i++ ) {\n // return true if match\n if ( elems[i] === elem ) {\n return true;\n }\n }\n // otherwise return false\n return false;\n }", "function query( elem, selector ) {\n // append to fragment if no parent\n checkParent( elem );\n\n // match elem with all selected elems of parent\n var elems = elem.parentNode.querySelectorAll( selector );\n for ( var i=0, len = elems.length; i < len; i++ ) {\n // return true if match\n if ( elems[i] === elem ) {\n return true;\n }\n }\n // otherwise return false\n return false;\n }", "function query( elem, selector ) {\n // append to fragment if no parent\n checkParent( elem );\n\n // match elem with all selected elems of parent\n var elems = elem.parentNode.querySelectorAll( selector );\n for ( var i=0, len = elems.length; i < len; i++ ) {\n // return true if match\n if ( elems[i] === elem ) {\n return true;\n }\n }\n // otherwise return false\n return false;\n }", "function query( elem, selector ) {\n // append to fragment if no parent\n checkParent( elem );\n\n // match elem with all selected elems of parent\n var elems = elem.parentNode.querySelectorAll( selector );\n for ( var i=0, len = elems.length; i < len; i++ ) {\n // return true if match\n if ( elems[i] === elem ) {\n return true;\n }\n }\n // otherwise return false\n return false;\n }", "function query( elem, selector ) {\n // append to fragment if no parent\n checkParent( elem );\n\n // match elem with all selected elems of parent\n var elems = elem.parentNode.querySelectorAll( selector );\n for ( var i=0, len = elems.length; i < len; i++ ) {\n // return true if match\n if ( elems[i] === elem ) {\n return true;\n }\n }\n // otherwise return false\n return false;\n }", "function query( elem, selector ) {\n // append to fragment if no parent\n checkParent( elem );\n\n // match elem with all selected elems of parent\n var elems = elem.parentNode.querySelectorAll( selector );\n for ( var i=0, len = elems.length; i < len; i++ ) {\n // return true if match\n if ( elems[i] === elem ) {\n return true;\n }\n }\n // otherwise return false\n return false;\n }", "function query( elem, selector ) {\n // append to fragment if no parent\n checkParent( elem );\n\n // match elem with all selected elems of parent\n var elems = elem.parentNode.querySelectorAll( selector );\n for ( var i=0, len = elems.length; i < len; i++ ) {\n // return true if match\n if ( elems[i] === elem ) {\n return true;\n }\n }\n // otherwise return false\n return false;\n }", "function query( elem, selector ) {\n // append to fragment if no parent\n checkParent( elem );\n\n // match elem with all selected elems of parent\n var elems = elem.parentNode.querySelectorAll( selector );\n for ( var i=0, len = elems.length; i < len; i++ ) {\n // return true if match\n if ( elems[i] === elem ) {\n return true;\n }\n }\n // otherwise return false\n return false;\n }", "function query( elem, selector ) {\n // append to fragment if no parent\n checkParent( elem );\n\n // match elem with all selected elems of parent\n var elems = elem.parentNode.querySelectorAll( selector );\n for ( var i=0, len = elems.length; i < len; i++ ) {\n // return true if match\n if ( elems[i] === elem ) {\n return true;\n }\n }\n // otherwise return false\n return false;\n }", "function query( elem, selector ) {\n // append to fragment if no parent\n checkParent( elem );\n\n // match elem with all selected elems of parent\n var elems = elem.parentNode.querySelectorAll( selector );\n for ( var i=0, len = elems.length; i < len; i++ ) {\n // return true if match\n if ( elems[i] === elem ) {\n return true;\n }\n }\n // otherwise return false\n return false;\n }", "function query( elem, selector ) {\n // append to fragment if no parent\n checkParent( elem );\n\n // match elem with all selected elems of parent\n var elems = elem.parentNode.querySelectorAll( selector );\n for ( var i=0, len = elems.length; i < len; i++ ) {\n // return true if match\n if ( elems[i] === elem ) {\n return true;\n }\n }\n // otherwise return false\n return false;\n }", "function query( elem, selector ) {\n // append to fragment if no parent\n checkParent( elem );\n\n // match elem with all selected elems of parent\n var elems = elem.parentNode.querySelectorAll( selector );\n for ( var i=0, len = elems.length; i < len; i++ ) {\n // return true if match\n if ( elems[i] === elem ) {\n return true;\n }\n }\n // otherwise return false\n return false;\n }", "function query( elem, selector ) {\n // append to fragment if no parent\n checkParent( elem );\n\n // match elem with all selected elems of parent\n var elems = elem.parentNode.querySelectorAll( selector );\n for ( var i=0, len = elems.length; i < len; i++ ) {\n // return true if match\n if ( elems[i] === elem ) {\n return true;\n }\n }\n // otherwise return false\n return false;\n }", "function findParent(el0, predicate) {\n if (!el0) return null;\n let el = el0.parentElement;\n if (!el) return null;\n do {\n if (predicate(el)) {\n return el;\n }\n el = el.parentElement;\n } while (el);\n return null;\n }", "findChild(tagName) {\n const children = this.getChildren()\n for (let i = 0; i < children.length; i++) {\n const child = children[i]\n if (child.type === tagName) return child\n }\n }", "function ancestorElem(node){\r\n if (node.nodeType === 1) {\r\n return node;\r\n }\r\n else {\r\n return ancestorElem(node.parentNode);\r\n }\r\n }", "function findParent( element, parentTag ) {\n while ( element.parentNode ) {\n element = element.parentNode;\n if ( element.tagName == parentTag ) {\n return element;\n }\n }\n return null;\n }", "function Xml_GetNamedAncestor(objNode,strAncestorName,blnEexcludSelf)\r\n{\r\n // Validate recieved arguments.\r\n if(objNode && !Aux_IsNullOrEmpty(strAncestorName))\r\n {\r\n return Xml_SelectSingleNode(\"ancestor\"+(blnEexcludSelf?\"\":\"-or-self\")+\"::\"+strAncestorName+\"[1]\",objNode);\r\n }\r\n \r\n return null;\r\n}", "function getChildElements(node)\n{\n\treturn getChildNodes(node, function(child)\n\t{\n\t\treturn child.nodeType === 1;\n\t});\n}", "function scanChildren(element) {\n var found;\n if (element) {\n for (var i = 0, len = element.length; i < len; i++) {\n var target = element[i];\n if (!found) {\n for (var j = 0, numChild = target.childNodes.length; j < numChild; j++) {\n found = found || scanTree([target.childNodes[j]]);\n }\n }\n }\n }\n return found;\n }" ]
[ "0.62965804", "0.6130739", "0.6130739", "0.6102466", "0.60880804", "0.60284203", "0.6009682", "0.5954808", "0.58971274", "0.5895123", "0.5879965", "0.58273274", "0.58237016", "0.58237016", "0.5816811", "0.5816811", "0.5816811", "0.5794734", "0.5789776", "0.57840765", "0.5782645", "0.57466936", "0.5746575", "0.5719891", "0.56963146", "0.56883186", "0.5676204", "0.5665398", "0.5664381", "0.5664381", "0.5664381", "0.5664381", "0.5664381", "0.5659798", "0.5654343", "0.56538534", "0.5644534", "0.5640425", "0.56235695", "0.56200963", "0.56140363", "0.55835724", "0.55748403", "0.55597794", "0.5559213", "0.5559213", "0.55429465", "0.55272907", "0.55272907", "0.552564", "0.55061", "0.54943484", "0.5492213", "0.5482005", "0.54751843", "0.5463966", "0.54516613", "0.54417485", "0.54415524", "0.5431844", "0.5411889", "0.54071444", "0.540659", "0.53989214", "0.53989214", "0.53989214", "0.53903145", "0.5368317", "0.53490686", "0.53358155", "0.53283614", "0.53208154", "0.5312662", "0.5280671", "0.52750045", "0.5268795", "0.5265603", "0.526196", "0.5255834", "0.5255834", "0.5255834", "0.5255834", "0.5255834", "0.5255834", "0.5255834", "0.5255834", "0.5255834", "0.5255834", "0.5255834", "0.5255834", "0.5255834", "0.5255834", "0.5255834", "0.5255834", "0.52387196", "0.5225521", "0.5224203", "0.5206813", "0.5204628", "0.52043086", "0.52041084" ]
0.0
-1
Returns a simple, queryselector representation of a DOM element e.g. [HTMLElement] => inputfoo.btn[name=baz]
function _htmlElementAsString(el) { var elem = el; var out = []; var className; var classes; var key; var attr; var i; if (!elem || !elem.tagName) { return ''; } out.push(elem.tagName.toLowerCase()); if (elem.id) { out.push("#" + elem.id); } // eslint-disable-next-line prefer-const className = elem.className; if (className && Object(_is__WEBPACK_IMPORTED_MODULE_0__[/* isString */ "k"])(className)) { classes = className.split(/\s+/); for (i = 0; i < classes.length; i++) { out.push("." + classes[i]); } } var allowedAttrs = ['type', 'name', 'title', 'alt']; for (i = 0; i < allowedAttrs.length; i++) { key = allowedAttrs[i]; attr = elem.getAttribute(key); if (attr) { out.push("[" + key + "=\"" + attr + "\"]"); } } return out.join(''); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function q (el) {\n if (typeof el === 'string') return document.querySelector(el)\n else if (typeof el === 'object' && el[0]) return el[0]\n else return el\n}", "function _(elm) { return document.querySelector(elm); }", "function querySelector(element) {\n return document.querySelector(element);\n}", "function getEl(el) {\n return document.querySelector(el);\n}", "function getNodeSelector(el, win) {\n var parts = [el.tagName];\n if (el.id) parts.push('#' + el.id);\n if (el.className && el.className.length) parts.push(\".\" + el.className.split(' ').join('.')); // Can't get much more advanced with the current browser\n\n if (!win.document.querySelectorAll || !Array.prototype.indexOf) return parts.join('');\n\n try {\n if (win.document.querySelectorAll(parts.join('')).length === 1) return parts.join('');\n } catch (e) {\n // Sometimes the query selector can be invalid just return it as-is\n return parts.join('');\n } // try to get a more specific selector if this one matches more than one element\n\n\n if (el.parentNode.childNodes.length > 1) {\n var index = Array.prototype.indexOf.call(el.parentNode.childNodes, el) + 1;\n parts.push(\":nth-child(\" + index + \")\");\n }\n\n if (win.document.querySelectorAll(parts.join('')).length === 1) return parts.join(''); // try prepending the parent node selector\n\n if (el.parentNode) return getNodeSelector(el.parentNode, win) + \" > \" + parts.join('');\n return parts.join('');\n}", "function getClassSelector (elem) {\n\t\tvar eleQuery = '';\n\t\t// account for element being of type node and has no attributes property\n\t\teleQuery += (elem.attributes && elem.attributes.class && elem.attributes.class.value) ? '.'+elem.attributes.class.value.split(' ').join('.') : '';\n\t\treturn (eleQuery !== '') ? elem.tagName + '' + eleQuery : null;\n\t}", "function _(element) {\n return document.querySelector(element);\n }", "findElement(selector) {\n return document.querySelector(selector);\n }", "function _( el )\n{\n return document.querySelector( el );\n}", "function element (el) {\n return new ElementQuery(el);\n}", "function getDomElement(selector) {\n if (WINDOW$6.document && WINDOW$6.document.querySelector) {\n return WINDOW$6.document.querySelector(selector) ;\n }\n return null;\n }", "function getDomElement(selector) {\n\t if (WINDOW$5.document && WINDOW$5.document.querySelector) {\n\t return WINDOW$5.document.querySelector(selector) ;\n\t }\n\t return null;\n\t}", "getElement(selector) {\n const element = document.querySelector(selector);\n\n return element;\n }", "getElement(selector) {\n const element = document.querySelector(selector);\n\n return element;\n }", "function el(query) {\n return document.getElementById(query) || document.querySelector(query);\n }", "function query (el) {\n\t if (typeof el === 'string') {\n\t var selector = el\n\t el = document.querySelector(el)\n\t if (!el) {\n\t process.env.NODE_ENV !== 'production' && warn(\n\t 'Cannot find element: ' + selector\n\t )\n\t return document.createElement('div')\n\t }\n\t }\n\t return el\n\t}", "function $(el) {\n return document.querySelector(el);\n }", "function query (el) {\n if (typeof el === 'string') {\n var selector = el;\n el = document.querySelector(el);\n if (!el) {\n process.env.NODE_ENV !== 'production' && warn(\n 'Cannot find element: ' + selector\n );\n return document.createElement('div')\n }\n }\n return el\n}", "function query (el) {\n if (typeof el === 'string') {\n var selector = el;\n el = document.querySelector(el);\n if (!el) {\n process.env.NODE_ENV !== 'production' && warn(\n 'Cannot find element: ' + selector\n );\n return document.createElement('div')\n }\n }\n return el\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n process.env.NODE_ENV !== 'production' && warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n process.env.NODE_ENV !== 'production' && warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n process.env.NODE_ENV !== 'production' && warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n process.env.NODE_ENV !== 'production' && warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n process.env.NODE_ENV !== 'production' && warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n process.env.NODE_ENV !== 'production' && warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n process.env.NODE_ENV !== 'production' && warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n process.env.NODE_ENV !== 'production' && warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n process.env.NODE_ENV !== 'production' && warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n process.env.NODE_ENV !== 'production' && warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n process.env.NODE_ENV !== 'production' && warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n process.env.NODE_ENV !== 'production' && warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n process.env.NODE_ENV !== 'production' && warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n process.env.NODE_ENV !== 'production' && warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n process.env.NODE_ENV !== 'production' && warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n process.env.NODE_ENV !== 'production' && warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n process.env.NODE_ENV !== 'production' && warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n\t if (typeof el === 'string') {\n\t var selector = el;\n\t el = document.querySelector(el);\n\t if (!el) {\n\t process.env.NODE_ENV !== 'production' && warn(\n\t 'Cannot find element: ' + selector\n\t );\n\t return document.createElement('div')\n\t }\n\t }\n\t return el\n\t}", "function query (el) {\n\t if (typeof el === 'string') {\n\t var selector = el;\n\t el = document.querySelector(el);\n\t if (!el) {\n\t process.env.NODE_ENV !== 'production' && warn(\n\t 'Cannot find element: ' + selector\n\t );\n\t return document.createElement('div')\n\t }\n\t }\n\t return el\n\t}", "static getElement(els) {\r\n if (typeof els === 'string') {\r\n if (!els.length)\r\n return null;\r\n if (els[0] === '#') {\r\n return document.getElementById(els.substring(1));\r\n }\r\n if (els[0] === '.' || els[0] === '[') {\r\n return document.querySelector(els);\r\n }\r\n // if we start with a digit, assume it's an id (error calling querySelector('#1')) as class are not valid CSS\r\n if (!isNaN(+els[0])) { // start with digit\r\n return document.getElementById(els);\r\n }\r\n // finally try string, then id then class\r\n let el = document.querySelector(els);\r\n if (!el) {\r\n el = document.getElementById(els);\r\n }\r\n if (!el) {\r\n el = document.querySelector('.' + els);\r\n }\r\n return el;\r\n }\r\n return els;\r\n }", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n }", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n }", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n }", "function getElement(selector) {\n return document.querySelector(selector);\n}", "function getDomElement(selector) {\n if (WINDOW.document && WINDOW.document.querySelector) {\n return WINDOW.document.querySelector(selector) ;\n }\n return null;\n}", "getElement(selector){\n const element = document.querySelector(selector);\n return element;\n }", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n }", "function selectElement(selector) {\n return document.querySelector(selector);\n}", "function query(el) {\n if (typeof el === 'string') {\n var selector = el;\n el = document.querySelector(el);\n if (!el) {\n process.env.NODE_ENV !== 'production' && warn('Cannot find element: ' + selector);\n return document.createElement('div');\n }\n }\n return el;\n}", "function querySelector(s) { return this.querySelectorAll(s)[0] }", "function query(el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n process.env.NODE_ENV !== 'production' && warn('Cannot find element: ' + el);\n return document.createElement('div');\n }\n return selected;\n } else {\n return el;\n }\n}", "function query(el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n process.env.NODE_ENV !== 'production' && warn('Cannot find element: ' + el);\n return document.createElement('div');\n }\n return selected;\n } else {\n return el;\n }\n}", "function query(el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n process.env.NODE_ENV !== 'production' && warn('Cannot find element: ' + el);\n return document.createElement('div');\n }\n return selected;\n } else {\n return el;\n }\n}", "function query(el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n process.env.NODE_ENV !== 'production' && warn('Cannot find element: ' + el);\n return document.createElement('div');\n }\n return selected;\n } else {\n return el;\n }\n}", "function query(el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n process.env.NODE_ENV !== 'production' && warn('Cannot find element: ' + el);\n return document.createElement('div');\n }\n return selected;\n } else {\n return el;\n }\n}", "function query(el) {\n\t if (typeof el === 'string') {\n\t var selected = document.querySelector(el);\n\t if (!selected) {\n\t process.env.NODE_ENV !== 'production' && warn('Cannot find element: ' + el);\n\t return document.createElement('div');\n\t }\n\t return selected;\n\t } else {\n\t return el;\n\t }\n\t}", "function query(el) {\n\t if (typeof el === 'string') {\n\t var selected = document.querySelector(el);\n\t if (!selected) {\n\t process.env.NODE_ENV !== 'production' && warn('Cannot find element: ' + el);\n\t return document.createElement('div');\n\t }\n\t return selected;\n\t } else {\n\t return el;\n\t }\n\t}", "function query(el) {\n\t if (typeof el === 'string') {\n\t var selector = el;\n\t el = document.querySelector(el);\n\t if (!el) {\n\t process.env.NODE_ENV !== 'production' && warn('Cannot find element: ' + selector);\n\t return document.createElement('div');\n\t }\n\t }\n\t return el;\n\t}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n \"debug\" !== 'production' && warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n }", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "function querySelector(){\n\t\treturn document.querySelector.apply(document, arguments);\n\t}", "function query (el) {\n if (typeof el === 'string') {\n var selector = el;\n el = document.querySelector(el);\n if (!el) {\n \"development\" !== 'production' && warn(\n 'Cannot find element: ' + selector\n );\n return document.createElement('div')\n }\n }\n return el\n}", "function query (el) {\n if (typeof el === 'string') {\n var selector = el;\n el = document.querySelector(el);\n if (!el) {\n \"development\" !== 'production' && warn(\n 'Cannot find element: ' + selector\n );\n return document.createElement('div')\n }\n }\n return el\n}", "function query (el) {\n if (typeof el === 'string') {\n var selector = el;\n el = document.querySelector(el);\n if (!el) {\n \"development\" !== 'production' && warn(\n 'Cannot find element: ' + selector\n );\n return document.createElement('div')\n }\n }\n return el\n}", "getElement(selector) {\n const element = document.querySelector(selector);\n return element;\n }", "function query (el) {\n if (typeof el === 'string') {\n var selected = document.querySelector(el);\n if (!selected) {\n 'production' !== 'production' && warn(\n 'Cannot find element: ' + el\n );\n return document.createElement('div')\n }\n return selected\n } else {\n return el\n }\n}", "getElement(el) {\n const element = document.querySelector(el);\n return element;\n }" ]
[ "0.7290738", "0.72729284", "0.70942974", "0.6918658", "0.68634987", "0.6855619", "0.6824114", "0.68001807", "0.67541987", "0.67434585", "0.6739643", "0.6735193", "0.6725986", "0.6725986", "0.6714609", "0.66955113", "0.6694225", "0.66918546", "0.66918546", "0.66904104", "0.66904104", "0.66904104", "0.66904104", "0.66904104", "0.66904104", "0.66904104", "0.66904104", "0.66904104", "0.66904104", "0.66904104", "0.66904104", "0.66904104", "0.66904104", "0.66904104", "0.66904104", "0.66904104", "0.66825825", "0.66825825", "0.6665852", "0.66619974", "0.66619974", "0.66619974", "0.66391665", "0.6632311", "0.6631298", "0.6629681", "0.6624846", "0.66240036", "0.6619525", "0.6618075", "0.6618075", "0.6618075", "0.6618075", "0.6618075", "0.6592563", "0.6592563", "0.6591074", "0.6581521", "0.6578096", "0.6578096", "0.6578096", "0.6578096", "0.6578096", "0.6578096", "0.6578096", "0.6578096", "0.6578096", "0.6578096", "0.6578096", "0.6578096", "0.6578096", "0.6578096", "0.6578096", "0.6578096", "0.6578096", "0.6578096", "0.6578096", "0.6578096", "0.6578096", "0.6578096", "0.6578096", "0.6578096", "0.6578096", "0.6578096", "0.6578096", "0.6578096", "0.6578096", "0.6578096", "0.6578096", "0.6578096", "0.6578096", "0.6578096", "0.6578096", "0.6578096", "0.6567996", "0.6546281", "0.6546281", "0.6546281", "0.6543086", "0.65364075", "0.6525764" ]
0.0
-1
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
function dataToCoordSize(dataSize, dataItem) { dataItem = dataItem || [0, 0]; return zrUtil.map([0, 1], function (dimIdx) { var val = dataItem[dimIdx]; var halfSize = dataSize[dimIdx] / 2; var p1 = []; var p2 = []; p1[dimIdx] = val - halfSize; p2[dimIdx] = val + halfSize; p1[1 - dimIdx] = p2[1 - dimIdx] = dataItem[1 - dimIdx]; return Math.abs(this.dataToPoint(p1)[dimIdx] - this.dataToPoint(p2)[dimIdx]); }, this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get Android() {}", "function SBRecordsetPHP_analyzePlatformSpecific()\r\n{\r\n\r\n\r\n}", "onChildAppStart () {\n\n }", "private internal function m248() {}", "private public function m246() {}", "onMessageStart() { }", "createStream () {\n\n }", "_playbackCompatibility() {\n // Detect audio playback capabilities.\n\n // Detect HTML5 Audio playback.\n // http://caniuse.com/#feat=audio\n this.canUseAudio = Boolean(new Audio());\n console.log('Native HTML5 Audio playback capability: ' +\n this.canUseAudio);\n\n // Detect Cordova Media Playback\n // It allows playing audio using the native bridge inside WebView Apps.\n // https://github.com/apache/cordova-plugin-media/blob/master/doc/index.md\n this.canUseCordovaMedia = Boolean(window.Media);\n console.log('Cordova Media playback capability: ' +\n this.canUseCordovaMedia);\n\n if (!(this.canUseAudio || this.canUseCordovaMedia)) {\n throw new Error(\n 'Some form of audio playback capability is required');\n }\n\n var _audio = new Audio();\n if (_audio.canPlayType === 'function') {\n throw new Error(\n 'Unable to detect audio playback capabilities');\n }\n\n var canPlayOggVorbis = _audio.canPlayType(\n 'audio/ogg; codecs=\"vorbis\"') !== '';\n var canPlayOggOpus = _audio.canPlayType(\n 'audio/ogg; codecs=\"opus\"') !== '';\n var canPlayWave = _audio.canPlayType('audio/wav') !== '';\n var canPlayMP3 = _audio.canPlayType('audio/mpeg; codecs=\"mp3\"') !== '';\n var canPlayAAC = _audio.canPlayType(\n 'audio/mp4; codecs=\"mp4a.40.2\"') !== '';\n var canPlay3GPP = _audio.canPlayType(\n 'audio/3gpp; codecs=\"samr\"') !== '';\n\n console.log('Native Vorbis audio in Ogg container playback capability: ' +\n canPlayOggVorbis);\n console.log('Native Opus audio in Ogg container playback capability: ' +\n canPlayOggOpus);\n console.log('Native PCM audio in Waveform Audio File Format (WAVE) ' +\n 'playback capability: ' + canPlayWave);\n console.log('Native MPEG Audio Layer 3 (MP3) playback capability: ' +\n canPlayMP3);\n console.log('Native Low-Complexity AAC audio in MP4 container playback ' +\n 'capability: ' + canPlayAAC);\n console.log('Native AMR audio in 3GPP container playback capability: ' +\n canPlay3GPP);\n\n if (!(canPlayWave || canPlayMP3)) {\n throw new Error(\n 'Native Wave or MP3 playback is required');\n }\n }", "constructor() {\n\t}", "constructor() {\n\t}", "constructor() {\n\n\t}", "onComponentMount() {\n\n }", "constructor() {\n throw new Error('Not implemented');\n }", "supportsPlatform() {\n return true;\n }", "function _____SHARED_functions_____(){}", "constructor() {\n }", "constructor() {\n\t\t// ...\n\t}", "static get tag(){return\"hal-9000\"}", "static getDeviceModel() {\n return \"zhimi.fan.za4\";\n }", "requestContainerInfo() {}", "constructor () { super() }", "function BaseDeviceProfile() {\n \n this.audioNeedsTranscodingCodecs = []; // fill these with audio codecs that the implemented device can handle natively\n this.videoNeedsTranscodingCodecs = []; // fill these with video codecs that the implemented device can handle natively\n this.validFormats = []; // fill these with video formats that the implemented device can handle natively\n\n this.transcodeOptions = {\n rescaleVideo : false, // BaseDeviceProfile.prototype.rescale\n subtitle : false, // BaseDeviceProfile.prototype.hardCodeSubtitle\n audioShiftCorrect : false // BaseDeviceProfile.prototype.correctAudioOffset\n };\n\n /**\n * @todo: whutz this?\n * @param {[type]} probeData [description]\n * @return {[type]} [description]\n */\n this.canPlayContainer = function (probeData) {\n throw new Error(\"canPlayContainer : Not Implemented\");\n };\n\n /**\n * Implement this method to return device specific ffmpeg flags for a probed media\n * @param {object} probeData ffmpeg probe data\n * @param {[type]} forceTranscode force transcode even if native format?\n * @return {Promise} [description]\n */\n this.getFFmpegFlags = function (probeData, forceTranscode) {\n throw new Error(\"getFFmpegFlags : Not Implemented!\");\n };\n\n}", "static get STATUS() {\n return 0;\n }", "static create () {}", "get() {}", "didMount() {\n }", "_onMessage() {\n throw new Error(\"not implemented\");\n }", "onReady() {}", "native() {\n throw new Error('NOT_IMPLEMENTED_EXCEPTION: you must override this method in order to use it')\n }", "function sdk(){\n}", "constructor () {\r\n\t\t\r\n\t}", "transient private protected internal function m182() {}", "function version(){ return \"0.13.0\" }", "static getDeviceModel() {\n return \"zhimi.fan.za5\";\n }", "function getVersion(){return _VERSION}", "transient private internal function m185() {}", "started () {}", "constructor() {\r\n }", "started() { }", "InitVsaEngine() {\n\n }", "function SigV4Utils() { }", "started() {\r\n\r\n\t}", "static get NOT_READY () {return 0}", "initialize() {\n\n }", "started () {\n\n }", "started () {\n\n }", "started () {\n\n }", "onMessageReceive() {}", "initialize()\n {\n }", "_get () {\n throw new Error('_get not implemented')\n }", "get () {\n }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "function getImplementation( cb ){\n\n }", "started() {}", "started() {}", "started() {}", "started() {}", "started() {}", "started() {}", "started() {}", "started() {}", "started() {}", "started() {}", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "heartbeat () {\n }", "static final private internal function m106() {}", "initleancloud() {\n AV.init({\n appId: keys.appId,\n appKey: keys.appKey\n })\n this.globalData.AV = AV\n }", "getStreamPosition() {\n return Native.getStreamPosition();\n }", "onMessage() {}", "onMessage() {}", "get WSAPlayerX64() {}", "constructor() {\n super();\n this._logger = new pip_services3_components_node_3.CompositeLogger();\n this._connectionResolver = new connect_1.AwsConnectionResolver();\n this._connectTimeout = 30000;\n this._client = null; //AmazonCloudWatchClient\n this._opened = false;\n }" ]
[ "0.53504926", "0.4896905", "0.48514667", "0.48116106", "0.4775166", "0.4743932", "0.47342455", "0.47035336", "0.4694186", "0.4694186", "0.46744877", "0.46453032", "0.46394095", "0.4629355", "0.46211302", "0.45832416", "0.45812932", "0.45752546", "0.45698234", "0.45625272", "0.4557475", "0.4549714", "0.45494938", "0.4545794", "0.45383474", "0.4523037", "0.45180768", "0.45005357", "0.4496748", "0.4486438", "0.447462", "0.44716924", "0.4468301", "0.44601226", "0.4456266", "0.4455926", "0.44557476", "0.4445067", "0.44378054", "0.44258687", "0.44258553", "0.4424118", "0.44097725", "0.4406038", "0.4404498", "0.4404498", "0.4404498", "0.43926418", "0.43781474", "0.43708664", "0.43657827", "0.43545496", "0.43545496", "0.43545496", "0.43545496", "0.43545496", "0.43545496", "0.43545496", "0.43545496", "0.43545496", "0.43545496", "0.43545496", "0.43526813", "0.43514904", "0.43514904", "0.43514904", "0.43514904", "0.43514904", "0.43514904", "0.43514904", "0.43514904", "0.43514904", "0.43514904", "0.4350625", "0.4350625", "0.4350625", "0.4350625", "0.4350625", "0.4350625", "0.4350625", "0.4350625", "0.4350625", "0.4350625", "0.4350625", "0.4350625", "0.4350625", "0.4350625", "0.4350625", "0.4350625", "0.4350625", "0.4350625", "0.4350625", "0.4350625", "0.4349645", "0.43450522", "0.43440443", "0.43390423", "0.43347356", "0.43347356", "0.43332103", "0.43318707" ]
0.0
-1
If a block is tsv format
function isTSVFormat(block) { // Simple method to find out if a block is tsv format var firstLine = block.slice(0, block.indexOf('\n')); if (firstLine.indexOf(ITEM_SPLITER) >= 0) { return true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isTSVFormat(block) {\n\t // Simple method to find out if a block is tsv format\n\t var firstLine = block.slice(0, block.indexOf('\\n'));\n\t\n\t if (firstLine.indexOf(ITEM_SPLITER) >= 0) {\n\t return true;\n\t }\n\t }", "function isTSVFormat(block){ // Simple method to find out if a block is tsv format\n var firstLine=block.slice(0,block.indexOf('\\n'));if(firstLine.indexOf(ITEM_SPLITER) >= 0){return true;}}", "function isTSVFormat(block) {\n // Simple method to find out if a block is tsv format\n var firstLine = block.slice(0, block.indexOf('\\n'));\n if (firstLine.indexOf(ITEM_SPLITER) >= 0) {\n return true;\n }\n }", "function isTSVFormat(block) {\n // Simple method to find out if a block is tsv format\n var firstLine = block.slice(0, block.indexOf('\\n'));\n if (firstLine.indexOf(ITEM_SPLITER) >= 0) {\n return true;\n }\n }", "function isTSVFormat(block) {\n\t // Simple method to find out if a block is tsv format\n\t var firstLine = block.slice(0, block.indexOf('\\n'));\n\t if (firstLine.indexOf(ITEM_SPLITER) >= 0) {\n\t return true;\n\t }\n\t}", "function parseTsv(text) {\r\n\t\t\tvar m = text.match(/(\\t|\\r?\\n|[^\\t\"\\r\\n]+|\"(?:[^\"]|\"\")*\")/g);\r\n\t\t\tvar tsv = [];\r\n\t\t\tvar line = [];\r\n\t\t\ttsv.push(line);\r\n\t\t\tfor(var i = 0; i < m.length; i++) {\r\n\t\t\t\tvar str = m[i];\r\n\t\t\t\tif(/^(\\r\\n|\\r|\\n)$/.test(str)) {\r\n\t\t\t\t\tline = [];\r\n\t\t\t\t\ttsv.push(line);\r\n\t\t\t\t}\r\n\t\t\t\telse if(/^\\t$/.test(str)) {\r\n\t\t\t\t\t//noop\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tif(/^\"[^\"]*\"$/.test(str)) {\r\n\t\t\t\t\t\tstr = str.replace(/^\"|\"$/g, '');\r\n\t\t\t\t\t}\r\n\t\t\t\t\tstr = str.replace(/\"\"/g, '\"');\r\n\t\t\t\t\tline.push(str);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn tsv;\r\n\t\t}", "function matchTab() {\n\t\tvar pattern = /^\\t/;\n\t\tvar x = lexString.match(pattern);\n\t\tif(x !== null) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "function getCellsTsv(data) {\r\n\t\t\tvar tsv = '';\r\n\t\t\tfor(var row = 0; row < data.length; row++) {\r\n\t\t\t\t// Exclude invisible cells\r\n\t\t\t\tif(!$(data[row][0].parentNode).is(':visible')) {\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(row != 0) tsv += '\\n';\r\n\t\t\t\tfor(var col = 0; col < data[row].length; col++) {\r\n\t\t\t\t\tif(col != 0) tsv += '\\t';\r\n\t\t\t\t\tvar text = getStaticText(data[row][col]);\r\n\t\t\t\t\tif(/[\\t\\n\"]/.test(text)) {\r\n\t\t\t\t\t\t// If it contains line breaks and tabs, enclose it in a double coat.\r\n\t\t\t\t\t\t// And if there is \" in the character, it is converted to \"\".\r\n\t\t\t\t\t\t// Because of IE7, I don't use replaceAll('\"', '\"\"') function.\r\n\t\t\t\t\t\ttsv += '\"' + text.split('\"').join('\"\"') + '\"';\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\ttsv += text;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn tsv;\r\n\t\t}", "acceptsTableEdit(row) {\n const lastRow = this.getLastRow();\n if (row > lastRow) {\n return false;\n }\n const line = this.editor.document.lineAt(row).text.trimLeft();\n if (line.startsWith('|')) {\n return true;\n }\n return false;\n }", "function tt(e,t,a,n){var r,f=e.doc,o=f.mode;t=q(f,t);var i,s=T(f,t.line),c=Xe(e,t.line,a),u=new di(s.text,e.options.tabSize,c);for(n&&(i=[]);(n||u.pos<t.ch)&&!u.eol();)u.start=u.pos,r=et(o,u,c.state),n&&i.push(new pi(u,r,We(f.mode,c.state)));return n?i:new pi(u,r,c.state)}", "_formatTable(object, cb) {\n var lineType = {};\n // Create object with all line model\n object.forOrder.forEach((type, i) => {\n // If an header rows is define we take line after that header rows\n if (object.headerRows) {\n lineType[type] = _.cloneDeep(object.body[i+object.headerRows]);\n } else {\n lineType[type] = _.cloneDeep(object.body[i]);\n }\n });\n var dataName;\n // Take the data name we need, if headerRows define we take the first model line\n if (object.headerRows) {\n dataName = this._recoverDataName(object.body[object.headerRows]);\n } else {\n dataName = this._recoverDataName(object.body[0]);\n }\n // Remove all model line from dd\n if (object.headerRows) {\n object.body = object.body.slice(0, object.headerRows);\n } else {\n object.body = [];\n }\n if (this._data[dataName]) {\n var count = 0;\n // For each line in data we create a new line with correct model and replace all tag with data\n asynk.each(this._data[dataName], (line, cb) => {\n if (!line.type) {\n return cb();\n }\n if (!lineType[line.type]) {\n return cb();\n }\n var newLine = _.cloneDeep(lineType[line.type]);\n asynk.each(newLine, (column, cb) => {\n if (column.text) {\n // verify if tag is present, if true replace tag with data\n if (column.text.indexOf(this._tag) != -1) {\n column.text = this._replaceTagLine(column.text, dataName, count);\n }\n if (column.rowSpan) {\n column.rowSpan = this._data[dataName].length;\n }\n }\n cb();\n }).serie().done(()=> {\n object.body.push(newLine);\n count++;\n cb();\n });\n }).serie().asCallback(cb);\n }\n }", "get isTextblock() {\n return this.type.isTextblock;\n }", "function checkVertical(symbol) {\n if (row1[1] == `:${symbol}:`) {\n if (row2[1] == `:${symbol}:`) {\n if (row3[1] == `:${symbol}:`) {\n return fin = symbol;\n }\n }\n }\n if (row1[2] == `:${symbol}:`) {\n if (row2[2] == `:${symbol}:`) {\n if (row3[2] == `:${symbol}:`) {\n return fin = symbol;\n }\n }\n }\n if (row1[3] == `:${symbol}:`) {\n if (row2[3] == `:${symbol}:`) {\n if (row3[3] == `:${symbol}:`) {\n return fin = symbol;\n }\n }\n }\n }", "function objectToTsv(data) {\n const tsvRows = [];\n //Header for first row\n const headers = Object.keys(data[0]);\n tsvRows.push(headers.join('\t'));\n\n //Loop over the rows and escapping the ',' and '\"'\n for (const row of data) {\n const values = headers.map(header => {\n const escaped = ('' + row[header]).replace(/\"/g, '\\\\\"');\n return `\"${escaped}\"`;\n });\n tsvRows.push(values.join('\\t'));\n }\n return tsvRows.join('\\n');\n}", "function isTextBlock(node){\n\t\treturn node.$element && (node.name() in dtd.$block || node.name() in dtd.$listItem) && dtd[node.name()]['#'];\n\t}", "isTocStyle(paragraph) {\n let style = paragraph.paragraphFormat.baseStyle;\n return (style !== undefined && (style.name.toLowerCase().indexOf('toc') !== -1));\n }", "function isOutputChunk(file) {\n return typeof file.code === 'string';\n}", "function csvFromTem(CSV, temHead, tem, temBetween, temFoot, temCond, temOptions) {\r\n var j;\r\n var v;\r\n if(!CSV){return;}\r\n var s = \"\";\r\n //alert(tem);\r\n var seqobj = new SeqObj();\r\n s += temHandler(CSV, temHead, -1, 0);\r\n for (j = 0; j < CSV.table.length; j++) {\r\n v = temHandler(CSV, temCond, j, j, null); // check conditional\r\n if (v.toString().left(5) == \"false\") continue;\r\n s += temHandler(CSV, tem, j, seqobj.next(), temOptions);\r\n if (j != CSV.table.length - 1) s += temHandler(CSV, temBetween, j, seqobj.curr());\r\n }\r\n s += temHandler(CSV, temFoot, -1, seqobj.curr(), temOptions);\r\n return s;\r\n}", "function List2TSV(LST){\n\t\tvar out=\"\";\n\t\tfor (var i in LST){\n\t\t\tvar LSTI=LST[i].join(\"\t\");\n\t\t\tout+=LSTI+'\\n';\n\t\t}\n\t\treturn out;\n\t}", "function handleSingle(tokenizer, block) {\n var nsStart = tokenizer.currentTokenStart, nsEnd = getNamespaceEnd(tokenizer), name = getNamespace(tokenizer, nsEnd), column, columns = [], tokens = TokenIndexBuilder.create(512), tokenCount = 0, readingNames = true;\n while (readingNames) {\n if (tokenizer.currentTokenType !== 4 /* ColumnName */ || !isNamespace(tokenizer, nsStart, nsEnd)) {\n readingNames = false;\n break;\n }\n column = getTokenString(tokenizer);\n moveNext(tokenizer);\n if (tokenizer.currentTokenType !== 3 /* Value */) {\n return {\n hasError: true,\n errorLine: tokenizer.currentLineNumber,\n errorMessage: \"Expected value.\"\n };\n }\n columns[columns.length] = column;\n TokenIndexBuilder.addToken(tokens, tokenizer.currentTokenStart, tokenizer.currentTokenEnd);\n tokenCount++;\n moveNext(tokenizer);\n }\n block.addCategory(new Text.Category(block.data, name, nsStart, tokenizer.currentTokenStart, columns, tokens.tokens, tokenCount));\n return {\n hasError: false,\n errorLine: 0,\n errorMessage: \"\"\n };\n }", "function hasTabs(input)\n{\n\treturn input.split(/[^\\t]/)[0].length;\n}", "function notBlockUseCaseMultilineBlock() { console.log('Not an block use case - Block - Multine');}", "function quick_and_dirty_vtt_or_srt_parser(vtt) {\n console.log('--quick_and_dirty_vtt_or_srt_parser--');\n\tlet lines = vtt.trim().replace('\\r\\n', '\\n').split(/[\\r\\n]/).map(function(line) {\n\t\treturn line.trim();\n });\n // console.log(lines);\n\tlet cues = [];\n\tlet start = null;\n\tlet end = null;\n\tlet payload = null;\n\tfor (let i = 0; i < lines.length; i++) {\n\t\tif (lines[i].indexOf('-->') >= 0) {\n\t\t\tlet splitted = lines[i].split(/[ \\t]+-->[ \\t]+/);\n\t\t\tif (splitted.length != 2) {\n\t\t\t\tthrow 'Error when splitting \"-->\": ' + lines[i];\n\t\t\t}\n\n\t\t\t// Already ignoring anything past the \"end\" timestamp (i.e. cue settings).\n\t\t\tstart = parse_timestamp(splitted[0]);\n\t\t\tend = parse_timestamp(splitted[1]);\n\t\t} else if (lines[i] == '') {\n\t\t\tif (start && end) {\n\t\t\t\tlet cue = { 'start': start, 'end': end, 'text': payload };\n\t\t\t\tcues.push(cue);\n\t\t\t\tstart = null;\n\t\t\t\tend = null;\n\t\t\t\tpayload = null;\n\t\t\t}\n\t\t} else if(start && end) {\n\t\t\tif (payload == null) {\n\t\t\t\tpayload = lines[i];\n\t\t\t} else {\n\t\t\t\tpayload += '\\n' + lines[i];\n\t\t\t}\n\t\t}\n\t}\n\tif (start && end) {\n\t\tlet cue = { 'start': start, 'end': end, 'text': payload };\n\t\tcues.push(cue);\n }\n \n console.log(cues);\n\n\treturn cues;\n}", "identify() {\n let output = this.default;\n\n let sameLineCommas = 0;\n let newLineCommas = 0;\n\n this.objectBlocks.forEach(block => {\n sameLineCommas += [...block.matchAll(/,\\n/gms)].length;\n newLineCommas += [...block.matchAll(/\\n\\s*,/gms)].length;\n });\n\n this.arrayBrackets.forEach(block => {\n sameLineCommas += [...block.matchAll(/,\\n/gms)].length;\n newLineCommas += [...block.matchAll(/\\n\\s*,/gms)].length;\n });\n\n if (newLineCommas > sameLineCommas) {\n output = 'first';\n }\n\n return output;\n }", "function extractCtabData(data, format) \n\t{\n\t\tvar fmt = format.toLowerCase();\n\t\tif (fmt === 'mol')\n\t\t{\n\t\t\tvar a = data.split('\\n');\n\t\t\t// discard first two lines\n\t\t\ta.splice(0, 2);\n\t\t\treturn a.join('\\n');\n\t\t}\n\t\telse if (fmt === 'pdb')\n\t\t{\n\t\t\tvar a = data.split('\\n');\t\t\t\n\t\t\ta.splice(0, 3);\n\t\t\tvar str = a.join('\\n');\n\t\t\t//var s = str.replace(/\\s/g, '');\n\t\t\t//console.log(str, s);\n\t\t\treturn str;\n\t\t}\n\t\telse\n\t\t\treturn data;\n\t}", "_parseTextTemplate() {\n\n let figureRows = this._textTemplate.split('\\n');\n\n figureRows.forEach(row => {\n this._width = row.trim().length;\n this._height += 1;\n\n row.split('').forEach((char) => {\n if (char === DIED_CHAR) {\n this._dataTemplate.push(false);\n } else if (char === ALIVE_CHAR) {\n this._dataTemplate.push(true);\n }\n })\n\n });\n\n }", "function isHeader () {\n return /^(Name|Syntax|Description|Examples|See also)/i.test(line)\n }", "function T(e,t){if((t-=e.first)<0||t>=e.size)throw new Error(\"There is no line \"+(t+e.first)+\" in the document.\");for(var a=e;!a.lines;)for(var n=0;;++n){var r=a.children[n],f=r.chunkSize();if(t<f){a=r;break}t-=f}return a.lines[t]}", "function hasSign( block ){\n if (block && block.state && block.state.setLine)\n return block.state;\n return false;\n}", "isHeadingStyle(para) {\n let style = para.paragraphFormat.baseStyle;\n if (style !== undefined) {\n return isNullOrUndefined(this.tocStyles[style.name]) ? false : true;\n }\n return false;\n }", "function tsvJSON(tsv) {\n const lines = tsv.split('\\n');\n const headers = lines.slice(0, 1)[0].split('\\t');\n return lines.slice(1, lines.length).map(line => {\n const data = line.split('\\t');\n return headers.reduce((obj, nextKey, index) => {\n obj[nextKey] = data[index];\n return obj;\n }, {});\n });\n }", "function testFor(trRow) {\n\n let sectionPath =\n ('Section Hierarchy' in trRow && trRow['Section Hierarchy']) ?\n trRow['Section Hierarchy'] :\n trRow['Section'];\n\n let title = trRow['Title'];\n let testFile = safePath(sectionPath, title) + flags.testFileSuffix;\n\n // These fields are kind of HTML-ish - double whitespace isn't rendered.\n // Our text files *do* care about this.\n let steps = trRow['Steps'];\n if (steps) steps = steps.replace(/[ \\t]+/g, ' ');\n let results = trRow['Expected Result'];\n if (results) results = results.replace(/[ \\t]+/g, ' ');\n\n let content = steps + \"\\n\\n\" +\n (results ? \"Expected Result:\\n\" + results + \"\\n\\n\" : \"\");\n\n // Append any extra persisted TestRail data as fields in the\n // test file\n let fieldContent = [];\n for (let i = 0; i < persistedTrFields.length; ++i) {\n\n let trField = persistedTrFields[i];\n if (trRow[trField] == null) continue;\n\n fieldContent.push(trField + \": \" + trRow[trField]);\n }\n\n content = content + fieldContent.join('\\n');\n\n return [testFile, content];\n}", "function printBlockString(value, isDescription) {\n\t return (value[0] === ' ' || value[0] === '\\t') && value.indexOf('\\n') === -1 ? '\"\"\"' + value.replace(/\"\"\"/g, '\\\\\"\"\"') + '\"\"\"' : isDescription ? '\"\"\"\\n' + value.replace(/\"\"\"/g, '\\\\\"\"\"') + '\\n\"\"\"' : indent('\"\"\"\\n' + value.replace(/\"\"\"/g, '\\\\\"\"\"')) + '\\n\"\"\"';\n\t}", "function tabletypeformatter(value, row, index) { \n let multiple = false; \n if (value === null || value === '' || value === undefined) \n { \n return \"\";\n } \n if (multiple) { \n let valarray = value.split(','); \n let result = tabletypedatasource.filter(item => valarray.includes(item.value));\n let textarray = result.map(x => x.text);\n if (textarray.length > 0)\n return textarray.join(\",\");\n else \n return value;\n } else { \n let result = tabletypedatasource.filter(x => x.value == value);\n if (result.length > 0)\n return result[0].text;\n else\n return value;\n } \n }", "function parseInternal(data) {\n var tokenizer = createTokenizer(data), cat, id, file = new Text.File(data), block = new Text.DataBlock(data, \"default\"), saveFrame = new Text.DataBlock(data, \"empty\"), inSaveFrame = false, blockSaveFrames;\n moveNext(tokenizer);\n while (tokenizer.currentTokenType !== 6 /* End */) {\n var token = tokenizer.currentTokenType;\n // Data block\n if (token === 0 /* Data */) {\n if (inSaveFrame) {\n return error(tokenizer.currentLineNumber, \"Unexpected data block inside a save frame.\");\n }\n if (block.categories.length > 0) {\n file.dataBlocks.push(block);\n }\n block = new Text.DataBlock(data, data.substring(tokenizer.currentTokenStart + 5, tokenizer.currentTokenEnd));\n moveNext(tokenizer);\n // Save frame\n }\n else if (token === 1 /* Save */) {\n id = data.substring(tokenizer.currentTokenStart + 5, tokenizer.currentTokenEnd);\n if (id.length === 0) {\n if (saveFrame.categories.length > 0) {\n blockSaveFrames = block.additionalData[\"saveFrames\"];\n if (!blockSaveFrames) {\n blockSaveFrames = [];\n block.additionalData[\"saveFrames\"] = blockSaveFrames;\n }\n blockSaveFrames[blockSaveFrames.length] = saveFrame;\n }\n inSaveFrame = false;\n }\n else {\n if (inSaveFrame) {\n return error(tokenizer.currentLineNumber, \"Save frames cannot be nested.\");\n }\n inSaveFrame = true;\n saveFrame = new Text.DataBlock(data, id);\n }\n moveNext(tokenizer);\n // Loop\n }\n else if (token === 2 /* Loop */) {\n cat = handleLoop(tokenizer, inSaveFrame ? saveFrame : block);\n if (cat.hasError) {\n return error(cat.errorLine, cat.errorMessage);\n }\n // Single row\n }\n else if (token === 4 /* ColumnName */) {\n cat = handleSingle(tokenizer, inSaveFrame ? saveFrame : block);\n if (cat.hasError) {\n return error(cat.errorLine, cat.errorMessage);\n }\n // Out of options\n }\n else {\n return error(tokenizer.currentLineNumber, \"Unexpected token. Expected data_, loop_, or data name.\");\n }\n }\n // Check if the latest save frame was closed.\n if (inSaveFrame) {\n return error(tokenizer.currentLineNumber, \"Unfinished save frame (`\" + saveFrame.header + \"`).\");\n }\n if (block.categories.length > 0) {\n file.dataBlocks.push(block);\n }\n return result(file);\n }", "function checkCanBePlain( schema, block ) {\n\t// TMP will be replaced with schema.checkWrap().\n\tconst isPlainAllowed = schema.checkChild( block.parent, 'plain' );\n\tconst isBlockAllowedInPlain = schema.checkChild( [ '$root', 'plain' ], block );\n\n\treturn isPlainAllowed && isBlockAllowedInPlain;\n}", "function displayTableTabularFile(data) {\n // Transform columns to rows\n for(let i=0;i<data.files.length;i++) {\n if ('preview_data' in data.files[i]) {\n data.files[i].preview_data = cols2rows(data.files[i].preview_data);\n }\n }\n\n // display received data\n var template = $('#template-source_file-preview').html();\n\n var templateScript = Handlebars.compile(template);\n var html = templateScript(data);\n\n $(\"#content_integration\").html(html);\n\n function mapCallback() {\n return $(this).val();\n }\n\n function getSelectCallback(index, value) {\n selectbox.find(\"option[value=\"+value+\"]\").hide();\n }\n\n // Select the correct type for each column\n /*\n data.file[i]\n - name : name file\n - preview_data : first line of file\n - column_types : text, numeric, etc...\n */\n for(let i=0, l=data.files.length; i<l; i++) {\n\n if ('column_types' in data.files[i]) {\n var cols = data.files[i].column_types;\n for(let j=0; j<cols.length; j++) {\n var selectbox = $('div#content_integration form.template-source_file:eq(' + i + ') select.column_type:eq(' + j + ')');\n var values = selectbox.find(\"option\").map(mapCallback);\n\n if ($.inArray(cols[j], ['start', 'end', 'numeric']) == -1) {\n $.each(['start', 'end', 'numeric'],getSelectCallback);\n }\n\n if ($.inArray(cols[j], ['entityGoterm']) == -1) {\n $.each(['entityGoterm'],getSelectCallback);\n }\n\n if ($.inArray( cols[j], values) >= 0) {\n selectbox.val(cols[j]);\n }\n\n // Check what is in the db\n checkExistingData($('div#content_integration form.template-source_file:eq(' + i + ')'));\n }\n }\n }\n}", "function isTokenSeparated(stream) {\n return stream.sol() ||\n stream.string.charAt(stream.start - 1) == \" \" ||\n stream.string.charAt(stream.start - 1) == \"\\t\";\n }", "function printBlockString(value, isDescription) {\n return (value[0] === ' ' || value[0] === '\\t') && value.indexOf('\\n') === -1 ? '\"\"\"' + value.replace(/\"\"\"/g, '\\\\\"\"\"') + '\"\"\"' : isDescription ? '\"\"\"\\n' + value.replace(/\"\"\"/g, '\\\\\"\"\"') + '\\n\"\"\"' : indent('\"\"\"\\n' + value.replace(/\"\"\"/g, '\\\\\"\"\"')) + '\\n\"\"\"';\n}", "get isTextblock() {\n return this.isBlock && this.inlineContent;\n }", "function parseTSVtoJSON() {\n var tsv_data = fs.readFileSync('./jason_concerts.tsv').toString();\n\n var parsed = TSV.parse(tsv_data);\n var post_processing = [];\n // Remove Junk Data\n for (var i = 0; i < parsed.length; i++ ){\n var c = parsed[i];\n if (c.hasOwnProperty('artist') && c.artist !== \"\") {\n post_processing.push(c);\n }\n }\n return post_processing;\n}", "function createTxt(report) {\n const output = entities.decode(report.markdown());\n csvAccumulator.push([report.kind, output]);\n}", "function looks_like_log_line(line) {\n return (typeof line == 'string' && Date.parse(line.split('T')[0]) > 0);\n }", "function handleLastBlockCharacterDelete(isForward, rng) {\n\t\t\t\tvar path, blockElm, newBlockElm, clonedBlockElm, sibling,\n\t\t\t\t\tcontainer, offset, br, currentFormatNodes;\n\n\t\t\t\tfunction cloneTextBlockWithFormats(blockElm, node) {\n\t\t\t\t\tcurrentFormatNodes = $(node).parents().filter(function(idx, node) {\n\t\t\t\t\t\treturn !!editor.schema.getTextInlineElements()[node.nodeName];\n\t\t\t\t\t});\n\n\t\t\t\t\tnewBlockElm = blockElm.cloneNode(false);\n\n\t\t\t\t\tcurrentFormatNodes = Tools.map(currentFormatNodes, function(formatNode) {\n\t\t\t\t\t\tformatNode = formatNode.cloneNode(false);\n\n\t\t\t\t\t\tif (newBlockElm.hasChildNodes()) {\n\t\t\t\t\t\t\tformatNode.appendChild(newBlockElm.firstChild);\n\t\t\t\t\t\t\tnewBlockElm.appendChild(formatNode);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tnewBlockElm.appendChild(formatNode);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tnewBlockElm.appendChild(formatNode);\n\n\t\t\t\t\t\treturn formatNode;\n\t\t\t\t\t});\n\n\t\t\t\t\tif (currentFormatNodes.length) {\n\t\t\t\t\t\tbr = dom.create('br');\n\t\t\t\t\t\tcurrentFormatNodes[0].appendChild(br);\n\t\t\t\t\t\tdom.replace(newBlockElm, blockElm);\n\n\t\t\t\t\t\trng.setStartBefore(br);\n\t\t\t\t\t\trng.setEndBefore(br);\n\t\t\t\t\t\teditor.selection.setRng(rng);\n\n\t\t\t\t\t\treturn br;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tfunction isTextBlock(node) {\n\t\t\t\t\treturn node && editor.schema.getTextBlockElements()[node.tagName];\n\t\t\t\t}\n\n\t\t\t\tif (!rng.collapsed) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tcontainer = rng.startContainer;\n\t\t\t\toffset = rng.startOffset;\n\t\t\t\tblockElm = dom.getParent(container, dom.isBlock);\n\t\t\t\tif (!isTextBlock(blockElm)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (container.nodeType == 1) {\n\t\t\t\t\tcontainer = container.childNodes[offset];\n\t\t\t\t\tif (container && container.tagName != 'BR') {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (isForward) {\n\t\t\t\t\t\tsibling = blockElm.nextSibling;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsibling = blockElm.previousSibling;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (dom.isEmpty(blockElm) && isTextBlock(sibling) && dom.isEmpty(sibling)) {\n\t\t\t\t\t\tif (cloneTextBlockWithFormats(blockElm, container)) {\n\t\t\t\t\t\t\tdom.remove(sibling);\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (container.nodeType == 3) {\n\t\t\t\t\tpath = NodePath.create(blockElm, container);\n\t\t\t\t\tclonedBlockElm = blockElm.cloneNode(true);\n\t\t\t\t\tcontainer = NodePath.resolve(clonedBlockElm, path);\n\n\t\t\t\t\tif (isForward) {\n\t\t\t\t\t\tif (offset >= container.data.length) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcontainer.deleteData(offset, 1);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (offset <= 0) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcontainer.deleteData(offset - 1, 1);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (dom.isEmpty(clonedBlockElm)) {\n\t\t\t\t\t\treturn cloneTextBlockWithFormats(blockElm, container);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "function handleLastBlockCharacterDelete(isForward, rng) {\n\t\t\t\tvar path, blockElm, newBlockElm, clonedBlockElm, sibling,\n\t\t\t\t\tcontainer, offset, br, currentFormatNodes;\n\n\t\t\t\tfunction cloneTextBlockWithFormats(blockElm, node) {\n\t\t\t\t\tcurrentFormatNodes = $(node).parents().filter(function(idx, node) {\n\t\t\t\t\t\treturn !!editor.schema.getTextInlineElements()[node.nodeName];\n\t\t\t\t\t});\n\n\t\t\t\t\tnewBlockElm = blockElm.cloneNode(false);\n\n\t\t\t\t\tcurrentFormatNodes = Tools.map(currentFormatNodes, function(formatNode) {\n\t\t\t\t\t\tformatNode = formatNode.cloneNode(false);\n\n\t\t\t\t\t\tif (newBlockElm.hasChildNodes()) {\n\t\t\t\t\t\t\tformatNode.appendChild(newBlockElm.firstChild);\n\t\t\t\t\t\t\tnewBlockElm.appendChild(formatNode);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tnewBlockElm.appendChild(formatNode);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tnewBlockElm.appendChild(formatNode);\n\n\t\t\t\t\t\treturn formatNode;\n\t\t\t\t\t});\n\n\t\t\t\t\tif (currentFormatNodes.length) {\n\t\t\t\t\t\tbr = dom.create('br');\n\t\t\t\t\t\tcurrentFormatNodes[0].appendChild(br);\n\t\t\t\t\t\tdom.replace(newBlockElm, blockElm);\n\n\t\t\t\t\t\trng.setStartBefore(br);\n\t\t\t\t\t\trng.setEndBefore(br);\n\t\t\t\t\t\teditor.selection.setRng(rng);\n\n\t\t\t\t\t\treturn br;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tfunction isTextBlock(node) {\n\t\t\t\t\treturn node && editor.schema.getTextBlockElements()[node.tagName];\n\t\t\t\t}\n\n\t\t\t\tif (!rng.collapsed) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tcontainer = rng.startContainer;\n\t\t\t\toffset = rng.startOffset;\n\t\t\t\tblockElm = dom.getParent(container, dom.isBlock);\n\t\t\t\tif (!isTextBlock(blockElm)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (container.nodeType == 1) {\n\t\t\t\t\tcontainer = container.childNodes[offset];\n\t\t\t\t\tif (container && container.tagName != 'BR') {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (isForward) {\n\t\t\t\t\t\tsibling = blockElm.nextSibling;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsibling = blockElm.previousSibling;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (dom.isEmpty(blockElm) && isTextBlock(sibling) && dom.isEmpty(sibling)) {\n\t\t\t\t\t\tif (cloneTextBlockWithFormats(blockElm, container)) {\n\t\t\t\t\t\t\tdom.remove(sibling);\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (container.nodeType == 3) {\n\t\t\t\t\tpath = NodePath.create(blockElm, container);\n\t\t\t\t\tclonedBlockElm = blockElm.cloneNode(true);\n\t\t\t\t\tcontainer = NodePath.resolve(clonedBlockElm, path);\n\n\t\t\t\t\tif (isForward) {\n\t\t\t\t\t\tif (offset >= container.data.length) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcontainer.deleteData(offset, 1);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (offset <= 0) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcontainer.deleteData(offset - 1, 1);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (dom.isEmpty(clonedBlockElm)) {\n\t\t\t\t\t\treturn cloneTextBlockWithFormats(blockElm, container);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "function handleLastBlockCharacterDelete(isForward, rng) {\n\t\t\t\tvar path, blockElm, newBlockElm, clonedBlockElm, sibling,\n\t\t\t\t\tcontainer, offset, br, currentFormatNodes;\n\n\t\t\t\tfunction cloneTextBlockWithFormats(blockElm, node) {\n\t\t\t\t\tcurrentFormatNodes = $(node).parents().filter(function(idx, node) {\n\t\t\t\t\t\treturn !!editor.schema.getTextInlineElements()[node.nodeName];\n\t\t\t\t\t});\n\n\t\t\t\t\tnewBlockElm = blockElm.cloneNode(false);\n\n\t\t\t\t\tcurrentFormatNodes = Tools.map(currentFormatNodes, function(formatNode) {\n\t\t\t\t\t\tformatNode = formatNode.cloneNode(false);\n\n\t\t\t\t\t\tif (newBlockElm.hasChildNodes()) {\n\t\t\t\t\t\t\tformatNode.appendChild(newBlockElm.firstChild);\n\t\t\t\t\t\t\tnewBlockElm.appendChild(formatNode);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tnewBlockElm.appendChild(formatNode);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tnewBlockElm.appendChild(formatNode);\n\n\t\t\t\t\t\treturn formatNode;\n\t\t\t\t\t});\n\n\t\t\t\t\tif (currentFormatNodes.length) {\n\t\t\t\t\t\tbr = dom.create('br');\n\t\t\t\t\t\tcurrentFormatNodes[0].appendChild(br);\n\t\t\t\t\t\tdom.replace(newBlockElm, blockElm);\n\n\t\t\t\t\t\trng.setStartBefore(br);\n\t\t\t\t\t\trng.setEndBefore(br);\n\t\t\t\t\t\teditor.selection.setRng(rng);\n\n\t\t\t\t\t\treturn br;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tfunction isTextBlock(node) {\n\t\t\t\t\treturn node && editor.schema.getTextBlockElements()[node.tagName];\n\t\t\t\t}\n\n\t\t\t\tif (!rng.collapsed) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tcontainer = rng.startContainer;\n\t\t\t\toffset = rng.startOffset;\n\t\t\t\tblockElm = dom.getParent(container, dom.isBlock);\n\t\t\t\tif (!isTextBlock(blockElm)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (container.nodeType == 1) {\n\t\t\t\t\tcontainer = container.childNodes[offset];\n\t\t\t\t\tif (container && container.tagName != 'BR') {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (isForward) {\n\t\t\t\t\t\tsibling = blockElm.nextSibling;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsibling = blockElm.previousSibling;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (dom.isEmpty(blockElm) && isTextBlock(sibling) && dom.isEmpty(sibling)) {\n\t\t\t\t\t\tif (cloneTextBlockWithFormats(blockElm, container)) {\n\t\t\t\t\t\t\tdom.remove(sibling);\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (container.nodeType == 3) {\n\t\t\t\t\tpath = NodePath.create(blockElm, container);\n\t\t\t\t\tclonedBlockElm = blockElm.cloneNode(true);\n\t\t\t\t\tcontainer = NodePath.resolve(clonedBlockElm, path);\n\n\t\t\t\t\tif (isForward) {\n\t\t\t\t\t\tif (offset >= container.data.length) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcontainer.deleteData(offset, 1);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (offset <= 0) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcontainer.deleteData(offset - 1, 1);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (dom.isEmpty(clonedBlockElm)) {\n\t\t\t\t\t\treturn cloneTextBlockWithFormats(blockElm, container);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "function pt(o){\n p(\"\\t\" + o);\n }", "static tag_lines(raw)\r\n {\r\n let lines = [];\r\n let next_is_def = false;\r\n let in_code_block = false;\r\n let in_quote_block = false;\r\n for (const [index, value] of raw.entries())\r\n {\r\n let trimmed = value.trim();\r\n if (in_code_block)\r\n {\r\n lines.push(new Line(value, 'code'))\r\n }\r\n else if (in_quote_block)\r\n {\r\n lines.push(new Line(value, 'quote'))\r\n }\r\n else if (trimmed.length === 0)\r\n {\r\n lines.push(new Line('', 'empty'));\r\n }\r\n // Titles :\r\n else if (trimmed[0] === '#')\r\n {\r\n lines.push(new Line(trimmed, 'title'));\r\n }\r\n // HR :\r\n else if ((trimmed.match(/-/g)||[]).length === trimmed.length)\r\n {\r\n lines.push(new Line('', 'separator'));\r\n }\r\n // Lists, line with the first non empty character is \"* \" or \"+ \" or \"- \" :\r\n else if (trimmed.substring(0, 2) === '* ')\r\n {\r\n lines.push(new Line(value, 'unordered_list'));\r\n }\r\n else if (trimmed.substring(0, 2) === '+ ')\r\n {\r\n lines.push(new Line(value, 'ordered_list'));\r\n }\r\n else if (trimmed.substring(0, 2) === '- ')\r\n {\r\n lines.push(new Line(value, 'reverse_list'));\r\n }\r\n // Keywords, line with the first non empty character is \"!\" :\r\n // var, const, include, require, css, html, comment\r\n else if (trimmed.startsWith('!var '))\r\n {\r\n lines.push(new Line(trimmed, 'var'));\r\n }\r\n else if (trimmed.startsWith('!const '))\r\n {\r\n lines.push(new Line(trimmed, 'const'));\r\n }\r\n else if (trimmed.startsWith('!include '))\r\n {\r\n lines.push(new Line(trimmed, 'include'));\r\n }\r\n else if (trimmed.startsWith('!require '))\r\n {\r\n lines.push(new Line(trimmed, 'require'));\r\n }\r\n else if (trimmed.startsWith('!css '))\r\n {\r\n lines.push(new Line(trimmed, 'css'));\r\n }\r\n else if (trimmed.startsWith('!html'))\r\n {\r\n lines.push(new Line(trimmed, 'html'));\r\n }\r\n else if (trimmed.substring(0, 2) === '//')\r\n {\r\n lines.push(new Line(trimmed, 'comment'));\r\n }\r\n // Block of code\r\n else if (trimmed.substring(0, 2) === '@@@')\r\n {\r\n in_code_block = !in_code_block;\r\n lines.push(new Line(value, 'code'))\r\n }\r\n else if (trimmed.substring(0, 2) === '@@' && trimmed.substring(trimmed.length-2, trimmed.length) !== '@@') // :TODO: Escaping @@ in code for Ruby. @@code@@ should be a <p> not a <pre>!\r\n {\r\n lines.push(new Line(value, 'code'));\r\n }\r\n // Block of quote\r\n else if (trimmed.substring(0, 2) === '>>>')\r\n {\r\n in_quote_block = !in_quote_block;\r\n lines.push(new Line(value, 'quote'))\r\n }\r\n else if (trimmed.substring(0, 2) === '>>')\r\n {\r\n lines.push(new Line(value, 'quote'));\r\n }\r\n // Labels\r\n else if (trimmed.substring(0, 2) === '::')\r\n {\r\n lines.push(new Line(trimmed, 'label'));\r\n }\r\n // Div (Si la ligne entière est {{ }}, c'est une div. On ne fait pas de span d'une ligne)\r\n else if (trimmed.substring(0, 2) === '{{' && trimmed.substring(trimmed.length - 2) === '}}')\r\n {\r\n lines.push(new Line(trimmed, 'div'));\r\n }\r\n // Tables\r\n else if (trimmed[0] === '|' && trimmed[trimmed.length - 1] === '|')\r\n {\r\n lines.push(new Line(trimmed, 'row'));\r\n }\r\n // Definition lists\r\n else if (trimmed.substring(0, 2) === '$ ')\r\n {\r\n lines.push(new Line(trimmed.substring(2), 'definition-header'));\r\n next_is_def = true;\r\n }\r\n else\r\n {\r\n if (!next_is_def)\r\n {\r\n lines.push(new Line(trimmed, 'text'));\r\n }\r\n else\r\n {\r\n lines.push(new Line(trimmed, 'definition-content'));\r\n next_is_def = false;\r\n }\r\n }\r\n }\r\n return lines;\r\n }", "function formatMultiDTab(textes) {\r\n\tlet textesArray = splitTextToArray(textes);\r\n\tlet newStringText = \"\";\r\n\tfor (let i = 0; i < textesArray.length; i++) {\r\n\t\tnewStringText = newStringText + \"\\n\" + reverseArrayIndex(textesArray[i]);\r\n\t}\r\n\treturn newStringText;\r\n}", "isTextFile(file) {\n let extensions = [\"doc\", \"docx\", \"odt\", \"pdf\", \"rtf\", \"txt\"];\n return extensions.includes(file.extension);\n }", "isStringUnIndentedCollectionItem() {\n return this.currentLine === '-' || this.currentLine.slice(0, 2) === '- ';\n }", "function is_node_block(node) {\n if (node.nodeType != 1)\n return false;\n return (Pattern.NodeName.line.test(node.nodeName) ||\n Pattern.NodeName.li.test(node.nodeName) ||\n Pattern.NodeName.pre.test(node.nodeName));\n }", "loadTableFromCSVFile(seperator){\n var seperator = this.csvSeperator;\n var firstLine = [];\n\n var indexTime = -1;\n var indexLow = -1;\n var indexHigh = -1;\n var indexOpen = -1;\n var indexClose = -1;\n var indexVolume = -1;\n\n var loadedIntervalls = [];\n\n fs.readFileSync(this.csvFilePath).toString().split('\\n').forEach(function (line) { \n \n var lineArray = line.split(seperator);\n\n if (firstLine.length == 0){\n\n indexTime = lineArray.indexOf(\"time\");\n indexLow = lineArray.indexOf(\"low\");\n indexHigh = lineArray.indexOf(\"high\");\n indexOpen = lineArray.indexOf(\"open\");\n indexClose = lineArray.indexOf(\"close\");\n indexVolume = lineArray.indexOf(\"volume\");\n\n //check availability needed gdax columns\n if ((indexTime != -1) && (indexLow != -1) && (indexHigh != -1) && (indexOpen != -1) && (indexClose != -1) && (indexVolume != -1) ){\n //continue\n firstLine = lineArray;\n }else{\n throw new Error(\"First line of csv needs to contain: time, low, high, open, close, volume. Additional columns are possible but will not be loaded!\");\n }\n \n }else{\n //add row by row to the TradeTable json object\n if (lineArray.length >=6){\n loadedIntervalls.push({ index: loadedIntervalls.length ,\n time: Number(lineArray[indexTime]), \n low: Number(lineArray[indexLow]), \n high: Number(lineArray[indexHigh]), \n open: Number(lineArray[indexOpen]), \n close: Number(lineArray[indexClose]), \n volume: Number(lineArray[indexVolume])});\n }\n\n \n }\n\n })\n\n this.data.intervalls = loadedIntervalls;\n }", "stringify(chunk) {\n var column, columns, containsEscape, containsQuote, containsRowDelimiter, containsdelimiter, csvrecord, delimiter, err, escape, field, header, i, j, l, len, m, options, quote, quoted, quotedMatch, quotedString, quoted_empty, quoted_match, quoted_string, record, record_delimiter, ref, ref1, regexp, shouldQuote, value;\n if (typeof chunk !== 'object') {\n return chunk;\n }\n ({columns, header} = this.options);\n record = [];\n // Record is an array\n if (Array.isArray(chunk)) {\n if (columns) {\n // We are getting an array but the user has specified output columns. In\n // this case, we respect the columns indexes\n chunk.splice(columns.length);\n }\n// Cast record elements\n for (i = j = 0, len = chunk.length; j < len; i = ++j) {\n field = chunk[i];\n [err, value] = this.__cast(field, {\n index: i,\n column: i,\n records: this.info.records,\n header: header && this.info.records === 0\n });\n if (err) {\n this.emit('error', err);\n return;\n }\n record[i] = [value, field];\n }\n } else {\n // Record is a literal object\n if (columns) {\n for (i = l = 0, ref = columns.length; (0 <= ref ? l < ref : l > ref); i = 0 <= ref ? ++l : --l) {\n field = get(chunk, columns[i].key);\n [err, value] = this.__cast(field, {\n index: i,\n column: columns[i].key,\n records: this.info.records,\n header: header && this.info.records === 0\n });\n if (err) {\n this.emit('error', err);\n return;\n }\n record[i] = [value, field];\n }\n } else {\n for (column in chunk) {\n field = chunk[column];\n [err, value] = this.__cast(field, {\n index: i,\n column: columns[i].key,\n records: this.info.records,\n header: header && this.info.records === 0\n });\n if (err) {\n this.emit('error', err);\n return;\n }\n record.push([value, field]);\n }\n }\n }\n csvrecord = '';\n for (i = m = 0, ref1 = record.length; (0 <= ref1 ? m < ref1 : m > ref1); i = 0 <= ref1 ? ++m : --m) {\n [value, field] = record[i];\n if (typeof value === 'string') {\n options = this.options;\n } else if (isObject(value)) {\n ({value, ...options} = value);\n if (!(typeof value === 'string' || value === void 0 || value === null)) {\n this.emit('error', Error(`Invalid Casting Value: returned value must return a string, null or undefined, got ${JSON.stringify(value)}`));\n return;\n }\n options = {...this.options, ...options};\n } else if (value === void 0 || value === null) {\n options = this.options;\n } else {\n this.emit('error', Error(`Invalid Casting Value: returned value must return a string, an object, null or undefined, got ${JSON.stringify(value)}`));\n return;\n }\n ({delimiter, escape, quote, quoted, quoted_empty, quoted_string, quoted_match, record_delimiter} = options);\n if (value) {\n if (typeof value !== 'string') {\n this.emit('error', Error(`Formatter must return a string, null or undefined, got ${JSON.stringify(value)}`));\n return null;\n }\n containsdelimiter = delimiter.length && value.indexOf(delimiter) >= 0;\n containsQuote = (quote !== '') && value.indexOf(quote) >= 0;\n containsEscape = value.indexOf(escape) >= 0 && (escape !== quote);\n containsRowDelimiter = value.indexOf(record_delimiter) >= 0;\n quotedString = quoted_string && typeof field === 'string';\n quotedMatch = quoted_match && typeof field === 'string' && quoted_match.filter(function(quoted_match) {\n if (typeof quoted_match === 'string') {\n return value.indexOf(quoted_match) !== -1;\n } else {\n return quoted_match.test(value);\n }\n });\n quotedMatch = quotedMatch && quotedMatch.length > 0;\n shouldQuote = containsQuote || containsdelimiter || containsRowDelimiter || quoted || quotedString || quotedMatch;\n if (shouldQuote && containsEscape) {\n regexp = escape === '\\\\' ? new RegExp(escape + escape, 'g') : new RegExp(escape, 'g');\n value = value.replace(regexp, escape + escape);\n }\n if (containsQuote) {\n regexp = new RegExp(quote, 'g');\n value = value.replace(regexp, escape + quote);\n }\n if (shouldQuote) {\n value = quote + value + quote;\n }\n csvrecord += value;\n } else if (quoted_empty || ((quoted_empty == null) && field === '' && quoted_string)) {\n csvrecord += quote + quote;\n }\n if (i !== record.length - 1) {\n csvrecord += delimiter;\n }\n }\n return csvrecord;\n }", "isThead() {\n return true\n }", "function processReorderConversion(){\n let reordered_tsv = reOrderTable(reorder_table,template_header,reorder_header);\n downloadTSV(reordered_tsv,`reordered_tsv.tsv`);\n \n }", "function printBlockString(value, isDescription) {\n var escaped = value.replace(/\"\"\"/g, '\\\\\"\"\"');\n return (value[0] === ' ' || value[0] === '\\t') && value.indexOf('\\n') === -1 ? '\"\"\"' + escaped.replace(/\"$/, '\"\\n') + '\"\"\"' : '\"\"\"\\n' + (isDescription ? escaped : indent(escaped)) + '\\n\"\"\"';\n }", "function isStatementOrBlock() {\n\t if (this.parentPath.isLabeledStatement() || t.isBlockStatement(this.container)) {\n\t return false;\n\t } else {\n\t return _lodashCollectionIncludes2[\"default\"](t.STATEMENT_OR_BLOCK_KEYS, this.key);\n\t }\n\t}", "function isStatementOrBlock() {\n\t if (this.parentPath.isLabeledStatement() || t.isBlockStatement(this.container)) {\n\t return false;\n\t } else {\n\t return _lodashCollectionIncludes2[\"default\"](t.STATEMENT_OR_BLOCK_KEYS, this.key);\n\t }\n\t}", "function isStatementOrBlock() {\n\t if (this.parentPath.isLabeledStatement() || t.isBlockStatement(this.container)) {\n\t return false;\n\t } else {\n\t return _lodashCollectionIncludes2[\"default\"](t.STATEMENT_OR_BLOCK_KEYS, this.key);\n\t }\n\t}", "function isStatementOrBlock() {\n\t if (this.parentPath.isLabeledStatement() || t.isBlockStatement(this.container)) {\n\t return false;\n\t } else {\n\t return _lodashCollectionIncludes2[\"default\"](t.STATEMENT_OR_BLOCK_KEYS, this.key);\n\t }\n\t}", "function isStatementOrBlock() {\n\t if (this.parentPath.isLabeledStatement() || t.isBlockStatement(this.container)) {\n\t return false;\n\t } else {\n\t return _lodashCollectionIncludes2[\"default\"](t.STATEMENT_OR_BLOCK_KEYS, this.key);\n\t }\n\t}", "_transform(chunk, encoding, callback) {\n var base, e;\n if (this.state.stop === true) {\n return;\n }\n // Chunk validation\n if (!(Array.isArray(chunk) || typeof chunk === 'object')) {\n this.state.stop = true;\n return callback(Error(`Invalid Record: expect an array or an object, got ${JSON.stringify(chunk)}`));\n }\n // Detect columns from the first record\n if (this.info.records === 0) {\n if (Array.isArray(chunk)) {\n if (this.options.header === true && !this.options.columns) {\n this.state.stop = true;\n return callback(Error('Undiscoverable Columns: header option requires column option or object records'));\n }\n } else {\n if ((base = this.options).columns == null) {\n base.columns = this.normalize_columns(Object.keys(chunk));\n }\n }\n }\n if (this.info.records === 0) {\n // Emit the header\n this.headers();\n }\n try {\n // Emit and stringify the record if an object or an array\n this.emit('record', chunk, this.info.records);\n } catch (error) {\n e = error;\n this.state.stop = true;\n return this.emit('error', e);\n }\n // Convert the record into a string\n if (this.options.eof) {\n chunk = this.stringify(chunk);\n if (chunk == null) {\n return;\n }\n chunk = chunk + this.options.record_delimiter;\n } else {\n chunk = this.stringify(chunk);\n if (chunk == null) {\n return;\n }\n if (this.options.header || this.info.records) {\n chunk = this.options.record_delimiter + chunk;\n }\n }\n // Emit the csv\n this.info.records++;\n this.push(chunk);\n return callback();\n }", "function hasTable(input)\n{\n\treturn (input.indexOf('<table>') != -1 && input.indexOf('</table>') != -1);\n}", "function trimTabs(data) {\n\tvar lines = data.split(/\\r?\\n/);\n\tvar output = \"\";\n\tfor (var i=0; i<lines.length; i++) {\n\t\tlet line = lines[i].replace(/\\t+$/, \"\");\n\t\tif (line.match(/^\\s*$/)) {\n\t\t\t// ignoring blank lines\n\t\t\tcontinue;\n\t\t}\n\t\tif (line.match(/^!!![^\\s]+:\\t/)) {\n\t\t\tline = line.replace(/\\t/, \" \");\n\t\t}\n\t\toutput += line + \"\\n\";\n\t}\n\treturn output;\n}", "function isStatementOrBlock() {\n if (this.parentPath.isLabeledStatement() || t.isBlockStatement(this.container)) {\n return false;\n } else {\n return _lodashCollectionIncludes2[\"default\"](t.STATEMENT_OR_BLOCK_KEYS, this.key);\n }\n}", "function impostaStanziamenti(importo, tabella) {\n \tvar anno = importo.annoCompetenza,\n tabellaStanziamenti = tabella.first().children(\"th\").slice(1);\n if(anno === parseInt(tabellaStanziamenti.eq(0).html(), 10)) {\n impostaDati(importo, 0);\n } else if (anno === parseInt(tabellaStanziamenti.eq(1).html(), 10)) {\n impostaDati(importo, 1);\n } else if (anno === parseInt(tabellaStanziamenti.eq(2).html(), 10)) {\n impostaDati(importo, 2);\n }\n }", "function isWikiTreeTurboJSON(element) {\n try {\n const o = JSON.parse(element.innerText);\n return o.hasOwnProperty('wikiTreeTurbo');\n }\n catch (err) {\n return false;\n }\n}", "function filaBuida(tr) {\n\tconsole.log(tr.children);\n\tfor (var i=0; i<tr.chidren.length; i++) {\n\t\tconsole.log(tr.children[i].textContent);\n\t\tif (tr.children[i].textContent.length > 0) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}", "function tsv2json(string) {\r\n let json = [];\r\n string = string.replace(/['\"]+/g, '');\r\n let array = string.split('\\n');\r\n let headers = array[0].split('\\t');\r\n for (var i = 1; i < array.length - 1; i++) {\r\n let data = array[i].split('\\t');\r\n let obj = {};\r\n for (var j = 0; j < data.length; j++) {\r\n obj[headers[j].trim()] = data[j].trim();\r\n }\r\n json.push(obj);\r\n }\r\n return json;\r\n}", "isTag(tag, lineMatchIndex, line) {\n let prevChar = line.charAt(lineMatchIndex - 1)\n let nextChar = line.charAt(lineMatchIndex + tag.length)\n\n if ((nextChar == ':' || nextChar == ']' || (this._config._whitespaceTagging && (nextChar == ' ' || nextChar == \"\\t\"))) && (prevChar !== '_')) {\n return true\n } else {\n return false\n }\n }", "_controlUploadFile(event) {\n let file = event.target.files[0];\n let fileName = file.name;\n let fileType = fileName.split(\".\")[fileName.split(\".\").length - 1];\n\n if(this.options.tableRender) {\n let table = this._componentRoot.querySelector('[data-component=\"table-custom\"]');\n\n if(table) {\n this._inputData = [];\n table.parentNode.removeChild(table);\n }\n\n this.options.tableRender = false;\n }\n\n let chooseFields = this._componentRoot.querySelector(\"#chooseFields\");\n\n if (chooseFields) {\n chooseFields.parentNode.removeChild(chooseFields);\n }\n\n if(fileType !== 'csv') {\n\n noty({\n text: 'Файл ' + fileName + ' некорректный, выберите корректный файл, формата csv.',\n type: 'error',\n timeout: 3000\n });\n\n return;\n\n } else {\n\n noty({\n text: 'Был выбран файл ' + fileName + '.',\n type: 'success',\n timeout: 3000\n });\n }\n\n this._parseCSV(event, file);\n }", "get type() {\n return typeof this._content == \"number\" ? exports.BlockType.Text :\n Array.isArray(this._content) ? this._content : this._content.type;\n }", "function printBlockString(value, isDescription) {\n var escaped = value.replace(/\"\"\"/g, '\\\\\"\"\"');\n return (value[0] === ' ' || value[0] === '\\t') && value.indexOf('\\n') === -1 ? \"\\\"\\\"\\\"\".concat(escaped.replace(/\"$/, '\"\\n'), \"\\\"\\\"\\\"\") : \"\\\"\\\"\\\"\\n\".concat(isDescription ? escaped : indent(escaped), \"\\n\\\"\\\"\\\"\");\n}", "function isInlineTemplate(tNode) {\n return tNode.type === 4\n /* Container */\n && tNode.value !== NG_TEMPLATE_SELECTOR;\n }", "function isInlineTemplate(tNode) {\n return tNode.type === 4 /* Container */ && tNode.value !== NG_TEMPLATE_SELECTOR;\n}", "function isInlineTemplate(tNode) {\n return tNode.type === 4 /* Container */ && tNode.value !== NG_TEMPLATE_SELECTOR;\n}", "function isInlineTemplate(tNode) {\n return tNode.type === 4 /* Container */ && tNode.value !== NG_TEMPLATE_SELECTOR;\n}", "function isInlineTemplate(tNode) {\n return tNode.type === 4 /* Container */ && tNode.value !== NG_TEMPLATE_SELECTOR;\n}", "function isInlineTemplate(tNode) {\n return tNode.type === 4 /* Container */ && tNode.value !== NG_TEMPLATE_SELECTOR;\n}", "function isInlineTemplate(tNode) {\n return tNode.type === 4 /* Container */ && tNode.value !== NG_TEMPLATE_SELECTOR;\n}", "function getBlockStyle(block) {\n const type = block.getType()\n if(type.indexOf('text-align-') === 0) return type\n return null\n}", "blockToTree(p) {\n\t\tlet point = p.clone();\n\t\tconst oldY = p.y;\n\t\tlet bottom;\n\t\tlet top;\n\t\twhile (!bottom) {\n\t\t\tpoint.subtract(new Vec3(0, 1, 0));\n\t\t\tlet block = this.bot.blockAt(point);\n\t\t\tif (!block.name.match(/_log$/)) {\n\t\t\t\tif (block.name === 'dirt') {\n\t\t\t\t\tbottom = block.position.clone().add(new Vec3(0, 1, 0));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t//console.log(`Block: ${p} is not a tree because it does not have dirt below it's base`);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tpoint.y = oldY;\n\t\twhile (!top) {\n\t\t\tpoint.add(new Vec3(0, 1, 0));\n\t\t\tconst block = this.bot.blockAt(point);\n\t\t\tif (!block.name.match(/_log$/)) {\n\t\t\t\tif (block.name.match(/_leaves$/)) {\n\t\t\t\t\ttop = point.clone().subtract(new Vec3(0, 1, 0));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t//console.log(`Block: ${p} is not a tree because it does not have leaves above it's top`);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tconst tree = Array();\n\t\tfor (var i = bottom.y; i <= top.y; i++) {\n\t\t\tconst block = this.bot.blockAt(new Vec3(bottom.x, i, bottom.z));\n\t\t\ttree.push(block);\n\t\t}\n\t\treturn tree;\n\t}", "identify() {\n let output = this.default;\n let hasQuotes = false;\n let hasNoQuotes = false;\n\n // Determine if any have quotes\n this.objectBlocks.forEach(block => {\n if (!hasQuotes) {\n hasQuotes = !!block.match(/['\"]\\s*:/);\n }\n\n if (!hasNoQuotes) {\n hasNoQuotes = !!block.match(/[^'\"]\\s*:/);\n }\n });\n\n // Set consistent if we don't mix quotes\n if ((!hasQuotes && hasNoQuotes) || (hasQuotes && !hasNoQuotes)) {\n output = 'consistent';\n }\n\n return output;\n }", "function parse_TxO(blob, length, opts) {\n var s = blob.l;\n var texts = \"\";\n\n try {\n blob.l += 4;\n var ot = (opts.lastobj || {\n cmo: [0, 0]\n }).cmo[1];\n var controlInfo; // eslint-disable-line no-unused-vars\n\n if ([0, 5, 7, 11, 12, 14].indexOf(ot) == -1) blob.l += 6;else controlInfo = parse_ControlInfo(blob, 6, opts);\n var cchText = blob.read_shift(2);\n /*var cbRuns = */\n\n blob.read_shift(2);\n /*var ifntEmpty = */\n\n parseuint16(blob, 2);\n var len = blob.read_shift(2);\n blob.l += len; //var fmla = parse_ObjFmla(blob, s + length - blob.l);\n\n for (var i = 1; i < blob.lens.length - 1; ++i) {\n if (blob.l - s != blob.lens[i]) throw new Error(\"TxO: bad continue record\");\n var hdr = blob[blob.l];\n var t = parse_XLUnicodeStringNoCch(blob, blob.lens[i + 1] - blob.lens[i] - 1);\n texts += t;\n if (texts.length >= (hdr ? cchText : 2 * cchText)) break;\n }\n\n if (texts.length !== cchText && texts.length !== cchText * 2) {\n throw new Error(\"cchText: \" + cchText + \" != \" + texts.length);\n }\n\n blob.l = s + length;\n /* [MS-XLS] 2.5.272 TxORuns */\n //\tvar rgTxoRuns = [];\n //\tfor(var j = 0; j != cbRuns/8-1; ++j) blob.l += 8;\n //\tvar cchText2 = blob.read_shift(2);\n //\tif(cchText2 !== cchText) throw new Error(\"TxOLastRun mismatch: \" + cchText2 + \" \" + cchText);\n //\tblob.l += 6;\n //\tif(s + length != blob.l) throw new Error(\"TxO \" + (s + length) + \", at \" + blob.l);\n\n return {\n t: texts\n };\n } catch (e) {\n blob.l = s + length;\n return {\n t: texts\n };\n }\n }", "function isSingleOutput(csvhead) {\r\n var singlenums = 0;\r\n for (var key in csvhead[0]) {\r\n if (csvhead[0][key] == 'single') {\r\n ++singlenums;\r\n }\r\n }\r\n\r\n return singlenums == 1;\r\n}", "function checkFileType(file, cb) {\n const filetypes = /csv/;\n const extname = filetypes.test(path.extname(file.originalname).toLocaleLowerCase());\n const mimetype = filetypes.test(file.mimetype);\n\n if (mimetype && extname){\n return cb(null, true);\n }else{\n cb('Error: CSV Files only');\n }\n}", "function printBlockString(value, isDescription) {\n var escaped = value.replace(/\"\"\"/g, '\\\\\"\"\"');\n return (value[0] === ' ' || value[0] === '\\t') && value.indexOf('\\n') === -1 ? '\"\"\"' + escaped.replace(/\"$/, '\"\\n') + '\"\"\"' : '\"\"\"\\n' + (isDescription ? escaped : indent(escaped)) + '\\n\"\"\"';\n}", "function printBlockString(value, isDescription) {\n var escaped = value.replace(/\"\"\"/g, '\\\\\"\"\"');\n return (value[0] === ' ' || value[0] === '\\t') && value.indexOf('\\n') === -1 ? '\"\"\"' + escaped.replace(/\"$/, '\"\\n') + '\"\"\"' : '\"\"\"\\n' + (isDescription ? escaped : indent(escaped)) + '\\n\"\"\"';\n}", "function printBlockString(value, isDescription) {\n var escaped = value.replace(/\"\"\"/g, '\\\\\"\"\"');\n return (value[0] === ' ' || value[0] === '\\t') && value.indexOf('\\n') === -1 ? '\"\"\"' + escaped.replace(/\"$/, '\"\\n') + '\"\"\"' : '\"\"\"\\n' + (isDescription ? escaped : indent(escaped)) + '\\n\"\"\"';\n}", "function printBlockString(value, isDescription) {\n var escaped = value.replace(/\"\"\"/g, '\\\\\"\"\"');\n return (value[0] === ' ' || value[0] === '\\t') && value.indexOf('\\n') === -1 ? '\"\"\"' + escaped.replace(/\"$/, '\"\\n') + '\"\"\"' : '\"\"\"\\n' + (isDescription ? escaped : indent(escaped)) + '\\n\"\"\"';\n}", "function printBlockString(value, isDescription) {\n var escaped = value.replace(/\"\"\"/g, '\\\\\"\"\"');\n return (value[0] === ' ' || value[0] === '\\t') && value.indexOf('\\n') === -1 ? '\"\"\"' + escaped.replace(/\"$/, '\"\\n') + '\"\"\"' : '\"\"\"\\n' + (isDescription ? escaped : indent(escaped)) + '\\n\"\"\"';\n}", "function isInlineTemplate(tNode) {\n return tNode.type === 4\n /* Container */\n && tNode.value !== NG_TEMPLATE_SELECTOR;\n}" ]
[ "0.8859122", "0.8845361", "0.88139796", "0.88139796", "0.87741005", "0.60407025", "0.5190595", "0.5138938", "0.50869346", "0.50047666", "0.4966861", "0.4956511", "0.49283457", "0.4926797", "0.49011958", "0.49008223", "0.48291752", "0.4825572", "0.48156893", "0.48068026", "0.4762295", "0.47622553", "0.47584796", "0.4758284", "0.47018436", "0.46605614", "0.46585336", "0.46497816", "0.46455517", "0.45798063", "0.45588118", "0.45483378", "0.4540758", "0.45277497", "0.4524823", "0.45197693", "0.44993928", "0.44931686", "0.44649318", "0.44533098", "0.44473606", "0.4441786", "0.44390595", "0.44218835", "0.44218835", "0.44218835", "0.43989822", "0.4398534", "0.43920135", "0.4385844", "0.43858045", "0.43849078", "0.4378184", "0.43715328", "0.43467543", "0.43428147", "0.43418846", "0.4339475", "0.4339475", "0.4339475", "0.4339475", "0.4339475", "0.43342447", "0.43110368", "0.43102944", "0.43100482", "0.430757", "0.43068117", "0.4306103", "0.43031627", "0.43023103", "0.4300174", "0.42935055", "0.42911908", "0.42826542", "0.42810342", "0.42810342", "0.42810342", "0.42810342", "0.42810342", "0.42810342", "0.42807367", "0.4277868", "0.42761943", "0.42754477", "0.42682362", "0.4257495", "0.42563403", "0.42563403", "0.42563403", "0.42563403", "0.42563403", "0.4255048" ]
0.8741611
11
globals __VUE_SSR_CONTEXT__ IMPORTANT: Do NOT use ES2015 features in this file (except for modules). This module is a runtime utility for cleaner component module output and will be included in the final webpack user bundle.
function normalizeComponent ( scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, /* server only */ shadowMode /* vue-cli only */ ) { // Vue.extend constructor export interop var options = typeof scriptExports === 'function' ? scriptExports.options : scriptExports // render functions if (render) { options.render = render options.staticRenderFns = staticRenderFns options._compiled = true } // functional template if (functionalTemplate) { options.functional = true } // scopedId if (scopeId) { options._scopeId = 'data-v-' + scopeId } var hook if (moduleIdentifier) { // server build hook = function (context) { // 2.3 injection context = context || // cached call (this.$vnode && this.$vnode.ssrContext) || // stateful (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional // 2.2 with runInNewContext: true if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { context = __VUE_SSR_CONTEXT__ } // inject component styles if (injectStyles) { injectStyles.call(this, context) } // register component module identifier for async chunk inferrence if (context && context._registeredComponents) { context._registeredComponents.add(moduleIdentifier) } } // used by ssr in case component is cached and beforeCreate // never gets called options._ssrRegister = hook } else if (injectStyles) { hook = shadowMode ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) } : injectStyles } if (hook) { if (options.functional) { // for template-only hot-reload because in that case the render fn doesn't // go through the normalizer options._injectStyles = hook // register for functioal component in vue file var originalRender = options.render options.render = function renderWithStyleInjection (h, context) { hook.call(context) return originalRender(h, context) } } else { // inject component registration as beforeCreate hook var existing = options.beforeCreate options.beforeCreate = existing ? [].concat(existing, hook) : [hook] } } return { exports: scriptExports, options: options } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Es(t,e,n,i,r,o,a,s){var u=(\"function\"===typeof n?n.options:n)||{};return u.__file=\"source.vue\",u.render||(u.render=t.render,u.staticRenderFns=t.staticRenderFns,u._compiled=!0,r&&(u.functional=!0)),u._scopeId=i,u}", "extend(config, ctx) {\n // if (process.server && process.browser) {\n if (ctx.isDev && ctx.isClient) {\n config.devtool = \"source-map\";\n // if (isDev && process.isClient) {\n config.plugins.push(\n new StylelintPlugin({\n files: [\"**/*.vue\", \"**/*.scss\"],\n })\n ),\n config.module.rules.push({\n enforce: \"pre\",\n test: /\\.(js|vue)$/,\n loader: \"eslint-loader\",\n exclude: /(node_modules)/,\n options: {\n formatter: require(\"eslint-friendly-formatter\"),\n },\n });\n if (ctx.isDev) {\n config.mode = \"development\";\n }\n }\n for (const rule of config.module.rules) {\n if (rule.use) {\n for (const use of rule.use) {\n if (use.loader === \"sass-loader\") {\n use.options = use.options || {};\n use.options.includePaths = [\n \"node_modules/foundation-sites/scss\",\n \"node_modules/motion-ui/src\",\n ];\n }\n }\n }\n }\n // vue-svg-inline-loader\n const vueRule = config.module.rules.find((rule) =>\n rule.test.test(\".vue\")\n );\n vueRule.use = [\n {\n loader: vueRule.loader,\n options: vueRule.options,\n },\n {\n loader: \"vue-svg-inline-loader\",\n },\n ];\n delete vueRule.loader;\n delete vueRule.options;\n }", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}", "function normalizeComponent (\n scriptExports,\n render,\n staticRenderFns,\n functionalTemplate,\n injectStyles,\n scopeId,\n moduleIdentifier, /* server only */\n shadowMode, /* vue-cli only */\n components, // fixed by xxxxxx auto components\n renderjs // fixed by xxxxxx renderjs\n) {\n // Vue.extend constructor export interop\n var options = typeof scriptExports === 'function'\n ? scriptExports.options\n : scriptExports\n\n // fixed by xxxxxx auto components\n if (components) {\n if (!options.components) {\n options.components = {}\n }\n var hasOwn = Object.prototype.hasOwnProperty\n for (var name in components) {\n if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {\n options.components[name] = components[name]\n }\n }\n }\n // fixed by xxxxxx renderjs\n if (renderjs) {\n (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {\n this[renderjs.__module] = this\n });\n (options.mixins || (options.mixins = [])).push(renderjs)\n }\n\n // render functions\n if (render) {\n options.render = render\n options.staticRenderFns = staticRenderFns\n options._compiled = true\n }\n\n // functional template\n if (functionalTemplate) {\n options.functional = true\n }\n\n // scopedId\n if (scopeId) {\n options._scopeId = 'data-v-' + scopeId\n }\n\n var hook\n if (moduleIdentifier) { // server build\n hook = function (context) {\n // 2.3 injection\n context =\n context || // cached call\n (this.$vnode && this.$vnode.ssrContext) || // stateful\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional\n // 2.2 with runInNewContext: true\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\n context = __VUE_SSR_CONTEXT__\n }\n // inject component styles\n if (injectStyles) {\n injectStyles.call(this, context)\n }\n // register component module identifier for async chunk inferrence\n if (context && context._registeredComponents) {\n context._registeredComponents.add(moduleIdentifier)\n }\n }\n // used by ssr in case component is cached and beforeCreate\n // never gets called\n options._ssrRegister = hook\n } else if (injectStyles) {\n hook = shadowMode\n ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }\n : injectStyles\n }\n\n if (hook) {\n if (options.functional) {\n // for template-only hot-reload because in that case the render fn doesn't\n // go through the normalizer\n options._injectStyles = hook\n // register for functioal component in vue file\n var originalRender = options.render\n options.render = function renderWithStyleInjection (h, context) {\n hook.call(context)\n return originalRender(h, context)\n }\n } else {\n // inject component registration as beforeCreate hook\n var existing = options.beforeCreate\n options.beforeCreate = existing\n ? [].concat(existing, hook)\n : [hook]\n }\n }\n\n return {\n exports: scriptExports,\n options: options\n }\n}" ]
[ "0.58472276", "0.5728634", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396", "0.57257396" ]
0.0
-1
Safely get global scope object
function getGlobalObject() { return (Object(_node__WEBPACK_IMPORTED_MODULE_0__[/* isNodeEnv */ "b"])() ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : fallbackGlobalObject); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getGlobalObject() {\r\n return isNodeEnv() ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : fallbackGlobalObject;\r\n}", "function getGlobalObject() {\r\n return (isNodeEnv()\r\n ? global\r\n : typeof window !== 'undefined'\r\n ? window\r\n : typeof self !== 'undefined'\r\n ? self\r\n : fallbackGlobalObject);\r\n}", "function getGlobalObject() {\n return isNodeEnv() ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {};\n}", "function getGlobalObject() {\n return (node_1.isNodeEnv()\n ? global\n : typeof window !== 'undefined' // eslint-disable-line no-restricted-globals\n ? window // eslint-disable-line no-restricted-globals\n : typeof self !== 'undefined'\n ? self\n : fallbackGlobalObject);\n}", "function getGlobalObject() {\n return (isNodeEnv()\n ? global\n : typeof window !== 'undefined'\n ? window\n : typeof self !== 'undefined'\n ? self\n : fallbackGlobalObject);\n}", "function getGlobal() {\n if (typeof self !== 'undefined') {\n return self;\n }\n if (typeof window !== 'undefined') {\n return window;\n }\n if (typeof global !== 'undefined') {\n return global;\n }\n throw new Error('Unable to locate global object.');\n}", "get UseGlobal() {}", "function getGlobal() {\n if (typeof self !== 'undefined') {\n return self;\n }\n if (typeof window !== 'undefined') {\n return window;\n }\n if (typeof __webpack_require__.g !== 'undefined') {\n return __webpack_require__.g;\n }\n throw new Error('Unable to locate global object.');\n}", "function getGlobal() {\r\n if (typeof self !== 'undefined') {\r\n return self;\r\n }\r\n if (typeof window !== 'undefined') {\r\n return window;\r\n }\r\n if (typeof __webpack_require__.g !== 'undefined') {\r\n return __webpack_require__.g;\r\n }\r\n throw new Error('Unable to locate global object.');\r\n}", "function getGlobal() {\n return this;\n}", "getScope() {}", "function scope(){\n \n var localScope = 'LOCALSCOPE';\n\n console.log ( globalScope );\n\n return localScope;\n\n}", "function getGlobalObject() {\n return self;\n }", "function getGlobalObject() {\n return self;\n }", "get global() {\n return globals;\n }", "getParentScope() {\n let scope;\n //use the global scope if we didn't find a sope and this is not the global scope\n if (this.program.globalScope !== this) {\n scope = this.program.globalScope;\n }\n if (scope) {\n return scope;\n }\n else {\n //passing null to the cache allows it to skip the factory function in the future\n return null;\n }\n }", "function getGlobal() {\n if (typeof globalThis !== 'undefined') {\n return globalThis;\n }\n if (typeof global !== 'undefined') {\n return global;\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore: Cannot find name 'window'.\n if (typeof window !== 'undefined') {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore: Cannot find name 'window'.\n return window;\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore: Cannot find name 'self'.\n if (typeof self !== 'undefined') {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore: Cannot find name 'self'.\n return self;\n }\n}", "function getGlobal() {\n if (typeof globalThis !== 'undefined') {\n return globalThis;\n }\n if (typeof global !== 'undefined') {\n return global;\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore: Cannot find name 'window'.\n if (typeof window !== 'undefined') {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore: Cannot find name 'window'.\n return window;\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore: Cannot find name 'self'.\n if (typeof self !== 'undefined') {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore: Cannot find name 'self'.\n return self;\n }\n}", "function getGlobal() {\n if (typeof globalThis !== 'undefined') {\n return globalThis;\n }\n if (typeof global !== 'undefined') {\n return global;\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore: Cannot find name 'window'.\n if (typeof window !== 'undefined') {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore: Cannot find name 'window'.\n return window;\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore: Cannot find name 'self'.\n if (typeof self !== 'undefined') {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore: Cannot find name 'self'.\n return self;\n }\n}", "function checkscope() {\n\tvar scope = \"local\"; // Declare a local variable with the same name\n\treturn scope; // Return the local value, not the global one\n}", "function h$getGlobal(that) {\n if(typeof global !== 'undefined') return global;\n return that;\n}", "function checkscope() {\n var scope = \"local\"; // Here we overwrite the variable, scope now is \"local\".\n return scope;\n}", "function getGlobal() {\n console.log(this);\n}", "function selfish() {\n let localScope = 'you cant get me!'\n}", "function getGlobal(e){if(!e)return e;var t=global;return each(e.split(\".\"),function(e){t=t[e]}),t}", "function globalScope() {\n console.log(outer); // 'I am from outer global scope'\n}", "function createFreshScope() {\n return {\n level: 1,\n self: null,\n locals: {},\n localPresent: {},\n streams: {},\n blocks: {}\n };\n}", "function __loadGlobals(){\n if($rootScope.globals === void 0 || typeof $rootScope.globals == 'undefined'){\n //@todo test if we can get globals from localStorage\n $http({url:'config/server_api.json', method:'GET'})\n .then(function successCallback(response) {\n $rootScope.server_api = response.data;\n });\n }\n }", "function DefaultScope() {}", "function isGlobalScope() {\n return !context.getScope().upper;\n }", "function GScope() {\n this.globalOne = 'Global Scope';\n\n toExport.globalScopeArrow = () => this;\n\n toExport.globalObject = {\n globalMethod: () => this,\n objectMethod: function () {\n return this;\n },\n bindGlobalMethod: function () {\n return toExport.globalScopeArrow.bind(toExport.globalObject)();\n }\n };\n}", "function getGlobal() {\n var moduleGlobal = {};\n\n for (var g in jspm.global) {\n if (jspm.global.hasOwnProperty(g) && g != 'window' && globalObj[g] != jspm.global[g])\n moduleGlobal[g] = jspm.global[g];\n }\n return moduleGlobal;\n }", "function getAngularJSGlobal() {\n return angular;\n}", "function addToGlobalScope() {\n var shell = require('./shell');\n for (var i in shell) {\n if (shell.hasOwnProperty(i)) {\n global[i] = shell[i];\n }\n }\n}", "function fnGlobalObject() {\n return this\n}", "get global() {\n //> 1. Let loader be this Loader.\n //> 1. If Type(loader) is not Object or loader does not have all the\n //> internal properties of a Loader object, throw a TypeError\n //> exception.\n if (!IsObject(this) ||\n !callFunction(std_WeakMap_has, loaderInternalDataMap, this))\n {\n throw std_TypeError(\"not a Loader object\");\n }\n\n //> 1. Return loader.[[Realm]].[[globalThis]].\n return GetLoaderInternalData(this).realm.globalThis;\n }", "function WindowGlobal = function() {\n return this\n }", "function mockGlobalScope() {\n Object.assign(global, { __STATIC_CONTENT_MANIFEST: (0, exports.mockManifest)() });\n Object.assign(global, { __STATIC_CONTENT: (0, exports.mockKV)(store) });\n}", "function checkscope2() {\n\t var scope = \"Local\";\n\t function nested() {\n\t\t var scope = \"nested\";\n\t\t return scope;\n\t }\n\t return nested();\n }", "get global() {\n //> 1. Let realmObject be this Realm object.\n //> 1. If Type(realmObject) is not Object or realmObject does not have\n //> all the internal properties of a Realm object, throw a\n //> TypeError exception.\n let realmData = GetRealmInternalData(this);\n\n //> 1. Return realmObject.[[Realm]].[[globalThis]].\n return realmData.realm.globalThis;\n }", "function globalize(env){\n\tif( !env){\n\t\tenv= require( \".\")\n\t}\n\tfor( var i in env){\n\t\tglobal[ i]= env[i]\n\t}\n\treturn global\n}", "function So() {\n // `window` is not always available, e.g. in ReactNative and WebWorkers.\n // eslint-disable-next-line no-restricted-globals\n return \"undefined\" != typeof window ? window : null;\n}", "function checkscope2() {\n\tscope = \"local\"; // Oops! We just changed the global variable.\n\tmyscope = \"local\"; // This implicitly declares a new global variable.\n\treturn [ scope, myscope ]; // Return two values.\n}", "get globalTop () {\n return this.global && this.parent.isRoot\n }", "function getNockScope(url, status){\r\n return nockScope('GET', url, status);\r\n}", "function checkGlobal(value) {\n return value && value.Object === Object ? value : undefined;\n}", "function checkGlobal(value) {\n return value && value.Object === Object ? value : undefined;\n}", "function checkGlobal(value) {\n return value && value.Object === Object ? value : undefined;\n }", "function checkGlobal(value) {\n return value && value.Object === Object ? value : undefined;\n }", "function checkGlobal(value) {\n return value && value.Object === Object ? value : undefined;\n }", "function checkGlobal(value) {\n return value && value.Object === Object ? value : undefined;\n }", "function checkGlobal(value) {\n return value && value.Object === Object ? value : undefined;\n }", "function checkGlobal(value) {\n return value && value.Object === Object ? value : undefined;\n }", "function getStaticContext(bind, scope) {\n var object = bind.object || bind.callee.object;\n return scope.isStatic(object) && object;\n}", "static async getGlobal() {\n const envQ = new Parse.Query('Environment');\n\n return await envQ.first({ useMasterKey: true });\n }", "function getStaticContext(bind, scope) {\n\t var object = bind.object || bind.callee.object;\n\t return scope.isStatic(object) && object;\n\t}", "function getStaticContext(bind, scope) {\n\t var object = bind.object || bind.callee.object;\n\t return scope.isStatic(object) && object;\n\t}", "function getGlobal(key, init) {\n const globalMap = getGlobalMap();\n if (globalMap.has(key)) {\n return globalMap.get(key);\n }\n else {\n const singleton = init();\n globalMap.set(key, singleton);\n return globalMap.get(key);\n }\n}", "function getThis() {\n console.log(this); //undefined in strict mode but Window\n}", "function getGlobal(value) {\n if (!value) {\n return value;\n }\n var g = global;\n each(value.split('.'), function (part) {\n g = g[part];\n });\n return g;\n }", "function getGlobal(value) {\n if (!value) {\n return value;\n }\n var g = global;\n each(value.split('.'), function (part) {\n g = g[part];\n });\n return g;\n }", "function getGlobal(value) {\n if (!value) {\n return value;\n }\n var g = global;\n each(value.split('.'), function (part) {\n g = g[part];\n });\n return g;\n }", "function getGlobal(value) {\n if (!value) {\n return value;\n }\n var g = global;\n each(value.split('.'), function (part) {\n g = g[part];\n });\n return g;\n }", "function getGlobal(value) {\n if (!value) {\n return value;\n }\n var g = global;\n each(value.split('.'), function (part) {\n g = g[part];\n });\n return g;\n }", "function getGlobal(value) {\n if (!value) {\n return value;\n }\n var g = global;\n each(value.split('.'), function (part) {\n g = g[part];\n });\n return g;\n }", "function getGlobal(value) {\n if (!value) {\n return value;\n }\n var g = global;\n each(value.split('.'), function (part) {\n g = g[part];\n });\n return g;\n }", "function getGlobal(value) {\n if (!value) {\n return value;\n }\n var g = global;\n each(value.split('.'), function (part) {\n g = g[part];\n });\n return g;\n }", "function getGlobal(value) {\n if (!value) {\n return value;\n }\n var g = global;\n each(value.split('.'), function (part) {\n g = g[part];\n });\n return g;\n }", "function getGlobal(value) {\n if (!value) {\n return value;\n }\n var g = global;\n each(value.split('.'), function (part) {\n g = g[part];\n });\n return g;\n }", "function getGlobal(value) {\n if (!value) {\n return value;\n }\n var g = global;\n each(value.split('.'), function (part) {\n g = g[part];\n });\n return g;\n }", "function getGlobal(value) {\n if (!value) {\n return value;\n }\n var g = global;\n each(value.split('.'), function (part) {\n g = g[part];\n });\n return g;\n }", "function getGlobal(value) {\n if (!value) {\n return value;\n }\n var g = global;\n each(value.split('.'), function (part) {\n g = g[part];\n });\n return g;\n }", "function getGlobal(value) {\n if (!value) {\n return value;\n }\n var g = global;\n each(value.split('.'), function (part) {\n g = g[part];\n });\n return g;\n }", "function getGlobal(value) {\n if (!value) {\n return value;\n }\n var g = global;\n each(value.split('.'), function (part) {\n g = g[part];\n });\n return g;\n }", "function getGlobal(value) {\n if (!value) {\n return value;\n }\n var g = global;\n each(value.split('.'), function (part) {\n g = g[part];\n });\n return g;\n }", "function getGlobal(value) {\n if (!value) {\n return value;\n }\n var g = global;\n each(value.split('.'), function (part) {\n g = g[part];\n });\n return g;\n }", "function getGlobal(value) {\n if (!value) {\n return value;\n }\n var g = global;\n each(value.split('.'), function (part) {\n g = g[part];\n });\n return g;\n }", "function getGlobal(value) {\n if (!value) {\n return value;\n }\n var g = global;\n each(value.split('.'), function (part) {\n g = g[part];\n });\n return g;\n }", "function getGlobal(value) {\n if (!value) {\n return value;\n }\n var g = global;\n each(value.split('.'), function (part) {\n g = g[part];\n });\n return g;\n }", "function getGlobal(value) {\n if (!value) {\n return value;\n }\n var g = global;\n each(value.split('.'), function (part) {\n g = g[part];\n });\n return g;\n }", "function globalBinding() {\n console.log(this); //points to the window object\n}", "function checkScope() {\n var myVars = 'local'; // Declare a local variable\n console.log(myVars);\n}", "getObjScope(item) {\n\t\tif (this.$scope[item] !== undefined) {\n\t\t\treturn this.$scope;\n\t\t} else if (this.$scope.$root && this.$scope.$root[item] !== undefined) {\n\t\t\treturn this.$scope.$root;\n\t\t} else if (this.$powerUi[item] !== undefined) {\n\t\t\treturn this.$powerUi;\n\t\t} else {\n\t\t\treturn undefined;\n\t\t}\n\t}", "function getScopeNode(elem) {\n\t\tvar $this = (elem instanceof jQuery) ? elem : $(elem);\n\t\twhile ($this != null && $this.length != 0 && $this[0] != window) {\n\t\t\tif ($this.attr(SCOPE)) return $this;\n\t\t\t$this = $this.parent();\n\t\t}\n\t\treturn null;\n\t}", "function global(binding){\n console.log(this)\n return binding;\n}", "function lisp_js_global(name) {\n lisp_assert(lisp_is_instance(name, Lisp_String));\n return window[lisp_string_native_string(name)];\n}", "function ThreadLocalGet() {\r\n}", "function getGlobal() {\n return $http.get('/api/core/global');\n }", "function jsonpCallbackContext() {\n if (typeof window === 'object') {\n return window;\n }\n return {};\n}", "function jsonpCallbackContext() {\n if (typeof window === 'object') {\n return window;\n }\n return {};\n}", "function jsonpCallbackContext() {\n if (typeof window === 'object') {\n return window;\n }\n return {};\n}", "function jsonpCallbackContext() {\n if (typeof window === 'object') {\n return window;\n }\n return {};\n}", "function jsonpCallbackContext() {\n if (typeof window === 'object') {\n return window;\n }\n return {};\n}", "function jsonpCallbackContext() {\n if (typeof window === 'object') {\n return window;\n }\n return {};\n}", "function jsonpCallbackContext() {\n if (typeof window === 'object') {\n return window;\n }\n return {};\n}", "function jsonpCallbackContext() {\n if (typeof window === 'object') {\n return window;\n }\n return {};\n}", "function jsonpCallbackContext() {\n if (typeof window === 'object') {\n return window;\n }\n return {};\n}", "function jsonpCallbackContext() {\n if (typeof window === 'object') {\n return window;\n }\n return {};\n}", "function jsonpCallbackContext() {\n if (typeof window === 'object') {\n return window;\n }\n return {};\n}", "function jsonpCallbackContext() {\n if (typeof window === 'object') {\n return window;\n }\n return {};\n}" ]
[ "0.7222374", "0.72033703", "0.72008914", "0.71630025", "0.71455836", "0.7140292", "0.69974977", "0.6996896", "0.69739324", "0.69653744", "0.6890241", "0.6863302", "0.68451947", "0.68451947", "0.6792176", "0.67782426", "0.66768926", "0.66768926", "0.66768926", "0.66750854", "0.6593303", "0.6463936", "0.6414458", "0.6382626", "0.6371345", "0.6365017", "0.634348", "0.63265634", "0.632172", "0.62992316", "0.625343", "0.6231428", "0.621143", "0.62010825", "0.6187859", "0.61740327", "0.61047846", "0.59748733", "0.5964634", "0.5925211", "0.5912405", "0.5911727", "0.59111047", "0.5899641", "0.5897558", "0.5873002", "0.5873002", "0.58354515", "0.58354515", "0.58354515", "0.58354515", "0.58354515", "0.58354515", "0.5822066", "0.5805168", "0.5800478", "0.5800478", "0.579726", "0.5795973", "0.5771682", "0.5771682", "0.5771682", "0.5771682", "0.5771682", "0.5771682", "0.5771682", "0.5771682", "0.5771682", "0.5771682", "0.5771682", "0.5771682", "0.5771682", "0.5771682", "0.5771682", "0.5771682", "0.5771682", "0.5771682", "0.5771682", "0.5771682", "0.5771682", "0.57619303", "0.57610327", "0.5753973", "0.57072574", "0.5706697", "0.57052034", "0.5683217", "0.5668591", "0.56637365", "0.56637365", "0.56637365", "0.56637365", "0.56637365", "0.56637365", "0.56637365", "0.56637365", "0.56637365", "0.56637365", "0.56637365", "0.56637365" ]
0.6972616
9
Parses string form of URL into an object // borrowed from // intentionally using regex and not href parsing trick because React Native and other // environments where DOM might not be available
function parseUrl(url) { if (!url) { return {}; } var match = url.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/); if (!match) { return {}; } // coerce to undefined values to empty string so we don't get 'undefined' var query = match[6] || ''; var fragment = match[8] || ''; return { host: match[4], path: match[5], protocol: match[2], relative: match[5] + query + fragment, }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseURL(str) {\n let fullObject;\n if (typeof FastBoot === 'undefined') {\n const element = document.createElement('a');\n element.href = str;\n fullObject = element;\n } else {\n fullObject = FastBoot.require('url').parse(str);\n }\n const desiredProps = {\n href: fullObject.href,\n protocol: fullObject.protocol,\n hostname: fullObject.hostname,\n port: fullObject.port,\n pathname: fullObject.pathname,\n search: fullObject.search,\n hash: fullObject.hash\n };\n return desiredProps;\n }", "function parseUri(url) {\r\n\t\tvar match = String(url).replace(/^\\s+|\\s+$/g, '').match(/^([^:\\/?#]+:)?(\\/\\/(?:[^:@]*(?::[^:@]*)?@)?(([^:\\/?#]*)(?::(\\d*))?))?([^?#]*)(\\?[^#]*)?(#[\\s\\S]*)?/);\r\n\t\treturn (match ? { href: match[0] || '', protocol: match[1] || '', authority: match[2] || '', host: match[3] || '', hostname: match[4] || '',\r\n\t\t port: match[5] || '', pathname: match[6] || '', search: match[7] || '', hash: match[8] || '' } : null);\r\n\t}", "function parseUrl(url)\n\n {\n if (!url) {\n return {};\n }\n\n const match = url.match(/^(([^:/?#]+):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n\n if (!match) {\n return {};\n }\n\n // coerce to undefined values to empty string so we don't get 'undefined'\n const query = match[6] || '';\n const fragment = match[8] || '';\n return {\n host: match[4],\n path: match[5],\n protocol: match[2],\n relative: match[5] + query + fragment, // everything minus origin\n };\n }", "function parseUrl (url) {\n var a = document.createElement('a')\n a.href = url\n\n return {\n href: a.href,\n pathname: a.pathname,\n search: (a.search) ? qs(a.search) : {},\n hash: a.hash\n }\n }", "function parseUrl(url) {\n var a = document.createElement('a');\n a.href = url;\n return {\n source: url,\n protocol: a.protocol.replace(':', ''),\n host: a.hostname,\n port: a.port,\n query: a.search,\n params: (function () {\n var ret = {},\n seg = a.search.replace(/^\\?/, '').split('&'),\n len = seg.length,\n i = 0,\n s;\n for (; i < len; i++) {\n if (!seg[i]) {\n continue;\n }\n s = seg[i].split('=');\n ret[s[0]] = s[1];\n }\n return ret;\n })(),\n file: (a.pathname.match(/\\/([^\\/?#]+)$/i) || [, ''])[1],\n hash: a.hash.replace('#', ''),\n path: a.pathname.replace(/^([^\\/])/, '/$1'),\n relative: (a.href.match(/tps?:\\/\\/[^\\/]+(.+)/) || [, ''])[1],\n segments: a.pathname.replace(/^\\//, '').split('/')\n };\n}", "function parseUrl(url)\n\n {\n if (!url) {\n return {};\n }\n\n const match = url.match(/^(([^:/?#]+):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n\n if (!match) {\n return {};\n }\n\n // coerce to undefined values to empty string so we don't get 'undefined'\n const query = match[6] || '';\n const fragment = match[8] || '';\n return {\n host: match[4],\n path: match[5],\n protocol: match[2],\n relative: match[5] + query + fragment, // everything minus origin\n };\n}", "function parseURL( url ) {\n var a = document.createElement('a');\n a.href = url;\n\n return {\n element: a,\n href: a.href,\n host: a.host,\n port: '0' === a.port || '' === a.port ? '' : a.port,\n hash: a.hash,\n hostname: a.hostname,\n pathname: a.pathname.charAt(0) !== '/' ? '/' + a.pathname : a.pathname,\n protocol: !a.protocol || ':' === a.protocol ? 'https:' : a.protocol,\n search: a.search,\n query: a.search.slice(1) // Nice utility for pre-stripping out the `?`\n };\n}", "function parseURL(url) {\n var link = document.createElement('a');\n link.href = url;\n let path = link.pathname;\n if (/\\.[a-z0-9_-]+$/i.test(path)) {\n path = path.split('/').slice(0, -1).join('/') + '/';\n }\n return {\n protocol: link.protocol,\n host: link.host,\n hostname: link.hostname,\n pathname: link.pathname,\n path,\n search: link.search,\n hash: link.hash\n };\n}", "function parseUri(str) {\n var pattern = /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/;\n var key = ['source', 'protocol', 'authority', 'userInfo', 'user', 'password', 'host', 'port', 'relative', 'path', 'directory', 'file', 'query', 'anchor'];\n var querypattern = /(?:^|&)([^&=]*)=?([^&]*)/g;\n\n var match = pattern.exec(str);\n var uri = {};\n var i = 14;\n while (i--) {\n uri[key[i]] = match[i] || '';\n }\n\n uri.queryKey = {};\n uri[key[12]].replace(querypattern, function ($0, $1, $2) {\n if ($1) {\n uri.queryKey[$1] = $2;\n }\n });\n\n return uri;\n}", "function parseURL(url) {\n var a = document.createElement('a');\n a.href = url;\n var domsplits = a.hostname.split(\".\");\n var dom = domsplits[domsplits.length-2]+\".\"+domsplits[domsplits.length-1];\n return ret = {\n source: url,\n protocol: a.protocol.replace(':',''),\n hostdomain: dom\n };\n}", "function parseURL(url) {\n var a = document.createElement('a');\n a.href = url;\n return {\n source: url,\n protocol: a.protocol.replace(':',''),\n host: a.hostname,\n port: a.port,\n query: a.search,\n params: (function(){\n var ret = {},\n seg = a.search.replace(/^\\?/,'').split('&'),\n len = seg.length, i = 0, s;\n for (;i<len;i++) {\n if (!seg[i]) { continue; }\n s = seg[i].split('=');\n ret[s[0]] = s[1];\n }\n return ret;\n })(),\n file: (a.pathname.match(/\\/([^\\/?#]+)$/i) || [,''])[1],\n hash: a.hash.replace('#',''),\n path: a.pathname.replace(/^([^\\/])/,'/$1'),\n relative: (a.href.match(/tps?:\\/\\/[^\\/]+(.+)/) || [,''])[1],\n segments: a.pathname.replace(/^\\//,'').split('/')\n };\n}", "function parseUri (str) {\n var o = {\n strictMode: false,\n key : [\"source\", \"protocol\", \"authority\", \"userInfo\", \"user\", \"password\", \"host\", \"port\", \"relative\", \"path\", \"directory\", \"file\", \"query\", \"anchor\"],\n q : {\n name : \"queryKey\",\n parser: /(?:^|&)([^&=]*)=?([^&]*)/g\n },\n parser : {\n strict: /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,\n loose : /^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/\n }\n },\n m = o.parser[o.strictMode ? \"strict\" : \"loose\"].exec(str),\n uri = {},\n i = 14;\n\n while (i--) {\n uri[o.key[i]] = m[i] || \"\";\n }\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {\n uri[o.q.name][$1] = $2;\n }\n });\n\n return uri;\n}", "function parseUrl(url)\n\n\t {\n\t if (!url) {\n\t return {};\n\t }\n\n\t const match = url.match(/^(([^:/?#]+):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n\n\t if (!match) {\n\t return {};\n\t }\n\n\t // coerce to undefined values to empty string so we don't get 'undefined'\n\t const query = match[6] || '';\n\t const fragment = match[8] || '';\n\t return {\n\t host: match[4],\n\t path: match[5],\n\t protocol: match[2],\n\t relative: match[5] + query + fragment, // everything minus origin\n\t };\n\t}", "function parseUrl(url) {\n if (!url) {\n return {};\n }\n var match = url.match(/^(([^:\\/?#]+):)?(\\/\\/([^\\/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n if (!match) {\n return {};\n }\n // coerce to undefined values to empty string so we don't get 'undefined'\n var query = match[6] || '';\n var fragment = match[8] || '';\n return {\n host: match[4],\n path: match[5],\n protocol: match[2],\n relative: match[5] + query + fragment,\n };\n}", "function parseUrl(url) {\n if (!url) {\n return {};\n }\n var match = url.match(/^(([^:\\/?#]+):)?(\\/\\/([^\\/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n if (!match) {\n return {};\n }\n // coerce to undefined values to empty string so we don't get 'undefined'\n var query = match[6] || '';\n var fragment = match[8] || '';\n return {\n host: match[4],\n path: match[5],\n protocol: match[2],\n relative: match[5] + query + fragment,\n };\n}", "function parseURL(url) {\n\n var parser = document.createElement('a'),\n searchObject = {},\n queries, split, i;\n\n // Let the browser do the work\n parser.href = url;\n\n // Convert query string to object\n queries = parser.search.replace(/^\\?/, '').split('&');\n for( i = 0; i < queries.length; i++ ) {\n split = queries[i].split('=');\n searchObject[split[0]] = split[1];\n }\n\n return {\n protocol: parser.protocol,\n host: parser.host,\n hostname: parser.hostname,\n port: parser.port,\n pathname: parser.pathname,\n search: parser.search,\n searchObject: searchObject,\n hash: parser.hash\n };\n\n}", "function parseLink(str){\n if(str){\n return str.split(',')\n .map(str => str.match(/<(.*?page=(\\d+).*?)>.*?\"(.*?)\"/))\n .reduce((obj,elm) => {obj[elm[3]] = {path:elm[1],page:elm[2]}; return obj},{})\n }\n}", "function parseURL(url) {\n var parser = document.createElement('a'),\n searchObject = {},\n queries, split, i;\n // Let the browser do the work\n parser.href = url;\n // Convert query string to object\n queries = parser.search.replace(/^\\?/, '').split('&');\n for (i = 0; i < queries.length; i++) {\n split = queries[i].split('=');\n searchObject[split[0]] = split[1];\n }\n return parser.pathname;\n\n //return {\n //protocol: parser.protocol,\n //host: parser.host,\n //hostname: parser.hostname,\n //port: parser.port,\n //pathname: parser.pathname,\n //search: parser.search,\n //searchObject: searchObject,\n //hash: parser.hash\n //};\n}", "function parseURL(url) {\n var a = document.createElement('a');\n a.href = url;\n return {\n source: url,\n protocol: a.protocol.replace(':',''),\n host: a.hostname,\n port: a.port,\n query: a.search,\n params: (function() {\n var ret = {},\n seg = a.search.replace(/^\\?/,'').split('&'),\n len = seg.length, i = 0, s;\n for (;i<len;i++) {\n if (!seg[i]) { continue; }\n s = seg[i].split('=');\n ret[s[0]] = s[1];\n }\n return ret;\n })(),\n file: (a.pathname.match(/\\/([^\\/?#]+)$/i) || [,''])[1],\n hash: a.hash.replace('#',''),\n path: a.pathname.replace(/^([^\\/])/,'/$1'),\n relative: (a.href.match(/tp:\\/\\/[^\\/]+(.+)/) || [,''])[1],\n segments: a.pathname.replace(/^\\//,'').split('/')\n };\n}", "function parseURL(url) {\n var a = document.createElement('a');\n a.href = url;\n return {\n source: url,\n protocol: a.protocol.replace(':',''),\n host: a.hostname,\n port: a.port,\n query: a.search,\n params: (function(){\n var ret = {},\n seg = a.search.replace(/^\\?/,'').split('&'),\n len = seg.length, i = 0, s;\n for (;i<len;i++) {\n if (!seg[i]) { continue; }\n s = seg[i].split('=');\n ret[s[0]] = s[1];\n }\n return ret;\n })(),\n file: (a.pathname.match(/\\/([^\\/?#]+)$/i) || [,''])[1],\n hash: a.hash.replace('#',''),\n path: a.pathname.replace(/^([^\\/])/,'/$1'),\n relative: (a.href.match(/tp:\\/\\/[^\\/]+(.+)/) || [,''])[1],\n segments: a.pathname.replace(/^\\//,'').split('/')\n };\n}", "function parseUrl(url) {\r\n if (!url) {\r\n return {};\r\n }\r\n var match = url.match(/^(([^:\\/?#]+):)?(\\/\\/([^\\/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\r\n if (!match) {\r\n return {};\r\n }\r\n // coerce to undefined values to empty string so we don't get 'undefined'\r\n var query = match[6] || '';\r\n var fragment = match[8] || '';\r\n return {\r\n host: match[4],\r\n path: match[5],\r\n protocol: match[2],\r\n relative: match[5] + query + fragment\r\n };\r\n}", "function parseUrl(url){if(typeof url!=='string')return{};var match=url.match(/^(([^:\\/?#]+):)?(\\/\\/([^\\/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);// coerce to undefined values to empty string so we don't get 'undefined'\nvar query=match[6]||'';var fragment=match[8]||'';return{protocol:match[2],host:match[4],path:match[5],relative:match[5]+query+fragment// everything minus origin\n};}", "function parseUrl(url) {\n const a = document.createElement('a');\n a.href = url;\n return a;\n}", "parseUrl( url, prop ) {\n let link = document.createElement( 'a' );\n link.href = url;\n let data = link[ prop ] || '';\n link = null;\n return data;\n }", "function parseURL(url) {\n const a = window.document.createElement(\"a\");\n a.href = url;\n return a;\n}", "function parseURI(url) {\n var m = String(url).replace(/^\\s+|\\s+$/g, '').match(/^([^:\\/?#]+:)?(\\/\\/(?:[^:@\\/?#]*(?::[^:@\\/?#]*)?@)?(([^:\\/?#]*)(?::(\\d*))?))?([^?#]*)(\\?[^#]*)?(#[\\s\\S]*)?/);\n // authority = '//' + user + ':' + pass '@' + hostname + ':' port\n return (m ? {\n href : m[0] || '',\n protocol : m[1] || '',\n authority: m[2] || '',\n host : m[3] || '',\n hostname : m[4] || '',\n port : m[5] || '',\n pathname : m[6] || '',\n search : m[7] || '',\n hash : m[8] || ''\n } : null);\n }", "function parseURI(url) {\n var m = String(url).replace(/^\\s+|\\s+$/g, '').match(/^([^:\\/?#]+:)?(\\/\\/(?:[^:@\\/?#]*(?::[^:@\\/?#]*)?@)?(([^:\\/?#]*)(?::(\\d*))?))?([^?#]*)(\\?[^#]*)?(#[\\s\\S]*)?/);\n // authority = '//' + user + ':' + pass '@' + hostname + ':' port\n return (m ? {\n href : m[0] || '',\n protocol : m[1] || '',\n authority: m[2] || '',\n host : m[3] || '',\n hostname : m[4] || '',\n port : m[5] || '',\n pathname : m[6] || '',\n search : m[7] || '',\n hash : m[8] || ''\n } : null);\n }", "function parseURL(url) {\n var a = document.createElement('a')\n a.href = url\n return a\n }", "function utilParseUrl(url) {\n\t\tconst el = document.createElement('a');\n\t\tconst queryObj = Object.create(null);\n\n\t\t// Let the `<a>` element parse the URL.\n\t\tel.href = url;\n\n\t\t// Populate the `queryObj` object with the query string attributes.\n\t\tif (el.search) {\n\t\t\tel.search\n\t\t\t\t.replace(/^\\?/, '')\n\t\t\t\t.splitOrEmpty(/(?:&(?:amp;)?|;)/)\n\t\t\t\t.forEach(query => {\n\t\t\t\t\tconst [key, value] = query.split('=');\n\t\t\t\t\tqueryObj[key] = value;\n\t\t\t\t});\n\t\t}\n\n\t\t/*\n\t\t\tCaveats by browser:\n\t\t\t\tEdge and Internet Explorer (≥8) do not support authentication\n\t\t\t\tinformation within a URL at all and will throw a security exception\n\t\t\t\ton *any* property access if it's included.\n\n\t\t\t\tInternet Explorer does not include the leading forward slash on\n\t\t\t\t`pathname` when required.\n\n\t\t\t\tOpera (Presto) strips the authentication information from `href`\n\t\t\t\tand does not supply `username` or `password`.\n\n\t\t\t\tSafari (ca. v5.1.x) does not supply `username` or `password` and\n\t\t\t\tpeforms URI decoding on `pathname`.\n\t\t*/\n\n\t\t// Patch for IE not including the leading slash on `pathname` when required.\n\t\tconst pathname = el.host && el.pathname[0] !== '/' ? `/${el.pathname}` : el.pathname;\n\n\t\treturn {\n\t\t\t// The full URL that was originally parsed.\n\t\t\thref : el.href,\n\n\t\t\t// The request protocol, lowercased.\n\t\t\tprotocol : el.protocol,\n\n\t\t\t// // The full authentication information.\n\t\t\t// auth : el.username || el.password // eslint-disable-line no-nested-ternary\n\t\t\t// \t? `${el.username}:${el.password}`\n\t\t\t// \t: typeof el.username === 'string' ? '' : undefined,\n\t\t\t//\n\t\t\t// // The username portion of the auth info.\n\t\t\t// username : el.username,\n\t\t\t//\n\t\t\t// // The password portion of the auth info.\n\t\t\t// password : el.password,\n\n\t\t\t// The full host information, including port number, lowercased.\n\t\t\thost : el.host,\n\n\t\t\t// The hostname portion of the host info, lowercased.\n\t\t\thostname : el.hostname,\n\n\t\t\t// The port number portion of the host info.\n\t\t\tport : el.port,\n\n\t\t\t// The full path information, including query info.\n\t\t\tpath : `${pathname}${el.search}`,\n\n\t\t\t// The pathname portion of the path info.\n\t\t\tpathname,\n\n\t\t\t// The query string portion of the path info, including the leading question mark.\n\t\t\tquery : el.search,\n\t\t\tsearch : el.search,\n\n\t\t\t// The attributes portion of the query string, parsed into an object.\n\t\t\tqueries : queryObj,\n\t\t\tsearches : queryObj,\n\n\t\t\t// The fragment string, including the leading hash/pound sign.\n\t\t\thash : el.hash\n\t\t};\n\t}", "function parseURL(url) {\n var parser = document.createElement('a'),\n searchObject = {},\n queries, split, i;\n \n // Let the browser do the work\n parser.href = url;\n \n // Convert query string to object\n queries = parser.search.replace(/^\\?/, '').split('&');\n \n for( i = 0; i < queries.length; i++ ) {\n split = queries[i].split('=');\n searchObject[split[0]] = split[1];\n }\n \n return {\n params: parser.search,\n paramsObj: searchObject,\n hash: parser.hash\n };\n }", "function parseURI(url) {\n\t\tvar m = String(url).replace(/^\\s+|\\s+$/g, '').match(/^([^:\\/?#]+:)?(\\/\\/(?:[^:@]*(?::[^:@]*)?@)?(([^:\\/?#]*)(?::(\\d*))?))?([^?#]*)(\\?[^#]*)?(#[\\s\\S]*)?/);\n\t\t// authority = '//' + user + ':' + pass '@' + hostname + ':' port\n\t\treturn (m ? {\n\t\t\thref : m[0] || '',\n\t\t\tprotocol : m[1] || '',\n\t\t\tauthority: m[2] || '',\n\t\t\thost : m[3] || '',\n\t\t\thostname : m[4] || '',\n\t\t\tport : m[5] || '',\n\t\t\tpathname : m[6] || '',\n\t\t\tsearch : m[7] || '',\n\t\t\thash : m[8] || ''\n\t\t} : null);\n\t}", "function parseURI(url) {\n var m = String(url).match(/^([^:\\/?#]+:)?(\\/\\/(?:[^:@]*(?::[^:@]*)?@)?(([^:\\/?#]*)(?::(\\d*))?))?([^?#]*)(\\?[^#]*)?(#[\\s\\S]*)?/);\n // authority = '//' + user + ':' + pass '@' + hostname + ':' port\n return (m ? {\n href : m[0] || '',\n protocol : m[1] || '',\n authority: m[2] || '',\n host : m[3] || '',\n hostname : m[4] || '',\n port : m[5] || '',\n pathname : m[6] || '',\n search : m[7] || '',\n hash : m[8] || ''\n } : null);\n}", "function parseURL(url) {\n var a = document.createElement('a')\n a.href = url\n return a\n}", "function parseURL(url) {\n var a = document.createElement('a')\n a.href = url\n return a\n}", "function parseURL(url) {\n var a = document.createElement('a')\n a.href = url\n return a\n}", "function parseURL(url) {\n var a = document.createElement('a')\n a.href = url\n return a\n}", "function parseURL(url) {\n var a = document.createElement('a')\n a.href = url\n return a\n}", "function parseURL(url) {\n var a = document.createElement('a')\n a.href = url\n return a\n}", "function parseURL(url) {\n var a = document.createElement('a')\n a.href = url\n return a\n}", "function parseURL(url) {\n var a = document.createElement('a')\n a.href = url\n return a\n}", "function parseUri(url) {\n\tvar p = [\"source\", \"protocol\", \"authority\", \"userInfo\", \"user\", \"password\", \"host\", \"port\", \"relative\", \"path\", \"directory\", \"file\", \"query\", \"anchor\"],\n\t\tu = {}, i = p.length,\n\t\tm = /^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/.exec(url);\n\twhile (i--) u[p[i]] = m[i] || \"\";\n\treturn u;\n}", "function parseURL(url) {\n var a = document.createElement('a');\n a.href = url;\n return a;\n }", "function parse_url(url) {\n\tvar parser = document.createElement('a'),\n\t\tsearchObject = {},\n\t\tqueries, split, i;\n\t// Let the browser do the work\n\tparser.href = url;\n\t// Convert query string to object\n\tqueries = parser.search.replace(/\\?/, '').split('&');\n\tfor( i = 0; i < queries.length; i++ ) {\n\t\tsplit = queries[i].split('=');\n\t\tif (split.length > 1) {\n\t\t\tsearchObject[split[0]] = split[1];\n\t\t} else {\n\t\t\tsearchObject[split[0]] = \"\";\n\t\t}\n\t}\n\t//return {\"host\":host, \"path\":path, \"gparamstr\":param, \"gparams\":gparams};\n\treturn {\"host\":parser.protocol + \"//\" + parser.host, \"path\":parser.pathname, \"gparamstr\":parser.search, \"gparams\":searchObject};\n}", "function parseURL(url) {\n if (url.indexOf(URL_SCHEME_SUFFIX) === -1) {\n throw new Error(`The url string provided does not contain a scheme. ` +\n `Supported schemes are: ` +\n `${ModelStoreManagerRegistry.getSchemes().join(',')}`);\n }\n return {\n scheme: url.split(URL_SCHEME_SUFFIX)[0],\n path: url.split(URL_SCHEME_SUFFIX)[1],\n };\n}", "function parseURL(url) {\n if (url.indexOf(URL_SCHEME_SUFFIX) === -1) {\n throw new Error(`The url string provided does not contain a scheme. ` +\n `Supported schemes are: ` +\n `${ModelStoreManagerRegistry.getSchemes().join(',')}`);\n }\n return {\n scheme: url.split(URL_SCHEME_SUFFIX)[0],\n path: url.split(URL_SCHEME_SUFFIX)[1],\n };\n}", "function parseURI(url) {\n\tvar m = String(url).replace(/^\\s+|\\s+$/g, '').match(/^([^:\\/?#]+:)?(\\/\\/(?:[^:@]*(?::[^:@]*)?@)?(([^:\\/?#]*)(?::(\\d*))?))?([^?#]*)(\\?[^#]*)?(#[\\s\\S]*)?/);\n\t// authority = '//' + user + ':' + pass '@' + hostname + ':' port\n\treturn (m ? {\n\t\thref : m[0] || '',\n\t\tprotocol : m[1] || '',\n\t\tauthority: m[2] || '',\n\t\thost : m[3] || '',\n\t\thostname : m[4] || '',\n\t\tport : m[5] || '',\n\t\tpathname : m[6] || '',\n\t\tsearch : m[7] || '',\n\t\thash : m[8] || ''\n\t} : null);\n}", "function parseURI(url) {\n\tvar m = String(url).replace(/^\\s+|\\s+$/g, '').match(/^([^:\\/?#]+:)?(\\/\\/(?:[^:@]*(?::[^:@]*)?@)?(([^:\\/?#]*)(?::(\\d*))?))?([^?#]*)(\\?[^#]*)?(#[\\s\\S]*)?/);\n\t// authority = '//' + user + ':' + pass '@' + hostname + ':' port\n\treturn (m ? {\n\t\thref : m[0] || '',\n\t\tprotocol : m[1] || '',\n\t\tauthority: m[2] || '',\n\t\thost : m[3] || '',\n\t\thostname : m[4] || '',\n\t\tport : m[5] || '',\n\t\tpathname : m[6] || '',\n\t\tsearch : m[7] || '',\n\t\thash : m[8] || ''\n\t} : null);\n}", "function parseURI(url) {\n\tvar m = String(url).replace(/^\\s+|\\s+$/g, '').match(/^([^:\\/?#]+:)?(\\/\\/(?:[^:@]*(?::[^:@]*)?@)?(([^:\\/?#]*)(?::(\\d*))?))?([^?#]*)(\\?[^#]*)?(#[\\s\\S]*)?/);\n\t// authority = '//' + user + ':' + pass '@' + hostname + ':' port\n\treturn (m ? {\n\t\thref : m[0] || '',\n\t\tprotocol : m[1] || '',\n\t\tauthority: m[2] || '',\n\t\thost : m[3] || '',\n\t\thostname : m[4] || '',\n\t\tport : m[5] || '',\n\t\tpathname : m[6] || '',\n\t\tsearch : m[7] || '',\n\t\thash : m[8] || ''\n\t} : null);\n}", "function parseURI(url) {\n\tvar m = String(url).replace(/^\\s+|\\s+$/g, '').match(/^([^:\\/?#]+:)?(\\/\\/(?:[^:@]*(?::[^:@]*)?@)?(([^:\\/?#]*)(?::(\\d*))?))?([^?#]*)(\\?[^#]*)?(#[\\s\\S]*)?/);\n\t// authority = '//' + user + ':' + pass '@' + hostname + ':' port\n\treturn (m ? {\n\t\thref : m[0] || '',\n\t\tprotocol : m[1] || '',\n\t\tauthority: m[2] || '',\n\t\thost : m[3] || '',\n\t\thostname : m[4] || '',\n\t\tport : m[5] || '',\n\t\tpathname : m[6] || '',\n\t\tsearch : m[7] || '',\n\t\thash : m[8] || ''\n\t} : null);\n}", "function parseURL(url) {\n if (url.indexOf(URL_SCHEME_SUFFIX) === -1) {\n throw new Error(\"The url string provided does not contain a scheme. \" +\n \"Supported schemes are: \" +\n (\"\" + ModelStoreManagerRegistry.getSchemes().join(',')));\n }\n return {\n scheme: url.split(URL_SCHEME_SUFFIX)[0],\n path: url.split(URL_SCHEME_SUFFIX)[1],\n };\n}", "function parseLink(s) {\n const output = {};\n const regex = /<([^>]+)>; rel=\"([^\"]+)\"/g;\n \n let m;\n while (m = regex.exec(s)) {\n const [_, v, k] = m;\n output[k] = v;\n }\n pages = output;\n}", "static parseURI(url) {\n var parse;\n parse = document.createElement('a');\n parse.href = url;\n parse.segments = parse.pathname.split('/');\n parse.filex = parse.segments.pop().split('.');\n parse.file = parse.filex[0];\n parse.ext = parse.filex.length === 2 ? parse.filex[1] : '';\n return parse;\n }", "function parseURL(opt_url) {\r\n var elem = document.createElement('a'),\r\n result = {\r\n params: parseQS(elem.href = opt_url = opt_url == undefined ? __global.location.href : opt_url),\r\n toString: function() {\r\n return href;\r\n }\r\n };\r\n walk(elem, function(value, key) {\r\n if (/^(hash|href|port|protocol|(user|path|host)(name)?|search|password)$/.test(key)) {\r\n result[key] = value;\r\n }\r\n }, 1);\r\n return result;\r\n }", "function parseUrl (url) {\n\turl = url || location.href\n\n\tconst splitUrl = url.split('?')\n\tconst [link, params] = splitUrl\n\n\tif(params) {\n\t\tconst result = {url: link}\n\t\tconst _params = params.split('&')\n\t\t_params.forEach(item => {\n\t\t\tconst [name, key] = item.split('=')\n\t\t\tresult[name] = decodeURIComponent(key)\n\t\t})\n\t\treturn result\n\t}else {\n\t\treturn null\n\t}\n}", "function parseUrl(url) {\n var parser = document.createElement('a');\n parser.href = url;\n return parser;\n }", "function parseUrl(url)\n{\n c(url, 'yellow');\n var defaultFormat = 'json';\n var parsedUrl = ur.parse(url);\n var format = parsedUrl.pathname.match(/.*\\.(.*)?(\\?.*)?/);\n var pathname = parsedUrl.pathname.replace(/\\..*/, '').replace(/^\\/|\\/$/, '').replace(/^resources\\//, '').split('/');\n var queries = qs.parse(parsedUrl.query);\n var parsed = {\n path: parsedUrl.path,\n format: (format) ? format[1] : defaultFormat,\n pathname: pathname,\n queries: queries,\n resource_name: (pathname) ? pathname[0] : null,\n account_id: (pathname && pathname[1]) ? pathname[1] : null,\n resource_id: (pathname && pathname[2]) ? pathname[2] : null,\n token: (queries && queries.access_token) ? queries.access_token : null\n }\n c(parsed, 'red');\n return parsed;\n}", "function parse(url) {\n if (typeof document !== 'undefined') {\n var a = document.createElement('a');\n a.href = url;\n return a;\n }\n return urlparse(url);\n }", "function parse_url(href) {\n if (!href) {\n href = location.href;\n }\n var l = document.createElement(\"a\");\n l.href = href;\n l.query = parse_query({}, href);\n return l;\n}", "function parseUriParts(urlString) {\n\t // A TypeError is thrown if urlString is not a string\n\t // @see https://nodejs.org/api/url.html#url_url_parse_urlstring_parsequerystring_slashesdenotehost\n\t return url.parse(shared.isString(urlString) ? urlString : '', false, true);\n\t}", "function parseUrl() {\n var hash = window.location.hash.substr(1),\n rez = hash.split(\"-\"),\n index = rez.length > 1 && /^\\+?\\d+$/.test(rez[rez.length - 1]) ? parseInt(rez.pop(-1), 10) || 1 : 1,\n gallery = rez.join(\"-\");\n\n return {\n hash: hash,\n /* Index is starting from 1 */\n index: index < 1 ? 1 : index,\n gallery: gallery\n };\n }", "function parseUrl(url){\n\tif (!typeof(url) == 'string'){\n\t\tthrow Error(`Unexpected input type, expected string but got ${typeof(url)}`)\n\t}\n\tlet re = /^(https:\\/\\/www\\.amazon\\.co\\.jp\\/).*(dp|gp\\/)(.*\\/)/g;\n\tconst resultArray = [...url.matchAll(re)];\n\tlet urlStr;\n\ttry{\n\t\turlStr = resultArray[0][1]+resultArray[0][2]+resultArray[0][3];\n\t\treturn urlStr;\n\t}catch(error){\n\t\tthrow Error('Invalid url parsing error');\n\t}\n}", "function parseUrl() {\n var hash = window.location.hash.substr(1),\n rez = hash.split(\"-\"),\n index = rez.length > 1 && /^\\+?\\d+$/.test(rez[rez.length - 1]) ? parseInt(rez.pop(-1), 10) || 1 : 1,\n gallery = rez.join(\"-\");\n\n return {\n hash: hash,\n /* Index is starting from 1 */\n index: index < 1 ? 1 : index,\n gallery: gallery\n };\n }", "function parseUrl() {\n var hash = window.location.hash.substr(1),\n rez = hash.split(\"-\"),\n index = rez.length > 1 && /^\\+?\\d+$/.test(rez[rez.length - 1]) ? parseInt(rez.pop(-1), 10) || 1 : 1,\n gallery = rez.join(\"-\");\n\n return {\n hash: hash,\n /* Index is starting from 1 */\n index: index < 1 ? 1 : index,\n gallery: gallery\n };\n }", "function parseUrl() {\n var hash = window.location.hash.substr(1),\n rez = hash.split(\"-\"),\n index = rez.length > 1 && /^\\+?\\d+$/.test(rez[rez.length - 1]) ? parseInt(rez.pop(-1), 10) || 1 : 1,\n gallery = rez.join(\"-\");\n\n return {\n hash: hash,\n /* Index is starting from 1 */\n index: index < 1 ? 1 : index,\n gallery: gallery\n };\n }", "function parseUrl(url) {\n\t const firstChar = url.charAt(0);\n\t if (firstChar === '~') {\n\t const secondChar = url.charAt(1);\n\t url = url.slice(secondChar === '/' ? 2 : 1);\n\t }\n\t return parseUriParts(url);\n\t}", "function parseDeepLink(url) {\r\n const link = querystringDecode(extractQuerystring(url))['link'];\r\n // Double link case (automatic redirect).\r\n const doubleDeepLink = link\r\n ? querystringDecode(extractQuerystring(link))['deep_link_id']\r\n : null;\r\n // iOS custom scheme links.\r\n const iOSDeepLink = querystringDecode(extractQuerystring(url))['deep_link_id'];\r\n const iOSDoubleDeepLink = iOSDeepLink\r\n ? querystringDecode(extractQuerystring(iOSDeepLink))['link']\r\n : null;\r\n return iOSDoubleDeepLink || iOSDeepLink || doubleDeepLink || link || url;\r\n}", "parseUrl(url) {\n let urlTree;\n\n try {\n urlTree = this.urlSerializer.parse(url);\n } catch (e) {\n urlTree = this.malformedUriErrorHandler(e, this.urlSerializer, url);\n }\n\n return urlTree;\n }", "function parseUrl (ast) {\n let [firstAgument] = ast.arguments;\n let rawUrl = firstAgument.raw;\n let url = rawUrl.replace(/^\\//, '').replace(/\\/$/, '').replace(/\\\\/g,'');\n assert(url);\n return url;\n }", "function cssParseUri(candidate) {\n var string1 = /^\\s*[\"]([^\"]*)[\"]\\s*$/;\n var string2 = /^\\s*[']([^']*)[']\\s*$/;\n var url1 = /^\\s*url\\s*[(][\"]([^\"]*)[\"][)]\\s*$/;\n var url2 = /^\\s*url\\s*[(][']([^']*)['][)]\\s*$/;\n // Not officially part of the CSS2.1 grammar\n // but supported by Chrome\n var url3 = /^\\s*url\\s*[(]([^)]*)[)]\\s*$/;\n var match;\n if ((match = string1.exec(candidate))) {\n return match[1];\n } else if ((match = string2.exec(candidate))) {\n return match[1];\n } else if ((match = url1.exec(candidate))) {\n return match[1];\n } else if ((match = url2.exec(candidate))) {\n return match[1];\n } else if ((match = url3.exec(candidate))) {\n return match[1];\n }\n return null;\n }", "function cssParseUri(candidate) {\n var string1 = /^\\s*[\"]([^\"]*)[\"]\\s*$/;\n var string2 = /^\\s*[']([^']*)[']\\s*$/;\n var url1 = /^\\s*url\\s*[(][\"]([^\"]*)[\"][)]\\s*$/;\n var url2 = /^\\s*url\\s*[(][']([^']*)['][)]\\s*$/;\n // Not officially part of the CSS2.1 grammar\n // but supported by Chrome\n var url3 = /^\\s*url\\s*[(]([^)]*)[)]\\s*$/;\n var match;\n if ((match = string1.exec(candidate))) {\n return match[1];\n } else if ((match = string2.exec(candidate))) {\n return match[1];\n } else if ((match = url1.exec(candidate))) {\n return match[1];\n } else if ((match = url2.exec(candidate))) {\n return match[1];\n } else if ((match = url3.exec(candidate))) {\n return match[1];\n }\n return null;\n }", "function parseUrl() {\r\n var hash = window.location.hash.substr(1),\r\n rez = hash.split(\"-\"),\r\n index = rez.length > 1 && /^\\+?\\d+$/.test(rez[rez.length - 1]) ? parseInt(rez.pop(-1), 10) || 1 : 1,\r\n gallery = rez.join(\"-\");\r\n\r\n return {\r\n hash: hash,\r\n /* Index is starting from 1 */\r\n index: index < 1 ? 1 : index,\r\n gallery: gallery\r\n };\r\n }", "function parseUrl() {\r\n var hash = window.location.hash.substr(1),\r\n rez = hash.split(\"-\"),\r\n index = rez.length > 1 && /^\\+?\\d+$/.test(rez[rez.length - 1]) ? parseInt(rez.pop(-1), 10) || 1 : 1,\r\n gallery = rez.join(\"-\");\r\n\r\n return {\r\n hash: hash,\r\n /* Index is starting from 1 */\r\n index: index < 1 ? 1 : index,\r\n gallery: gallery\r\n };\r\n }", "function parseUri (str) {\n var o = parseUri.options,\n m = o.parser[o.strictMode ? \"strict\" : \"loose\"].exec(str),\n uri = {},\n i = 14;\n\n while (i--) uri[o.key[i]] = m[i] || \"\";\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) uri[o.q.name][$1] = $2;\n });\n\n return uri;\n}", "function parseUri (str) {\n var o = parseUri.options,\n m = o.parser[o.strictMode ? \"strict\" : \"loose\"].exec(str),\n uri = {},\n i = 14;\n\n while (i--) uri[o.key[i]] = m[i] || \"\";\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) uri[o.q.name][$1] = $2;\n });\n\n return uri;\n}", "function parseUri (str) {\n var o = parseUri.options,\n m = o.parser[o.strictMode ? \"strict\" : \"loose\"].exec(str),\n uri = {},\n i = 14;\n while (i--) uri[o.key[i]] = m[i] || \"\";\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) uri[o.q.name][$1] = $2;\n });\n return uri;\n}", "function parseUri(str) {\n var o = parseUri.options,\n m = o.parser[o.strictMode ? \"strict\" : \"loose\"].exec(str),\n uri = {},\n i = 14\n\n while (i--) uri[o.key[i]] = m[i] || \"\"\n\n uri[o.q.name] = {}\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) uri[o.q.name][$1] = $2\n })\n\n return uri\n}", "function parseUri(str) {\n var o = parseUri.options,\n m = o.parser[o.strictMode ? \"strict\" : \"loose\"].exec(str),\n uri = {},\n i = 14;\n\n while (i--) uri[o.key[i]] = m[i] || \"\";\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) uri[o.q.name][$1] = urldecode($2);\n });\n\n return uri;\n }", "function parseDeepLink(url) {\r\n const link = (0,_firebase_util__WEBPACK_IMPORTED_MODULE_0__.querystringDecode)((0,_firebase_util__WEBPACK_IMPORTED_MODULE_0__.extractQuerystring)(url))['link'];\r\n // Double link case (automatic redirect).\r\n const doubleDeepLink = link\r\n ? (0,_firebase_util__WEBPACK_IMPORTED_MODULE_0__.querystringDecode)((0,_firebase_util__WEBPACK_IMPORTED_MODULE_0__.extractQuerystring)(link))['deep_link_id']\r\n : null;\r\n // iOS custom scheme links.\r\n const iOSDeepLink = (0,_firebase_util__WEBPACK_IMPORTED_MODULE_0__.querystringDecode)((0,_firebase_util__WEBPACK_IMPORTED_MODULE_0__.extractQuerystring)(url))['deep_link_id'];\r\n const iOSDoubleDeepLink = iOSDeepLink\r\n ? (0,_firebase_util__WEBPACK_IMPORTED_MODULE_0__.querystringDecode)((0,_firebase_util__WEBPACK_IMPORTED_MODULE_0__.extractQuerystring)(iOSDeepLink))['link']\r\n : null;\r\n return iOSDoubleDeepLink || iOSDeepLink || doubleDeepLink || link || url;\r\n}", "function linkparser(link) {\r\n const start = link.indexOf('net/');\r\n const end = link.indexOf('?');\r\n const res = link.slice(Number(start) + 4, end);\r\n return res;\r\n}", "function splitLink(content) {\n // remove title part (if exists)\n content = content.trim();\n var url = content, title = \"\";\n var mat = content.match(/^(\\S+)\\s+(\"(?:[^\"\\\\]+|\\\\.)+\"|[^\"\\s].*)/);\n if (mat) {\n url = mat[1];\n title = mat[2];\n if (title.charAt(0) === '\"')\n title = title.substr(1, title.length - 2).replace(/\\\\\"/g, '\"');\n }\n return { url: url, title: title };\n }", "function parseUri(str) {\n var o = parseUri.options, m = o.parser[o.strictMode ? \"strict\" : \"loose\"].exec(str), uri = {}, i = 14;\n while (i--)\n uri[o.key[i]] = m[i] || \"\";\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1)\n uri[o.q.name][$1] = $2;\n });\n return uri;\n }", "function parseUri(str) {\n var o = parseUri.options,\n m = o.parser[o.strictMode ? \"strict\" : \"loose\"].exec(str),\n uri = {},\n i = 14;\n\n while (i--) uri[o.key[i]] = m[i] || \"\";\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) uri[o.q.name][$1] = $2;\n });\n\n return uri;\n}", "function parseUri (str) {\n var o = parseUri.options,\n m = o.parser[o.strictMode ? \"strict\" : \"loose\"].exec(str),\n uri = {},\n i = 14;\n\n while (i--) uri[o.key[i]] = m[i] || \"\";\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) uri[o.q.name][$1] = $2;\n });\n\n return uri;\n}", "function parseUri (str) {\n var o = parseUri.options,\n m = o.parser[o.strictMode ? \"strict\" : \"loose\"].exec(str),\n uri = {},\n i = 14;\n\n while (i--) uri[o.key[i]] = m[i] || \"\";\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) uri[o.q.name][$1] = $2;\n });\n\n return uri;\n}", "function parseUrl() {\n var url = location.href;\n var k = url.indexOf('?');\n if(k == -1){\n return;\n }\n var querystr = url.substr(k+1);\n var arr1 = querystr.split('&');\n var arr2 = new Object();\n for (k in arr1){\n var ta = arr1[k].split('=');\n arr2[ta[0]] = ta[1];\n }\n return arr2;\n}", "parseUrl(url) {\n let urlTree;\n try {\n urlTree = this.urlSerializer.parse(url);\n }\n catch (e) {\n urlTree = this.malformedUriErrorHandler(e, this.urlSerializer, url);\n }\n return urlTree;\n }", "parseUrl(url) {\n let urlTree;\n try {\n urlTree = this.urlSerializer.parse(url);\n }\n catch (e) {\n urlTree = this.malformedUriErrorHandler(e, this.urlSerializer, url);\n }\n return urlTree;\n }", "parseUrl(url) {\n let urlTree;\n try {\n urlTree = this.urlSerializer.parse(url);\n }\n catch (e) {\n urlTree = this.malformedUriErrorHandler(e, this.urlSerializer, url);\n }\n return urlTree;\n }", "parseUrl(url) {\n let urlTree;\n try {\n urlTree = this.urlSerializer.parse(url);\n }\n catch (e) {\n urlTree = this.malformedUriErrorHandler(e, this.urlSerializer, url);\n }\n return urlTree;\n }", "parseUrl(url) {\n let urlTree;\n try {\n urlTree = this.urlSerializer.parse(url);\n }\n catch (e) {\n urlTree = this.malformedUriErrorHandler(e, this.urlSerializer, url);\n }\n return urlTree;\n }", "function parseProtocol(url) {\n const parsedURL = /^(\\w+)\\:\\/\\/([^\\/]+)\\/(.*)$/.exec(url);\n if (!parsedURL) {\n return false;\n }\n console.log(parsedURL);\n // [\"https://developer.mozilla.org/en-US/docs/Web/JavaScript\", \n // \"https\", \"developer.mozilla.org\", \"en-US/docs/Web/JavaScript\"]\n\n const [, protocol, fullhost, fullpath] = parsedURL;\n return protocol;\n}", "function parseUri(str) {\r\n\tvar\to = parseUri.options,\r\n\t\tm = o.parser[o.strictMode ? \"strict\" : \"loose\"].exec(str),\r\n\t\turi = {},\r\n\t\ti = 14;\r\n\r\n\twhile (i--) uri[o.key[i]] = m[i] || \"\";\r\n\r\n\turi[o.q.name] = {};\r\n\turi[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\r\n\t\tif ($1) uri[o.q.name][$1] = $2;\r\n\t});\r\n\r\n\treturn uri;\r\n}", "function parseUrl() {\n var hash = window.location.hash.substr( 1 );\n var rez = hash.split( '-' );\n var index = rez.length > 1 && /^\\+?\\d+$/.test( rez[ rez.length - 1 ] ) ? parseInt( rez.pop( -1 ), 10 ) || 1 : 1;\n var gallery = rez.join( '-' );\n\n // Index is starting from 1\n if ( index < 1 ) {\n index = 1;\n }\n\n return {\n hash : hash,\n index : index,\n gallery : gallery\n };\n }", "function parseUri(str) {\n\tvar options = parseUri.options;\n\tvar matches = options.parser[options.strictMode ? \"strict\" : \"loose\"].exec(str);\n\tvar uri = {};\n\tvar i = 14;\n\n\twhile (i--) {\n\t\turi[options.key[i]] = matches[i] || \"\";\n\t}\n\turi[options.query.name] = {};\n\turi[options.key[12]].replace(options.query.parser, function($0, $1, $2) {\n\t\tif ($1)\n\t\t\turi[options.query.name][$1] = $2;\n\t});\n\n\treturn uri;\n}", "function parseUri (str) {\n var o = parseUri.options,\n m = o.parser[o.strictMode ? \"strict\" : \"loose\"].exec(str),\n uri = {},\n i = 14;\n\n while (i--) {uri[o.key[i]] = m[i] || \"\";}\n\n uri[o.q.name] = {};\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n if ($1) {uri[o.q.name][$1] = $2;}\n });\n\n return uri;\n}", "function parseUri (str) {\r\n var o = parseUri.options,\r\n m = o.parser[o.strictMode ? \"strict\" : \"loose\"].exec(str),\r\n uri = {},\r\n i = 14;\r\n\r\n while (i--) uri[o.key[i]] = m[i] || \"\";\r\n\r\n uri[o.q.name] = {};\r\n uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\r\n if ($1) uri[o.q.name][$1] = $2;\r\n });\r\n\r\n return uri;\r\n}", "function parseUri(str) {\r\n\tvar options = parseUri.options;\r\n\tvar matches = options.parser[options.strictMode ? \"strict\" : \"loose\"].exec(str);\r\n\tvar uri = {};\r\n\tvar i = 14;\r\n\r\n\twhile (i--) {\r\n\t\turi[options.key[i]] = matches[i] || \"\";\r\n\t}\r\n\turi[options.query.name] = {};\r\n\turi[options.key[12]].replace(options.query.parser, function($0, $1, $2) {\r\n\t\tif ($1)\r\n\t\t\turi[options.query.name][$1] = $2;\r\n\t});\r\n\r\n\treturn uri;\r\n}", "function parseUri(str) {\n\tvar\to = parseUri.options,\n\t\tm = o.parser[o.strictMode ? \"strict\" : \"loose\"].exec(str),\n\t\turi = {},\n\t\ti = 14;\n\n\twhile (i--) uri[o.key[i]] = m[i] || \"\";\n\n\turi[o.q.name] = {};\n\turi[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {\n\t\tif ($1) uri[o.q.name][$1] = $2;\n\t});\n\n\treturn uri;\n}", "function parseURL(request, response){\n \tvar parseQuery = true; \n var badHost = true; \n var urlObj = url.parse(request.url, parseQuery , badHost );\n console.log('path:');\n console.log(urlObj.path);\n console.log('query:');\n console.log(urlObj.query);\n \treturn urlObj;\n }" ]
[ "0.8121613", "0.7074693", "0.70151013", "0.6993006", "0.69894713", "0.69573736", "0.69354415", "0.69031566", "0.69030756", "0.68946064", "0.6887863", "0.68662775", "0.68588316", "0.68518674", "0.68518674", "0.6842979", "0.6840864", "0.68403757", "0.6840171", "0.68379337", "0.6830801", "0.67795396", "0.67666095", "0.67485327", "0.6689813", "0.6644316", "0.6644316", "0.66392606", "0.6636705", "0.6623138", "0.66157657", "0.6606603", "0.66034776", "0.66034776", "0.66034776", "0.66034776", "0.66034776", "0.66034776", "0.66034776", "0.66034776", "0.6594663", "0.65750873", "0.6571312", "0.65703094", "0.65703094", "0.65362394", "0.65362394", "0.65362394", "0.65362394", "0.6510282", "0.64983636", "0.6488274", "0.64523494", "0.6407793", "0.6361494", "0.6353802", "0.63353896", "0.622603", "0.62240845", "0.613536", "0.6134525", "0.6110155", "0.6110155", "0.6110155", "0.6089478", "0.6051958", "0.6047924", "0.60417825", "0.6003281", "0.6003281", "0.5999463", "0.5999463", "0.59901834", "0.59901834", "0.5975166", "0.5972011", "0.59675777", "0.59670097", "0.59623873", "0.5955243", "0.5946972", "0.59407157", "0.5931537", "0.5931537", "0.59258926", "0.59161204", "0.59161204", "0.59161204", "0.59161204", "0.59161204", "0.5904158", "0.589415", "0.5892413", "0.5883285", "0.58811975", "0.5872911", "0.5869722", "0.5869504", "0.5866124" ]
0.68405855
18
Extracts either message or type+value from an event that can be used for userfacing logs
function getEventDescription(event) { if (event.message) { return event.message; } if (event.exception && event.exception.values && event.exception.values[0]) { var exception = event.exception.values[0]; if (exception.type && exception.value) { return exception.type + ": " + exception.value; } return exception.type || exception.value || event.event_id || '<unknown>'; } return event.event_id || '<unknown>'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function processMessage(event)\n{\n var message;\n try {\n message = JSON.parse(event.data);\n } catch (e) {}\n\n if(!message.type)\n return;\n switch (message.type)\n {\n case \"command\":\n processCommand(message);\n break;\n case \"event\":\n processEvent(message);\n break;\n default:\n console.error(\"Unknown type of the message\");\n return;\n }\n\n}", "function getLogEventStrings() {\n var eventsArr = [];\n var str = Logger.getLog();\n var arr = str.split(\"\\n\");\n// Logger.log(\"arr=\" + arr.length);\n for (var i in arr) {\n// Logger.log(\"arr[\" + i + \"]=\" + arr[i]);\n if ( arr[i].length > 0 ) {\n var regexResult = /.+?INFO: \\[EVENT\\] (.+)/.exec(arr[i]); //Is log string of [EVENT] type\n if (regexResult && regexResult[0].length>0) eventsArr.push(regexResult[1]);\n }\n }\n return eventsArr;\n}", "function parseEvent(logEvent, logGroupName, logStreamName) {\n console.log(\"logEvent: \" + JSON.stringify(logEvent));\n return {\n // remove '\\n' character at the end of the event\n message: logEvent.message.trim(),\n logGroupName: logGroupName,\n logStreamName: logStreamName,\n timestamp: new Date(logEvent.timestamp).toISOString()\n };\n }", "function processMessage(event) {\n var message;\n try {\n message = JSON.parse(event.data);\n } catch (e) {\n console.error(\"Cannot parse data\", event.data);\n return;\n }\n\n switch (message.type) {\n case \"command\":\n processCommand(message);\n break;\n case \"event\":\n processEvent(message);\n break;\n default:\n console.warn(\"Unknown message type\");\n }\n}", "function getAriaEventInfo(event) {\r\n var values = {\r\n 'CorrelationVector': event.vector.toString(),\r\n 'ValidationErrors': event.validationErrors,\r\n 'WebLog_FullName': event.eventName,\r\n 'WebLog_EventType': EventBase_1.ClonedEventType[event.eventType]\r\n };\r\n if (event.eventType === EventBase_1.ClonedEventType.End) {\r\n values.Duration = event.endTime - event.startTime;\r\n }\r\n var names = event.eventName.split(',');\r\n for (var _i = 0, names_1 = names; _i < names_1.length; _i++) {\r\n var name_1 = names_1[_i];\r\n if (name_1) {\r\n values[\"WebLog_Type_\" + name_1] = 1;\r\n }\r\n }\r\n var data = event.data, context = event.context;\r\n if (context) {\r\n for (var key in context) {\r\n if (Object.prototype.hasOwnProperty.call(context, key)) {\r\n var value = context[key];\r\n if (value === undefined || value === null) {\r\n continue;\r\n }\r\n var loggingName = index_1.capitalize(key);\r\n values[loggingName] = value;\r\n }\r\n }\r\n }\r\n if (data) {\r\n for (var field in data) {\r\n if (Object.prototype.hasOwnProperty.call(data, field)) {\r\n var value = data[field];\r\n if (value === undefined || value === null) {\r\n continue;\r\n }\r\n var propertyMetadata = event.metadata[field];\r\n if (propertyMetadata) {\r\n var loggingName = propertyMetadata.isPrefixingDisabled ?\r\n index_1.capitalize(field) :\r\n index_1.capitalize(propertyMetadata.definedInName) + \"_\" + field;\r\n var type = propertyMetadata.type;\r\n if (type === 4 /* Object */) {\r\n for (var subField in value) {\r\n if (Object.prototype.hasOwnProperty.call(value, subField)) {\r\n var subValue = value[subField];\r\n if (subValue !== undefined && subValue !== null && subValue !== '') {\r\n // Do not write values which would serialize as empty since they do not provide meaningful\r\n // information in instrumentation back-ends.\r\n values[loggingName + \"_\" + subField.replace('.', '_')] = subValue;\r\n }\r\n }\r\n }\r\n }\r\n else {\r\n values[loggingName] = type === 6 /* Enum */ ? propertyMetadata.typeRef[value] : value;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return {\r\n name: event.isEventTypePrefixingDisabled ? names[names.length - 2] : \"ev_\" + names[names.length - 2],\r\n values: values\r\n };\r\n}", "function getEventDescription(event) {\n if (event.message) {\n return event.message;\n }\n else if (event.exception && event.exception.values && event.exception.values[0]) {\n var exception = event.exception.values[0];\n if (exception.type && exception.value) {\n return exception.type + \": \" + exception.value;\n }\n else {\n return exception.type || exception.value || event.event_id || '<unknown>';\n }\n }\n else {\n return event.event_id || '<unknown>';\n }\n}", "function getEventDescription(event) {\r\n if (event.message) {\r\n return event.message;\r\n }\r\n if (event.exception && event.exception.values && event.exception.values[0]) {\r\n var exception = event.exception.values[0];\r\n if (exception.type && exception.value) {\r\n return exception.type + \": \" + exception.value;\r\n }\r\n return exception.type || exception.value || event.event_id || '<unknown>';\r\n }\r\n return event.event_id || '<unknown>';\r\n}", "function getAriaEventInfo(event) {\r\n var e_1, _a;\r\n var values = {\r\n 'CorrelationVector': event.vector.toString(),\r\n 'ValidationErrors': event.validationErrors,\r\n 'WebLog_FullName': event.eventName,\r\n 'WebLog_EventType': EventBase_1.ClonedEventType[event.eventType]\r\n };\r\n if (event.eventType === EventBase_1.ClonedEventType.End) {\r\n values.Duration = event.endTime - event.startTime;\r\n }\r\n var names = event.eventName.split(',');\r\n try {\r\n for (var names_1 = tslib_1.__values(names), names_1_1 = names_1.next(); !names_1_1.done; names_1_1 = names_1.next()) {\r\n var name_1 = names_1_1.value;\r\n if (name_1) {\r\n values[\"WebLog_Type_\" + name_1] = 1;\r\n }\r\n }\r\n }\r\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\r\n finally {\r\n try {\r\n if (names_1_1 && !names_1_1.done && (_a = names_1.return)) _a.call(names_1);\r\n }\r\n finally { if (e_1) throw e_1.error; }\r\n }\r\n var data = event.data, context = event.context;\r\n if (context) {\r\n for (var key in context) {\r\n if (Object.prototype.hasOwnProperty.call(context, key)) {\r\n var value = context[key];\r\n if (value === undefined || value === null) {\r\n continue;\r\n }\r\n var loggingName = index_1.capitalize(key);\r\n values[loggingName] = value;\r\n }\r\n }\r\n }\r\n if (data) {\r\n for (var field in data) {\r\n if (Object.prototype.hasOwnProperty.call(data, field)) {\r\n var value = data[field];\r\n if (value === undefined || value === null) {\r\n continue;\r\n }\r\n var propertyMetadata = event.metadata[field];\r\n if (propertyMetadata) {\r\n var loggingName = propertyMetadata.isPrefixingDisabled ?\r\n index_1.capitalize(field) :\r\n index_1.capitalize(propertyMetadata.definedInName) + \"_\" + field;\r\n var type = propertyMetadata.type;\r\n if (type === 4 /* Object */) {\r\n for (var subField in value) {\r\n if (value[subField] !== undefined) {\r\n values[loggingName + \"_\" + subField.replace('.', '_')] = value[subField];\r\n }\r\n }\r\n }\r\n else {\r\n values[loggingName] = type === 6 /* Enum */ ? propertyMetadata.typeRef[value] : value;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return {\r\n name: event.isEventTypePrefixingDisabled ? names[names.length - 2] : \"ev_\" + names[names.length - 2],\r\n values: values\r\n };\r\n}", "displayEvent(e) {\n if (e[\"event_type\"] == \"api_call\") {\n let params = e[\"params\"].map(x => x[\"variable_name\"]).join(\", \")\n if (e[\"variables\"] && e[\"variables\"].length > 0) {\n let short_name_variables = e[\"variables\"].flatMap(x => {\n if (\"full_name\" in x) {\n return x[\"full_name\"]\n } else {\n // TODO are there any cases where 'full_name' would be nested\n // somewhere other than inside a 'value' list?\n return x['value'].map(y => y[\"full_name\"])\n }\n }).filter(x => x!= undefined)\n .map(x => x.split(\"_\")[0])\n .reduce((unique, item) =>\n unique.includes(item) ? unique : [...unique, item], [])\n .join(\", \")\n return `API_CALL -> [${short_name_variables}]: ${e[\"endpoint\"]}(${params})`\n } else {\n return `API_CALL: ${e[\"endpoint\"]}(${params})`\n }\n } else if (e[\"event_type\"] == \"agent_utterance\") {\n return `TMPL: ${e[\"template\"]} [${e[\"params\"].join(\", \")}] `\n } else if (e[\"event_type\"] == \"wait_for_user\") {\n return \"REMOVE_ACTION\"\n } else if (e[\"event_type\"] == \"user_utterance\") {\n return `USER_UTTERANCE`\n } else {\n return \"UNKNOWN EVENT CHECK CONSOLE F12\"\n }\n }", "function event_type_of_edge(e) {\n if (e === null) return '';\n let str = e[2]['event_str'];\n if (!(typeof str === 'string' || str instanceof String)) {\n str = str[0];\n }\n return '<p>' + e[2]['event_id'] + ': ' + str + '</p>'\n}", "function getEventDescription(event) {\n const { message, event_id: eventId } = event;\n if (message) {\n return message;\n }\n\n const firstException = getFirstException(event);\n if (firstException) {\n if (firstException.type && firstException.value) {\n return `${firstException.type}: ${firstException.value}`;\n }\n return firstException.type || firstException.value || eventId || '<unknown>';\n }\n return eventId || '<unknown>';\n}", "function getEventDescription(event) {\n const { message, event_id: eventId } = event;\n if (message) {\n return message;\n }\n\n const firstException = getFirstException(event);\n if (firstException) {\n if (firstException.type && firstException.value) {\n return `${firstException.type}: ${firstException.value}`;\n }\n return firstException.type || firstException.value || eventId || '<unknown>';\n }\n return eventId || '<unknown>';\n }", "function getEventDescription(event) {\n\t const { message, event_id: eventId } = event;\n\t if (message) {\n\t return message;\n\t }\n\n\t const firstException = getFirstException(event);\n\t if (firstException) {\n\t if (firstException.type && firstException.value) {\n\t return `${firstException.type}: ${firstException.value}`;\n\t }\n\t return firstException.type || firstException.value || eventId || '<unknown>';\n\t }\n\t return eventId || '<unknown>';\n\t}", "function parseLog(value){\n return parse(value);\n}", "function decodeEventInfo(eventInfoText) {\n\n let eventInfo = {};\n\n // Convert whole string to lowercase\n const eventInfoTextLower = eventInfoText.toLowerCase();\n\n // Get the location of the #, may not be in string in which case will get index -1\n const indexOfHash = eventInfoTextLower.indexOf('#');\n\n // if a '#' was found then it is \"Guard #XX begins shift\" event\n if (indexOfHash >= 0) {\n\n // Add Event type\n eventInfo.EventType = 'ShiftStart';\n\n // Extract the guard ID\n const rightHandSideOfGuardID = eventInfoTextLower.slice(indexOfHash + 1);\n const guardIDEndIndex = rightHandSideOfGuardID.indexOf(' ');\n\n const guardIDText = rightHandSideOfGuardID.slice(0, guardIDEndIndex);\n\n let guardID;\n\n try {\n guardID = parseInt(guardIDText, 10);\n\n } catch (err) {\n console.error('Failed to convert guard ID');\n console.error(`Failed at: ${rightHandSideOfGuardID}`);\n\n // Throw error\n throw new Error('Failed to convert Guard ID');\n\n }\n\n if (guardID > 0) {\n eventInfo.guardID = guardID;\n\n } else {\n console.error('Invalid Guard ID');\n console.error(`Found Guard ID: ${guardID}`);\n\n throw new Error('Invalid Guard ID');\n }\n\n } else {\n // The remaining Event types are FallAsleep or WakeUp\n // Deduce type by presence of key word in text block\n\n const indexOfFallsAsleep = eventInfoTextLower.indexOf('asleep');\n const indexOfWakes = eventInfoTextLower.indexOf('wakes');\n\n if (indexOfFallsAsleep > -1) {\n // Event type is FallAsleep\n eventInfo.EventType = 'FallAsleep';\n\n } else if (indexOfWakes > -1) {\n // event type is WakeUp\n eventInfo.EventType = 'WakeUp';\n\n } else {\n // Unable to resolve the event type\n console.error('Unable to resolve event type');\n console.error(`Failed to resolve: ${eventInfoTextLower}`);\n\n\n }\n\n // Sanity check\n if (indexOfWakes > -1 && indexOfFallsAsleep > -1) {\n // Both event types match, cannot be\n\n // Clear misleading event type\n delete eventInfo.EventType;\n }\n\n }\n\n return eventInfo;\n\n }", "decodeEventLog(eventName: string, log: Object) {\n const abi = this.abi.find(abi => {\n return abi.type === 'event' && abi.name === eventName\n })\n if (!abi) {\n throw new Error(`Event '${eventName}' not found in ABI`)\n }\n const inputs = [\n {\n indexed: true,\n name: 'signature',\n type: 'string',\n },\n ...abi.inputs,\n ]\n // Remove event sig topic as expected by decodeLog\n const topics = log.topics.slice(1)\n return Web3EthAbi.decodeLog(inputs, log.data, topics)\n }", "function extractEventData() {\n var data = {};\n data['guestCount'] = $('#event-details__guest-count').val();\n data['time'] = $('#event-details__event-time').val();\n data['length'] = $('#event-details__event-length').val();\n data['date'] = $('#event-details__event-date').val();\n data['drinkPrice'] = 1.1;\n return data;\n }", "function handleEvent(event) {\n switch (event.type) {\n case 'message':\n const message = event.message;\n switch (message.type) {\n case 'text': \n if(message.text.includes(\"nama\") || message.text.includes(\"email\") || message.text.includes(\"Nama\") || message.text.includes(\"Email\")){\n const splitter = message.text.split(\" \")\n return handleRegistration(splitter, event.replyToken, event.source);\n }\n return handleText(message, event.replyToken, event.source);\n case 'image':\n return handleImage(message, event.replyToken);\n case 'video':\n return handleVideo(message, event.replyToken);\n case 'audio':\n return handleAudio(message, event.replyToken);\n case 'location':\n return handleLocation(message, event.replyToken);\n case 'sticker':\n return handleSticker(message, event.replyToken);\n default:\n throw new Error(`Unknown message: ${JSON.stringify(message)}`);\n }\n\n default:\n throw new Error(`Unknown event: ${JSON.stringify(event)}`);\n }\n}", "parseLog(log) {\n let fragment = this.getEvent(log.topics[0]);\n if (!fragment || fragment.anonymous) {\n return null;\n }\n // @TODO: If anonymous, and the only method, and the input count matches, should we parse?\n // Probably not, because just because it is the only event in the ABI does\n // not mean we have the full ABI; maybe jsut a fragment?\n return new LogDescription({\n eventFragment: fragment,\n name: fragment.name,\n signature: fragment.format(),\n topic: this.getEventTopic(fragment),\n args: this.decodeEventLog(fragment, log.data, log.topics)\n });\n }", "parseLog(log) {\n let fragment = this.getEvent(log.topics[0]);\n if (!fragment || fragment.anonymous) {\n return null;\n }\n // @TODO: If anonymous, and the only method, and the input count matches, should we parse?\n // Probably not, because just because it is the only event in the ABI does\n // not mean we have the full ABI; maybe jsut a fragment?\n return new LogDescription({\n eventFragment: fragment,\n name: fragment.name,\n signature: fragment.format(),\n topic: this.getEventTopic(fragment),\n args: this.decodeEventLog(fragment, log.data, log.topics)\n });\n }", "parse(eventObject) {\t\t\t\t\t\t\t\t\t\t\t\t\t\t// method definition\n\t\tlet {name, time} = eventObject;\t\t\t\t\t\t\t\t\t\t\t// let keyword, destructuring\n\t\treturn `Received event ${name} at time ${time}`;\t\t\t\t\t\t// template string\n\t}", "function obtenerEvento(event) {\n // console.log(busqueda.value);\n console.log(`Evento: ${event.type}`);\n}", "function $getEventType(e) {\r\n\t\treturn e.type;\r\n\t}", "function getLogEvents() {\n var eventMap = {};\n if ( Logger.getLog().length > 0 ) {\n var arr = Logger.getLog().split(\"\\n\");\n for (var i in arr) {\n var str = arr[i];\n var regexResultArr = str.match(\"(.+?) INFO: (.+)\");\n var timestamp = regexResultArr[0];\n var event = regexResultArr[1];\n eventMap[i] = timestamp + \" \" + event;\n }\n }\n return eventMap;\n}", "eventExtras(type) {\n return {\n 'type': type,\n 'timestamp': new Date().getTime()\n };\n }", "function logger(event, payload) {\n let timestamp = new Date();\n console.log({ timestamp, event, payload });//considered a destructured object\n }", "messageEventless (input, context, log_level) {\n // make sure we set the default values\n ensure_init(context);\n // don't let failed_ct or failed_address go negative\n context['failed_ct'] = Math.max(0, context['failed_ct']);\n context['failed_address'] = Math.max(0, context['failed_address']);\n\n return this.preprocess(input, context, log_level)\n .then((res) => {\n return {\n \"text\": res['resp']['output']['text'].reduce((all, current) => all += current, \"\"),\n \"context\": res['resp']['context'],\n \"intents\": res['resp']['intents']\n };\n });\n }", "function onMessage(event) {\n\n\t\tvar msg = JSON.parse(event.data);\n\n\t\tswitch(msg.type) {\n\n\t\tcase 'chat':\n\t\t\tdisplayChatMessage(event);\n\t\t\tbreak;\n\n\t\tcase 'attendeeCount':\n\t\t\tdisplayAttendeeCount(event);\n\t\t\tbreak;\n\t\t\t\n\t\tcase 'kudosCount':\n\t\t\tdisplayKudosCount(event);\n\t\t\tbreak;\n\t\t\t\n\t\tcase 'fanCount':\n\t\t\tdisplayFanCount(event);\n\t\t\tbreak;\n\n\t\t}\n\t}", "function handleMessage(event){\n var data = JSON.parse(event.data);\n log(\"Received:\" +\" Latitude: \"+ data.lat +\n \" Longitude: \" + data.lon);\n}", "_processMessage(message)\n{\n try\n {\n let data = JSON.parse(message);\n if (undefined === data.e)\n {\n return;\n }\n switch (data.e)\n {\n case 'depthUpdate':\n this._processOrderBookUpdate(data);\n return;\n case 'aggTrade':\n this._processTrades(data);\n return;\n case '24hrTicker':\n this._processTicker(data);\n return;\n case 'kline':\n this._processKline(data);\n return;\n }\n }\n catch (e)\n {\n logger.error(e.stack);\n return;\n }\n}", "async function parseSingleEvent(event) {\n\n\tlet e = {\n\t\tid: null,\n\t\ttype: null,\n\t\tplanned: false,\n\t\tdate: {\n\t\t\tfetched: null,\n\t\t\tstart: null,\n\t\t\tend: null,\n\t\t},\n\t\tsummary: null,\n\t\tdetail: null,\n\t\tline: [],\n\t\teffects: null,\n\t\tseverity: null,\n\t\tsource: null,\n\t};\n\ttry {\n\t\te.id = event.SituationNumber[0].trim();\n\t\te.type = event.ReasonName[0].trim();\n\t\te.planned = (event.Planned[0] === 'true') ? true : false;\n\t\te.summary = event.Summary[0]._;\n\t\te.detail = cleanStatusText(event.LongDescription[0]);\n\t\te.type_detail = event.Consequences[0].Consequence[0].Condition[0];\n\t\te.severity = event.Consequences[0].Consequence[0].Severity[0];\n\n\t\te.date.fetched = event.CreationTime[0];\n\t\te.date.start = event.PublicationWindow[0].StartTime[0];\n\t\te.date.end = (event.PublicationWindow[0].EndTime) ? event.PublicationWindow[0].EndTime[0] : null;\n\n\t\t// Parse out lines.\n\t\tlet k = event.Affects[0].VehicleJourneys[0].AffectedVehicleJourney;\n\t\tfor (let j in k) {\n\t\t\te.line.push({ line: k[j].LineRef[0].trim(), dir: k[j].DirectionRef[0].trim()});\n\t\t}\n\n\t\tif (event.Source[0].SourceType[0] != 'directReport') {\n\t\t\te.source = event.Source[0].SourceType[0];\n\t\t\tconsole.warn('NEW SOURCE TYPE:', event.Source[0].SourceType[0]);\n\t\t}\n\n\t\te.detail = await parseDetailMessage(e.detail, e.summary, e.line, e.id);\n\n\t}\n\tcatch (err) {\n\t\tconsole.error('\\n\\n <!> Error during Message Assembly: ', err ,'\\n\\n');\n\t}\n\n\treturn e;\n}", "function logEvent(eventType) {}", "processEvent(e) {\n\t // having each type directly access methods to avoid one long switch\n\t try {\n\t \t return this[e.type](e)\n\t\t} catch (e) {\n\t\t return null;\n\t\t}\n\t}", "function Event_ConvertToLogData(theEvent, userData, rule)\n{\n\t//create the data\n\tvar data =\n\t{\n\t\tInterpreterObjectId: theEvent.InterpreterObject.DataObject.Id,\n\t\tEventName: Get_EventString(theEvent.Event),\n\t\tData: theEvent.Data,\n\t\tDesignerName: IntObject_GetDesignerNameFromId(theEvent.InterpreterObject.DataObject.Id),\n\t\tUserData: null,\n\t\tInterpreterObjectIdEx: -1,\n\t\tEventNameEx: theEvent.EventEx > 0 ? Get_EventString(theEvent.EventEx) : null,\n\t\tDataEx: theEvent.DataEx,\n\t\tDesignerNameEx: null\n\t};\n\t//has interpreter Object EX?\n\tif (theEvent.InterpreterObjectEx)\n\t{\n\t\tdata.InterpreterObjectIdEx = theEvent.InterpreterObjectEx.DataObject.Id;\n\t\tdata.DesignerNameEx = IntObject_GetDesignerNameFromId(theEvent.InterpreterObjectEx.DataObject.Id);\n\t}\n\t//has userdata?\n\tif (userData)\n\t{\n\t\t//add user data\n\t\tdata.UserData =\n\t\t\t{\n\t\t\t\tUniqueId: userData.UniqueId,\n\t\t\t\tDataType: userData.DataType,\n\t\t\t\tInterpreterObjectId: userData.InterpreterObjectId,\n\t\t\t\tDesignerName: IntObject_GetDesignerNameFromId(userData.InterpreterObjectId),\n\t\t\t\tExtraData: userData.ExtraData,\n\t\t\t\tRuleId: rule.UniqueId,\n\t\t\t\tHintMessageId: rule.MessageId,\n\t\t\t\tHintMessageHTML: \"\",\n\t\t\t\tRuleType: rule.Type,\n\t\t\t\tRuleFormat: rule.Format,\n\t\t\t\tRuleComparison: rule.Comparison,\n\t\t\t\tRuleData: rule.Data\n\t\t\t};\n\t\t//have we got a current tutorial?\n\t\tif (__SIMULATOR.StateManager.CurrentState.Tut && rule.MessageId)\n\t\t{\n\t\t\t//get the message\n\t\t\tvar wi4Msg = __SIMULATOR.StateManager.CurrentState.GetMessage(rule.MessageId);\n\t\t\t//valid?\n\t\t\tif (wi4Msg)\n\t\t\t{\n\t\t\t\t//reset the message\n\t\t\t\tdata.UserData.HintMessageHTML = wi4Msg.HTMLContent;\n\t\t\t}\n\t\t}\n\t}\n\t//return it\n\treturn data;\n}", "function getData (event) {\n var msg = JSON.parse(event.data);\n //console.log(msg);\n // We can select specific JSON groups by using msg.name, where JSON contains \"name\":x\n // Every type MUST have msg.type to determine what else is pulled from it\n switch (msg.type){\n case \"print\": // Print out msg.data\n //console.log(msg.data);\n break;\n case \"battery\":\n $('#battery-voltage').text(msg.data);\n break;\n case \"ping_sensors\":\n $('#ping-display').text(JSON.stringify(msg.data));\n var d = msg.data;\n sensorIndicatorDraw(d.fr,d.r,d.br,d.b,d.bl,d.l,d.fl);\n break;\n }\n }", "function handler(event, context) {\n if (event.type) {\n return context.succeed((0, _example.getMessage)(event.type));\n }\n return context.fail('No type provided!');\n}", "function routeMessage(event) {\r\n let obj = JSON.parse(event.data);\r\n\r\n switch(obj.type) {\r\n case \"search\":\r\n let keyword = obj.value;\r\n search(keyword);\r\n break;\r\n case \"config\":\r\n config();\r\n break;\r\n case \"history\":\r\n history();\r\n break;\r\n case \"debug\":\r\n debug(obj);\r\n break;\r\n }\r\n}", "getEventInfo(event){\n var offset = this.$viewer_div.offset();\n var properties = this.model.get('viewer_properties');\n var coords = this.get_coords(event);\n var extraKeys = this.model.get('extraEventKeys');\n \n var eventInfo = {\n clientX: event.clientX,\n clientY: event.clientY,\n offsetLeft: offset.left,\n offsetTop: offset.top,\n scrollTop: this.$viewer_div[0].scrollTop,\n scrollLeft: this.$viewer_div[0].scrollLeft,\n type: event.type,\n altKey: event.altKey,\n shiftKey: event.shiftKey,\n viewerX: coords[0],\n viewerY: coords[1]\n };\n \n // If the user wants any fields from the event not used by default, they\n // can be specified here\n for(var key in extraKeys){\n eventInfo[key] = event[key];\n };\n \n return eventInfo;\n }", "function handleMessage(message_event) {\n appendToEventLog('nexe sez: ' + message_event.data);\n}", "function parseMsg(evt) {\n let msg\n try { msg = JSON.parse(evt.data) }\n catch (e) { onError(\n new Error('Invalid JSON from LiveReload server.')\n )}\n return msg\n }", "function parseMessage(buffer){\n var result={malformed:true}\n , actionMatch\n , str = buffer.toString()\n , match = messagePattern.exec(str) \n ;\n \n if(!match || isNaN(Date.parse(match[2]))) return result;\n\n //result.pri = match[1];\n result.time = new Date(match[2]);\n result.cat = match[3].toUpperCase();\n //result.severity = match[4];\n //result.logId = match[5];\n //result.revision = match[6];\n // I have not removed these commented properties for later they might be used, and one could just uncomment them.\n result.event = match[7].toUpperCase();\n if(actionPattern.test(match[8])){\n actionMatch = actionPattern.exec(match[8]);\n result.action = actionMatch[1].toUpperCase();\n result.message = actionMatch[2];\n }else{\n result.message = match[8];\n } \n delete result.malformed;\n result.message = match[0]; // complete message is requested in requirements.\n return result;\n}", "function handleMessage(e) {\n\t\tif (!e.data) return;\n\n\t\tvar payload;\n\t\ttry {\n\t\t\tpayload = JSON.parse(e.data);\n\t\t} catch (e) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!payload) return;\n\n\t\tvar handler = handlers[payload.event];\n\t\tif (handler) {\n\t\t\thandler(e.source, payload);\n\t\t}\n\t}", "formatEvent(event, eidx) {\n\t\t// Enum to human-readable structure to translate the various DOM contexts.\n\t\tconst locationTypes = {\n\t\t\t0: \"attribute name\",\n\t\t\t1: \"text\",\n\t\t\t2: \"node name\",\n\t\t\t3: \"attribute value\",\n\t\t\t4: \"comment block\"\n\t\t};\n\n\t\tvar ret = [];\n\t\tif (event.DOMContexts && event.DOMContexts.length > 0) {\n\t\t\tret = event.DOMContexts.map(\n\t\t\t\tfunction(context, cidx) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tHTMLLocationType:\n\t\t\t\t\t\t\tlocationTypes[context.HTMLLocationType],\n\t\t\t\t\t\tHTMLNodeType: context.HTMLNodeType,\n\t\t\t\t\t\tEventContext: context.EventContext,\n\t\t\t\t\t\tRawEvent: event.RawEvent.Data,\n\t\t\t\t\t\tRawEventIndex: cidx,\n\t\t\t\t\t\tEventType: event.EventType,\n\t\t\t\t\t\tEventHost: this.parseHost(event.EventURL),\n\t\t\t\t\t\tEventPath: this.parsePath(event.EventURL),\n\t\t\t\t\t\tSeverity: context.Severity\n\t\t\t\t\t};\n\t\t\t\t}.bind(this)\n\t\t\t);\n\t\t} else {\n\t\t\t// If there are no DOMContexts, it is most likely an HTTP response.\n\t\t\treturn {\n\t\t\t\tHTMLLocationType: \"n/a\",\n\t\t\t\tHTMLNodeType: \"n/a\",\n\t\t\t\tEventContext: \"n/a\",\n\t\t\t\tRawEvent: event.RawEvent.Data,\n\t\t\t\tRawEventIndex: 0, // this isn't really correct. there could be a case where there are two of the same tracer in an HTTP response\n\t\t\t\tEventType: event.EventType,\n\t\t\t\tEventHost: this.parseHost(event.EventURL),\n\t\t\t\tEventPath: this.parsePath(event.EventURL),\n\t\t\t\tSeverity: 0\n\t\t\t};\n\t\t}\n\n\t\treturn ret;\n\t}", "get eventMessage() {\n var _a;\n return (_a = this._eventData.event_data.message) !== null && _a !== void 0 ? _a : '';\n }", "onMessage(event) {\n try {\n const data = JSON.parse(event.data);\n // data.event is used to lookup which registered listener to call\n this.ee.emit(data.event, data);\n } catch (error) {\n this.ee.emit('error', error);\n }\n }", "function detectEventType(obj) {\n var result;\n\n if (obj.type === \"simple_message\") {\n result = makeSimpleMsgElement(obj);\n } else if (obj.type === \"apply\") {\n result = makeApplyElement(obj);\n } else if (obj.type === \"reward\") {\n result = makeAwardElement(obj);\n } else if (obj.type === \"decline_offer\") {\n result = makeDestroyElement(obj);\n } else if (obj.type === \"reject_interpreter\") {\n result = makeDestroyElement(obj);\n } else if (obj.type === \"invite\") {\n result = makeInviteElement(obj);\n }\n\n return result;\n } // end of detecting event type function", "function processEvent(event) {\n const { body, pathParameters, queryStringParameters, requestContext } = event\n const { httpMethod, resourceId, resourcePath, requestId } = requestContext\n\n return {\n body: body && bourne.parse(body),\n queryStringParameters,\n pathParameters\n }\n}", "function addExceptionTypeValue(event, value, type) {\n event.exception = event.exception || {};\n event.exception.values = event.exception.values || [];\n event.exception.values[0] = event.exception.values[0] || {};\n event.exception.values[0].value = event.exception.values[0].value || value || '';\n event.exception.values[0].type = event.exception.values[0].type || type || 'Error';\n}", "function addExceptionTypeValue(event, value, type) {\n event.exception = event.exception || {};\n event.exception.values = event.exception.values || [];\n event.exception.values[0] = event.exception.values[0] || {};\n event.exception.values[0].value = event.exception.values[0].value || value || '';\n event.exception.values[0].type = event.exception.values[0].type || type || 'Error';\n}", "function addExceptionTypeValue(event, value, type) {\n event.exception = event.exception || {};\n event.exception.values = event.exception.values || [];\n event.exception.values[0] = event.exception.values[0] || {};\n event.exception.values[0].value = event.exception.values[0].value || value || '';\n event.exception.values[0].type = event.exception.values[0].type || type || 'Error';\n}", "function decodeLogItem(eventObject, log) {\n var useNumberedParams = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n\n if (eventObject && log.topics[0] === eventSignature(eventObject)) {\n return decodeEvent(eventObject, log.data, log.topics, useNumberedParams);\n }\n}", "function decodeLogItem(eventObject, log) {\n var useNumberedParams = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n\n if (eventObject && log.topics[0] === eventSignature(eventObject)) {\n return decodeEvent(eventObject, log.data, log.topics, useNumberedParams);\n }\n}", "function decodeLogItem(eventObject, log) {\n var useNumberedParams = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n\n if (eventObject && log.topics[0] === eventSignature(eventObject)) {\n return decodeEvent(eventObject, log.data, log.topics, useNumberedParams);\n }\n}", "function decodeLogItem(eventObject, log) {\n var useNumberedParams = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n\n if (eventObject && log.topics[0] === eventSignature(eventObject)) {\n return decodeEvent(eventObject, log.data, log.topics, useNumberedParams);\n }\n}", "function decodeLogItem(eventObject, log) {\n var useNumberedParams = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n\n if (eventObject && log.topics[0] === eventSignature(eventObject)) {\n return decodeEvent(eventObject, log.data, log.topics, useNumberedParams);\n }\n}", "function messageHandler(event, handlers) {\n\tvar data = JSON.parse(event.data);\n\tif(handlers[data.type]){\n\t\thandlers[data.type](data);\n\t} else {\n\t\tconsole.warn(\"unable to handle message\", event);\n\t}\n}", "function process_event(event){\n // Capturamos los datos del que genera el evento y el mensaje \n var senderID = event.sender.id;\n var message = event.message;\n \n // Si en el evento existe un mensaje de tipo texto\n if(message.text){\n // Crear un payload para un simple mensaje de texto\n var response = {\n \"text\": 'Has escrito lo siguiente: ' + message.text\n }\n }\n // Enviamos el mensaje mediante SendAPI\n enviar_texto(senderID, response);\n}", "function addExceptionTypeValue(event, value, type) {\n\t const exception = (event.exception = event.exception || {});\n\t const values = (exception.values = exception.values || []);\n\t const firstException = (values[0] = values[0] || {});\n\t if (!firstException.value) {\n\t firstException.value = value || '';\n\t }\n\t if (!firstException.type) {\n\t firstException.type = type || 'Error';\n\t }\n\t}", "function processEvent(event) {\n var linkName,\n pageName,\n reportEvent = false,\n linkTrackVars = [];\n\n appMeasurement.timestamp = timestampOption\n ? Math.floor(new Date().getTime() / 1000)\n : null;\n appMeasurement.events = '';\n if (event.CustomFlags && event.CustomFlags.hasOwnProperty(LINK_NAME)) {\n linkName = event.CustomFlags[LINK_NAME];\n }\n if (event.CustomFlags && event.CustomFlags.hasOwnProperty(PAGE_NAME)) {\n pageName = event.CustomFlags[PAGE_NAME];\n }\n\n if (isAdobeClientKitInitialized) {\n try {\n // First determine if an eventName is mapped, if so, log it as an event as opposed to a pageview or commerceview\n // ex. If a pageview is mapped to an event, we logEvent instead of logging it as a pageview\n var eventMapping = getEventMappingValue(event);\n\n if (\n eventMapping &&\n eventMapping.result &&\n eventMapping.matches\n ) {\n setMappings(event, true, linkTrackVars);\n reportEvent = logEvent(\n event,\n linkTrackVars,\n eventMapping.matches,\n linkName,\n pageName\n );\n } else if (event.EventDataType === MessageType.PageView) {\n setMappings(event, false);\n reportEvent = logPageView(event, pageName);\n } else if (event.EventDataType === MessageType.Commerce) {\n setMappings(event, true, linkTrackVars);\n reportEvent = processCommerceTransaction(\n event,\n linkTrackVars,\n linkName,\n pageName\n );\n } else if (event.EventDataType === MessageType.Media) {\n self.adobeMediaSDK.process(event);\n } else {\n return 'event name not mapped, aborting event logging';\n }\n\n if (\n reportEvent === true &&\n reportingService &&\n event.EventDataType\n ) {\n reportingService(self, event);\n return 'Successfully sent to ' + name;\n }\n } catch (e) {\n return 'Failed to send to: ' + name + ' ' + e;\n }\n }\n\n return 'Cannot send to forwarder ' + name + ', not initialized.';\n }", "function extractMessage(ex) {\n var message = ex && ex.message;\n if (!message) {\n return 'No error message';\n }\n if (message.error && typeof message.error.message === 'string') {\n return message.error.message;\n }\n return message;\n}", "function extractMessage(ex) {\n var message = ex && ex.message;\n if (!message) {\n return 'No error message';\n }\n if (message.error && typeof message.error.message === 'string') {\n return message.error.message;\n }\n return message;\n}", "function onMessage(event) {\n const echartsData = JSON.parse(event.nativeEvent.data);\n // 判断监听类型\n if (echartsData.type == \"datazoom\") {\n props.onDataZoom?.();\n } else if (echartsData.type == \"legendselectchanged\") {\n props.legendSelectChanged?.(echartsData.name);\n } else if (echartsData.type == \"tooltipEvent\") {\n props.tooltipEvent?.(echartsData.params);\n } else {\n props.onPress?.(JSON.parse(event.nativeEvent.data));\n }\n }", "function extractMessage(ex) {\n\t const message = ex && ex.message;\n\t if (!message) {\n\t return 'No error message';\n\t }\n\t if (message.error && typeof message.error.message === 'string') {\n\t return message.error.message;\n\t }\n\t return message;\n\t}", "function process_event(event){\n // Capturamos los datos del que genera el evento y el mensaje \n var senderID = event.sender.id;\n var message = event.message;\n \n // Si en el evento existe un mensaje de tipo texto\n if(message.text){\n // Crear un payload para un simple mensaje de texto\n console.log(senderID);\n var response = {\n \"text\": 'Va que esto dijiste: ' + message.text\n \n }\n }\n \n // Enviamos el mensaje mediante SendAPI\n enviar_texto(senderID, response);\n}", "function entityMessageReceiver(event) {\n // validate that this is an entityMessage\n if (-1 === event.data.indexOf('entityMessage')) return\n var message = JSON.parse(event.data)\n var uuid = message.uuid\n var entity = entities[uuid]\n switch (message.type) {\n case 'error':\n var value = message.value\n setEntityState(entity,'error')\n console.log('an entity threw an error -',uuid,value)\n break\n case 'setPosition':\n var value = message.value\n setPosition(entity,value)\n break\n case 'setRotation':\n var value = message.value\n setRotation(entity,value)\n break\n case 'move':\n var value = message.value\n move(entity,value)\n break\n case 'rotate':\n var value = message.value\n rotate(entity,value)\n break\n }\n }", "function handleReceiveMessage(event) {\n console.log(event.data);\n}", "function parseEvent(response) {\n if(!response)\n return;\n for (const key in response.args) {\n const arg = response.args[key];\n if (typeof arg === 'object') {\n if (arg.constructor !== Array)\n response.args[key] = arg.toNumber();\n }\n else if(!isAddress(arg))\n response.args[key] = toUtf8(arg);\n }\n}", "function handleMessage(message_event) {\n var data = message_event.data;\n if ((typeof(data) === 'string' || data instanceof String)) {\n check_if_pexe_7778_working(data);\n common.logMessage(data);\n }\n else if (data instanceof Object)\n {\n var pipeName = data['pipe']\n if ( pipeName !== undefined )\n {\n // Message for JavaScript I/O pipe\n var operation = data['operation'];\n if (operation == 'write') {\n $('pipe_output').value += ArrayBufferToString(data['payload']);\n } else if (operation == 'ack') {\n common.logMessage(pipeName + \": ack:\" + data['payload']);\n } else {\n common.logMessage('Got unexpected pipe operation: ' + operation);\n }\n }\n else\n {\n // Result from a function call.\n var params = data.args;\n var funcName = data.cmd;\n var callback = funcToCallback[funcName];\n if (!callback)\n {\n common.logMessage('Error: Bad message ' + funcName + ' received from NaCl module.');\n return;\n }\n delete funcToCallback[funcName];\n callback.apply(null, params);\n }\n } else {\n common.logMessage('Error: Unknow message `' + data + '` received from NaCl module.');\n }\n}", "varReceived(evt, panel) { \n // Parse message\n this.msg = JSON.parse(evt.data);\n\n var keys = Object.keys(this.msg)\n var msgLength = keys.length\n \n // Switch on type of message and message length\n switch(true) {\n // If actually an array of 2 variables\n case (msgLength == 2 && typeof this.msg.variable === 'undefined'):\n for(var values in this.msg){\n this.addVariable(this.msg[values].variable, this.msg[values].value);\n }\n break;\n // If single variable (name and value)\n case (msgLength == 2):\n this.addVariable(this.msg.variable, this.msg.value);\n break;\n // If multiple message passed (Map of variables)\n case (msgLength > 2 && this.msg[keys[msgLength-1]].value == panel):\n // Iterate over every variable\n for(var values in this.msg){\n this.addVariable(this.msg[values].variable, this.msg[values].value);\n }\n break;\n default:\n break; \n }\n }", "function parseGetMessage(message)\n\t{\n\t\tvar lines = message.split('\\r\\n');\n\t\tvar line = lines.shift();\n\t\tvar words = line.split(' ');\n\t\tvar word = words.shift();\n\t\tif (word != 'VALUE')\n\t\t{\n\t\t\tlog.error('Unknown token %s in %s', word, lines);\n\t\t\treturn null;\n\t\t}\n\t\tword = words.shift();\n\t\tword = words.shift();\n\t\tword = words.shift();\n\t\tif (!word)\n\t\t{\n\t\t\tlog.error('Invalid length %s', word);\n\t\t\treturn null;\n\t\t}\n\t\tvar length = parseInt(word, 10);\n\t\tline = lines.shift();\n\t\tif (line.length != length)\n\t\t{\n\t\t\tlog.error('Unexpected line length not %s in %s', length, line);\n\t\t\treturn null;\n\t\t}\n\t\treturn line;\n\t}", "decodeEventLog(eventFragment, data, topics) {\n if (typeof (eventFragment) === \"string\") {\n eventFragment = this.getEvent(eventFragment);\n }\n if (topics != null && !eventFragment.anonymous) {\n let topicHash = this.getEventTopic(eventFragment);\n if (!Object(_ethersproject_bytes__WEBPACK_IMPORTED_MODULE_2__[/* isHexString */ \"l\"])(topics[0], 32) || topics[0].toLowerCase() !== topicHash) {\n logger.throwError(\"fragment/topic mismatch\", _ethersproject_logger__WEBPACK_IMPORTED_MODULE_8__[/* Logger */ \"b\"].errors.INVALID_ARGUMENT, { argument: \"topics[0]\", expected: topicHash, value: topics[0] });\n }\n topics = topics.slice(1);\n }\n let indexed = [];\n let nonIndexed = [];\n let dynamic = [];\n eventFragment.inputs.forEach((param, index) => {\n if (param.indexed) {\n if (param.type === \"string\" || param.type === \"bytes\" || param.baseType === \"tuple\" || param.baseType === \"array\") {\n indexed.push(_fragments__WEBPACK_IMPORTED_MODULE_7__[/* ParamType */ \"g\"].fromObject({ type: \"bytes32\", name: param.name }));\n dynamic.push(true);\n }\n else {\n indexed.push(param);\n dynamic.push(false);\n }\n }\n else {\n nonIndexed.push(param);\n dynamic.push(false);\n }\n });\n let resultIndexed = (topics != null) ? this._abiCoder.decode(indexed, Object(_ethersproject_bytes__WEBPACK_IMPORTED_MODULE_2__[/* concat */ \"b\"])(topics)) : null;\n let resultNonIndexed = this._abiCoder.decode(nonIndexed, data, true);\n let result = [];\n let nonIndexedIndex = 0, indexedIndex = 0;\n eventFragment.inputs.forEach((param, index) => {\n if (param.indexed) {\n if (resultIndexed == null) {\n result[index] = new Indexed({ _isIndexed: true, hash: null });\n }\n else if (dynamic[index]) {\n result[index] = new Indexed({ _isIndexed: true, hash: resultIndexed[indexedIndex++] });\n }\n else {\n try {\n result[index] = resultIndexed[indexedIndex++];\n }\n catch (error) {\n result[index] = error;\n }\n }\n }\n else {\n try {\n result[index] = resultNonIndexed[nonIndexedIndex++];\n }\n catch (error) {\n result[index] = error;\n }\n }\n // Add the keyword argument if named and safe\n if (param.name && result[param.name] == null) {\n const value = result[index];\n // Make error named values throw on access\n if (value instanceof Error) {\n Object.defineProperty(result, param.name, {\n get: () => { throw wrapAccessError(`property ${JSON.stringify(param.name)}`, value); }\n });\n }\n else {\n result[param.name] = value;\n }\n }\n });\n // Make all error indexed values throw on access\n for (let i = 0; i < result.length; i++) {\n const value = result[i];\n if (value instanceof Error) {\n Object.defineProperty(result, i, {\n get: () => { throw wrapAccessError(`index ${i}`, value); }\n });\n }\n }\n return Object.freeze(result);\n }", "function handleMessage(message_event) {\n var data = message_event.data;\n if ((typeof(data) === 'string' || data instanceof String)) {\n common.logMessage(data);\n } else if (data instanceof Object) {\n var pipeName = data['pipe']\n if (pipeName !== undefined) {\n // Message for JavaScript I/O pipe\n var operation = data['operation'];\n if (operation == 'write') {\n $('pipe_output').value += ArrayBufferToString(data['payload']);\n } else if (operation == 'ack') {\n common.logMessage(pipeName + \": ack:\" + data['payload']);\n } else {\n common.logMessage('Got unexpected pipe operation: ' + operation);\n }\n } else {\n // Result from a function call.\n var params = data.args;\n var funcName = data.cmd;\n var callback = funcToCallback[funcName];\n\n if (!callback) {\n common.logMessage('Error: Bad message ' + funcName +\n ' received from NaCl module.');\n return;\n }\n\n delete funcToCallback[funcName];\n callback.apply(null, params);\n }\n } else {\n common.logMessage('Error: Unknow message `' + data +\n '` received from NaCl module.');\n }\n}", "function getEventData(){\n\tvar mapInfo = JSON.parse(sessionStorage.getItem(\"mapInfo\"));\n\tconsole.log(\"mapInfo:\");\n\tconsole.log(mapInfo)\n\t// console.log(\"Maps eventData:\");\n\t// console.log(eventData);\n\tvar location = mapInfo.location;\n\tvar eventName = mapInfo.name;\n\n\treturn [location, eventName];\n}", "function addExceptionTypeValue(event, value, type) {\n const exception = (event.exception = event.exception || {});\n const values = (exception.values = exception.values || []);\n const firstException = (values[0] = values[0] || {});\n if (!firstException.value) {\n firstException.value = value || '';\n }\n if (!firstException.type) {\n firstException.type = type || 'Error';\n }\n }", "function process_event(event){\n // Capturamos los datos del que genera el evento y el mensaje\n var senderID = event.sender.id;\n var message = event.message;\n \n // Si en el evento existe un mensaje de tipo texto\n if(message.text){\n console.log('=========MENSAJE DE ============')\n console.log('Mensaje de ' + senderID);\n console.log('mensaje: ' + message.text);\n\n if(message.text === 'Integrantes'){\n enviar_texto(senderID, {\n \"text\": '-Flores Olegua Johan Rafael 1910082' + ' ' +'-Pozo Aquino Erick Junior 1316534' + ' ' +'-Arroyo Caseres Juan Carlos ',\n })\n }\n if(message.text === 'integrantes'){\n enviar_texto(senderID, {\n \"text\": '-Flores Olegua Johan Rafael 1910082' + ' ' +'-Pozo Aquino Erick Junior 1316534' + ' ' +'-Arroyo Caseres Juan Carlos ',\n })\n }\n}\n \n // Enviamos el mensaje mediante SendAPI\n //enviar_texto(senderID, response);\n }", "function addExceptionTypeValue(event, value, type) {\n const exception = (event.exception = event.exception || {});\n const values = (exception.values = exception.values || []);\n const firstException = (values[0] = values[0] || {});\n if (!firstException.value) {\n firstException.value = value || '';\n }\n if (!firstException.type) {\n firstException.type = type || 'Error';\n }\n}", "function parseTicketMasterEvent(msg) {\n\tvar eventObj = new Object();\n\n\tvar context = jQuery(msg);\n\n\teventObj.start = new Object();\n\teventObj.end = new Object();\n\tstartString = context.find('meta[itemprop=\"startDate\"]').attr(\"content\");\n\tstartString = startString.replace('T', ' ');\n\teventObj.start.dateTime = new Date(startString);\n\n\teventObj.end.dateTime = new Date(eventObj.start.dateTime);\n\teventObj.end.dateTime.setHours( eventObj.end.dateTime.getHours() + 3 );\n\n\teventObj.summary = context.filter('meta[property=\"og:title\"]').attr(\"content\");\n\n\teventObj.description = context.filter('meta[property=\"og:url\"]').attr(\"content\");\n\n\tvar venue = context.find('#artist_venue_name').text();\n\tvar location = context.find('#artist_location').text();\n\t\n\teventObj.location = venue + \" - \" + location;\n\t\t\t\t\t\t\t\n\treturn eventObj;\n}", "decodeEventLog(eventFragment, data, topics) {\n if (typeof (eventFragment) === \"string\") {\n eventFragment = this.getEvent(eventFragment);\n }\n if (topics != null && !eventFragment.anonymous) {\n let topicHash = this.getEventTopic(eventFragment);\n if (!__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__ethersproject_bytes__[\"f\" /* isHexString */])(topics[0], 32) || topics[0].toLowerCase() !== topicHash) {\n logger.throwError(\"fragment/topic mismatch\", __WEBPACK_IMPORTED_MODULE_9__ethersproject_logger__[\"a\" /* Logger */].errors.INVALID_ARGUMENT, { argument: \"topics[0]\", expected: topicHash, value: topics[0] });\n }\n topics = topics.slice(1);\n }\n let indexed = [];\n let nonIndexed = [];\n let dynamic = [];\n eventFragment.inputs.forEach((param, index) => {\n if (param.indexed) {\n if (param.type === \"string\" || param.type === \"bytes\" || param.baseType === \"tuple\" || param.baseType === \"array\") {\n indexed.push(__WEBPACK_IMPORTED_MODULE_8__fragments__[\"e\" /* ParamType */].fromObject({ type: \"bytes32\", name: param.name }));\n dynamic.push(true);\n }\n else {\n indexed.push(param);\n dynamic.push(false);\n }\n }\n else {\n nonIndexed.push(param);\n dynamic.push(false);\n }\n });\n let resultIndexed = (topics != null) ? this._abiCoder.decode(indexed, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__ethersproject_bytes__[\"c\" /* concat */])(topics)) : null;\n let resultNonIndexed = this._abiCoder.decode(nonIndexed, data);\n let result = [];\n let nonIndexedIndex = 0, indexedIndex = 0;\n eventFragment.inputs.forEach((param, index) => {\n if (param.indexed) {\n if (resultIndexed == null) {\n result[index] = new Indexed({ _isIndexed: true, hash: null });\n }\n else if (dynamic[index]) {\n result[index] = new Indexed({ _isIndexed: true, hash: resultIndexed[indexedIndex++] });\n }\n else {\n try {\n result[index] = resultIndexed[indexedIndex++];\n }\n catch (error) {\n result[index] = error;\n }\n }\n }\n else {\n try {\n result[index] = resultNonIndexed[nonIndexedIndex++];\n }\n catch (error) {\n result[index] = error;\n }\n }\n // Add the keyword argument if named and safe\n if (param.name && result[param.name] == null) {\n const value = result[index];\n // Make error named values throw on access\n if (value instanceof Error) {\n Object.defineProperty(result, param.name, {\n get: () => { throw wrapAccessError(`property ${JSON.stringify(param.name)}`, value); }\n });\n }\n else {\n result[param.name] = value;\n }\n }\n });\n // Make all error indexed values throw on access\n for (let i = 0; i < result.length; i++) {\n const value = result[i];\n if (value instanceof Error) {\n Object.defineProperty(result, i, {\n get: () => { throw wrapAccessError(`index ${i}`, value); }\n });\n }\n }\n return Object.freeze(result);\n }", "function ga_event(e){\n d = $(e).data(\"ga\").split(\":\");\n gtag('event', d[0], {'event_category': d[1], 'event_label': d[2]});\n}", "decodeEventLog(eventFragment, data, topics) {\n if (typeof (eventFragment) === \"string\") {\n eventFragment = this.getEvent(eventFragment);\n }\n if (topics != null && !eventFragment.anonymous) {\n let topicHash = this.getEventTopic(eventFragment);\n if (!__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__ethersproject_bytes__[\"f\" /* isHexString */])(topics[0], 32) || topics[0].toLowerCase() !== topicHash) {\n logger.throwError(\"fragment/topic mismatch\", __WEBPACK_IMPORTED_MODULE_9__ethersproject_logger__[\"a\" /* Logger */].errors.INVALID_ARGUMENT, { argument: \"topics[0]\", expected: topicHash, value: topics[0] });\n }\n topics = topics.slice(1);\n }\n let indexed = [];\n let nonIndexed = [];\n let dynamic = [];\n eventFragment.inputs.forEach((param, index) => {\n if (param.indexed) {\n if (param.type === \"string\" || param.type === \"bytes\" || param.baseType === \"tuple\" || param.baseType === \"array\") {\n indexed.push(__WEBPACK_IMPORTED_MODULE_8__fragments__[\"d\" /* ParamType */].fromObject({ type: \"bytes32\", name: param.name }));\n dynamic.push(true);\n }\n else {\n indexed.push(param);\n dynamic.push(false);\n }\n }\n else {\n nonIndexed.push(param);\n dynamic.push(false);\n }\n });\n let resultIndexed = (topics != null) ? this._abiCoder.decode(indexed, __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__ethersproject_bytes__[\"c\" /* concat */])(topics)) : null;\n let resultNonIndexed = this._abiCoder.decode(nonIndexed, data, true);\n let result = [];\n let nonIndexedIndex = 0, indexedIndex = 0;\n eventFragment.inputs.forEach((param, index) => {\n if (param.indexed) {\n if (resultIndexed == null) {\n result[index] = new Indexed({ _isIndexed: true, hash: null });\n }\n else if (dynamic[index]) {\n result[index] = new Indexed({ _isIndexed: true, hash: resultIndexed[indexedIndex++] });\n }\n else {\n try {\n result[index] = resultIndexed[indexedIndex++];\n }\n catch (error) {\n result[index] = error;\n }\n }\n }\n else {\n try {\n result[index] = resultNonIndexed[nonIndexedIndex++];\n }\n catch (error) {\n result[index] = error;\n }\n }\n // Add the keyword argument if named and safe\n if (param.name && result[param.name] == null) {\n const value = result[index];\n // Make error named values throw on access\n if (value instanceof Error) {\n Object.defineProperty(result, param.name, {\n get: () => { throw wrapAccessError(`property ${JSON.stringify(param.name)}`, value); }\n });\n }\n else {\n result[param.name] = value;\n }\n }\n });\n // Make all error indexed values throw on access\n for (let i = 0; i < result.length; i++) {\n const value = result[i];\n if (value instanceof Error) {\n Object.defineProperty(result, i, {\n get: () => { throw wrapAccessError(`index ${i}`, value); }\n });\n }\n }\n return Object.freeze(result);\n }", "static log(eventMetadata) {\n let typeAction = new LogEventTypeAction({ action: eventMetadata.action });\n return new EventMetadata(Object.assign(eventMetadata, typeAction));\n }", "function extractMessage(ex) {\n const message = ex && ex.message;\n if (!message) {\n return 'No error message';\n }\n if (message.error && typeof message.error.message === 'string') {\n return message.error.message;\n }\n return message;\n }", "function interpretMessage(msg) {\n var msg_parsed = JSON.parse(msg);\n var content = msg_parsed['content'];\n printLog('Interpreting message of type \"' + msg_parsed['type'] + '\"');\n switch (msg_parsed['type']) {\n case 'REGISTER':\n interpret_register(content);\n break;\n case 'LOGIN':\n interpret_login(content);\n break;\n case 'LOGOUT':\n interpret_logout(content);\n break;\n case 'GET':\n interpret_get(content);\n break;\n case 'POST':\n interpret_post(content);\n break;\n case 'QUESTIONNAIRE':\n interpret_questionnaire(content);\n break;\n case 'COMMAND':\n interpret_command(content);\n break;\n default:\n printLog('Unknown type \"' + msg_parsed['type'])\n }\n}", "function getLogMessage(type)\n\t{\n\t\treturn '[POOF] [' + type + '] ';\n\t}", "function logStructEvent(category, action, label, property, value)\n {\n var sb = requestStringBuilder(configEncodeBase64);\n sb.add('e', 'se'); // 'se' for Structured Event\n sb.add('se_ca', category);\n sb.add('se_ac', action)\n sb.add('se_la', label);\n sb.add('se_pr', property);\n sb.add('se_va', value);\n request = getRequest(sb, 'structEvent');\n sendRequest(request, configTrackerPause);\n }", "function handleEvent(event) {\n\tswitch (event.type) {\n\t\tcase 'message':\n\t\t\tconst message = event.message;\n\t\t\tswitch (message.type) {\n\t\t\t\tcase 'text':\n\t\t\t\t\tif (event.source.type === 'group') {\n\t\t\t\t\t\tconsole.log(\"groupId: \" + event.source.groupId);\n\t\t\t\t\t\tconsole.log(\"userId: \" + event.source.userId);\n\t\t\t\t\t\tconsole.log(\"userName: \" + client.getGroupMemberProfile(event.source.groupId, event.source.userId).displayName);\n\t\t\t\t\t\treturn client.getGroupMemberProfile(event.source.groupId, event.source.userId)\n\t\t\t\t\t\t\t.then((group) => handleText(\n\n\t\t\t\t\t\t\t\tmessage, event.replyToken, event.source, group.displayName)\n\n\t\t\t\t\t\t\t);\n\t\t\t\t\t} else if (event.source.type === 'room') {\n\t\t\t\t\t\tconsole.log(\"roomId: \" + event.source.roomId);\n\t\t\t\t\t\tconsole.log(\"userId: \" + event.source.userId);\n\t\t\t\t\t\tconsole.log(\"userName: \" + client.getGroupMemberProfile(event.source.groupId, event.source.userId).displayName);\n\t\t\t\t\t\treturn client.getRoomMemberProfile(event.source.roomId, event.source.userId)\n\t\t\t\t\t\t\t.then((room) => handleText(\n\n\t\t\t\t\t\t\t\tmessage, event.replyToken, event.source, room.displayName)\n\n\t\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t//return handleText(message, event.replyToken, event.source);\n\t\t\t\t\t\tconsole.log(\"userId: \" + event.source.userId);\n\t\t\t\t\t\treturn client.getProfile(event.source.userId)\n\t\t\t\t\t\t\t.then((profile) => handleText(\n\t\t\t\t\t\t\t\tmessage, event.replyToken, event.source, profile.displayName)\n\n\t\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\tcase 'image':\n\t\t\t\t\t//return handleImage(message, event.replyToken);\n\t\t\t\t\treturn Promise.resolve(null);\n\t\t\t\tcase 'video':\n\t\t\t\t\t//return handleVideo(message, event.replyToken);\n\t\t\t\t\treturn Promise.resolve(null);\n\t\t\t\tcase 'audio':\n\t\t\t\t\t//return handleAudio(message, event.replyToken);\n\t\t\t\t\treturn Promise.resolve(null);\n\t\t\t\tcase 'location':\n\t\t\t\t\t//return handleLocation(message, event.replyToken);\n\t\t\t\t\treturn Promise.resolve(null);\n\t\t\t\tcase 'sticker':\n\t\t\t\t\t//return handleSticker(message, event.replyToken);\n\t\t\t\t\treturn Promise.resolve(null);\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error(`Unknown message: ${JSON.stringify(message)}`);\n\t\t\t}\n\n\t\tcase 'follow':\n\t\t\tclient.replyMessage(event.replyToken, botModel.getDefaultMsgHello());\n\n\t\tcase 'unfollow':\n\t\t\treturn console.log(`Unfollowed this bot: ${JSON.stringify(event)}`);\n\n\t\tcase 'join':\n\t\t\tclient.replyMessage(event.replyToken, botModel.getDefaultMsgHello());\n\n\t\tcase 'leave':\n\t\t\treturn console.log(`Left: ${JSON.stringify(event)}`);\n\n\t\tdefault:\n\t\t\tthrow new Error(`Unknown event: ${JSON.stringify(event)}`);\n\t}\n}", "function handleEvent(event) {\n switch (event.type) {\n case 'message':\n // create a echoing text message\n const echo = { type: 'text', text: event.message.text };\n\n // use reply API\n //return client.replyMessage(event.replyToken, echo);\n\n const message = event.message;\n switch (message.type) {\n case 'text':\n return client.replyMessage(event.replyToken, echo);\n return client.pushMessage(event.source.groupId, echo).catch((err)=>{\n console.log(err)\n });\n case 'image':\n return handleImage(message, event.replyToken);\n case 'video':\n return handleVideo(message, event.replyToken);\n case 'audio':\n return handleAudio(message, event.replyToken);\n case 'location':\n return handleLocation(message, event.replyToken);\n case 'sticker':\n return handleSticker(message, event.replyToken);\n default:\n throw new Error(`Unknown message: ${JSON.stringify(message)}`);\n }\n\n case 'follow':\n return replyText(event.replyToken, 'Got followed event');\n\n case 'unfollow':\n return console.log(`Unfollowed this bot: ${JSON.stringify(event)}`);\n\n case 'join':\n return replyText(event.replyToken, `Joined ${event.source.type}`);\n\n case 'leave':\n return console.log(`Left: ${JSON.stringify(event)}`);\n\n case 'postback':\n let data = event.postback.data;\n if (data === 'DATE' || data === 'TIME' || data === 'DATETIME') {\n data += `(${JSON.stringify(event.postback.params)})`;\n }\n return replyText(event.replyToken, `Got postback: ${data}`);\n\n case 'beacon':\n return replyText(event.replyToken, `Got beacon: ${event.beacon.hwid}`);\n\n default:\n throw new Error(`Unknown event: ${JSON.stringify(event)}`);\n }\n}", "function extractMessage(ex) {\n const message = ex && ex.message;\n if (!message) {\n return 'No error message';\n }\n if (message.error && typeof message.error.message === 'string') {\n return message.error.message;\n }\n return message;\n}", "function onMessageArrived(message) {\nconsole.log(\"onMessageArrived:\"+message.payloadString);\nvar str = message.payloadString;\nwindow.alert(str);\n\n}", "function dumpEvents(result){\n for(var i=0; i<result.logs.length;i++){\n console.log(result.logs[i].event,'>>', result.logs[i].args.name,' ',result.logs[i].args.howmuch.toNumber())\n }\n}", "function dumpEvents(result){\n for(var i=0; i<result.logs.length;i++){\n console.log(result.logs[i].event,'>>', result.logs[i].args.name,' ',result.logs[i].args.howmuch.toNumber())\n }\n}", "function s(e,t){if(\"function\"==typeof e)return e(t);const n=Object.keys(t);for(const o of n)\"message\"!==o&&(e=e.replace(\"{\"+o.toUpperCase()+\"}\",t[o]));return e}", "rxGameData(evt) {\n // JitsiExternalAPI::endpointTextMessageReceived event arguments format: \n // evt = {\n // data: {\n // senderInfo: {\n // jid: \"string\", // the jid of the sender\n // id: \"string\" // the participant id of the sender\n // },\n // eventData: {\n // name: \"string\", // the name of the datachannel event: `endpoint-text-message`\n // text: \"string\" // the received text from the sender\n // }\n // }\n //};\n const data = JSON.parse(evt.data.eventData.text);\n if (data.hax === APP_FINGERPRINT) {\n const evt2 = new CallaUserEvent(evt.data.senderInfo.id, data);\n this.dispatchEvent(evt2);\n }\n }", "function convertEvent(msgevent, type){\n\tif(type == 0){ return msgevent; }\n\telse { return null; }\n}", "function parseMessage(message){\n console.log(\"message get\", message);\n\n let header = createMessageHeader();\n header._setBuff(message);\n \n if(header.get(\"versionMajor\") !== EVENT_VERSION){\n console.log(`Cannot parse message, expected event version ${EVENT_VERSION}, but received ${header.get(\"versionMajor\")}`);\n }\n\n let bodyLength = header.get(\"length\"),\n body = Buffer.alloc(bodyLength);\n message.copy(body, 0, HEADER_LENGTH);\n\n return {\n header,\n body\n };\n}", "receivedMessage( event ) {\n\n var senderID = event.sender.id;\n var recipientID = event.recipient.id;\n var timeOfMessage = event.timestamp;\n var message = event.message;\n\n console.log( \"Received message for user %d and page %d at %d with message:\",\n senderID, recipientID, timeOfMessage );\n console.log( 'Message', JSON.stringify( message ) );\n\n var isEcho = message.is_echo;\n var messageId = message.mid;\n var appId = message.app_id;\n var metadata = message.metadata;\n\n // You may get a text or attachment but not both\n var messageText = message.text;\n var messageAttachments = message.attachments;\n var quickReply = message.quick_reply;\n\n if ( isEcho ) {\n // Just logging message echoes to console\n console.log( \"Received echo for message %s and app %d with metadata %s\",\n messageId, appId, metadata );\n return;\n }\n\n if ( messageText ) {\n if ( [ 'hi', 'hello' ].indexOf( messageText.toLowerCase().trim() ) !== -1 ) return messengerGeneric.sendTextMessage( senderID, 'Hi.' );\n messengerGeneric.sendTypingOn( senderID );\n setTimeout( () => {\n messengerGeneric.sendTextMessage( senderID, 'Nope.' );\n }, messageText.length * 10 < 20000 ? messageText.length * 10 : 20000 );\n }\n }", "function messageListener(event) {\r\n //console.log(event.data);\r\n }", "async function __dumpEvent(node, session, fields, eventFields, _callback) {\n var msg = {};\n msg.payload = {};\n verbose_log(chalk.yellow(\"Event Fields: \") + chalk.cyan(JSON.stringify(eventFields)));\n set_node_status_to(\"active event\");\n \n for (var i = 0; i < eventFields.length; i++) {\n var variant = eventFields[i];\n var fieldName = fields[i];\n verbose_log(chalk.yellow(\"Event Field: \") + chalk.cyan(fieldName) + \" \" + chalk.cyan(stringify(variant)));\n // Check if variant is NodeId and then get qualified name (browseName)\n if (variant && variant.dataType && variant.dataType === DataType.NodeId) {\n fieldName = await getBrowseName(session, variant.value);\n }\n if (!variant || variant.dataType === DataType.Null || !variant.value) {\n verbose_log(chalk.red(\"No variant or variant dataType is Null or no variant value! Variant: \") + chalk.cyan(JSON.stringify(variant)));\n } else {\n if (fieldName === \"EventId\" && variant && variant.value) {\n msg.payload[fieldName] = \"0x\" + variant.value.toString(\"hex\"); // As in UaExpert\n msg.payload[\"_\" + fieldName] = variant; // Keep as ByteString\n } else {\n msg.payload[fieldName] = opcuaBasics.clone_object(variant.value);\n }\n // if available, needed for Acknowledge function in client\n if (fieldName === \"ConditionId\" && variant && variant.value) {\n msg.topic = variant.value.toString();\n }\n }\n }\n\n // Set message topic\n if (eventFields.length === 0) {\n msg.topic=\"No EventFields\";\n }\n // if available, needed for Acknowledge function in client\n else if (msg.payload.ConditionId) {\n msg.topic=msg.payload.ConditionId.toString();\n }\n else if (msg.payload.EventId) {\n msg.topic=msg.payload.EventId.toString(); // Set then this can be used to Acknowledge event\n } \n else {\n if (msg.payload.EventType) {\n msg.topic=msg.payload.EventType.toString();\n }\n }\n verbose_log(chalk.yellow(\"Event message topic: \") + chalk.cyan(msg.topic));\n node.send(msg);\n _callback();\n }" ]
[ "0.6338606", "0.61995715", "0.6155481", "0.61328715", "0.61122143", "0.6079839", "0.60407096", "0.60049266", "0.60024065", "0.59383005", "0.58615464", "0.584968", "0.58174753", "0.57072175", "0.56880337", "0.5682649", "0.56795937", "0.5673357", "0.5671763", "0.5671763", "0.5666252", "0.56434053", "0.56381506", "0.5628829", "0.5596173", "0.5588847", "0.55740625", "0.55729705", "0.55648047", "0.55607337", "0.5511642", "0.5500418", "0.5486417", "0.54859674", "0.54470605", "0.54463935", "0.54435146", "0.5432816", "0.54300195", "0.5427134", "0.5423911", "0.54032826", "0.53654665", "0.5363991", "0.5331468", "0.53190714", "0.52938217", "0.52902275", "0.52902275", "0.52902275", "0.52836096", "0.52836096", "0.52836096", "0.52836096", "0.52836096", "0.5278157", "0.5276267", "0.5264311", "0.52627045", "0.5234817", "0.5234817", "0.5233595", "0.5232901", "0.52170193", "0.5208975", "0.5207809", "0.52003163", "0.5197508", "0.51972073", "0.51812804", "0.5180279", "0.5170666", "0.51652354", "0.5162951", "0.51602226", "0.51583993", "0.51510423", "0.5148725", "0.51406056", "0.5135783", "0.513293", "0.51313007", "0.512524", "0.5118149", "0.5118076", "0.5113515", "0.5110631", "0.5110624", "0.51096904", "0.51079124", "0.51079124", "0.51039743", "0.50987524", "0.50950885", "0.5093091", "0.50912875", "0.5088257", "0.507304" ]
0.6037439
9
Adds exception values, type and value to an synthetic Exception.
function addExceptionTypeValue(event, value, type) { event.exception = event.exception || {}; event.exception.values = event.exception.values || []; event.exception.values[0] = event.exception.values[0] || {}; event.exception.values[0].value = event.exception.values[0].value || value || ''; event.exception.values[0].type = event.exception.values[0].type || type || 'Error'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addExceptionTypeValue(event, value, type) {\n const exception = (event.exception = event.exception || {});\n const values = (exception.values = exception.values || []);\n const firstException = (values[0] = values[0] || {});\n if (!firstException.value) {\n firstException.value = value || '';\n }\n if (!firstException.type) {\n firstException.type = type || 'Error';\n }\n}", "function addExceptionTypeValue(event, value, type) {\n const exception = (event.exception = event.exception || {});\n const values = (exception.values = exception.values || []);\n const firstException = (values[0] = values[0] || {});\n if (!firstException.value) {\n firstException.value = value || '';\n }\n if (!firstException.type) {\n firstException.type = type || 'Error';\n }\n }", "function addExceptionTypeValue(event, value, type) {\n\t const exception = (event.exception = event.exception || {});\n\t const values = (exception.values = exception.values || []);\n\t const firstException = (values[0] = values[0] || {});\n\t if (!firstException.value) {\n\t firstException.value = value || '';\n\t }\n\t if (!firstException.type) {\n\t firstException.type = type || 'Error';\n\t }\n\t}", "function addExceptionTypeValue(event, value, type, mechanism) {\r\n if (mechanism === void 0) {\r\n mechanism = {\r\n handled: true,\r\n type: 'generic'\r\n };\r\n }\r\n event.exception = event.exception || {};\r\n event.exception.values = event.exception.values || [];\r\n event.exception.values[0] = event.exception.values[0] || {};\r\n event.exception.values[0].value = event.exception.values[0].value || value || '';\r\n event.exception.values[0].type = event.exception.values[0].type || type || 'Error';\r\n event.exception.values[0].mechanism = event.exception.values[0].mechanism || mechanism;\r\n}", "function Exception() {}", "function createStackForSend() {\n try {\n throw Error(error);\n }\n catch (ex) {\n error = ex;\n\n // note we generated this stack for later\n error.generatedStack = true;\n\n // set the time when it was created\n error.timestamp = error.timestamp || now;\n\n impl.addError(error, via, source);\n }\n }", "function addExceptionMechanism(event, newMechanism) {\n var _a;\n if (!event.exception || !event.exception.values) {\n return;\n }\n var exceptionValue0 = event.exception.values[0];\n var defaultMechanism = { type: 'generic', handled: true };\n var currentMechanism = exceptionValue0.mechanism;\n exceptionValue0.mechanism = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, defaultMechanism), currentMechanism), newMechanism);\n if (newMechanism && 'data' in newMechanism) {\n var mergedData = tslib_1.__assign(tslib_1.__assign({}, (_a = currentMechanism) === null || _a === void 0 ? void 0 : _a.data), newMechanism.data);\n exceptionValue0.mechanism.data = mergedData;\n }\n}", "function MyBaseExceptions(){\n}", "function ErrorTypeAndValue(type, value) {\n this.type = type;\n this.value = value;\n }", "function Exception() {\n var _this2;\n\n var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n\n _classCallCheck(this, Exception);\n\n _this2 = _super2.call(this, message);\n _this2.message = message;\n return _this2;\n }", "function __hsException(e) {\n e = e.toString();\n var x = new Long(2904464383, 3929545892, true);\n var y = new Long(3027541338, 3270546716, true);\n var t = new T5(0, x, y\n , new T5(0, x, y\n , unCStr(\"haste-prim\")\n , unCStr(\"Haste.Prim.Foreign\")\n , unCStr(\"JSException\")), __Z, __Z);\n var show = function(x) {return unCStr(E(x).a);}\n var dispEx = function(x) {return unCStr(\"JavaScript exception: \" + E(x).a);}\n var showList = function(_, s) {return unAppCStr(e, s);}\n var showsPrec = function(_, _p, s) {return unAppCStr(e, s);}\n var showDict = new T3(0, showsPrec, show, showList);\n var self;\n var fromEx = function(_) {return new T1(1, self);}\n var dict = new T5(0, t, showDict, null /* toException */, fromEx, dispEx);\n self = new T2(0, dict, new T1(0, e));\n return self;\n}", "function exception_example( ) {\n\n\t//\n\t//\tTRY Block\n\t//\n\ttry {\n\t\t//\n\t\t// Werfe eine neue Exception vom Typ MyError\n\t\t//\n\t\tthrow new MyError(\"Banane\")\n\t}\n\t//\n\t//\tCATCH Block\n\t//\n\tcatch( err ) {\n\t\t\n\t\t//\n\t\t// Teste, ob ein Fehler vom Typ MyError geworfen wurde\n\t\t//\t\n\t\tif( err instanceof MyError ) {\n\t\t\tconsole.warn(\"A MyError occured\" ,err);\n\t\t}\n\t\t\n\t\t//\n\t\t// War die Exception nicht vom Typ MyError dann werfe die Exception weiter\n\t\t//\n\t\telse {\n\t\t\tthrow err;\n\t\t}\n\t}\n}", "function addExceptionMechanism(event, newMechanism) {\n const firstException = getFirstException(event);\n if (!firstException) {\n return;\n }\n\n const defaultMechanism = { type: 'generic', handled: true };\n const currentMechanism = firstException.mechanism;\n firstException.mechanism = { ...defaultMechanism, ...currentMechanism, ...newMechanism };\n\n if (newMechanism && 'data' in newMechanism) {\n const mergedData = { ...(currentMechanism && currentMechanism.data), ...newMechanism.data };\n firstException.mechanism.data = mergedData;\n }\n }", "function bpException() {}", "function addExceptionMechanism(event, newMechanism) {\n const firstException = getFirstException(event);\n if (!firstException) {\n return;\n }\n\n const defaultMechanism = { type: 'generic', handled: true };\n const currentMechanism = firstException.mechanism;\n firstException.mechanism = { ...defaultMechanism, ...currentMechanism, ...newMechanism };\n\n if (newMechanism && 'data' in newMechanism) {\n const mergedData = { ...(currentMechanism && currentMechanism.data), ...newMechanism.data };\n firstException.mechanism.data = mergedData;\n }\n}", "function addExceptionMechanism(event, mechanism) {\n if (mechanism === void 0) { mechanism = {}; }\n // TODO: Use real type with `keyof Mechanism` thingy and maybe make it better?\n try {\n // @ts-ignore\n // tslint:disable:no-non-null-assertion\n event.exception.values[0].mechanism = event.exception.values[0].mechanism || {};\n Object.keys(mechanism).forEach(function (key) {\n // @ts-ignore\n event.exception.values[0].mechanism[key] = mechanism[key];\n });\n }\n catch (_oO) {\n // no-empty\n }\n}", "function addExceptionMechanism(event, mechanism) {\n if (mechanism === void 0) { mechanism = {}; }\n // TODO: Use real type with `keyof Mechanism` thingy and maybe make it better?\n try {\n // @ts-ignore Type 'Mechanism | {}' is not assignable to type 'Mechanism | undefined'\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception.values[0].mechanism = event.exception.values[0].mechanism || {};\n Object.keys(mechanism).forEach(function (key) {\n // @ts-ignore Mechanism has no index signature\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception.values[0].mechanism[key] = mechanism[key];\n });\n }\n catch (_oO) {\n // no-empty\n }\n}", "function addExceptionMechanism(event, newMechanism) {\n\t const firstException = getFirstException(event);\n\t if (!firstException) {\n\t return;\n\t }\n\n\t const defaultMechanism = { type: 'generic', handled: true };\n\t const currentMechanism = firstException.mechanism;\n\t firstException.mechanism = { ...defaultMechanism, ...currentMechanism, ...newMechanism };\n\n\t if (newMechanism && 'data' in newMechanism) {\n\t const mergedData = { ...(currentMechanism && currentMechanism.data), ...newMechanism.data };\n\t firstException.mechanism.data = mergedData;\n\t }\n\t}", "function MyException(message){exception(this);}", "function UserException (message){\n this.message=message;\n this.name=\"UserException\";\n}", "reThrow(error, filename, lineNumber) {\n if (error instanceof edge_error_1.EdgeError) {\n throw error;\n }\n const message = error.message.replace(/state\\./, '');\n throw new edge_error_1.EdgeError(message, 'E_RUNTIME_EXCEPTION', {\n filename: filename,\n line: lineNumber,\n col: 0,\n });\n }", "function Catch(...exceptions) {\n return (target) => {\n Reflect.defineMetadata(constants_1.FILTER_CATCH_EXCEPTIONS, exceptions, target);\n };\n}", "function throwException() {\n throwExceptionInner();\n}", "_triggerException(e) {\n\t\tthrow e\n\t}", "function tameException(ex) {\n if (ex && ex.UNCATCHABLE___) { throw ex; }\n try {\n switch (typeOf(ex)) {\n case 'string':\n case 'number':\n case 'boolean': \n case 'undefined': {\n // Immutable.\n return ex;\n }\n case 'object': {\n if (ex === null) { return null; }\n if (ex.throwable___) { return ex; }\n if (isInstanceOf(ex, Error)) { return primFreeze(ex); }\n return '' + ex;\n }\n case 'function': {\n // According to Pratap Lakhsman's \"JScript Deviations\" S2.11\n // If the caught object is a function, calling it within the catch\n // supplies the head of the scope chain as the \"this value\". The\n // called function can add properties to this object. This implies\n // that for code of this shape:\n // var x;\n // try {\n // // ...\n // } catch (E) {\n // E();\n // return s;\n // }\n // The reference to 'x' within the catch is not necessarily to the\n // local declaration of 'x'; this gives Catch the same performance\n // problems as with.\n\n // We return a different, powerless function instead.\n var name = '' + (ex.name || ex);\n function inLieuOfThrownFunction() {\n return 'In lieu of thrown function: ' + name;\n };\n return markFuncFreeze(inLieuOfThrownFunction, name);\n }\n default: {\n log('Unrecognized exception type: ' + (typeOf(ex)));\n return 'Unrecognized exception type: ' + (typeOf(ex));\n }\n }\n } catch (_) {\n // Can occur if coercion to string fails, or if ex has getters\n // that fail. This function must never throw an exception\n // because doing so would cause control to leave a catch block\n // before the handler fires.\n log('Exception during exception handling.');\n return 'Exception during exception handling.';\n }\n }", "HTTPNetworkException (msg) {\n let error = new Error(msg);\n error.name = \"HTTPNetworkException\";\n //error.snappMessage = \"something?\";\n throw error;\n }", "function gen_exception_return(/* DisasContext * */ s)\n{\n gen_op_movl_reg_TN[0][15]();\n gen_op_movl_T0_spsr();\n gen_op_movl_cpsr_T0(0xffffffff);\n s.is_jmp = 2;\n}", "function InvalidTypeOfException(){\n this.name = \"InvalidTypeOfException\";\n this.message = \"El tipo de dato no es correcto\";\n}", "constructor({ et = \"\", nt = { msg: \"...\", ev: \"error\" } }) {\n super(exceptionMessages[et]);\n this.name = \"InspectionException\";\n this.notify = nt;\n }", "function exceptionFromStacktrace(stacktrace) {\n var frames = prepareFramesForEvent(stacktrace.stack);\n var exception = {\n type: stacktrace.name,\n value: stacktrace.message,\n };\n if (frames && frames.length) {\n exception.stacktrace = { frames: frames };\n }\n // tslint:disable-next-line:strict-type-predicates\n if (exception.type === undefined && exception.value === '') {\n exception.value = 'Unrecoverable error caught';\n }\n return exception;\n}", "function typedThrow(msg) {\n throw new Error(msg);\n }", "function typedThrow(msg) {\n throw new Error(msg);\n }", "function exceptionFromStacktrace(stacktrace) {\r\n var frames = prepareFramesForEvent(stacktrace.stack);\r\n var exception = {\r\n type: stacktrace.name,\r\n value: stacktrace.message\r\n };\r\n if (frames && frames.length) {\r\n exception.stacktrace = { frames: frames };\r\n }\r\n // tslint:disable-next-line:strict-type-predicates\r\n if (exception.type === undefined && exception.value === '') {\r\n exception.value = 'Unrecoverable error caught';\r\n }\r\n return exception;\r\n}", "function exceptionFromStacktrace(stacktrace) {\n var frames = prepareFramesForEvent(stacktrace.stack);\n var exception = {\n type: stacktrace.name,\n value: stacktrace.message,\n };\n if (frames && frames.length) {\n exception.stacktrace = { frames: frames };\n }\n if (exception.type === undefined && exception.value === '') {\n exception.value = 'Unrecoverable error caught';\n }\n return exception;\n}", "function Exception(message) {\n\tthis.message = message;\n\tthis.name = \"Exception\";\n}", "function NegativeParameterException() {\n this.exception = \"Should throw a NegativeParameterException\";\n}", "recordException(_exception, _time) { }", "function UserException(message) {\n this.message = message;\n this.name = 'UserException';\n}", "function raise(value, name) {\n throw new Error('Invalid value `' + value + '` for setting `' + name + '`');\n}", "function UnhandledExceptionArgs(exception) {\n var __arguments = new Array(arguments.length);\n for (var __argumentIndex = 0; __argumentIndex < __arguments.length; ++__argumentIndex) {\n __arguments[__argumentIndex] = arguments[__argumentIndex];\n }\n if (__arguments.length == 1) {\n var exception_1 = __arguments[0];\n //super();\n this.fmliveswitchUnhandledExceptionArgsInit();\n this.__exception = exception_1;\n }\n else {\n throw new fm.liveswitch.Exception('Constructor overload does not exist with specified parameter count/type combination.');\n }\n }", "function exception(name, message, code) {\r\n var rtn = {};\r\n\r\n rtn.type = \"error\";\r\n rtn.name = (name||\"Error\");\r\n rtn.message = (message||rtn.name);\r\n rtn.code = (code||400);\r\n\r\n return rtn;\r\n}", "function Exception() {\n return;\n}", "exception (error, context /* , ...rest */) {\n if (this.theme.exception) {\n let actualError = error || new Error(\"vlm.exception called without error object\");\n if (!(error instanceof Error)) {\n actualError = new Error(String((error && error.message) || error || \"error missing\"));\n if (error.stack) actualError.stack = error.stack;\n }\n outputError(actualError, `${this.getContextName()} panics: exception from ${context}`, {\n debug: (msg, ...rest_) => console.error(this.theme.babble(msg), ...rest_),\n info: (msg, ...rest_) => console.error(this.theme.info(msg), ...rest_),\n error: (msg, ...rest_) => console.error(this.theme.error(msg), ...rest_),\n warn: (msg, ...rest_) => console.warn(this.theme.warning(msg), ...rest_),\n log: (msg, ...rest_) => console.log(msg, ...rest_),\n });\n }\n return this;\n }", "function _eventFromRejectionWithPrimitive(reason) {\n return {\n exception: {\n values: [\n {\n type: 'UnhandledRejection',\n // String() is needed because the Primitive type includes symbols (which can't be automatically stringified)\n value: `Non-Error promise rejection captured with value: ${String(reason)}`,\n },\n ],\n },\n };\n }", "function Throw(){ return Statement.apply(this,arguments) }", "function CustomException(message) {\n const error = new Error(message);\n return error;\n}", "function _eventFromRejectionWithPrimitive(reason) {\n\t return {\n\t exception: {\n\t values: [\n\t {\n\t type: 'UnhandledRejection',\n\t // String() is needed because the Primitive type includes symbols (which can't be automatically stringified)\n\t value: `Non-Error promise rejection captured with value: ${String(reason)}`,\n\t },\n\t ],\n\t },\n\t };\n\t}", "ListsNetworkException (msg) {\n let error = new Error(msg);\n error.name = 'ListsNetworkException';\n //error.snappMessage = \"something?\";\n throw error;\n }", "function _eventFromRejectionWithPrimitive(reason) {\n return {\n exception: {\n values: [\n {\n type: 'UnhandledRejection',\n // String() is needed because the Primitive type includes symbols (which can't be automatically stringified)\n value: `Non-Error promise rejection captured with value: ${String(reason)}`,\n },\n ],\n },\n };\n}", "function CustomError() {}", "function E(sym, val, def, ...otherClasses) {\n // Special case for SystemError that formats the error message differently\n // The SystemErrors only have SystemError as their base classes.\n messages.set(sym, val);\n if (def === SystemError) {\n def = makeSystemErrorWithCode(sym);\n } else {\n def = makeNodeErrorWithCode(def, sym);\n }\n\n if (otherClasses.length !== 0) {\n otherClasses.forEach((clazz) => {\n def[clazz.name] = makeNodeErrorWithCode(clazz, sym);\n });\n }\n codes[sym] = def;\n}", "function E(sym, val, def, ...otherClasses) {\n // Special case for SystemError that formats the error message differently\n // The SystemErrors only have SystemError as their base classes.\n messages.set(sym, val);\n if (def === SystemError) {\n def = makeSystemErrorWithCode(sym);\n } else {\n def = makeNodeErrorWithCode(def, sym);\n }\n\n if (otherClasses.length !== 0) {\n otherClasses.forEach((clazz) => {\n def[clazz.name] = makeNodeErrorWithCode(clazz, sym);\n });\n }\n codes[sym] = def;\n}", "error(number, message) {\n throw {\n type: \"error\",\n value: {\n message: { type: \"string\", value: message },\n number: { type: \"number\", value: number }\n }\n };\n }", "function thrower() {\n throw new Error('thrown');\n}", "function AttributeValueNotSpecifiedError() {\n this.name = 'AttributeValueNotSpecifiedError';\n this.message = 'Value for key was not specified.';\n}", "function RuntimeException(message) {\n\tthis.name = \"ParseException\";\n\tthis.message = message;\n\tthis.stack = (new Error()).stack;\n}", "function equalsHookFunction(data)\n{\n // using create_global_class api we have defined a new Exception object , now let's throw it\n throw myExceptionClass;\n}", "function thrower(){throw new Error(\"this should not happen!\")}", "function UserException(message) {\n this.message = message;\n this.name = 'UserException';\n }", "function captureException(exception, captureContext) {\n var syntheticException;\n try {\n throw new Error('Sentry syntheticException');\n }\n catch (exception) {\n syntheticException = exception;\n }\n return callOnHub('captureException', exception, {\n captureContext: captureContext,\n originalException: exception,\n syntheticException: syntheticException,\n });\n}", "function captureException(exception, captureContext) {\n var syntheticException;\n try {\n throw new Error('Sentry syntheticException');\n }\n catch (exception) {\n syntheticException = exception;\n }\n return callOnHub('captureException', exception, {\n captureContext: captureContext,\n originalException: exception,\n syntheticException: syntheticException,\n });\n}", "function e(a) {\n throw a;\n}", "function InputException(message) {\n this.message = message;\n this.name = \"InputException\";\n}", "function setupError (message) {\n if (hasCaptureStackTrace)\n // V8 specific method.\n Error.captureStackTrace(this, this.constructor)\n else\n // Generic way to set the error stack trace.\n Object.defineProperty(this, 'stack',\n nonEnumerableProperty(Error(message).stack))\n\n // Use the `+` operator with an empty string to implicitly type cast the\n // `message` argument into a string.\n Object.defineProperty(this, 'message',\n nonEnumerableProperty(message !== void 0 ? '' + message : ''))\n}", "error (e2)\n\t{\tlet e = new Error (this + \" \" + e2)\n\t this . propagateError (e);\n\t\treturn this;\n\t}", "exceptionTrack(properties) {\n const description = properties.event || properties.description || properties;\n appInsights.trackException(description);\n }", "function captureException(exception) {\n var syntheticException;\n try {\n throw new Error('Sentry syntheticException');\n }\n catch (exception) {\n syntheticException = exception;\n }\n return callOnHub('captureException', exception, {\n originalException: exception,\n syntheticException: syntheticException,\n });\n}", "function captureException(exception) {\n var syntheticException;\n try {\n throw new Error('Sentry syntheticException');\n }\n catch (exception) {\n syntheticException = exception;\n }\n return callOnHub('captureException', exception, {\n originalException: exception,\n syntheticException: syntheticException,\n });\n}", "function captureException(exception) {\r\n var syntheticException;\r\n try {\r\n throw new Error('Sentry syntheticException');\r\n } catch (exception) {\r\n syntheticException = exception;\r\n }\r\n return callOnHub('captureException', exception, {\r\n originalException: exception,\r\n syntheticException: syntheticException\r\n });\r\n}", "function $throw(ex) {\n throw ex || this\n}", "function errorEnhancer(data){\n //is plain Error and was not yet caught\n if(data instanceof Error && !data.caughtOnChainId){\n data.caughtOnChainId = funcArr._id;\n\n var trace = stackTrace({e: data});\n if(funcArr._name) {\n console.log('Failed inside ' + funcArr._name);\n }\n console.log(data.toString());\n console.log(trace.join('\\n'));\n }\n return Promise.reject(data);\n }", "function throwExceptionInner() {\n throw new Error('WebUI JS Error: exception button clicked');\n}", "function xb(a,b){if(Error.captureStackTrace)Error.captureStackTrace(this,xb);else{var c=Error().stack;c&&(this.stack=c)}a&&(this.message=String(a));void 0!==b&&(this.cause=b)}", "defineCustomErrors() {\n this.restifyErrors.InvalidTokenError = this.restifyErrors.makeConstructor('InvalidTokenError', {\n statusCode: 404,\n failureType: 'motion'\n });\n\n this.restifyErrors.BusinessError = this.restifyErrors.makeConstructor('BusinessError', {\n statusCode: 500,\n failureType: 'motion'\n });\n\n // this.restifyErrors.InvalidIdendifierError = this.restifyErrors.makeConstructor('InvalidIdendifierError', {\n // statusCode: 400,\n // failureType: 'motion'\n // });\n //\n // Ex.: ErrorHandler.throw('Your CPF is not valid', 'InvalidIdendifierError')\n }", "function InputException (message) {\n this.message = message;\n this.name = 'InputException';\n}", "function BaseException(message, parameters) {\n log.trace('BaseException CTOR message=\"%s\" parameters=\"%s\"', message, parameters);\n this.message = message || '';\n if (_.isEmpty(parameters)) {\n this.parameters = [];\n }\n else {\n this.parameters = _.isArray(parameters) ? parameters : [ parameters ];\n }\n}", "function Exception(what) {\n\tthis.mWhat = \"\"; // information about this exception\n\tif (what != null) { // if a string was passed\n\t\tthis.mWhat = what;\n\t}\n}", "function UserException(message) {\n\t\t\tthis.message = message;\n\t\t\tthis.name = 'UserException';\n\t\t}", "function addException() {\n if(!gCert || !gSSLStatus)\n return;\n\n var overrideService = Components.classes[\"@mozilla.org/security/certoverride;1\"]\n .getService(Components.interfaces.nsICertOverrideService);\n var flags = 0;\n let confirmBucketId = gNsISecTel.WARNING_BAD_CERT_CONFIRM_ADD_EXCEPTION_BASE;\n if (gSSLStatus.isUntrusted) {\n flags |= overrideService.ERROR_UNTRUSTED;\n confirmBucketId += gNsISecTel.WARNING_BAD_CERT_CONFIRM_ADD_EXCEPTION_FLAG_UNTRUSTED;\n }\n if (gSSLStatus.isDomainMismatch) {\n flags |= overrideService.ERROR_MISMATCH;\n confirmBucketId += gNsISecTel.WARNING_BAD_CERT_CONFIRM_ADD_EXCEPTION_FLAG_DOMAIN;\n }\n if (gSSLStatus.isNotValidAtThisTime) {\n flags |= overrideService.ERROR_TIME;\n confirmBucketId += gNsISecTel.WARNING_BAD_CERT_CONFIRM_ADD_EXCEPTION_FLAG_TIME;\n }\n \n var permanentCheckbox = document.getElementById(\"permanent\");\n var shouldStorePermanently = permanentCheckbox.checked && !inPrivateBrowsingMode();\n if(!permanentCheckbox.checked)\n gSecHistogram.add(gNsISecTel.WARNING_BAD_CERT_DONT_REMEMBER_EXCEPTION);\n\n gSecHistogram.add(confirmBucketId);\n var uri = getURI();\n overrideService.rememberValidityOverride(\n uri.asciiHost, uri.port,\n gCert,\n flags,\n !shouldStorePermanently);\n \n var args = window.arguments;\n if (args && args[0])\n args[0].exceptionAdded = true;\n \n gDialog.acceptDialog();\n}", "function raise(message) {\n var parameters = [];\n if(arguments.length > 1) {\n parameters = Array.prototype.slice.call(arguments, 1);\n }\n var err = this.error.apply(this, [message].concat(parameters));\n this.errors.push(err);\n return err;\n}", "function registerErrorInstrumentation() {\n utils_1.addInstrumentationHandler({\n callback: errorCallback,\n type: 'error',\n });\n utils_1.addInstrumentationHandler({\n callback: errorCallback,\n type: 'unhandledrejection',\n });\n}", "function generateError(message, code) {\n throw { message: message, errorCode: code };\n}", "function generateError(message, code) {\n throw { message: message, errorCode: code };\n}", "function generateError(message, code) {\n throw { message: message, errorCode: code };\n}", "function h$throwJSException(e) {\n // create a JSException object and wrap it in a SomeException\n // adding the Exception dictionary\n var someE = (h$c2(h$baseZCGHCziExceptionziSomeException_con_e,(h$ghcjszmprimZCGHCJSziPrimzizdfExceptionJSException),((h$c2(h$ghcjszmprimZCGHCJSziPrimziJSException_con_e,((h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (e)))),(h$toHsString(e.toString())))))));\n return h$throw(someE, true);\n}", "function h$throwJSException(e) {\n // create a JSException object and wrap it in a SomeException\n // adding the Exception dictionary\n var someE = (h$c2(h$baseZCGHCziExceptionziSomeException_con_e,(h$ghcjszmprimZCGHCJSziPrimzizdfExceptionJSException),((h$c2(h$ghcjszmprimZCGHCJSziPrimziJSException_con_e,((h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (e)))),(h$toHsString(e.toString())))))));\n return h$throw(someE, true);\n}", "function h$throwJSException(e) {\n // create a JSException object and wrap it in a SomeException\n // adding the Exception dictionary\n var someE = (h$c2(h$baseZCGHCziExceptionziSomeException_con_e,(h$ghcjszmprimZCGHCJSziPrimzizdfExceptionJSException),((h$c2(h$ghcjszmprimZCGHCJSziPrimziJSException_con_e,((h$c1(h$ghcjszmprimZCGHCJSziPrimziJSVal_con_e, (e)))),(h$toHsString(e.toString())))))));\n return h$throw(someE, true);\n}", "function NativeException(e) {\nvar that = new NativeException.$$;\nvar msg;\nif (typeof e === 'string') {\nmsg = String$(e);\n} else if (e) {\nmsg = String$(e.toString());\n} else {\nmsg = String$(\"Native JavaScript Exception\",27);\n}\nException(msg,null,that);\nreturn that;\n}", "function buildCustomError(...args) {\r\n return Reflect.construct(Error, args, buildCustomError);// 指定new.target为buildCustomError,这样prototype就不是Error.prototype了\r\n}", "function CCException(name, message) {\n this.name = name;\n this.message = message;\n this.toString = function () {\n return this.name + \": \" + this.message;\n };\n}", "get exceptions() { return check(exceptionsWasm); }", "function createStatusCodeError(statusCode) {\n return Object.assign(new Error(), {\n statusCode\n });\n}", "function err (message)\r\n\t\t{\r\n\t\t this.message=message;\r\n\t\t this.name=\"CNETAPI.Utils Exception:\";\r\n\t\t}", "function makeException(error, title, name, callerCls, callFunc, message) {\n var _a;\n return new Error((_a = message + (callerCls !== null && callerCls !== void 0 ? callerCls : nameSpace) + callFunc) !== null && _a !== void 0 ? _a : (Const_1.EMPTY_STR + arguments.caller.toString()));\n }", "function createStatusCodeError(statusCode) {\n return Object.assign(new Error(), {\n statusCode\n });\n}", "function makeErr(err, seq) {\n err._bulk_seq = seq;\n return err;\n }", "includeContentError(e) {\n\n }", "function toDomException(err) {\n return {\n ctor: 'RawDomException',\n _0: err.code,\n _1: err.name\n };\n}" ]
[ "0.6374556", "0.6370023", "0.63465154", "0.6233923", "0.5657113", "0.55716014", "0.5510732", "0.53008604", "0.5291609", "0.5210917", "0.51411", "0.5055595", "0.4997821", "0.49858013", "0.4962252", "0.49564525", "0.4939388", "0.4893575", "0.48620638", "0.4827497", "0.48214483", "0.48211688", "0.48039544", "0.4792455", "0.47895268", "0.47816092", "0.4780595", "0.4763679", "0.47233525", "0.47150356", "0.4698466", "0.4698466", "0.46974596", "0.4694871", "0.4687921", "0.4649873", "0.46470723", "0.4643448", "0.4642802", "0.46324182", "0.46225858", "0.4617691", "0.45649174", "0.45597073", "0.455628", "0.4553928", "0.45376933", "0.45270982", "0.4522061", "0.45132494", "0.4507072", "0.4507072", "0.44961435", "0.44875455", "0.4485726", "0.44850093", "0.4469206", "0.44478732", "0.44356015", "0.44275716", "0.44275716", "0.442545", "0.4421391", "0.44200233", "0.4382725", "0.4371153", "0.43589756", "0.43589756", "0.43579552", "0.43570384", "0.4356129", "0.4344591", "0.43433234", "0.43189618", "0.4305692", "0.43001822", "0.42957842", "0.42937917", "0.42922196", "0.42912757", "0.4291094", "0.4274949", "0.4274949", "0.4274949", "0.42669502", "0.42669502", "0.42669502", "0.42563066", "0.4248126", "0.424307", "0.42260468", "0.4222329", "0.42090407", "0.42028487", "0.42017892", "0.4200173", "0.41988575", "0.41925657" ]
0.6380193
2
Adds exception mechanism to a given event.
function addExceptionMechanism(event, mechanism) { if (mechanism === void 0) { mechanism = {}; } // TODO: Use real type with `keyof Mechanism` thingy and maybe make it better? try { // @ts-ignore Type 'Mechanism | {}' is not assignable to type 'Mechanism | undefined' // eslint-disable-next-line @typescript-eslint/no-non-null-assertion event.exception.values[0].mechanism = event.exception.values[0].mechanism || {}; Object.keys(mechanism).forEach(function (key) { // @ts-ignore Mechanism has no index signature // eslint-disable-next-line @typescript-eslint/no-non-null-assertion event.exception.values[0].mechanism[key] = mechanism[key]; }); } catch (_oO) { // no-empty } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addExceptionMechanism(event, mechanism) {\n if (mechanism === void 0) { mechanism = {}; }\n // TODO: Use real type with `keyof Mechanism` thingy and maybe make it better?\n try {\n // @ts-ignore\n // tslint:disable:no-non-null-assertion\n event.exception.values[0].mechanism = event.exception.values[0].mechanism || {};\n Object.keys(mechanism).forEach(function (key) {\n // @ts-ignore\n event.exception.values[0].mechanism[key] = mechanism[key];\n });\n }\n catch (_oO) {\n // no-empty\n }\n}", "function addExceptionMechanism(event, newMechanism) {\n var _a;\n if (!event.exception || !event.exception.values) {\n return;\n }\n var exceptionValue0 = event.exception.values[0];\n var defaultMechanism = { type: 'generic', handled: true };\n var currentMechanism = exceptionValue0.mechanism;\n exceptionValue0.mechanism = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, defaultMechanism), currentMechanism), newMechanism);\n if (newMechanism && 'data' in newMechanism) {\n var mergedData = tslib_1.__assign(tslib_1.__assign({}, (_a = currentMechanism) === null || _a === void 0 ? void 0 : _a.data), newMechanism.data);\n exceptionValue0.mechanism.data = mergedData;\n }\n}", "function addExceptionMechanism(event, newMechanism) {\n const firstException = getFirstException(event);\n if (!firstException) {\n return;\n }\n\n const defaultMechanism = { type: 'generic', handled: true };\n const currentMechanism = firstException.mechanism;\n firstException.mechanism = { ...defaultMechanism, ...currentMechanism, ...newMechanism };\n\n if (newMechanism && 'data' in newMechanism) {\n const mergedData = { ...(currentMechanism && currentMechanism.data), ...newMechanism.data };\n firstException.mechanism.data = mergedData;\n }\n}", "function addExceptionMechanism(event, newMechanism) {\n const firstException = getFirstException(event);\n if (!firstException) {\n return;\n }\n\n const defaultMechanism = { type: 'generic', handled: true };\n const currentMechanism = firstException.mechanism;\n firstException.mechanism = { ...defaultMechanism, ...currentMechanism, ...newMechanism };\n\n if (newMechanism && 'data' in newMechanism) {\n const mergedData = { ...(currentMechanism && currentMechanism.data), ...newMechanism.data };\n firstException.mechanism.data = mergedData;\n }\n }", "function addExceptionMechanism(event, newMechanism) {\n\t const firstException = getFirstException(event);\n\t if (!firstException) {\n\t return;\n\t }\n\n\t const defaultMechanism = { type: 'generic', handled: true };\n\t const currentMechanism = firstException.mechanism;\n\t firstException.mechanism = { ...defaultMechanism, ...currentMechanism, ...newMechanism };\n\n\t if (newMechanism && 'data' in newMechanism) {\n\t const mergedData = { ...(currentMechanism && currentMechanism.data), ...newMechanism.data };\n\t firstException.mechanism.data = mergedData;\n\t }\n\t}", "function exceptionHandler(event) {\n\t\talert(\"Exception: \" + event.code + \"::\" + event.message);\n\t}", "function exceptionHandler(event) {\n alert(\"Exception: \" + event.code + \"::\" + event.message);\n }", "function addExceptionTypeValue(event, value, type, mechanism) {\r\n if (mechanism === void 0) {\r\n mechanism = {\r\n handled: true,\r\n type: 'generic'\r\n };\r\n }\r\n event.exception = event.exception || {};\r\n event.exception.values = event.exception.values || [];\r\n event.exception.values[0] = event.exception.values[0] || {};\r\n event.exception.values[0].value = event.exception.values[0].value || value || '';\r\n event.exception.values[0].type = event.exception.values[0].type || type || 'Error';\r\n event.exception.values[0].mechanism = event.exception.values[0].mechanism || mechanism;\r\n}", "_triggerException(e) {\n\t\tthrow e\n\t}", "function exceptionHandler(event) {\n\talert(\"Exception: \" + event.code + \"::\" + event.message);\n}", "function addExceptionTypeValue(event, value, type) {\n const exception = (event.exception = event.exception || {});\n const values = (exception.values = exception.values || []);\n const firstException = (values[0] = values[0] || {});\n if (!firstException.value) {\n firstException.value = value || '';\n }\n if (!firstException.type) {\n firstException.type = type || 'Error';\n }\n}", "function Exception() {}", "function addExceptionTypeValue(event, value, type) {\n event.exception = event.exception || {};\n event.exception.values = event.exception.values || [];\n event.exception.values[0] = event.exception.values[0] || {};\n event.exception.values[0].value = event.exception.values[0].value || value || '';\n event.exception.values[0].type = event.exception.values[0].type || type || 'Error';\n}", "function addExceptionTypeValue(event, value, type) {\n event.exception = event.exception || {};\n event.exception.values = event.exception.values || [];\n event.exception.values[0] = event.exception.values[0] || {};\n event.exception.values[0].value = event.exception.values[0].value || value || '';\n event.exception.values[0].type = event.exception.values[0].type || type || 'Error';\n}", "function addExceptionTypeValue(event, value, type) {\n event.exception = event.exception || {};\n event.exception.values = event.exception.values || [];\n event.exception.values[0] = event.exception.values[0] || {};\n event.exception.values[0].value = event.exception.values[0].value || value || '';\n event.exception.values[0].type = event.exception.values[0].type || type || 'Error';\n}", "function JitsiGlobalUnhandledRejection(event) {\n handlers.forEach(handler => handler(null, null, null, null, event.reason));\n oldOnUnhandledRejection && oldOnUnhandledRejection(event);\n} // Setting the custom error handlers.", "function addExceptionTypeValue(event, value, type) {\n const exception = (event.exception = event.exception || {});\n const values = (exception.values = exception.values || []);\n const firstException = (values[0] = values[0] || {});\n if (!firstException.value) {\n firstException.value = value || '';\n }\n if (!firstException.type) {\n firstException.type = type || 'Error';\n }\n }", "function addExceptionTypeValue(event, value, type) {\n\t const exception = (event.exception = event.exception || {});\n\t const values = (exception.values = exception.values || []);\n\t const firstException = (values[0] = values[0] || {});\n\t if (!firstException.value) {\n\t firstException.value = value || '';\n\t }\n\t if (!firstException.type) {\n\t firstException.type = type || 'Error';\n\t }\n\t}", "ensureEvent (event) {\n if (Object.getPrototypeOf(event.constructor).name !== 'Event') {\n throw new Error(`Your event \"${event.constructor.name}\" must extend the \"Event\" utility`)\n }\n }", "function addOneErrorEvent() {\n window.onerror = function (message, url, lineNo, columnNo, errorObj) {\n console.log(message, url, lineNo, columnNo, errorObj);\n var oneErrorParams = {\n message: (errorObj === null || errorObj === void 0 ? void 0 : errorObj.message) || message,\n lineNo: lineNo,\n columnNo: columnNo,\n url: url,\n type: getOnerrorType(message)\n };\n computedErrorObject(oneErrorParams);\n };\n}", "function exception_example( ) {\n\n\t//\n\t//\tTRY Block\n\t//\n\ttry {\n\t\t//\n\t\t// Werfe eine neue Exception vom Typ MyError\n\t\t//\n\t\tthrow new MyError(\"Banane\")\n\t}\n\t//\n\t//\tCATCH Block\n\t//\n\tcatch( err ) {\n\t\t\n\t\t//\n\t\t// Teste, ob ein Fehler vom Typ MyError geworfen wurde\n\t\t//\t\n\t\tif( err instanceof MyError ) {\n\t\t\tconsole.warn(\"A MyError occured\" ,err);\n\t\t}\n\t\t\n\t\t//\n\t\t// War die Exception nicht vom Typ MyError dann werfe die Exception weiter\n\t\t//\n\t\telse {\n\t\t\tthrow err;\n\t\t}\n\t}\n}", "function addEvent(element, settings, customEvent, event) {\n\t\telement.bind(event, settings[customEvent]);\n\t}", "function _eventFromIncompleteOnError(msg, url, line, column) {\n\t const ERROR_TYPES_RE =\n\t /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;\n\n\t // If 'message' is ErrorEvent, get real message from inside\n\t let message = isErrorEvent(msg) ? msg.message : msg;\n\t let name = 'Error';\n\n\t const groups = message.match(ERROR_TYPES_RE);\n\t if (groups) {\n\t name = groups[1];\n\t message = groups[2];\n\t }\n\n\t const event = {\n\t exception: {\n\t values: [\n\t {\n\t type: name,\n\t value: message,\n\t },\n\t ],\n\t },\n\t };\n\n\t return _enhanceEventWithInitialFrame(event, url, line, column);\n\t}", "function _eventFromIncompleteOnError(msg, url, line, column) {\n const ERROR_TYPES_RE =\n /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;\n\n // If 'message' is ErrorEvent, get real message from inside\n let message = isErrorEvent$1(msg) ? msg.message : msg;\n let name = 'Error';\n\n const groups = message.match(ERROR_TYPES_RE);\n if (groups) {\n name = groups[1];\n message = groups[2];\n }\n\n const event = {\n exception: {\n values: [\n {\n type: name,\n value: message,\n },\n ],\n },\n };\n\n return _enhanceEventWithInitialFrame(event, url, line, column);\n }", "function _eventFromIncompleteOnError(msg, url, line, column) {\n const ERROR_TYPES_RE =\n /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;\n\n // If 'message' is ErrorEvent, get real message from inside\n let message = utils.isErrorEvent(msg) ? msg.message : msg;\n let name = 'Error';\n\n const groups = message.match(ERROR_TYPES_RE);\n if (groups) {\n name = groups[1];\n message = groups[2];\n }\n\n const event = {\n exception: {\n values: [\n {\n type: name,\n value: message,\n },\n ],\n },\n };\n\n return _enhanceEventWithInitialFrame(event, url, line, column);\n}", "function addException() {\n if(!gCert || !gSSLStatus)\n return;\n\n var overrideService = Components.classes[\"@mozilla.org/security/certoverride;1\"]\n .getService(Components.interfaces.nsICertOverrideService);\n var flags = 0;\n let confirmBucketId = gNsISecTel.WARNING_BAD_CERT_CONFIRM_ADD_EXCEPTION_BASE;\n if (gSSLStatus.isUntrusted) {\n flags |= overrideService.ERROR_UNTRUSTED;\n confirmBucketId += gNsISecTel.WARNING_BAD_CERT_CONFIRM_ADD_EXCEPTION_FLAG_UNTRUSTED;\n }\n if (gSSLStatus.isDomainMismatch) {\n flags |= overrideService.ERROR_MISMATCH;\n confirmBucketId += gNsISecTel.WARNING_BAD_CERT_CONFIRM_ADD_EXCEPTION_FLAG_DOMAIN;\n }\n if (gSSLStatus.isNotValidAtThisTime) {\n flags |= overrideService.ERROR_TIME;\n confirmBucketId += gNsISecTel.WARNING_BAD_CERT_CONFIRM_ADD_EXCEPTION_FLAG_TIME;\n }\n \n var permanentCheckbox = document.getElementById(\"permanent\");\n var shouldStorePermanently = permanentCheckbox.checked && !inPrivateBrowsingMode();\n if(!permanentCheckbox.checked)\n gSecHistogram.add(gNsISecTel.WARNING_BAD_CERT_DONT_REMEMBER_EXCEPTION);\n\n gSecHistogram.add(confirmBucketId);\n var uri = getURI();\n overrideService.rememberValidityOverride(\n uri.asciiHost, uri.port,\n gCert,\n flags,\n !shouldStorePermanently);\n \n var args = window.arguments;\n if (args && args[0])\n args[0].exceptionAdded = true;\n \n gDialog.acceptDialog();\n}", "function bpException() {}", "function MyException(message){exception(this);}", "function equalsHookFunction(data)\n{\n // using create_global_class api we have defined a new Exception object , now let's throw it\n throw myExceptionClass;\n}", "function raise(event) {\n if (!isString$1(event)) {\n return send(event, {\n to: SpecialTargets.Internal\n });\n }\n\n return {\n type: raise$1,\n event: event\n };\n }", "function throwIt(exception) {\n try {\n throw exception;\n } catch (e) {\n console.log('Caught: ' + e);\n }\n}", "function addEvent(element, eventName, callback) {\n\n\t\t\t\t\t\t\tif (element.addEventListener) element.addEventListener(eventName, callback, false);\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\telement.attachEvent(eventName, callback, false);\n\t\t\t\t}", "function addEvent(element, eventName, callback) {\n\n\t\t\t\t\t\t\tif (element.addEventListener) element.addEventListener(eventName, callback, false);\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\telement.attachEvent(eventName, callback, false);\n\t\t\t\t}", "function addEvent(element, eventName, callback) {\n\n\t\t\t\t\t\t\tif (element.addEventListener) element.addEventListener(eventName, callback, false);\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\telement.attachEvent(eventName, callback, false);\n\t\t\t\t}", "function addEvent(element, eventName, callback) {\n\n\t\t\t\t\t\t\tif (element.addEventListener) element.addEventListener(eventName, callback, false);\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\telement.attachEvent(eventName, callback, false);\n\t\t\t\t}", "function handleCrash(event) {\n }", "exceptionHandler(fn) {\n if (_.isUndefined(fn)) {\n return this._exceptionHandler\n }\n this._exceptionHandler = fn\n return this\n }", "function _add (element, event) {\n var events = event.split(' ');\n // is this valid to add this element? e.g. you can't have `blahblah` as event name\n var valid = true;\n\n for (var i = 0; i < events.length; i++) {\n var ex = events[i];\n\n if (_options.events.indexOf(ex) == -1) {\n valid = false;\n break;\n }\n }\n\n if (valid) {\n _elements.push({\n element: element,\n event: event\n });\n } else {\n _error('Invalid event name: `' + event + '`. Skipping ' + element);\n }\n }", "function addEvent(elem, event, fn) {\n\t\tif (elem.addEventListener) {\n\t\t\treturn elem.addEventListener(event, fn);\n\t\t}\n\n\t\treturn elem.attachEvent(`on${event}`, () => fn.call(elem, window.event));\n\t}", "function MyBaseExceptions(){\n}", "function raise$1(event) {\n if (!isString(event)) {\n return send$1(event, {\n to: SpecialTargets.Internal\n });\n }\n\n return {\n type: raise,\n event: event\n };\n}", "function addEvent(element, eventName, callback) {\n if (element.addEventListener) {\n element.addEventListener(eventName, callback, false);\n }\n else {\n element.attachEvent(eventName, callback, false);\n }\n }", "function Exception() {\n return;\n}", "function add_ev(node, event, f) {\n var eventHandler = function(e) { change_world(function(w, k) { f(w, e, k); },\n doNothing); };\n attachEvent(node, event, eventHandler);\n eventDetachers.push(function() { detachEvent(node, event, eventHandler); });\n }", "function add_ev(node, event, f) {\n var eventHandler = function(e) { change_world(function(w, k) { f(w, e, k); },\n doNothing); };\n attachEvent(node, event, eventHandler);\n eventDetachers.push(function() { detachEvent(node, event, eventHandler); });\n }", "onStoreException(event) {\n const me = this;\n\n let message;\n\n switch (event.type) {\n case 'server':\n message = event.response.message || 'Unspecified failure';\n break;\n\n case 'exception':\n if (event.exceptionType === 'network') {\n message = 'Network error';\n } else {\n // Server sent something that couldn't be parsed\n message = (event.error && event.error.message) || 'Failed to parse server response';\n }\n break;\n\n default:\n message = event.response.status + ' - ' + event.response.statusText || 'Unknown error';\n }\n\n // eslint-disable-next-line\n const messageHTML = `<div class=\"b-grid-load-failure\">\n <div class=\"b-grid-load-fail\">${me.L('loadFailedMessage')}</div>\n <div class=\"b-grid-load-fail\">${event.response.url ? event.response.url + ' responded with' : ''}</div>\n <div class=\"b-grid-load-fail\">${message}</div>\n </div>`;\n\n if (me.activeMask) {\n me.activeMask.icon = me.loadMaskErrorIcon;\n me.activeMask.text = messageHTML;\n\n me.loadmaskHideTimer = me.setTimeout(() => {\n me.unmaskBody();\n }, me.loadMaskHideTimeout);\n }\n }", "function addEvent(element, eventName, callback) {\n\n if (element.addEventListener) {\n\n element.addEventListener(eventName, callback, false);\n }\n else {\n\n element.attachEvent(eventName, callback, false);\n }\n\n\n }", "static setEvent(event) {\n contextEvent.set(event);\n }", "catch(func) {\n this.catchFunctions.push(func);\n return this;\n }", "function addEvent(element, eventName, callback) {\n\n if (element.addEventListener) {\n\n element.addEventListener(eventName, callback, false);\n } else {\n\n element.attachEvent(eventName, callback, false);\n }\n\n\n }", "function installOneError() {\n if (INITONERROR) {\n throw new Error('onerror is inited.');\n }\n addOneErrorEvent();\n addPromiseEvent();\n addNetworkOrSrcEvent();\n INITONERROR = true;\n}", "exceptionTrack(properties) {\n const description = properties.event || properties.description || properties;\n appInsights.trackException(description);\n }", "function handleCreateAnswerError(event) {\n\tconsole.log('createAnswer() error: ', e);\n}", "function addEvent(element, event_name, func) {\n if (element.addEventListener) {\n element.addEventListener(event_name, func, false);\n } else if (element.attachEvent) {\n element.attachEvent(\"on\"+event_name, func);\n }\n}", "function handleExeption(ex) {\n\n let alertElem = document.createElement(\"div\");\n\n alertElem.classList.add(\"alert\");\n\n setTimeout(() => {\n alertElem.classList.add(\"open\");\n }, 1);\n\n let innerElem = document.createElement(\"div\");\n innerElem.classList.add(\"alert-block\");\n alertElem.append(innerElem);\n\n let titleElem = document.createElement(\"div\");\n titleElem.classList.add(\"alert-title\");\n titleElem.append(\"Hay problemas\");\n innerElem.append(titleElem);\n\n let messageElem = document.createElement(\"div\");\n messageElem.classList.add(\"alert-message\");\n messageElem.append(ex);\n innerElem.append(messageElem);\n\n alertsDisplay.append(alertElem);\n removeAlert(alertElem);\n}", "function addEvent(eventFile) {\n\t\tif (validate(eventFile)) {\n\t\t\tevents[eventFile.event] = {\n\t\t\t\trun: eventFile.run\n\t\t\t};\n\t\t} else {\n\t\t\tLog.error(`Command file ${file} is invalid.`);\n\t\t\tthrow `Command file ${file} is invalid.`;\n\t\t}\n\t}", "function addHandler(name, o) {\n // adds a handler for a particular type of exception\n var handler = $.extend({}, defaultHandler, o || {});\n reportHandlers[name] = handler;\n }", "function addEvent(e) {\n\tif (! (layout.events.some(function (ee) {\n\t\treturn ((ee.nn == e.nn) && (ee.en == e.en));\n\t})))\n\t\tlayout.events.push(e);\n}", "function HeaderCalendar_Exception()\n{\n\tif (boolSaveChanges || bSelectChanged)\n\t{\n\t\tSaveChanges(\"MoveToHeaderCalendar_Exception()\", \"Exception\");\n\t}\n\telse\n\t{\n\t\tMoveToHeaderCalendar_Exception();\n\t}\n}", "function $throw(ex) {\n throw ex || this\n}", "function ExceptionHandlerDecorator($delegate, $raven) {\n function ExceptionHandler(exception, cause) {\n var raven = $raven.get();\n if (raven) {\n var additionData = {\n culprit: $raven.getUrl(),\n extra: {\n exception: exception,\n cause: cause\n }\n };\n raven.captureException(exception, additionData);\n } else {\n // continue default behavior: $log.error;\n $delegate(exception, cause);\n }\n }\n\n return ExceptionHandler;\n}", "function errorHandler($provide) {\n $provide.decorator(\"$exceptionHandler\", function ($delegate, $injector) {\n return function (exception, cause) {\n var $rootScope = $injector.get(\"$rootScope\");\n\n $rootScope.errors = $rootScope.errors || [];\n $rootScope.errors.push(exception.message);\n \n $delegate(exception, cause);\n };\n });\n\n }", "exception (error, context /* , ...rest */) {\n if (this.theme.exception) {\n let actualError = error || new Error(\"vlm.exception called without error object\");\n if (!(error instanceof Error)) {\n actualError = new Error(String((error && error.message) || error || \"error missing\"));\n if (error.stack) actualError.stack = error.stack;\n }\n outputError(actualError, `${this.getContextName()} panics: exception from ${context}`, {\n debug: (msg, ...rest_) => console.error(this.theme.babble(msg), ...rest_),\n info: (msg, ...rest_) => console.error(this.theme.info(msg), ...rest_),\n error: (msg, ...rest_) => console.error(this.theme.error(msg), ...rest_),\n warn: (msg, ...rest_) => console.warn(this.theme.warning(msg), ...rest_),\n log: (msg, ...rest_) => console.log(msg, ...rest_),\n });\n }\n return this;\n }", "function addEvent(el,ev,fn){\n\tvar isIE=window.attachEvent?true:false;\n\tif(isIE)el.attachEvent('on'+ev,fn);\n\telse if(el.addEventListener)el.addEventListener(ev,fn,false);\n}", "function thrower(){throw new Error(\"this should not happen!\")}", "async function addEvent(event) {\n let {name, description, image, start, end, color, creatorId, groupId} = event;\n assert.ok(color); assert.ok(creatorId); assert.ok(groupId); assert.ok(start); assert.ok(end);\n\n start = moment(start).toISOString(); end = moment(end).toISOString(); \n\n const eventId = await repository.addEvent({name, description, image, start, end, color, creatorId, groupId});\n\n const resourceId = await repository.addEventResource(eventId);\n\n //give join permission to members of group\n await resourceUsecase.addResourcePermissionToUserGroup({groupId, resourceId, permission: JOIN});\n\n //give update permission to creator of group\n const creatorGroup = await repository.getSoloGroupOfUser(creatorId);\n await resourceUsecase.addResourcePermissionToUserGroup({groupId: creatorGroup.id, resourceId, permission: UPDATE});\n }", "function addEvent( element, eventName, callback ) {\n\t\tif (element.addEventListener) {\n\t\t\telement.addEventListener(eventName, callback, false);\n\t\t} else {\n\t\t\telement.attachEvent(\"on\" + eventName, callback);\n\t\t}\n\t}", "function throwException() {\n throwExceptionInner();\n}", "function NativeException(e) {\nvar that = new NativeException.$$;\nvar msg;\nif (typeof e === 'string') {\nmsg = String$(e);\n} else if (e) {\nmsg = String$(e.toString());\n} else {\nmsg = String$(\"Native JavaScript Exception\",27);\n}\nException(msg,null,that);\nreturn that;\n}", "function addEvent(obj,event_name,func_name)\r\n{\r\n\tif (obj.attachEvent)\r\n\t{\r\n\t\tobj.attachEvent(\"on\"+event_name, func_name);\r\n\t}\r\n\telse if(obj.addEventListener)\r\n\t{\r\n\t\tobj.addEventListener(event_name,func_name,true);\r\n\t}\r\n\telse\r\n\t{\r\n\t\tobj[\"on\"+event_name] = func_name;\r\n\t}\r\n}", "function addEvent(object, eventName, functionName, capture){\n\t//following true if browser == EI\n\tif(object.attachEvent) {\n\t\tobject.attachEvent(\"on\" + eventName, functionName);\n\t} //end if EI\n\t//else is another browser\n\telse if(object.addEventListener) {\n\t\tobject.addEventListener(eventName, functionName, capture);\n\t} //end else other browser, not EI\n} //end addEvent", "function addEvent(event) {\n\n\t\t\tevent.id = nextEventId();\n\n\t\t\tevents.push(event);\n\n\t\t\treturn deferred.promiseValue(event);\n\t\t}", "async _handleErrors(err, {eventId, critical, param} = {}) {\n let newErr = new Error();\n /* All validation and constraint errors renamed as ValidationError. */\n newErr.name = 'ValidationError';\n newErr.status = 500;\n newErr.stack = err.stack;\n newErr.errors = [];\n switch (err.name) {\n /* Input failed to validate by Sequelize implementation of\n validator.js. */\n case 'SequelizeValidationError':\n for (let i = 0; i < err.errors.length; i++) {\n newErr.errors.push({\n msg: err.errors[i].message,\n param: err.errors[i].path\n });\n }\n break;\n\n /* Input for foreign key does not exist in associated models. */\n case 'SequelizeForeignKeyConstraintError':\n const path = err.index.split('_')[1];\n newErr.errors.push({\n msg: `Invalid ${path} selected.`,\n param: path\n });\n break;\n\n /* Input is a duplicate of existing record when it needs to be\n unique. */\n case 'SequelizeUniqueConstraintError':\n for (let i = 0; i < err.errors.length; i++) {\n const path = err.errors[i].path;\n const cap_path = path.charAt(0).toUpperCase() + path.substr(1);\n newErr.errors.push({\n msg: `${cap_path} already in use.`,\n param: path\n });\n }\n break;\n\n /* Other errors shouldn't occur, so there is either a server,\n connection, or code error. */\n default:\n if (critical) {\n newErr.errors = 'unknown';\n } else {\n newErr.errors.push({\n msg: err.message,\n param\n });\n }\n }\n /* Set event to error. */\n let msg;\n if (Array.isArray(newErr.errors)) {\n msg = newErr.errors[0].msg;\n } else {\n msg = newErr.errors;\n }\n await this.events.throw(eventId, msg, newErr.stack);\n\n /* Throw error. */\n throw newErr;\n }", "function on_error(e) {\n\tconsole.error(e, e.stack); // eslint-disable-line no-console\n\tvar div = document.createElement('div');\n\tdiv.appendChild(document.createTextNode(e.message));\n\tdocument.querySelector('.error').appendChild(div);\n}", "function on_error(e) {\n\tconsole.error(e, e.stack); // eslint-disable-line no-console\n\tvar div = document.createElement('div');\n\tdiv.appendChild(document.createTextNode(e.message));\n\tdocument.querySelector('.error').appendChild(div);\n}", "function addEvent(object, event, handler) {\r\n if(object.addEventListener) object.addEventListener(event, handler, false);\r\n else if(object.attachEvent) object.attachEvent('on'+event, handler);\r\n }", "function addEvent(element, eventName, handler) {\n if (element.addEventListener) {\n element.addEventListener(eventName, handler);\n } else {\n element.attachEvent('on' + eventName, function(){\n handler.call(element);\n });\n }\n}", "function e(a) {\n throw a;\n}", "function attachErrorHandlerIfApplicable() {\n if (window.onerror !== exceptionHandler) {\n previousErrorHandler = window.onerror;\n window.onerror = exceptionHandler;\n }\n }", "function addEvent(object, evName, fnName, cap) {\n\tif (object.attachEvent)\n\t\tobject.attachEvent(\"on\" + evName, fnName);\n\telse if (object.addEventListener)\n\t\tobject.addEventListener(evName, fnName, cap);\n}", "function captureException(exception, captureContext) {\n var syntheticException;\n try {\n throw new Error('Sentry syntheticException');\n }\n catch (exception) {\n syntheticException = exception;\n }\n return callOnHub('captureException', exception, {\n captureContext: captureContext,\n originalException: exception,\n syntheticException: syntheticException,\n });\n}", "function captureException(exception, captureContext) {\n var syntheticException;\n try {\n throw new Error('Sentry syntheticException');\n }\n catch (exception) {\n syntheticException = exception;\n }\n return callOnHub('captureException', exception, {\n captureContext: captureContext,\n originalException: exception,\n syntheticException: syntheticException,\n });\n}", "includeContentError(e) {\n\n }", "function throwExceptionInner() {\n throw new Error('WebUI JS Error: exception button clicked');\n}", "function setExceptionHandler(handler) {\r\n var old = Private.exceptionHandler;\r\n Private.exceptionHandler = handler;\r\n return old;\r\n }", "function captureException(exception) {\r\n var syntheticException;\r\n try {\r\n throw new Error('Sentry syntheticException');\r\n } catch (exception) {\r\n syntheticException = exception;\r\n }\r\n return callOnHub('captureException', exception, {\r\n originalException: exception,\r\n syntheticException: syntheticException\r\n });\r\n}", "onerror(err) {\n debug(\"error\", err);\n this.emitReserved(\"error\", err);\n }", "function addEvent (elem, type, eventHandle) {\r\n\t\tif (elem == null || elem == undefined) return;\r\n\t\tif ( elem.addEventListener ) {\r\n\t\t\telem.addEventListener( type, eventHandle, false );\r\n\t\t} else if ( elem.attachEvent ) {\r\n\t\t\telem.attachEvent( \"on\" + type, eventHandle );\r\n\t\t} else {\r\n\t\t\telem[\"on\"+type]=eventHandle;\r\n\t\t}\r\n\t}", "function captureException(exception) {\n var syntheticException;\n try {\n throw new Error('Sentry syntheticException');\n }\n catch (exception) {\n syntheticException = exception;\n }\n return callOnHub('captureException', exception, {\n originalException: exception,\n syntheticException: syntheticException,\n });\n}", "function captureException(exception) {\n var syntheticException;\n try {\n throw new Error('Sentry syntheticException');\n }\n catch (exception) {\n syntheticException = exception;\n }\n return callOnHub('captureException', exception, {\n originalException: exception,\n syntheticException: syntheticException,\n });\n}", "function addEvent(el, type, handler) {\n if (el.attachEvent) el.attachEvent('on'+type, handler); else el.addEventListener(type, handler);\n}", "function throwIt(exceptionMsg) {\n console.log(exceptionMsg);\n let errorDisplayElement = document.getElementById(names.errorDisplay);\n // If an element for displaying errors is not yet on the page, create it\n if (errorDisplayElement === null || errorDisplayElement === undefined) {\n errorDisplayElement = document.createElement(\"div\");\n errorDisplayElement.id = names.errorDisplay;\n document.body.appendChild(errorDisplayElement);\n }\n let newMessage = document.createElement(\"div\");\n newMessage.classList.add(names.errorMessage);\n newMessage.textContent = exceptionMsg;\n errorDisplayElement.appendChild(newMessage);\n}", "function addEvent (el, evt, cb) {\n if (el.addEventListener) el.addEventListener(evt, cb, false);\n else if (el.attachEvent) el.attachEvent('on' + evt, cb); \n}", "function findPromiseRejectionHandler(evtName){return function(e){var eventTasks=findEventTasks(global,evtName);eventTasks.forEach(function(eventTask){// windows has added unhandledrejection event listener\n// trigger the event listener\nvar PromiseRejectionEvent=global[\"PromiseRejectionEvent\"];if(PromiseRejectionEvent){var evt=new PromiseRejectionEvent(evtName,{promise:e.promise,reason:e.rejection});eventTask.invoke(evt)}})}}", "onUnexpectedExternalError(e) {\n this.unexpectedErrorHandler(e);\n }", "function eventAdd(ev)\n{\n if (!ev)\n ev = window.event;\n ev.stopPropagation();\n\n let form = this.form;\n let idir = form.idir.value;\n if (idir > 0)\n { // database record already exists\n let lang = 'en';\n if ('lang' in args)\n lang = args.lang;\n let url = \"/FamilyTree/editEvent.php?ider=0\" +\n \"&idir=\" + idir +\n \"&rownum=\" +\n '&lang=' + lang\n if (debug.toLowerCase() == 'y')\n {\n url += \"&debug=y\";\n popupAlert(\"editIndivid.js: eventAdd: \" + url,\n this);\n }\n\n // open edit dialog for event in right half of window\n windowList.push(openFrame(\"event\",\n url,\n \"right\"));\n return true;\n } // database record already exists\n else\n { // individual record not created in database yet\n newSearch = this; // identify button that was clicked\n refresh(); // update database first\n } // individual record not created in database yet\n}", "function handlerError(token, ex) {\n //store the exception\n token.result.exception = ex;\n finalizeTest(token, ex);\n }", "function addEvent(obj, evType, fn)\n{\n if (obj.addEventListener)\n {\n obj.addEventListener(evType, fn, false);\n return true;\n }\n else if (obj.attachEvent)\n {\n var r = obj.attachEvent(\"on\" + evType, fn);\n return r;\n }\n else\n {\n alert(\"Event handler could not be attached\");\n return false;\n }\n}", "constructor({ et = \"\", nt = { msg: \"...\", ev: \"error\" } }) {\n super(exceptionMessages[et]);\n this.name = \"InspectionException\";\n this.notify = nt;\n }", "onWorkerError(event) {\n console.error('⚙️ Error with InMemorySearch worker ⚙️', event);\n }" ]
[ "0.72324514", "0.6960397", "0.6916953", "0.68539137", "0.68011314", "0.62969136", "0.6210959", "0.618817", "0.61599517", "0.6111626", "0.5759549", "0.5727169", "0.5694992", "0.5694992", "0.5694992", "0.568407", "0.5660355", "0.56268835", "0.55241895", "0.54722035", "0.5294434", "0.52045137", "0.5193403", "0.51926297", "0.5143898", "0.51409686", "0.5124181", "0.51154363", "0.5113687", "0.5085051", "0.50719225", "0.50659704", "0.50659704", "0.50659704", "0.50659704", "0.50021505", "0.4995754", "0.49928385", "0.49898356", "0.49833947", "0.49512184", "0.4947723", "0.49239594", "0.4915724", "0.4915724", "0.4876875", "0.4876246", "0.48718834", "0.48686358", "0.4866722", "0.48624054", "0.48536208", "0.4829791", "0.48230714", "0.48085475", "0.48001242", "0.4799427", "0.47880948", "0.47783488", "0.47767422", "0.47595564", "0.4757687", "0.47123843", "0.4711806", "0.47117713", "0.47027305", "0.46955958", "0.4687264", "0.46813807", "0.46808413", "0.46645635", "0.4663382", "0.46626508", "0.46531156", "0.46509856", "0.4648129", "0.4647428", "0.4646935", "0.4643012", "0.46405813", "0.46401283", "0.46401283", "0.46355608", "0.46353385", "0.46323147", "0.46307123", "0.46272692", "0.4624904", "0.4619535", "0.4619535", "0.4619101", "0.461845", "0.46168104", "0.4615292", "0.461251", "0.45983538", "0.45899025", "0.45840624", "0.45831996", "0.45712912" ]
0.7067206
1
A safe form of location.href
function getLocationHref() { try { return document.location.href; } catch (oO) { return ''; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLocationHref() {\n try {\n return WINDOW$6.document.location.href;\n } catch (oO) {\n return '';\n }\n }", "function getLocationHref() {\n\t try {\n\t return WINDOW$5.document.location.href;\n\t } catch (oO) {\n\t return '';\n\t }\n\t}", "function getLocationHref() {\n try {\n return WINDOW.document.location.href;\n } catch (oO) {\n return '';\n }\n}", "function getLocationHref() {\n var global = global_1.getGlobalObject();\n try {\n return global.document.location.href;\n }\n catch (oO) {\n return '';\n }\n}", "function getValidLocationString(href) {\n\t\t// Replace spaces with %20.\n\t\thref = href.replace(/\\ /g, \"%20\");\n\n\t\t// Escape single quotes, so that quote isn't interpretted as end-of-string delimitter.\n\t\thref = href.replace(/'/g, \"\\\\'\");\n\n\t\treturn href;\n\t}", "function getItemLink()\r\n {\r\n return encodeURIComponent(window.location);\r\n }", "function getItemLink()\r\n {\r\n return encodeURIComponent(window.location);\r\n }", "function getItemLink()\r\n {\r\n return encodeURIComponent(window.location);\r\n }", "function getItemLink()\r\n {\r\n return encodeURIComponent(window.location);\r\n }", "function getItemLink()\r\n {\r\n return encodeURIComponent(window.location);\r\n }", "function getItemLink()\r\n {\r\n return encodeURIComponent(window.location);\r\n }", "function getItemLink()\r\n {\r\n return encodeURIComponent(window.location);\r\n }", "function getItemLink()\r\n {\r\n return encodeURIComponent(window.location);\r\n }", "function getItemLink()\r\n {\r\n return encodeURIComponent(window.location);\r\n }", "function getItemLink()\r\n {\r\n return encodeURIComponent(window.location);\r\n }", "function getItemLink()\r\n {\r\n return encodeURIComponent(window.location);\r\n }", "function getItemLink()\r\n {\r\n return encodeURIComponent(window.location);\r\n }", "function getItemLink()\r\n {\r\n return encodeURIComponent(window.location);\r\n }", "function getItemLink()\r\n {\r\n return encodeURIComponent(window.location);\r\n }", "function getItemLink()\r\n {\r\n return encodeURIComponent(window.location);\r\n }", "function _getLocation() { return \"\" + window.location; }", "function getItemLink() {\r\n return encodeURIComponent(window.location);\r\n }", "function getItemLink() {\r\n return encodeURIComponent(window.location.href);\r\n }", "function getItemLink() {\r\n return encodeURIComponent(window.location.href);\r\n }", "function getItemLink() {\r\n return encodeURIComponent(window.location.href);\r\n }", "function getItemLink() {\r\n return encodeURIComponent(window.location.href);\r\n }", "function getURL(){\n\treturn window.location;\n}", "function mustachifyUrl(href) {\n var url = \"http://mustachify.me/4?src=\" + escape(toAbsoluteURL(href));\n return url;\n}", "function getRedirectUrl() {\n let loc = window.location;\n let url = `${loc.protocol}//${loc.host}${loc.pathname}`;\n return url;\n }", "function getCurrentURL() {\n return window.location.href;\n}", "function getValidHrefString(href) {\n\t\t// Replace spaces with %20.\n\t\thref = href.replace(/\\ /g, \"%20\");\n\n\t\treturn href;\n\t}", "function getUrl() {\n var loc = window.location;\n var pathName = loc.pathname.substring(0, loc.pathname.lastIndexOf('/') + 1);\n return loc.href.substring(0, loc.href.length - ((loc.pathname + loc.search + loc.hash).length - pathName.length));\n}", "function getCurrentUrl() {\r\n var url = window.location.href.toString();\r\n var url = url.replace(/#.*/gi, '');\r\n return url;\r\n}", "function getURI() {\n var uri = document.location.href;\n\t\t\t\t\n var canonical = $$(\"link[rel=canonical]\")[0];\n\t\t\t\tif (canonical) {\t\t\t\n\t\t\t\t\tcanonical = canonical.readAttribute(\"href\")\n\t\t\t\t\tif (canonical && canonical.length > 0) {\n\t\t\t\t\t\t\tif (canonical.indexOf(\"http\") < 0) {\n\t\t\t\t\t\t\t\t\tcanonical = document.location.protocol + \"//\" + document.location.host + canonical;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\turi = canonical;\n\t\t\t\t\t}\n\t\t\t\t}\n\n return uri;\n }", "function SafeUrl(){}", "function urlWithoutQueryString(loc) {\n\tloc = loc || self.location;\n\treturn loc.protocol + \"//\" + loc.host + loc.pathname\n}", "function getAbsUrl(s){\n var a = document.createElement('a');\n a.href = s\n return a.href;\n}", "function SafeUrl() { }", "function SafeUrl() { }", "function SafeUrl() { }", "function m(e){return e.href.replace(/#.*/,\"\")}", "function page_uri() {\n\treturn window.location.href.split('#')[0];\n}", "function anywhereizeURL(key) {\n return \"http://redirect.viglink.com?key=\" + key + \"&u=\" + encodeURIComponent(window.location.href);\n }", "function SafeUrl() {}", "function SafeUrl() {}", "function SafeUrl() {}", "function SafeUrl() {}", "function SafeUrl() {}", "static getBaseUri(loc) {\r\n var baseUri = loc.href.substring(0, loc.href.lastIndexOf(C.ST.WHACK)+1);\r\n return baseUri;\r\n }", "_getPathFromUrl () {\n return window.location.toString().split(/[?#]/)[0]\n }", "function currentPageURL() {\n l = window.location;\n var s = l.search;//?....&....&....\n if (s != '') {\n s = '&' + s.substring(1); // Replace initial ? with &\n s = s\n .replace(/&AUTHSERVICE_JWT=[^&]*/, '')\n .replace(/&AUTHSERVICE_ERROR=[^&]*/, '');\n if (s != '') {\n s = '?' + s.substring(1); // Replace initial & with ?\n }\n }\n var thisPageURL = l.protocol + \"//\" + l.host + l.pathname + s + l.hash;\n return thisPageURL;\n }", "function stripHash(location) {\n return location.href.replace(/#.*/, '')\n }", "function Hl(){function a(a){a=a.slice(1).split(\"&\");for(var b=0;b<a.length;b++){var d=a[b].split(\"=\");c[decodeURIComponent(d[0])]=decodeURIComponent(d[1])}}var b=g.location||{},c={},d=b.hash;d&&a(d);(b=b.search)&&a(b);return c}", "function getAbsolutePath() {\n var loc = window.location;\n var pathName = loc.pathname.substring(0, loc.pathname.lastIndexOf('/') - 1);\n return loc.href.substring(0, loc.href.length - ((loc.pathname + loc.search + loc.hash).length - pathName.length));\n}", "function getAbsolutePath() {\n var loc = window.location;\n var pathName = loc.pathname.substring(0, loc.pathname.lastIndexOf('/') + 1);\n return loc.href.substring(0, loc.href.length - ((loc.pathname + loc.search + loc.hash).length - pathName.length));\n}", "function getURL() {\r\n let loc = document.location.href;\r\n\r\n if (loc.indexOf('?') > 0) {\r\n let getString = loc.split('?')[1];\r\n let GET = getString.split('&');\r\n var get = {};\r\n for (var i = 0, l = GET.length; i < l; i++) {\r\n var tmp = GET[i].split('=');\r\n get[tmp[0]] = unescape(decodeURI(tmp[1]));\r\n }\r\n return get;\r\n }\r\n}", "function localURL() { \n var pathWORes = location.pathname.substring(0, location.pathname.lastIndexOf(\"/\")+1);\n var protoWDom = location.href.substr(0, location.href.indexOf(\"/\", 8));\n return protoWDom + pathWORes;\n }", "function fk(){function a(a){a=a.slice(1).split(\"&\");for(var b=0;b<a.length;b++){var d=a[b].split(\"=\");c[decodeURIComponent(d[0])]=decodeURIComponent(d[1])}}var b=n.location||{},c={},d=b.hash;d&&a(d);(b=b.search)&&a(b);return c}", "function ml(){function a(a){a=a.slice(1).split(\"&\");for(var b=0;b<a.length;b++){var d=a[b].split(\"=\");c[decodeURIComponent(d[0])]=decodeURIComponent(d[1])}}var b=g.location||{},c={},d=b.hash;d&&a(d);(b=b.search)&&a(b);return c}", "function redirectByUrl() {\n location.href = u;\n }", "function getHref(to) {\n const hist = getInA(get(), historyPath);\n let location = to;\n if (typeof to === \"string\") {\n if (to.charAt(0) !== \"/\") {\n location = createLocation(to, null, null, hist.location);\n } else {\n location = createLocation(to);\n }\n }\n const href = location ? hist.createHref(location) : \"\";\n return href;\n }", "function getCurrentURL() {\n\treturn window.location;\n\t//return the url of the current page\n}", "function stripHash(location) {\n return location.href.replace(/#.*/, '');\n }", "function getHashPath() {\n return Path.decode(\n // We can't use window.location.hash here because it's not\n // consistent across browsers - Firefox will pre-decode it!\n window.location.href.split('#')[1] || ''\n );\n}", "function qualifyURL(url) {\n var a = document.createElement('a');\n a.href = url;\n return a.href;\n }", "function stripHash(location) {\n return location.href.replace(/#.*/, '')\n}", "function stripHash(location) {\n return location.href.replace(/#.*/, '')\n}", "function stripHash(location) {\n return location.href.replace(/#.*/, '')\n}", "function Hk(){function a(a){a=a.slice(1).split(\"&\");for(var b=0;b<a.length;b++){var d=a[b].split(\"=\");c[decodeURIComponent(d[0])]=decodeURIComponent(d[1])}}var b=h.location||{},c={},d=b.hash;d&&a(d);(b=b.search)&&a(b);return c}", "function getPagePath(){var loc=String(document.location);if(loc.indexOf('?')!=-1){loc=loc.split('?')[0]}var url=loc.split('/');var tmpstr=new Array();for(i=3;i<url.length;i++){tmpstr.push(url[i])}var lastitem=tmpstr[tmpstr.length-1];if(lastitem==''){tmpstr[tmpstr.length-1]='index.html'}tmpstr=tmpstr.join('/');return tmpstr}", "function getFullURL(url) {\n var a = document.createElement('a');\n a.href = url;\n return a.href;\n }", "function getFlink() {\n\tvar a = document.location.href.split(\"#\")[1];\n\tif (a) return a;\n}", "function getApplicationURL()\n{\n var url = window.location.href;\n\n // remove the cgi request from the end of the string\n var index = url.indexOf(\"?\");\n if (index >= 0)\n {\n url = url.substring(0, index);\n }\n\n index = url.lastIndexOf(\"general\");\n url = url.substring(0, index);\n\n // remove the trailing '/' from the end of the string\n index = url.lastIndexOf(\"/\");\n if (index == url.length - 1)\n {\n url = url.substring(0, index);\n }\n\n return url;\n}", "function qualifyUrl(url) {\n var element = document.createElement(\"span\");\n element.innerHTML = '<a href=\"' + url + '\">&nbsp;</a>';\n return element.firstChild.href;\n}", "get location() {\n if (_history.size <= 0)\n return window.location.hash || \"#\";\n const history = Array.from(_history);\n return history[history.length -1];\n }", "getUrl() {\n var _a;\n const routerLink = (_a = this.routerLink) !== null && _a !== void 0 ? _a : this.routerLinkWithHref;\n return routerLink\n ? this.router.serializeUrl(routerLink.urlTree)\n : undefined;\n }", "function newUrl(directLink){\n \"use strict\";\n var str_arr, last_letter;\n\n str_arr = window.location.href.split('?'); // Split on search\n\n //Preprocess the string to workaround some buggy http servers\n if (str_arr.length > 1){\n //Remove trailing slash if such is present.\n if (str_arr[str_arr.length -1][str_arr[str_arr.length -1].length -1] === '/'){\n str_arr[str_arr.length -1] = str_arr[str_arr.length -1].slice(0, str_arr[str_arr.length -1][str_arr[str_arr.length -1].length -1] -1);\n }\n last_letter = str_arr[str_arr.length -1][str_arr[str_arr.length -1].length -1];\n }\n\n //If we have a ? in the current URL and the ? part ends in a number (to check if it is our url or someone else)\n if (str_arr.length > 1 && !isNaN(last_letter)){\n str_arr[str_arr.length -1] = directLink; //Update the direct link part.\n } else { //Else if we have a / at the end of the url\n str_arr.push(directLink);\n }\n\n return str_arr.join('?');\n \n}", "function nl(){function a(a){a=a.slice(1).split(\"&\");for(var b=0;b<a.length;b++){var d=a[b].split(\"=\");c[decodeURIComponent(d[0])]=decodeURIComponent(d[1])}}var b=l.location||{},c={},d=b.hash;d&&a(d);(b=b.search)&&a(b);return c}", "function qualifyURL(url) {\n var a = document.createElement('a');\n a.href = url;\n return a.href;\n}", "function currentUrl() {\n\tvar protocol = $(window.location).attr('protocol');\n\tvar location = $(window.location).attr('host');\n\tvar HOST_URL = protocol+\"//\"+location+\"/\";\n\n\treturn HOST_URL;\n}", "function url(href) {\n return /^([a-z]{2,}):/.test(href) ? href : ('http://' + href);\n }", "getHref() {\n switch (this.type) {\n case \"room\":\n return \"room.html?\" + this.id + \"+\" + this.title.split(' ').join('_');\n case \"device\":\n return \"device.html?\" + this.id + \"+\" + this.title.split(' ').join('_');\n default:\n return \"home.html\";\n }\n }", "function getHash() {\n\tvar href = top.location.href;\n\tvar pos = href.indexOf('#') + 1;\n\treturn (pos) ? href.substr(pos) : '';\n}", "function toURL(href) {\n if(typeof URL === 'function' && isLocation) {\n return new URL(href, location.toString());\n } else if (hasDocument) {\n var anc = document.createElement('a');\n anc.href = href;\n return anc;\n }\n }", "function toURL(href) {\n if(typeof URL === 'function' && isLocation) {\n return new URL(href, location.toString());\n } else if (hasDocument) {\n var anc = document.createElement('a');\n anc.href = href;\n return anc;\n }\n }", "function toURL(href) {\n if(typeof URL === 'function' && isLocation) {\n return new URL(href, location.toString());\n } else if (hasDocument) {\n var anc = document.createElement('a');\n anc.href = href;\n return anc;\n }\n }", "function get_open_url(url) {\n var curr = new builder.Url(url);\n var base = new builder.Url(builder.lastStep().url() || builder.storage.get('baseurl'));\n\n if (base.server() == curr.server()) {\n return curr.path();\n } else {\n return curr.href();\n }\n }", "function getCurrentUrl() {\n try {\n var url = window.location.href;\n console.log(\"status pass : Current url is \", url);\n return url;\n } catch (err) {\n console.log(err);\n }\n}", "function weUrl(url)\n{\n\treturn url.indexOf(we_script) >= 0 ? url : we_script.replace(/:\\/\\/[^\\/]+/g, '://' + location.host) + (we_script.indexOf('?') == -1 ? '?' : (we_script.search(/[?&;]$/) == -1 ? ';' : '')) + url;\n}", "function ol(){function a(a){a=a.slice(1).split(\"&\");for(var b=0;b<a.length;b++){var d=a[b].split(\"=\");c[decodeURIComponent(d[0])]=decodeURIComponent(d[1])}}var b=g.location||{},c={},d=b.hash;d&&a(d);(b=b.search)&&a(b);return c}", "function getHashedURL(hash_URL) {\r\n\r\n if (hash_URL.indexOf(location.host) >= 0) {\r\n hash_URL = hash_URL.replace(\"http://\" + location.host, \"\");\r\n }\r\n return hash_URL;\r\n}", "getWindowLocation() {\n return window.location;\n }", "normalize(url) {\n return Location.stripTrailingSlash(_stripBaseHref(this._baseHref, _stripIndexHtml(url)));\n }", "function getHref () {\n if (\n props.lang &&\n isRelative(props.href) &&\n !props.isStatic(props.href) &&\n !props.href.match(new RegExp(`^/${props.lang}(/?|/.*)$`)) &&\n !props.href.match(/^(#|\\?)/)\n ) {\n return `/${props.lang}${props.href}`\n }\n\n return props.href\n }", "function getAbsoluteUrl(url) {\n A_ELEMENT.href = url;\n return A_ELEMENT.href;\n }", "function getAbsoluteUrl(url) {\n A_ELEMENT.href = url;\n return A_ELEMENT.href;\n }", "function getURL() {\n var url = window.location.pathname.split('/').slice(0, 4).join('/')\n\n return url + '/' + cid + '/'\n}", "static AppPath() {\n\t\tvar path = location.href.split(\"/\");\n\t\t\n\t\tpath.pop();\n\t\t\n\t\treturn path.join(\"/\");\n\t}", "function urlabsolute(loc){\n\tvar locm=loc.match(ureg);\n\tif(locm[6]) return loc;\n\tvar baseh=document.getElementsByTagName('BASE')[0];\n\tif(!baseh || !baseh.href) return loc;\n\tvar basem=baseh.href.match(ureg);\n\tif(!basem[1] || !basem[2]) return loc;\n\treturn basem[1]+basem[2]+basem[5]+loc;\n}" ]
[ "0.72748166", "0.7157395", "0.7090928", "0.6976126", "0.68934065", "0.6688352", "0.6688352", "0.6688352", "0.6688352", "0.6688352", "0.6688352", "0.6688352", "0.6688352", "0.6688352", "0.6688352", "0.6688352", "0.6688352", "0.6688352", "0.6688352", "0.6688352", "0.66816205", "0.6677243", "0.6654754", "0.6654754", "0.6654754", "0.6654754", "0.650134", "0.6274304", "0.6211169", "0.61860716", "0.61768067", "0.61522084", "0.61383927", "0.6129996", "0.6084073", "0.6080877", "0.6074821", "0.60621107", "0.60621107", "0.60621107", "0.60190195", "0.6018177", "0.60157084", "0.6007112", "0.6007112", "0.6007112", "0.6007112", "0.6007112", "0.599882", "0.59962535", "0.59907913", "0.5985351", "0.5955909", "0.59516966", "0.5950975", "0.5942957", "0.5942674", "0.5940916", "0.5939889", "0.5930099", "0.59276533", "0.59263605", "0.5893961", "0.58792305", "0.58752203", "0.5861085", "0.5861085", "0.5861085", "0.5847495", "0.5837152", "0.58285546", "0.5815951", "0.57993615", "0.5792285", "0.5787581", "0.5775659", "0.57689905", "0.57603043", "0.57463694", "0.5745385", "0.57407093", "0.5734025", "0.5716884", "0.5709212", "0.5709212", "0.5709212", "0.5686926", "0.5679574", "0.5666547", "0.56463647", "0.5636144", "0.5634559", "0.56287634", "0.56279635", "0.562373", "0.562373", "0.56158805", "0.56052035", "0.56024206" ]
0.7062153
4
Parses input into a SemVer interface
function parseSemver(input) { var match = input.match(SEMVER_REGEXP) || []; var major = parseInt(match[1], 10); var minor = parseInt(match[2], 10); var patch = parseInt(match[3], 10); return { buildmetadata: match[5], major: isNaN(major) ? undefined : major, minor: isNaN(minor) ? undefined : minor, patch: isNaN(patch) ? undefined : patch, prerelease: match[4], }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseSemver(input) {\n const match = input.match(SEMVER_REGEXP) || [];\n const major = parseInt(match[1], 10);\n const minor = parseInt(match[2], 10);\n const patch = parseInt(match[3], 10);\n return {\n buildmetadata: match[5],\n major: isNaN(major) ? undefined : major,\n minor: isNaN(minor) ? undefined : minor,\n patch: isNaN(patch) ? undefined : patch,\n prerelease: match[4],\n };\n}", "read (input) {\n\n // Store the new input!\n this.state.input += input\n\n // Now loop through the input and parse until we hit a dead end\n do {\n this.state = parse_version (this.state)\n\n // Maybe we parsed a version! That's cool!\n if (this.state.result === 'success') {\n this.cb({\n version: this.state.version,\n parents: this.state.parents,\n body: this.state.body,\n patches: this.state.patches\n })\n\n // Reset the parser for the next version!\n this.state = {input: this.state.input}\n }\n\n // Or maybe there's an error to report upstream\n else if (this.state.result === 'error') {\n this.cb(null, this.state.message)\n return\n }\n\n // We stop once we've run out of parseable input.\n } while (this.state.result !== 'waiting' && this.state.input.trim() !== '')\n }", "function parseVersion (V) {\n\tvar result = {};\n\t\n\tvar remainder = V;\n\t\n\t// Get the first numeric\n\tvar split = splitNumeric(remainder);\n\tif (split) {\n\t\tresult.numerics = [split.numeric];\n\t\tremainder = split.remainder;\n\t}\n\t\n function addArray(item, arrayName) {\n return item[arrayName] = [];\n }\n \n\t// Get all the additional numeric parts into the numerics array\n\tsplit = splitDotNumeric(remainder);\n\twhile (split) {\n\t\t(result.numerics || addArray(result, 'numeric')).push(split.numeric);\n\t\tremainder = split.remainder;\n\t\t\n\t\tsplit = splitDotNumeric(remainder);\n\t}\n\t\n\t// Split out the letter if there is one\n\tsplit = splitLetter(remainder);\n\tif (split !== null) {\n\t\tresult.letter = split.letter;\n\t\tremainder = split.remainder;\n\t}\n\n\t// Process our suffixes if there are any\n\tsplit = splitSuffix(remainder);\n\twhile (split !== null) {\n\t\t(result.suffixes || addArray(result, 'suffixes')).push(split.suffix);\n\t\tremainder = split.remainder;\n\t\t\n\t\tsplit = splitSuffix(remainder);\n\t}\n\t\n\t// Process release indicator if any\n\tsplit = splitRevision(remainder);\n\tif (split !== null) {\n\t\tresult.revision = split.revision;\n\t\tremainder = split.remainder;\n\t}\n\n\tif (remainder.length > 0) {\n\t\tresult.invalid = true;\n\t\tresult.invalidText = remainder;\n\t}\n\t\n\treturn result;\n}", "function parse(versionString, requireFull) {\n if (!versionString) {\n throw new Error('A version parameter is required.');\n }\n\n // Check if the version string includes an alias, and resolve it.\n let versionParts = versionString.split('/');\n if (versionParts.length < 3) {\n let resolvedVersion = settings.aliases[versionParts[0]];\n if (resolvedVersion) {\n versionString = resolvedVersion;\n if (versionParts.length === 2) {\n versionString += '/' + versionParts[1];\n }\n }\n }\n\n let match = versionRegex.exec(versionString);\n if (!match) {\n throw new Error('Invalid version string: ' + versionString);\n }\n\n let remoteName = match[2] || null;\n let semanticVersion = match[5] || null;\n let label = match[7] || null;\n let arch = match[9];\n let os = process.platform;\n\n if (requireFull) {\n if (!remoteName) {\n throw new Error('A remote name is required.');\n }\n if (!arch) {\n throw new Error('A processor architecture is required.');\n }\n }\n\n if (label === 'current' && !remoteName && !arch) {\n let currentVersion = require('./use').getCurrentVersion();\n if (!currentVersion) {\n throw new Error('There is no current version. Use `nvs use` to set one.');\n }\n\n label = null;\n semanticVersion = currentVersion.semanticVersion;\n arch = currentVersion.arch;\n }\n\n if (!remoteName || remoteName === 'default') {\n remoteName = settings.remotes['default'] || 'node';\n }\n\n if (!settings.remotes[remoteName]) {\n throw new Error('remote name not found in settings.json: ' + remoteName);\n }\n\n if (label && label !== 'latest' && label !== 'lts' && !label.startsWith('lts-')) {\n throw new Error('Invalid version label: ' + label);\n }\n\n if (!arch) {\n arch = process.arch;\n }\n\n switch (arch) {\n case '32':\n case 'x86':\n case 'ia32':\n arch = 'x86';\n break;\n case '64':\n case 'x64':\n case 'amd64':\n arch = 'x64';\n break;\n default:\n throw new Error('Invalid architecture: ' + arch);\n }\n\n if (os === 'win32') {\n os = 'win';\n }\n\n let version = {\n remoteName,\n semanticVersion,\n label,\n arch,\n os,\n };\n return version;\n}", "function parse(input, options) {\n return Parser.parse(input, options)\n }", "function parse(input, options) {\n return Parser.parse(input, options)\n }", "function parse(input, options) {\n return Parser.parse(input, options)\n }", "function parseLine(input)\n {\n var matchedParser;\n\n for (var index = 0; index < EveParser.parsers.length; index++)\n {\n if (EveParser.parsers[index].matches(input))\n {\n matchedParser = EveParser.parsers[index];\n break; // found one, we're done\n }\n }\n //console.log($this.matchedParser.name);\n if (matchedParser !== undefined)\n { // no parser means silently ignore.\n //console.log($this.matchedParser.parse(input));\n materials.push(matchedParser.parse(input));\n }\n }", "function _parse(input, currentDataStructure) {\n if (input.length === 0){\n return currentDataStructure;\n }\n\n else if (startingNewDictionary(input)){\n currentDataStructure = {};\n var results = _parse(input.slice(1), currentDataStructure); // remove the 'd' character\n while(results.result !== DICTIONARY_END){\n // all keys must be Strings\n // so convert the byte array into a string\n var key = byteBufferToString(results.result);\n results = _parse(results.remainingInput, currentDataStructure);\n var value = results.result; // value stays a byte buffer\n\n currentDataStructure[key] = value;\n results = _parse(results.remainingInput, currentDataStructure);\n }\n return packageResults(currentDataStructure, results.remainingInput);\n }\n else if (startingNewList(input)){\n currentDataStructure = [];\n var results = _parse(input.slice(1), currentDataStructure); // remove the 'l' character\n while(results.result !== LIST_END){\n currentDataStructure.push(results.result);\n results = _parse(results.remainingInput, currentDataStructure);\n }\n return packageResults(currentDataStructure, results.remainingInput);\n }\n\n else if (startingByteString(input)){\n return parseByteString(input);\n }\n else if (startingInteger(input)){\n return parseInteger(input);\n }\n\n else if (endingList(input, currentDataStructure)){\n return packageResults(LIST_END, input.slice(1));\n }\n\n else if (endingDictionary(input, currentDataStructure)){\n return packageResults(DICTIONARY_END, input.slice(1));\n }\n}", "async parse(entity,input,include=[]) {\n if (!this[entity]) error(`'${entity}' is not a valid Entity`)\n return this[entity].parse(input,include)\n }", "static parse (input) {\n const diagram = new Diagram()\n diagram.encodedInput = Diagram.encode(input)\n return diagram\n }", "function Parse(input) {\n // Decode an incoming message to an object of fields.\n var b = bytes(atob(input.data));\n // use TTN decoder:\n var decoded = Decoder(b, input.fPort);\n // Update values in device properties\n status_update_device(decoded);\n return decoded;\n}", "function parseUserEventInput(data){\n \n var split = /^(.+)\\n\\-{3,6}\\n(.+)$/s.exec(data);\n if(!split) throw Error(\"完全看不懂!\");\n\n try{\n var yamldoc = yaml.parse(split[1].trim());\n } catch(e){\n throw Error(\"格式写错了!\");\n }\n var description = split[2].trim();\n\n if(!(\n yamldoc.name &&\n _.isString(yamldoc.name) &&\n yamldoc.name.length <= 100 &&\n yamldoc.name.length >= 3\n )){\n throw Error(\"活动名字要在3到100个字之间!\");\n }\n\n const isPublicTranslation = {\n \"y\": true, \"yes\": true, \"是\": true, \"公开\": true, \"true\": true,\n \"1\": true,\n\n \"n\": false, \"no\": false, \"否\": false, \"不公开\": false,\n \"false\": false, \"私有\": false, \"私密\": false, \"0\": false,\n };\n\n if(isPublicTranslation[yamldoc.public] === undefined){\n throw Error(\"要决定是不是公开分享!\");\n }\n yamldoc.public = isPublicTranslation[yamldoc.public];\n\n \n return {\n name: yamldoc.name,\n public: yamldoc.public,\n description: description,\n }\n}", "function parseInput(line){\n if (line == \"\") {\n return null;\n }\n\n var name, type;\n\n [name, type] = line.split(\":\");\n\n type = type || \"text\";\n\n return {\n id: name, name: name,\n type: type,\n }\n }", "function semver (s) {\n\t return low.unemptyString(s) &&\n\t /^\\d+\\.\\d+\\.\\d+$/.test(s)\n\t}", "function parseInput(str) {\n var input = {};\n var tokens = str.trim().toLowerCase().split(/\\s/);\n var halves = mergeTokens(tokens);\n if (!validateInput(halves))\n return null;\n\n input['department'] = halves[0];\n input['courseNumber'] = halves[1];\n\n return input;\n}", "static parseModelVersion(modelVersion) {\n const parseRegexp = new RegExp(/(\\d{4})v(\\d+)/);\n if (parseRegexp.test(modelVersion)) {\n const versionParts = parseRegexp.exec(modelVersion);\n return {\n year: parseInt(versionParts[1], 10),\n version: parseInt(versionParts[2], 10),\n };\n }\n\n throw new Error(\n `Provided modelVersion (${modelVersion}) is not supported.`,\n );\n }", "_parseVersion() {\n if (this.packageJsonContent) {\n if (!this.packageJsonContent.hasOwnProperty('version')) {\n throw (new Error('Cannot find property \"version in package.json\"'))\n }\n\n const parts = this.packageJsonContent.version.split('.')\n if (!parts.length || parts.length !== 3) {\n throw (new Error(`Invalid version scheme. Expected: x.x.x, have ${this.packageJsonContent.version}`))\n }\n\n this.version.major = parseInt(parts[0], 10) || 0\n this.version.minor = parseInt(parts[1], 10) || 0\n this.version.patch = parseInt(parts[2], 10) || 0\n }\n }", "function parse(input, options) {\n return Parser.parse(input, options)\n}", "function parse(input, options) {\n return Parser.parse(input, options)\n}", "function parse(input, options) {\n return Parser.parse(input, options)\n}", "function parse(input, options) {\n return Parser.parse(input, options)\n}", "function parse(input, options) {\n return Parser.parse(input, options)\n}", "function parse(input, options) {\n return Parser.parse(input, options)\n}", "function parse(input, options) {\n return Parser.parse(input, options)\n}", "function BinaryParser() {}", "function BinaryParser() {}", "function BinaryParser() {}", "function BinaryParser() {}", "function BinaryParser() {}", "validate(input) {\r\n return new Promise((resolve, reject) => {\r\n SwaggerParser.validate(input+'.yaml').then((api) => {\r\n resolve(true);\r\n }).catch((err) => {\r\n \t\t console.log(err);\r\n resolve('You must provide an existing OpenAPI spec (yaml file in working directory) and the spec MUST be valid');\r\n });\r\n });\r\n }", "function __decodeMsg (input) {\n let msg = JSON.parse(input);\n switch (msg.version) {\n case 1:\n return msg.data;\n break;\n default:\n throw new Error('Decoding unknown version of message payload');\n }\n}", "function extractVersionFromString (source) {\n let version = source.match(SEMVER_REGEX)\n\n return !version || version.length === 0 ? null : version[0]\n}", "function exec (input) {\n return parser.parse(input);\n}", "function parse(input, options) {\n return new _state.Parser(options, input).parse();\n}", "function parse(input, options) {\n return new Parser(options, input).parse()\n}", "function parse(input, options) {\n return new Parser(options, input).parse()\n}", "function parse(input, options) {\n return new Parser(options, input).parse()\n}", "function DebugProtocolParser(inputStream,\n protocolVersion,\n rawDumpFileName,\n textDumpFileName,\n textDumpFilePrefix,\n hexDumpConsolePrefix,\n textDumpConsolePrefix) {\n var _this = this;\n this.inputStream = inputStream;\n this.closed = false; // stream is closed/broken, don't parse anymore\n this.bytes = 0;\n this.dvalues = 0;\n this.messages = 0;\n this.requests = 0;\n this.prevBytes = 0;\n this.bytesPerSec = 0;\n this.statsTimer = null;\n this.readableNumberValue = true;\n\n events.EventEmitter.call(this);\n\n var buf = new Buffer(0); // accumulate data\n var msg = []; // accumulated message until EOM\n var versionIdentification;\n\n var statsInterval = 2000;\n var statsIntervalSec = statsInterval / 1000;\n this.statsTimer = setInterval(function () {\n _this.bytesPerSec = (_this.bytes - _this.prevBytes) / statsIntervalSec;\n _this.prevBytes = _this.bytes;\n _this.emit('stats-update');\n }, statsInterval);\n\n function consume(n) {\n var tmp = new Buffer(buf.length - n);\n buf.copy(tmp, 0, n);\n buf = tmp;\n }\n\n inputStream.on('data', function (data) {\n var i, n, x, v, gotValue, len, t, tmpbuf, verstr;\n var prettyMsg;\n\n if (_this.closed || !_this.inputStream) {\n console.log('Ignoring incoming data from closed input stream, len ' + data.length);\n return;\n }\n\n _this.bytes += data.length;\n if (rawDumpFileName) {\n fs.appendFileSync(rawDumpFileName, data);\n }\n if (hexDumpConsolePrefix) {\n console.log(hexDumpConsolePrefix + data.toString('hex'));\n }\n\n buf = Buffer.concat([ buf, data ]);\n\n // Protocol version handling. When dumping an output stream, the\n // caller gives a non-null protocolVersion so we don't read one here.\n if (protocolVersion == null) {\n if (buf.length > 1024) {\n _this.emit('transport-error', 'Parse error (version identification too long), dropping connection');\n _this.close();\n return;\n }\n\n for (i = 0, n = buf.length; i < n; i++) {\n if (buf[i] == 0x0a) {\n tmpbuf = new Buffer(i);\n buf.copy(tmpbuf, 0, 0, i);\n consume(i + 1);\n verstr = tmpbuf.toString('utf-8');\n t = verstr.split(' ');\n protocolVersion = Number(t[0]);\n versionIdentification = verstr;\n\n _this.emit('protocol-version', {\n protocolVersion: protocolVersion,\n versionIdentification: versionIdentification\n });\n break;\n }\n }\n\n if (protocolVersion == null) {\n // Still waiting for version identification to complete.\n return;\n }\n }\n\n // Parse complete dvalues (quite inefficient now) by trial parsing.\n // Consume a value only when it's fully present in 'buf'.\n // See doc/debugger.rst for format description.\n\n while (buf.length > 0) {\n x = buf[0];\n v = undefined;\n gotValue = false; // used to flag special values like undefined\n\n if (x >= 0xc0) {\n // 0xc0...0xff: integers 0-16383\n if (buf.length >= 2) {\n v = ((x - 0xc0) << 8) + buf[1];\n consume(2);\n }\n } else if (x >= 0x80) {\n // 0x80...0xbf: integers 0-63\n v = x - 0x80;\n consume(1);\n } else if (x >= 0x60) {\n // 0x60...0x7f: strings with length 0-31\n len = x - 0x60;\n if (buf.length >= 1 + len) {\n v = new Buffer(len);\n buf.copy(v, 0, 1, 1 + len);\n v = bufferToDebugString(v);\n consume(1 + len);\n }\n } else {\n switch (x) {\n case 0x00: v = DVAL_EOM; consume(1); break;\n case 0x01: v = DVAL_REQ; consume(1); break;\n case 0x02: v = DVAL_REP; consume(1); break;\n case 0x03: v = DVAL_ERR; consume(1); break;\n case 0x04: v = DVAL_NFY; consume(1); break;\n case 0x10: // 4-byte signed integer\n if (buf.length >= 5) {\n v = buf.readInt32BE(1);\n consume(5);\n }\n break;\n case 0x11: // 4-byte string\n if (buf.length >= 5) {\n len = buf.readUInt32BE(1);\n if (buf.length >= 5 + len) {\n v = new Buffer(len);\n buf.copy(v, 0, 5, 5 + len);\n v = bufferToDebugString(v);\n consume(5 + len);\n }\n }\n break;\n case 0x12: // 2-byte string\n if (buf.length >= 3) {\n len = buf.readUInt16BE(1);\n if (buf.length >= 3 + len) {\n v = new Buffer(len);\n buf.copy(v, 0, 3, 3 + len);\n v = bufferToDebugString(v);\n consume(3 + len);\n }\n }\n break;\n case 0x13: // 4-byte buffer\n if (buf.length >= 5) {\n len = buf.readUInt32BE(1);\n if (buf.length >= 5 + len) {\n v = new Buffer(len);\n buf.copy(v, 0, 5, 5 + len);\n v = { type: 'buffer', data: v.toString('hex') };\n consume(5 + len);\n // Value could be a Node.js buffer directly, but\n // we prefer all dvalues to be JSON compatible\n }\n }\n break;\n case 0x14: // 2-byte buffer\n if (buf.length >= 3) {\n len = buf.readUInt16BE(1);\n if (buf.length >= 3 + len) {\n v = new Buffer(len);\n buf.copy(v, 0, 3, 3 + len);\n v = { type: 'buffer', data: v.toString('hex') };\n consume(3 + len);\n // Value could be a Node.js buffer directly, but\n // we prefer all dvalues to be JSON compatible\n }\n }\n break;\n case 0x15: // unused/none\n v = { type: 'unused' };\n consume(1);\n break;\n case 0x16: // undefined\n v = { type: 'undefined' };\n gotValue = true; // indicate 'v' is actually set\n consume(1);\n break;\n case 0x17: // null\n v = null;\n gotValue = true; // indicate 'v' is actually set\n consume(1);\n break;\n case 0x18: // true\n v = true;\n consume(1);\n break;\n case 0x19: // false\n v = false;\n consume(1);\n break;\n case 0x1a: // number (IEEE double), big endian\n if (buf.length >= 9) {\n v = new Buffer(8);\n buf.copy(v, 0, 1, 9);\n v = { type: 'number', data: v.toString('hex') };\n\n if (_this.readableNumberValue) {\n // The value key should not be used programmatically,\n // it is just there to make the dumps more readable.\n v.value = buf.readDoubleBE(1);\n }\n consume(9);\n }\n break;\n case 0x1b: // object\n if (buf.length >= 3) {\n len = buf[2];\n if (buf.length >= 3 + len) {\n v = new Buffer(len);\n buf.copy(v, 0, 3, 3 + len);\n v = { type: 'object', 'class': buf[1], pointer: v.toString('hex') };\n consume(3 + len);\n }\n }\n break;\n case 0x1c: // pointer\n if (buf.length >= 2) {\n len = buf[1];\n if (buf.length >= 2 + len) {\n v = new Buffer(len);\n buf.copy(v, 0, 2, 2 + len);\n v = { type: 'pointer', pointer: v.toString('hex') };\n consume(2 + len);\n }\n }\n break;\n case 0x1d: // lightfunc\n if (buf.length >= 4) {\n len = buf[3];\n if (buf.length >= 4 + len) {\n v = new Buffer(len);\n buf.copy(v, 0, 4, 4 + len);\n v = { type: 'lightfunc', flags: buf.readUInt16BE(1), pointer: v.toString('hex') };\n consume(4 + len);\n }\n }\n break;\n case 0x1e: // heapptr\n if (buf.length >= 2) {\n len = buf[1];\n if (buf.length >= 2 + len) {\n v = new Buffer(len);\n buf.copy(v, 0, 2, 2 + len);\n v = { type: 'heapptr', pointer: v.toString('hex') };\n consume(2 + len);\n }\n }\n break;\n default:\n _this.emit('transport-error', 'Parse error, dropping connection');\n _this.close();\n }\n }\n\n if (typeof v === 'undefined' && !gotValue) {\n break;\n }\n msg.push(v);\n _this.dvalues++;\n\n // Could emit a 'debug-value' event here, but that's not necessary\n // because the receiver will just collect statistics which can also\n // be done using the finished message.\n\n if (v === DVAL_EOM) {\n _this.messages++;\n\n if (textDumpFileName || textDumpConsolePrefix) {\n prettyMsg = prettyDebugMessage(msg);\n if (textDumpFileName) {\n fs.appendFileSync(textDumpFileName, (textDumpFilePrefix || '') + prettyMsg + '\\n');\n }\n if (textDumpConsolePrefix) {\n console.log(textDumpConsolePrefix + prettyMsg);\n }\n }\n\n _this.emit('debug-message', msg);\n msg = []; // new object, old may be in circulation for a while\n }\n }\n });\n\n // Not all streams will emit this.\n inputStream.on('error', function (err) {\n _this.emit('transport-error', err);\n _this.close();\n });\n\n // Not all streams will emit this.\n inputStream.on('close', function () {\n _this.close();\n });\n}", "function parseDeclarationVersion(stream, state) {\n state.tokenize = parseDeclarationEncoding;\n \n if(isTokenSeparated(stream) && stream.match(/^version( )*=( )*\"([a-zA-Z0-9_.:]|\\-)+\"/)) {\n return STYLE_INSTRUCTION;\n }\n stream.skipToEnd();\n return STYLE_ERROR;\n }", "function acorn_parse(input, options) {\n return Parser.parse(input, options)\n}", "function parseInput1(inputText) {\n const [rulesText, messagesText] = inputText\n .trim()\n .split('\\n\\n');\n const rules = rulesText\n .split('\\n')\n .map(line => {\n const [id, rulesText] = line.split(': ');\n if (rulesText.startsWith('\"')) return {id, matches: [rulesText[1]]};\n const rules = rulesText\n .split(' | ')\n .map(rule => rule.split(' '));\n return {id, rules};\n });\n const messages = messagesText\n .split('\\n');\n return {rules, messages};\n}", "constructor(str, data)\n {\n this.errors = [];\n let lines = str.split('\\n');\n\n let tokenizer = new Tokenizer(lines);\n for ( var i = 0; i < tokenizer.errors.length; i++ )\n {\n this.errors.push(tokenizer.errors[i]);\n if ( i === tokenizer.errors.length - 1 )\n return;\n }\n\n let expressions = [];\n for ( var i = 0; i < tokenizer.lines.length; i++ )\n expressions.push(new Expression(tokenizer.lines[i], i+1));\n\n let leave = false;\n for ( var i = 0; i < expressions.length; i++ )\n {\n if ( expressions[i].valid === false && expressions[i].err === false )\n {\n expressions.splice(i--, 1);\n continue;\n }\n\n if ( expressions[i].err )\n {\n this.errors.push(expressions[i].err);\n leave = true;\n }\n }\n\n if ( leave )\n return;\n\n try\n {\n let parsedState = parser(expressions);\n this.program = new Program(parsedState, data);\n }\n catch(e)\n {\n this.errors.push(e);\n }\n }", "function BinaryParser() { }", "function yamlParse(input) {\n return jsYaml.load(input, { schema: schema });\n}", "function IsSemVer(validationOptions) {\n return Object(_common_ValidateBy__WEBPACK_IMPORTED_MODULE_0__[\"ValidateBy\"])({\n name: IS_SEM_VER,\n validator: {\n validate: (value, args) => isSemVer(value),\n defaultMessage: Object(_common_ValidateBy__WEBPACK_IMPORTED_MODULE_0__[\"buildMessage\"])(eachPrefix => eachPrefix + '$property must be a Semantic Versioning Specification', validationOptions),\n },\n }, validationOptions);\n}", "function parseVersion(str) {\n if(!str) throw new Error(\"Failed to parse version string: \" + str);\n\n var fields = str.split('.');\n if(fields.length != 3) {\n throw new Error(\"Failed to parse version string: \" + str);\n }\n\n var n;\n fields = fields.map(function(s) {\n n = parseInt(s);\n if(n > 999999) {\n throw new Error(\"Failed to parse version string: \" + str);\n }\n return n;\n });\n\n return fields[0] * 1000000000000 + fields[1] * 1000000 + fields[2];\n}", "function parseInput(input) {\n var lines = input.split('\\n');\n var set = Uint32Array.from(lines[1].split(' '));\n\n if (set.length != parseInt(lines, 10)) {\n throw 'Error reading input';\n }\n \n return set;\n}", "function Parser(input) {\n // Make a new lexer\n this.lexer = new Lexer(input);\n}", "function parseInput(string) {\n // remember, these get applied right-to-left\n var f = helpers.compose(createObjects, splitOnDashes, createArrays)\n return f(string)\n}", "function isSemanticSort(tagPattern) {\n return splitTypeAndPattern(tagPattern).type === 'semver';\n}", "constructor(input = undefined) {\n super();\n this._typeName = \"StandardParseableInput\";\n this._typeID = undefined;\n this.getInput = () => this.input;\n if (input instanceof Input) {\n this.input = input;\n }\n }", "function isSemVer(value) {\n return typeof value === 'string' && validator_lib_isSemVer__WEBPACK_IMPORTED_MODULE_1___default()(value);\n}", "normalize (metadata) {\n metadata.sort((e1, e2) => semver.compare(e1.number, e2.number));\n const vMetadata = {};\n\n for (let i = 0; i < metadata.length; i++) {\n vMetadata[metadata[i].number] = metadata[i];\n }\n return {versions: vMetadata};\n }", "parse(parseType) {}", "function SpecParser() {\n\t this.result = {};\n\t }", "function Parser() {\n}", "function Parser() {\n}", "function parseInput(inputStr) {\n let input = {}\n inputStr.split(/[\\r\\n]/).forEach(sentence => {\n let floor\n switch (sentence.split(' ')[1]) {\n case 'first':\n floor = 1\n break\n case 'second':\n floor = 2\n break\n case 'third':\n floor = 3\n break\n case 'fourth':\n floor = 4\n break\n default:\n throw new Error(`Can't parse floor`)\n }\n\n input[floor] = []\n if (floor === 1) {\n input[floor].push('E')\n }\n let rtgs = sentence.match(/(\\w+) generator/g)\n if (rtgs) {\n input[floor].push(...rtgs.map(rtg => rtg.slice(0, 1).toUpperCase() + 'G'))\n }\n\n let chips = sentence.match(/(\\w+) microchip/g)\n if (chips) {\n input[floor].push(...chips.map(chip => chip.slice(0, 1).toUpperCase() + 'M'))\n }\n })\n\n return input\n}", "function SpecParser() {\n this.result = {};\n }", "function Parser() {\n\n}", "function MutationInputParser ()\n{\n\tvar _data = null; // MutationCollection\n\tvar _geneList = null;\n\tvar _sampleList = null;\n\tvar _idCounter = 0;\n\n\t// TODO add column name alternatives?\n\t// map of <mutation model field name, input header name> pairs\n\tvar _headerMap = {\n\t\t\"proteinPosEnd\": \"protein_position_end\",\n\t\t\"uniprotId\": \"uniprot_id\",\n\t\t\"cancerType\": \"cancer_type\",\n\t\t\"tumorType\": \"tumor_type\",\n\t\t\"cancerStudyLink\": \"cancer_study_link\",\n\t\t\"codonChange\": \"codon_change\",\n\t\t\"proteinPosStart\": \"protein_position_start\",\n\t\t\"linkToPatientView\": \"patient_view_link\",\n\t\t\"geneticProfileId\": \"genetic_profile_id\",\n\t\t\"mutationCount\": \"mutation_count\",\n\t\t\"mutationType\": \"mutation_type\", // \"variant_classification\"\n\t\t\"referenceAllele\": \"reference_allele\",\n\t\t\"uniprotAcc\": \"uniprot_accession\",\n\t\t\"fisValue\": \"fis_value\",\n\t\t\"functionalImpactScore\": \"fis\",\n\t\t\"cancerStudy\": \"cancer_study\",\n\t\t\"normalRefCount\": \"normal_ref_count\",\n\t\t\"ncbiBuildNo\": \"ncbi_build\",\n\t\t\"normalFreq\": \"normal_frequency\",\n\t\t\"cancerStudyShort\": \"cancer_study_short\",\n\t\t\"msaLink\": \"msa_link\",\n\t\t\"mutationStatus\": \"mutation_status\",\n\t\t\"cna\": \"copy_number\",\n\t\t\"proteinChange\": \"protein_change\",\n\t\t\"aminoAcidChange\": \"amino_acid_change\",\n\t\t\"endPos\": \"end_position\",\n\t\t//\"refseqMrnaId\": \"\",\n\t\t\"geneSymbol\": \"hugo_symbol\",\n\t\t\"tumorFreq\": \"tumor_frequency\",\n\t\t\"startPos\": \"start_position\",\n\t\t\"keyword\": \"keyword\",\n\t\t\"cosmic\": \"cosmic\",\n\t\t\"validationStatus\": \"validation_status\",\n\t\t\"mutationSid\": \"mutation_sid\",\n\t\t//\"canonicalTranscript\": \"\",\n\t\t\"normalAltCount\": \"normal_alt_count\",\n\t\t\"variantAllele\": \"variant_allele\",\n\t\t//\"mutationEventId\": \"\",\n\t\t\"mutationId\": \"mutation_id\",\n\t\t\"caseId\": \"sample_id\", // \"tumor_sample_barcode\"\n\t\t\"xVarLink\": \"xvar_link\",\n\t\t\"pdbLink\": \"pdb_link\",\n\t\t\"tumorAltCount\": \"tumor_alt_count\",\n\t\t\"tumorRefCount\": \"tumor_ref_count\",\n\t\t\"sequencingCenter\": \"center\",\n\t\t\"chr\": \"chromosome\"\n\t};\n\n\t/**\n\t * Initializes a default mutation object where all data fields are empty strings.\n\t *\n\t * @returns {Object} a default \"empty\" mutation object\n\t */\n\tfunction initMutation()\n\t{\n\t\treturn {\n\t\t\t\"proteinPosEnd\": \"\",\n\t\t\t\"uniprotId\": \"\",\n\t\t\t\"cancerType\": \"\",\n\t\t\t\"tumorType\": \"\",\n\t\t\t\"cancerStudyLink\": \"\",\n\t\t\t\"codonChange\": \"\",\n\t\t\t\"proteinPosStart\": \"\",\n\t\t\t\"linkToPatientView\": \"\",\n\t\t\t\"geneticProfileId\": \"\",\n\t\t\t\"mutationCount\": \"\",\n\t\t\t\"mutationType\": \"\",\n\t\t\t\"referenceAllele\": \"\",\n\t\t\t\"uniprotAcc\": \"\",\n\t\t\t\"fisValue\": \"\",\n\t\t\t\"functionalImpactScore\": \"\",\n\t\t\t\"cancerStudy\": \"\",\n\t\t\t\"normalRefCount\": \"\",\n\t\t\t\"ncbiBuildNo\": \"\",\n\t\t\t\"normalFreq\": \"\",\n\t\t\t\"cancerStudyShort\": \"\",\n\t\t\t\"msaLink\": \"\",\n\t\t\t\"mutationStatus\": \"\",\n\t\t\t\"cna\": \"\",\n\t\t\t\"proteinChange\": \"\",\n\t\t\t\"aminoAcidChange\": \"\",\n\t\t\t\"endPos\": \"\",\n\t\t\t\"refseqMrnaId\": \"\",\n\t\t\t\"geneSymbol\": \"\",\n\t\t\t\"tumorFreq\": \"\",\n\t\t\t\"startPos\": \"\",\n\t\t\t\"keyword\": \"\",\n\t\t\t\"cosmic\": \"\",\n\t\t\t\"validationStatus\": \"\",\n\t\t\t\"mutationSid\": \"\",\n\t\t\t//\"canonicalTranscript\": \"\",\n\t\t\t\"normalAltCount\": \"\",\n\t\t\t\"variantAllele\": \"\",\n\t\t\t//\"mutationEventId\": \"\",\n\t\t\t\"mutationId\": \"\",\n\t\t\t\"caseId\": \"\",\n\t\t\t\"xVarLink\": \"\",\n\t\t\t\"pdbLink\": \"\",\n\t\t\t\"tumorAltCount\": \"\",\n\t\t\t\"tumorRefCount\": \"\",\n\t\t\t\"sequencingCenter\": \"\",\n\t\t\t\"chr\": \"\"\n\t\t};\n\t}\n\n\t/**\n\t * Parses the entire input data and creates an array of mutation objects.\n\t *\n\t * @param input input string/file.\n\t * @returns {MutationCollection} an array of mutation objects.\n\t */\n\tfunction parseInput(input)\n\t{\n\t\tvar mutationData = new MutationCollection();\n\n\t\tvar lines = input.split(\"\\n\");\n\n\t\tif (lines.length > 0)\n\t\t{\n\t\t\t// assuming first line is a header\n\t\t\t// TODO allow comments?\n\t\t\tvar indexMap = buildIndexMap(lines[0]);\n\n\t\t\t// rest should be data\n\t\t\tfor (var i=1; i < lines.length; i++)\n\t\t\t{\n\t\t\t\t// skip empty lines\n\t\t\t\tif (lines[i].length > 0)\n\t\t\t\t{\n\t\t\t\t\tmutationData.push(parseLine(lines[i], indexMap));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t_data = mutationData;\n\n\t\treturn mutationData;\n\t}\n\n\t/**\n\t * Parses a single line of the input and returns a new mutation object.\n\t *\n\t * @param line single line of the input data\n\t * @param indexMap map of <header name, index> pairs\n\t * @returns {MutationModel} a mutation model object\n\t */\n\tfunction parseLine(line, indexMap)\n\t{\n\t\t//var mutation = initMutation();\n\t\t// init an empty mutation object\n\t\tvar mutation = new MutationModel();\n\n\t\t// assuming values are separated by tabs\n\t\tvar values = line.split(\"\\t\");\n\t\tvar attributes = {};\n\n\t\t// find the corresponding column for each field, and set the value\n\t\t_.each(_.keys(_headerMap), function(key) {\n\t\t\tvar value = parseValue(key, values, indexMap);\n\n\t\t\tif (value)\n\t\t\t{\n\t\t\t\tattributes[key] = value;\n\t\t\t}\n\t\t});\n\n\t\tattributes.mutationId = attributes.mutationId || nextId();\n\n\t\t// TODO mutationSid?\n\t\tattributes.mutationSid = attributes.mutationSid || attributes.mutationId;\n\n\t\tattributes.variantKey = VariantAnnotationUtil.generateVariantKey(attributes);\n\n\t\tmutation.set(attributes);\n\t\treturn mutation;\n\t}\n\n\t/**\n\t * Parses the value of a single input cell.\n\t *\n\t * @param field name of the mutation model field\n\t * @param values array of values for a single input line\n\t * @param indexMap map of <header name, index> pairs\n\t * @returns {string|undefined} data value for the given field name.\n\t */\n\tfunction parseValue(field, values, indexMap)\n\t{\n\t\t// get the column name for the given field name\n\t\tvar column = _headerMap[field];\n\t\tvar index = indexMap[column];\n\t\tvar value = undefined;\n\n\t\tif (index != null)\n\t\t{\n\t\t\tvalue = values[index] || undefined;\n\t\t}\n\n\t\treturn value;\n\t}\n\n\t/**\n\t * Builds a map of <header name, index> pairs, to use header names\n\t * instead of index constants.\n\t *\n\t * @param header header line (first line) of the input\n\t * @returns {object} map of <header name, index> pairs\n\t */\n\tfunction buildIndexMap(header)\n\t{\n\t\tvar columns = header.split(\"\\t\");\n\t\tvar map = {};\n\n\t\t_.each(columns, function(column, index) {\n\t\t\tmap[column.toLowerCase()] = index;\n\t\t});\n\n\t\treturn map;\n\t}\n\n\t/**\n\t * Processes the input data and creates a list of sample (case) ids.\n\t *\n\t * @returns {Array} an array of sample ids\n\t */\n\tfunction getSampleArray()\n\t{\n\t\tif (_data == null)\n\t\t{\n\t\t\treturn [];\n\t\t}\n\n\t\tif (_sampleList == null)\n\t\t{\n\t\t\tvar sampleSet = {};\n\n\t\t\t_data.each(function(mutation, idx) {\n\t\t\t\tif (mutation.get(\"caseId\") != null &&\n\t\t\t\t mutation.get(\"caseId\").length > 0)\n\t\t\t\t{\n\t\t\t\t\tsampleSet[mutation.get(\"caseId\")] = mutation.get(\"caseId\");\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t_sampleList = _.values(sampleSet);\n\t\t}\n\n\t\treturn _sampleList;\n\t}\n\n\tfunction getGeneList()\n\t{\n\t\tif (_data == null)\n\t\t{\n\t\t\treturn [];\n\t\t}\n\n\t\tif (_geneList == null)\n\t\t{\n\t\t\tvar geneSet = {};\n\n\t\t\t_data.each(function(mutation, idx) {\n\t\t\t\tif (mutation.get(\"geneSymbol\") != null &&\n\t\t\t\t mutation.get(\"geneSymbol\").length > 0)\n\t\t\t\t{\n\t\t\t\t\tgeneSet[mutation.get(\"geneSymbol\").toUpperCase()] =\n\t\t\t\t\t\tmutation.get(\"geneSymbol\").toUpperCase();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\t_geneList = _.values(geneSet);\n\t\t}\n\n\t\treturn _geneList;\n\t}\n\n\tfunction nextId()\n\t{\n\t _idCounter++;\n\n\t\treturn \"stalone_mut_\" + _idCounter;\n\t}\n\n\treturn {\n\t\tparseInput: parseInput,\n\t\tgetSampleArray: getSampleArray,\n\t\tgetGeneList: getGeneList\n\t};\n}", "function validateInputFormat() {\n const relationRegex = /^[A-Z]*\\(([A-Z]+,)*[A-Z]+\\)$/g;\n const trimmedRelationString = relationInput.value.toUpperCase().replace(/ /g,'');\n \n const dependencyRegex = /(^([A-Z]+(,[A-Z]+)*->[A-Z]+(,[A-Z]+)*){1}(;[A-Z]+(,[A-Z]+)*->[A-Z]+(,[A-Z]+)*)*$)|^$/;\n const trimmedDependencyString = dependencyInput.value.toUpperCase().replace(/ /g,'');\n\n try {\n // Check the trimmed relation input string\n if (trimmedRelationString === \"\") throw {\n code: 1,\n msg: 'Please enter a relation schema.'\n };\n else if (!relationRegex.test(trimmedRelationString)) throw {\n code: 1,\n msg: 'Invalid relation schema format.'\n };\n relationInput.setCustomValidity('');\n \n // Check the trimmed dependency input string\n if (!dependencyRegex.test(trimmedDependencyString)) throw {\n code: 2,\n msg: 'Invalid functional dependency format.'\n };\n dependencyInput.setCustomValidity('');\n\n updateRelationErrorMsg();\n updateDependencyErrorMsg();\n parseInput(trimmedRelationString,trimmedDependencyString);\n }\n catch(err) {\n if (err.code == 1) {\n relationInput.setCustomValidity(err.msg);\n updateRelationErrorMsg();\n }\n else if (err.code == 2) {\n dependencyInput.setCustomValidity(err.msg);\n updateDependencyErrorMsg();\n }\n else {\n console.log(\"A deadly error has occured:\\n\" + err);\n }\n }\n}", "function handleSegment(segment) {\n if (segment[1].text == 'null') {\n return { intertype: 'value', ident: '0', type: 'i32' };\n } else if (segment[1].text == 'zeroinitializer') {\n Types.needAnalysis[segment[0].text] = 0;\n return { intertype: 'emptystruct', type: segment[0].text };\n } else if (segment[1].text in PARSABLE_LLVM_FUNCTIONS) {\n return parseLLVMFunctionCall(segment);\n } else if (segment[1].type && segment[1].type == '{') {\n Types.needAnalysis[segment[0].text] = 0;\n return { intertype: 'struct', type: segment[0].text, contents: handleSegments(segment[1].tokens) };\n } else if (segment[1].type && segment[1].type == '<') {\n Types.needAnalysis[segment[0].text] = 0;\n return { intertype: 'struct', type: segment[0].text, contents: handleSegments(segment[1].item.tokens[0].tokens) };\n } else if (segment[1].type && segment[1].type == '[') {\n Types.needAnalysis[segment[0].text] = 0;\n return { intertype: 'list', type: segment[0].text, contents: handleSegments(segment[1].item.tokens) };\n } else if (segment.length == 2) {\n Types.needAnalysis[segment[0].text] = 0;\n return { intertype: 'value', type: segment[0].text, ident: toNiceIdent(segment[1].text) };\n } else if (segment[1].text === 'c') {\n // string\n var text = segment[2].text;\n text = text.substr(1, text.length-2);\n return { intertype: 'string', text: text, type: 'i8*' };\n } else if (segment[1].text === 'blockaddress') {\n return parseBlockAddress(segment);\n } else {\n throw 'Invalid segment: ' + dump(segment);\n }\n }", "parseInput(args) {\n let validArgs = {\n a: 'add',\n add: 'add',\n l: 'list',\n list: 'list',\n d: 'delete',\n delete: 'delete',\n u: 'update',\n update: 'update',\n };\n\n let allCommands = Object.keys(args);\n let command = allCommands.filter(arg => validArgs[arg])[0];\n\n return {\n action: validArgs[command],\n payload: typeof args[command] === 'string' ? args[command] : undefined,\n category: args.category,\n text: args.text,\n };\n }", "function parseInput(data_string) {\n var split_array = data_string.split('|');\n var processed_data = {};\n processed_data.timestamp = split_array[0];\n processed_data.instrument_id = split_array[4].split('=')[1];\n processed_data.trade_volume = split_array[7].split('=')[1];\n processed_data.trade_type = split_array[15].split('=')[1];\n console.log(processed_data);\n return processed_data;\n}", "parse(superBlock, tokenizer) {\n throw new Error(\"parse function not implemented!\");\n }", "function parseInput(input) {\r\n\t\tvar ret = [];\r\n\t\tvar building = [];\r\n\t\tvar data = input.trim().split(\";\");\r\n\r\n\t\t//iterate through the input\r\n\t\tfor (var i = 0; i < data.length; i++) {\r\n\t\t\tbuilding = data[i].split(\"|\");\r\n\r\n\t\t\tret.push({\r\n\t\t\t\tname: building[0].trim(),\r\n\t\t\t\tlevel: parseInt(building[1])\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn ret;\r\n\t}", "function cmdLineParse(str) {\n // replaces multiple spaces with just one space\n // replaces all comments, denoted with either []s or #s\n // trims before / after spaces\n // splits string up into array based on spaces\n var cmd_array = str.replace(/#.*/g, ' ').replace(/\\[.*\\]/g, '').trim().toLowerCase().replace(/\\s{2,}/g, ' ').split(' ');\n\n // from spliced string, take cmd type (inc,deb,end) and cmd number\n cmd = {'cmd': cmd_array[1], 'cmd_num': parseInt(cmd_array[0]), 'fail': false}\n\n // depending on type of command, make sure correct number of arguments\n // if not, report failure\n if ((cmd['cmd'] == 'inc' && cmd_array.length != 4) || \n (cmd['cmd'] == 'deb' && cmd_array.length != 5) ||\n (cmd['cmd'] == 'end' && cmd_array.length != 2)) {\n cmd['fail'] = true;\n return cmd;\n }\n\n // if cmd is inc or deb, pull information from cmd_array\n // both commands need box number and next command\n // only deb commands need fail command number\n if (cmd['cmd'] == 'inc' || cmd['cmd'] == 'deb') {\n cmd['box'] = parseInt(cmd_array[2]);\n cmd['nxt_cmd'] = parseInt(cmd_array[3]);\n if (cmd['cmd'] == 'deb') {\n cmd['fail_cmd'] = parseInt(cmd_array[4]);\n }\n }\n\n // check command for failure\n if (cmdFail(cmd)) {\n cmd['fail'] = true;\n }\n\n return cmd;\n}", "static parse(str) {\n }", "constructor (version, codec, multihash) {\n if (typeof version === 'string') {\n if (multibase.isEncoded(version)) { // CID String (encoded with multibase)\n const cid = multibase.decode(version)\n this.version = parseInt(cid.slice(0, 1).toString('hex'), 16)\n this.codec = multicodec.getCodec(cid.slice(1))\n this.multihash = multicodec.rmPrefix(cid.slice(1))\n } else { // bs58 string encoded multihash\n this.codec = 'dag-pb'\n this.multihash = mh.fromB58String(version)\n this.version = 0\n }\n } else if (Buffer.isBuffer(version)) {\n const firstByte = version.slice(0, 1)\n const v = parseInt(firstByte.toString('hex'), 16)\n if (v === 0 || v === 1) { // CID\n const cid = version\n this.version = v\n this.codec = multicodec.getCodec(cid.slice(1))\n this.multihash = multicodec.rmPrefix(cid.slice(1))\n } else { // multihash\n this.codec = 'dag-pb'\n this.multihash = version\n this.version = 0\n }\n } else if (typeof version === 'number') {\n if (typeof codec !== 'string') {\n throw new Error('codec must be string')\n }\n if (!(version === 0 || version === 1)) {\n throw new Error('version must be a number equal to 0 or 1')\n }\n mh.validate(multihash)\n this.codec = codec\n this.version = version\n this.multihash = multihash\n }\n }", "parse(input) {\n let command = {};\n\n command.username = this.getUser(input);\n command.subject = this.getSubject(input);\n command.query = this.getQuery(input);\n\n return command;\n }", "static buildParser(format) {\n // Split input format by regexp, which includes predefined patterns. Normally format would have some\n // splitters, like 'YYYY-MM-DD' or 'D/M YYYY' so output will contain matched patterns as well as splitters\n // which would serve as anchors. E.g. provided format is 'D/M!YYYY' and input is `11/6!2019` algorithm would work like:\n // 1. split format by regexp // ['', 'D', '/', 'M', '!', 'YYYY', '']\n // 2. find splitters // ['/', '!']\n // 3. split input by seps, step by step // ['11', ['6', ['2019']]]\n //\n // Inputs like 'YYYYY' (YYYY + Y) are kinda invalid, need to figure smth when\n // we encounter them.\n const parts = format.split(parserRegexp),\n parser = [];\n\n // if length of the parts array is 1 - there are no regexps in the input string. thus - no parsers\n // do same if there are patterns matching locale strings (l, ll, LLLL etc.)\n // returning empty array to use new Date() as parser\n if (parts.length === 1 || localeStrRegExp.test(format)) {\n return [];\n } else {\n parts.reduce((prev, curr, index, array) => {\n // ignore first and last empty string\n if (index !== 0 || curr !== '') {\n // if current element matches parser regexp store it as a parser\n if (parserRegexp.test(curr)) {\n const localeParsers = (this.L('parsers') !== 'parsers' && this.L('parsers')) || {},\n fn = localeParsers[curr] || parsers[curr];\n\n // Z should be last element in the string that matches regexp. Last array element is always either\n // an empty string (if format ends with Z) or splitter (everything that doesn't match regexp after Z)\n // If there is a pattern after Z, then Z index will be lower than length - 2\n if (curr === 'Z' && index < array.length - 2) {\n throw new Error(`Invalid format ${format} TimeZone (Z) must be last token`);\n }\n\n // If fn is a string, we found an alias (L, LLL, l etc.).\n // Need to build parsers from mapped format and merge with existing\n if (typeof fn === 'string') {\n // we are going to merge nested parsers with current, some cleanup required:\n // 1. last element is no longer last\n // 2. need to pass last parser to the next step\n const nestedParsers = DateHelper.buildParser(fn),\n lastItem = nestedParsers.pop();\n delete lastItem.last;\n\n // elevate nested parsers\n parser.push(...nestedParsers);\n\n prev = lastItem;\n } else {\n prev.pattern = curr;\n prev.fn = parsers[curr];\n }\n }\n // if it doesn't match - we've found a splitter\n else {\n prev.splitter = curr;\n parser.push(prev);\n prev = {};\n }\n } else if (prev.hasOwnProperty('pattern')) {\n parser.push(prev);\n }\n return prev;\n }, {});\n }\n\n parser[parser.length - 1].last = true;\n\n return parser;\n }", "function parseDate(input) {\n let year;\n let month;\n let day;\n\n let i = 0;\n for (let chunk of input.split(\"-\")) {\n switch (i) {\n case 0:\n year = parseInt(chunk);\n break;\n case 1:\n month = parseInt(chunk);\n break;\n case 2:\n day = parseInt(chunk);\n break;\n }\n i += 1;\n }\n let date = new Date(year, month - 1, day);\n return date;\n}", "function TokenStream(input) {\n var current = null;\n var keywords = ' true false let if else while func agent ';\n return {\n next : next,\n peek : peek,\n eof : eof,\n croak : input.croak\n };\n function is_keyword(x) {\n return keywords.indexOf(' ' + x + ' ') >= 0;\n }\n function is_digit(ch) {\n return /[0-9]/i.test(ch);\n }\n function is_id_start(ch) {\n return /[\\.\\/_A-Za-z]/i.test(ch);\n }\n function is_id(ch) {\n return is_id_start(ch) || '0123456789-+'.indexOf(ch) >= 0;\n }\n function is_op_char(ch) {\n return '+-*/^%=&|<>!:@$'.indexOf(ch) >= 0;\n }\n function is_punc(ch) {\n //return ',;(){}[]'.indexOf(ch) >= 0;\n return ',;(){}[]\\n'.indexOf(ch) >= 0;\n }\n function is_whitespace(ch) {\n //return ' \\t\\n'.indexOf(ch) >= 0;\n return ' \\t'.indexOf(ch) >= 0;\n }\n function read_while(predicate) {\n var str = '';\n while (!input.eof() && predicate(input.peek()))\n str += input.next();\n // console.log('Read ['+str+']');\n return str;\n }\n function read_number() {\n var has_dot = false;\n var number = read_while(function(ch){\n if (ch == '.') {\n if (has_dot) return false;\n has_dot = true;\n return true;\n }\n return is_digit(ch);\n });\n return { type: 'num', value: parseFloat(number) };\n }\n function read_ident() {\n var id = read_while(is_id);\n return {\n type : is_keyword(id) ? 'kw' : 'var',\n value : id\n };\n }\n function read_escaped(end) {\n var escaped = false, str = '';\n input.next();\n while (!input.eof()) {\n var ch = input.next();\n if (escaped) {\n str += ch;\n escaped = false;\n } else if (ch == '\\\\') {\n escaped = true;\n } else if (ch == end) {\n break;\n } else {\n str += ch;\n }\n }\n return str;\n }\n function read_string() {\n var ch = input.peek();\n return { type: 'str', value: read_escaped(ch) };\n }\n\n function read_line() {\n return { type: 'str', value: read_while(ch=>(ch != '\\n'))};\n }\n\n function skip_comment() {\n read_while(function(ch){ return ch != '\\n'; });\n input.next();\n }\n\n function read_next() {\n read_while(is_whitespace);\n if (input.eof()) return null;\n var ch = input.peek();\n // console.log('char: '+ch);\n if (ch == '#') {\n skip_comment();\n return read_next();\n }\n\n if (ch == '\"' || ch == \"'\") return read_string();\n if (is_digit(ch)) return read_number();\n if (is_id_start(ch)) return read_ident();\n // if (is_special_char(ch)) return read_special();\n \n if (is_punc(ch)) return {\n type : 'punc',\n value : input.next()\n };\n if (is_op_char(ch)) return {\n type : 'op',\n value : read_while(is_op_char)\n };\n\n input.croak('Can\\'t handle character: ' + ch);\n }\n\n function peek() {\n return current || (current = read_next());\n }\n\n function next() {\n var tok = current;\n current = null;\n return tok || read_next();\n }\n\n function eof() {\n return peek() == null;\n }\n}", "function parseInput1(inputText) {\n const [rulesText, myTicketText, ticketsText] = inputText\n .trim()\n .split('\\n\\n');\n const rules = rulesText\n .split('\\n')\n .flatMap(text => {\n const [name, rangeText] = text.split(': ');\n return rangeText.split(' or ');\n })\n .map(rangeText => {\n const [min, max] = rangeText.split('-');\n return {min: parseInt(min), max: parseInt(max)};\n });\n const ticketNumbers = ticketsText\n .split('\\n')\n .slice(1)\n .flatMap(text => text.split(','))\n .map(num => parseInt(num));\n\n return {rules, ticketNumbers};\n}", "static parse(s) {\n const split = s.split('\\.', 7);\n if (split.length !== 7) {\n console.error(s + ' is not a valid Noun');\n }\n const noun = new Noun();\n // gender\n noun.masculine = 'M' === split[0];\n // singular/plural\n noun.singular = split[1];\n noun.plural = split[2];\n // stat\n noun.stats = new Map();\n split[3].split('\\|').forEach(stat => {\n if (stat.indexOf('=') !== -1) {\n const statSplit = stat.split('=');\n noun.stats.set(statSplit[0], Number(statSplit[1]));\n }\n });\n // tag\n noun.tags = split[4].split('\\|');\n // power\n noun.powers = split[5].split('\\|');\n noun.price = _price__WEBPACK_IMPORTED_MODULE_2__[\"Price\"].parse(split[6], split[1]);\n return noun;\n }", "function ModelParser() {\n Parser.call(this);\n\n this.onValue = function(v) {\n\tthis.emit('model', v);\n };\n this.onEnd = function() { };\n\n this.on('list', function() {\n\tvar list = [];\n\tvar oldOnValue = this.onValue, oldOnUp = this.onUp;\n\tthis.onValue = function(v) {\n\t list.push(v);\n\t};\n\tthis.onUp = function() {\n\t this.onValue = oldOnValue;\n\t this.onUp = oldOnUp;\n\t this.onValue(list);\n\t};\n });\n this.on('dict', function() {\n\tvar key = undefined, dict = {};\n\tvar oldOnValue = this.onValue, oldOnUp = this.onUp;\n\tthis.onValue = function(v) {\n\t if (key === undefined) {\n\t\tkey = v.toString();\n\t } else {\n\t\tdict[key] = v;\n\t\tkey = undefined;\n\t }\n\t};\n\tthis.onUp = function() {\n\t this.onValue = oldOnValue;\n\t this.onUp = oldOnUp;\n\t this.onValue(dict);\n\t};\n });\n this.on('integer', function(integer) {\n\tthis.onValue(integer);\n });\n this.on('string', function(string) {\n\tthis.onValue(string);\n });\n this.on('up', function() {\n\tthis.onUp();\n });\n}", "function parseDate(input) {\n var parts = input.split('-');\n // new Date(year, month [, date [, hours[, minutes[, seconds[, ms]]]]])\n return Date.parse(new Date(parts[0], parts[1] - 1, parts[2])); // months are 0-based\n }", "function parseVersionNum(vn) {\n\t\t\tvn = vn.split(\".\");\n\t\t\treturn {\n\t\t\t\t'major' : (vn[0]*1),\n\t\t\t\t'minor' : (vn[1]*1),\n\t\t\t\t'patch' : (vn[2]*1)\n\t\t\t};\n\t\t}", "validateVersionInfo (data) {\n\t\tAssert.equal(data.currentVersion, this.CURRENT_RELEASE, 'current version is not correct');\n\t\tAssert.equal(data.supportedVersion, this.EARLIEST_SUPPORTED_RELEASE, 'earliest supported version is not correct');\n\t\tAssert.equal(data.preferredVersion, this.MINUMUM_PREFERRED_RELEASE, 'preferred version is not correct');\n\t}", "function parse(input, options) {\n\t if (!options || (options.startRule === 'games')) {\n\t return parseGames(input, options);\n\t }\n\t else {\n\t return parseGame(input, options);\n\t }\n\t}", "function parseLine(line) {\n\n // Remove empty lines\n if(!line || !line.length) {\n return;\n }\n\n // Substring details based on separators\n var date = line.substr(0,line.indexOf(' -'));\n var sender, message;\n\n // If there is no sender, label message sender as system\n if (line.indexOf(': ') === -1) {\n sender = 'system';\n message = line.substr(line.indexOf('- ')+2);\n }\n // Else substring sender and message\n else {\n sender = line.substr(line.indexOf('- ')+2, line.indexOf(': ')-line.indexOf('- ')-2);\n message = line.substr(line.indexOf(': ')+2);\n }\n\n return {\n date: date,\n sender: sender,\n message: message\n };\n\n}", "function tokenize() {\n // 8.1. Descriptor tokeniser: Skip whitespace\n collectCharacters(regexLeadingSpaces); // 8.2. Let current descriptor be the empty string.\n\n currentDescriptor = \"\"; // 8.3. Let state be in descriptor.\n\n state = \"in descriptor\";\n\n while (true) {\n // 8.4. Let c be the character at position.\n c = input.charAt(pos); // Do the following depending on the value of state.\n // For the purpose of this step, \"EOF\" is a special character representing\n // that position is past the end of input.\n // In descriptor\n\n if (state === \"in descriptor\") {\n // Do the following, depending on the value of c:\n // Space character\n // If current descriptor is not empty, append current descriptor to\n // descriptors and let current descriptor be the empty string.\n // Set state to after descriptor.\n if (isSpace(c)) {\n if (currentDescriptor) {\n descriptors.push(currentDescriptor);\n currentDescriptor = \"\";\n state = \"after descriptor\";\n } // U+002C COMMA (,)\n // Advance position to the next character in input. If current descriptor\n // is not empty, append current descriptor to descriptors. Jump to the step\n // labeled descriptor parser.\n\n } else if (c === \",\") {\n pos += 1;\n\n if (currentDescriptor) {\n descriptors.push(currentDescriptor);\n }\n\n parseDescriptors();\n return; // U+0028 LEFT PARENTHESIS (()\n // Append c to current descriptor. Set state to in parens.\n } else if (c === \"\\u0028\") {\n currentDescriptor = currentDescriptor + c;\n state = \"in parens\"; // EOF\n // If current descriptor is not empty, append current descriptor to\n // descriptors. Jump to the step labeled descriptor parser.\n } else if (c === \"\") {\n if (currentDescriptor) {\n descriptors.push(currentDescriptor);\n }\n\n parseDescriptors();\n return; // Anything else\n // Append c to current descriptor.\n } else {\n currentDescriptor = currentDescriptor + c;\n } // (end \"in descriptor\"\n // In parens\n\n } else if (state === \"in parens\") {\n // U+0029 RIGHT PARENTHESIS ())\n // Append c to current descriptor. Set state to in descriptor.\n if (c === \")\") {\n currentDescriptor = currentDescriptor + c;\n state = \"in descriptor\"; // EOF\n // Append current descriptor to descriptors. Jump to the step labeled\n // descriptor parser.\n } else if (c === \"\") {\n descriptors.push(currentDescriptor);\n parseDescriptors();\n return; // Anything else\n // Append c to current descriptor.\n } else {\n currentDescriptor = currentDescriptor + c;\n } // After descriptor\n\n } else if (state === \"after descriptor\") {\n // Do the following, depending on the value of c:\n // Space character: Stay in this state.\n if (isSpace(c)) ; else if (c === \"\") {\n parseDescriptors();\n return; // Anything else\n // Set state to in descriptor. Set position to the previous character in input.\n } else {\n state = \"in descriptor\";\n pos -= 1;\n }\n } // Advance position to the next character in input.\n\n\n pos += 1; // Repeat this step.\n } // (close while true loop)\n\n }", "function validSemanticVersion (version, minimum) {\n version = parseSemVer(version)\n minimum = parseSemVer(minimum)\n\n var versionNum = (version.major * 100000 * 100000) +\n (version.minor * 100000) +\n version.patch\n var minimumNum = (minimum.major * 100000 * 100000) +\n (minimum.minor * 100000) +\n minimum.patch\n\n return versionNum >= minimumNum\n }", "function parseFieldSpecs$1(input) {\n var specs = [];\n var tokens = [];\n var i;\n var token;\n if (typeof input === 'string') {\n tokens = input.split(/\\s*,\\s*/);\n }\n else if (typeof input === 'function') {\n tokens = [input];\n }\n else if (Array.isArray(input)) {\n tokens = input;\n }\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n if (typeof token === 'string') {\n specs.push(token.charAt(0) === '-' ?\n { field: token.substring(1), order: -1 } :\n { field: token, order: 1 });\n }\n else if (typeof token === 'function') {\n specs.push({ func: token });\n }\n }\n return specs;\n }", "function compile(inputSpec) {\n var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n // 0. Augment opt with default opts\n if (opt.logger) {\n // set the singleton logger to the provided logger\n set(opt.logger);\n }\n\n if (opt.fieldTitle) {\n // set the singleton field title formatter\n setTitleFormatter(opt.fieldTitle);\n }\n\n try {\n // 1. Initialize config by deep merging default config with the config provided via option and the input spec.\n var config = initConfig(mergeConfig(opt.config, inputSpec.config)); // 2. Normalize: Convert input spec -> normalized spec\n // - Decompose all extended unit specs into composition of unit spec. For example, a box plot get expanded into multiple layers of bars, ticks, and rules. The shorthand row/column channel is also expanded to a facet spec.\n // - Normalize autosize and width or height spec\n\n var spec = normalize(inputSpec, config); // 3. Build Model: normalized spec -> Model (a tree structure)\n // This phases instantiates the models with default config by doing a top-down traversal. This allows us to pass properties that child models derive from their parents via their constructors.\n // See the abstract `Model` class and its children (UnitModel, LayerModel, FacetModel, ConcatModel) for different types of models.\n\n var model = buildModel(spec, null, '', undefined, config); // 4 Parse: Model --> Model with components\n // Note that components = intermediate representations that are equivalent to Vega specs.\n // We need these intermediate representation because we need to merge many visualization \"components\" like projections, scales, axes, and legends.\n // We will later convert these components into actual Vega specs in the assemble phase.\n // In this phase, we do a bottom-up traversal over the whole tree to\n // parse for each type of components once (e.g., data, layout, mark, scale).\n // By doing bottom-up traversal, we start parsing components of unit specs and\n // then merge child components of parent composite specs.\n //\n // Please see inside model.parse() for order of different components parsed.\n\n model.parse(); // drawDataflow(model.component.data.sources);\n // 5. Optimize the dataflow. This will modify the data component of the model.\n\n optimizeDataflow(model.component.data, model); // drawDataflow(model.component.data.sources);\n // 6. Assemble: convert model components --> Vega Spec.\n\n var vgSpec = assembleTopLevelModel(model, getTopLevelProperties(inputSpec, spec.autosize, config, model), inputSpec.datasets, inputSpec.usermeta);\n return {\n spec: vgSpec,\n normalized: spec\n };\n } finally {\n // Reset the singleton logger if a logger is provided\n if (opt.logger) {\n reset();\n } // Reset the singleton field title formatter if provided\n\n\n if (opt.fieldTitle) {\n resetTitleFormatter();\n }\n }\n }", "function InputPackage(sequenceNumber,value){\n this.sequenceNumber = sequenceNumber;\n this.value = value;\n}", "static parse(line) {\n let r = line.match(/^FIRMWARE_NAME:.*/i);\n if (!r) {\n return null;\n }\n\n const payload = {};\n\n { // FIRMWARE_NAME\n const r = line.match(/FIRMWARE_NAME:([a-zA-Z\\_\\-]+(\\s+[\\d\\.]+)?)/);\n if (r) {\n payload.firmwareName = r[1];\n }\n }\n\n { // PROTOCOL_VERSION\n const r = line.match(/PROTOCOL_VERSION:([\\d\\.]+)/);\n if (r) {\n payload.protocolVersion = r[1];\n }\n }\n\n { // MACHINE_TYPE\n const r = line.match(/MACHINE_TYPE:(\\w+)/);\n if (r) {\n payload.machineType = r[1];\n }\n }\n\n { // EXTRUDER_COUNT\n const r = line.match(/EXTRUDER_COUNT:(\\d+)/);\n if (r) {\n payload.extruderCount = Number(r[1]);\n }\n }\n\n { // UUID\n const r = line.match(/UUID:([a-zA-Z0-9\\-]+)/);\n if (r) {\n payload.uuid = r[1];\n }\n }\n\n return {\n type: MarlinLineParserResultFirmware,\n payload: payload\n };\n }", "function parseDate(input) {\n\t var parts = input.match(/(\\d+)/g);\n\t // new Date(year, month [, date [, hours[, minutes[, seconds[, ms]]]]])\n\t return new Date(parts[0], parts[1]-1, parts[2]); // months are 0-based\n\t}", "function parseDate(input) {\n\t var parts = input.match(/(\\d+)/g);\n\t // new Date(year, month [, date [, hours[, minutes[, seconds[, ms]]]]])\n\t return new Date(parts[0], parts[1]-1, parts[2]); // months are 0-based\n\t}", "match(input, start, end){\n start = start || 0\n end = end || input.length\n if(typeof input === 'string') input = new Source(input)\n if(!this.startsWith(input.get(start)))\n return this.error(input, start, start)\n var n = end\n end=start+1\n while(end<n && Character.isDigit(input.get(end))) end++\n if(end==n) \n return this.token(input, start, end, Number.parseInt(input.substring(start,end)))\n var integer = true\n if(input.get(end)=='.'){\n integer = false\n end++\n var s=end\n while(end<n && Character.isDigit(input.get(end))) end++\n if(end==n) \n return this.token(input, start, end, Number.parseFloat(input.substring(start,end)))\n if(end==s) return this.error(input, start, end)\n }\n if(input.get(end)=='E' || input.get(end)=='e'){\n integer = false\n end++\n if(end==n) return this.error(input, start, end)\n if(this.isSign(input.get(end))) end++\n if(end==n) return this.error(input, start, end)\n var s = end\n while(end<n && Character.isDigit(input.get(end))) end++\n if(end==s) return this.error(input, start, end)\n }\n if( integer ) return this.token(input, start, end, Number.parseInt(input.substring(start,end)))\n return this.token(input, start, end, Number.parseFloat(input.substring(start,end)))\n }", "function parseFieldSpecs(input) {\n var specs = [];\n var tokens = [];\n var i;\n var token;\n\n if (typeof input === 'string') {\n tokens = input.split(/\\s*,\\s*/);\n } else if (typeof input === 'function') {\n tokens = [input];\n } else if (Array.isArray(input)) {\n tokens = input;\n }\n\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i];\n\n if (typeof token === 'string') {\n specs.push(token.charAt(0) === '-' ? {\n field: token.substring(1),\n order: -1\n } : {\n field: token,\n order: 1\n });\n } else if (typeof token === 'function') {\n specs.push({\n func: token\n });\n }\n }\n\n return specs;\n }", "function tokenize() {\n\n // 8.1. Descriptor tokeniser: Skip whitespace\n collectCharacters(regexLeadingSpaces);\n\n // 8.2. Let current descriptor be the empty string.\n currentDescriptor = \"\";\n\n // 8.3. Let state be in descriptor.\n state = \"in descriptor\";\n\n while (true) {\n\n // 8.4. Let c be the character at position.\n c = input.charAt(pos);\n\n // Do the following depending on the value of state.\n // For the purpose of this step, \"EOF\" is a special character representing\n // that position is past the end of input.\n\n // In descriptor\n if (state === \"in descriptor\") {\n // Do the following, depending on the value of c:\n\n // Space character\n // If current descriptor is not empty, append current descriptor to\n // descriptors and let current descriptor be the empty string.\n // Set state to after descriptor.\n if (isSpace(c)) {\n if (currentDescriptor) {\n descriptors.push(currentDescriptor);\n currentDescriptor = \"\";\n state = \"after descriptor\";\n }\n\n // U+002C COMMA (,)\n // Advance position to the next character in input. If current descriptor\n // is not empty, append current descriptor to descriptors. Jump to the step\n // labeled descriptor parser.\n } else if (c === \",\") {\n pos += 1;\n if (currentDescriptor) {\n descriptors.push(currentDescriptor);\n }\n parseDescriptors();\n return;\n\n // U+0028 LEFT PARENTHESIS (()\n // Append c to current descriptor. Set state to in parens.\n } else if (c === \"\\u0028\") {\n currentDescriptor = currentDescriptor + c;\n state = \"in parens\";\n\n // EOF\n // If current descriptor is not empty, append current descriptor to\n // descriptors. Jump to the step labeled descriptor parser.\n } else if (c === \"\") {\n if (currentDescriptor) {\n descriptors.push(currentDescriptor);\n }\n parseDescriptors();\n return;\n\n // Anything else\n // Append c to current descriptor.\n } else {\n currentDescriptor = currentDescriptor + c;\n }\n // (end \"in descriptor\"\n\n // In parens\n } else if (state === \"in parens\") {\n\n // U+0029 RIGHT PARENTHESIS ())\n // Append c to current descriptor. Set state to in descriptor.\n if (c === \")\") {\n currentDescriptor = currentDescriptor + c;\n state = \"in descriptor\";\n\n // EOF\n // Append current descriptor to descriptors. Jump to the step labeled\n // descriptor parser.\n } else if (c === \"\") {\n descriptors.push(currentDescriptor);\n parseDescriptors();\n return;\n\n // Anything else\n // Append c to current descriptor.\n } else {\n currentDescriptor = currentDescriptor + c;\n }\n\n // After descriptor\n } else if (state === \"after descriptor\") {\n\n // Do the following, depending on the value of c:\n // Space character: Stay in this state.\n if (isSpace(c)) {\n\n // EOF: Jump to the step labeled descriptor parser.\n } else if (c === \"\") {\n parseDescriptors();\n return;\n\n // Anything else\n // Set state to in descriptor. Set position to the previous character in input.\n } else {\n state = \"in descriptor\";\n pos -= 1;\n\n }\n }\n\n // Advance position to the next character in input.\n pos += 1;\n\n // Repeat this step.\n } // (close while true loop)\n }", "function parseDate(input) {\n if (input instanceof Date) {\n return input;\n } else {\n var parts = input.match(/(\\d+)/g);\n // new Date(year, month [, date [, hours[, minutes[, seconds[, ms]]]]])\n return new Date(parts[0], parts[1]-1, parts[2], parts[3], parts[4]); // months are 0-based\n }\n}", "function tokenize() {\n\n\t\t\t// 8.1. Descriptor tokeniser: Skip whitespace\n\t\t\tcollectCharacters(regexLeadingSpaces);\n\n\t\t\t// 8.2. Let current descriptor be the empty string.\n\t\t\tcurrentDescriptor = \"\";\n\n\t\t\t// 8.3. Let state be in descriptor.\n\t\t\tstate = \"in descriptor\";\n\n\t\t\twhile (true) {\n\n\t\t\t\t// 8.4. Let c be the character at position.\n\t\t\t\tc = input.charAt(pos);\n\n\t\t\t\t// Do the following depending on the value of state.\n\t\t\t\t// For the purpose of this step, \"EOF\" is a special character representing\n\t\t\t\t// that position is past the end of input.\n\n\t\t\t\t// In descriptor\n\t\t\t\tif (state === \"in descriptor\") {\n\t\t\t\t\t// Do the following, depending on the value of c:\n\n\t\t\t\t // Space character\n\t\t\t\t // If current descriptor is not empty, append current descriptor to\n\t\t\t\t // descriptors and let current descriptor be the empty string.\n\t\t\t\t // Set state to after descriptor.\n\t\t\t\t\tif (isSpace(c)) {\n\t\t\t\t\t\tif (currentDescriptor) {\n\t\t\t\t\t\t\tdescriptors.push(currentDescriptor);\n\t\t\t\t\t\t\tcurrentDescriptor = \"\";\n\t\t\t\t\t\t\tstate = \"after descriptor\";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t// U+002C COMMA (,)\n\t\t\t\t\t// Advance position to the next character in input. If current descriptor\n\t\t\t\t\t// is not empty, append current descriptor to descriptors. Jump to the step\n\t\t\t\t\t// labeled descriptor parser.\n\t\t\t\t\t} else if (c === \",\") {\n\t\t\t\t\t\tpos += 1;\n\t\t\t\t\t\tif (currentDescriptor) {\n\t\t\t\t\t\t\tdescriptors.push(currentDescriptor);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tparseDescriptors();\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t// U+0028 LEFT PARENTHESIS (()\n\t\t\t\t\t// Append c to current descriptor. Set state to in parens.\n\t\t\t\t\t} else if (c === \"\\u0028\") {\n\t\t\t\t\t\tcurrentDescriptor = currentDescriptor + c;\n\t\t\t\t\t\tstate = \"in parens\";\n\n\t\t\t\t\t// EOF\n\t\t\t\t\t// If current descriptor is not empty, append current descriptor to\n\t\t\t\t\t// descriptors. Jump to the step labeled descriptor parser.\n\t\t\t\t\t} else if (c === \"\") {\n\t\t\t\t\t\tif (currentDescriptor) {\n\t\t\t\t\t\t\tdescriptors.push(currentDescriptor);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tparseDescriptors();\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t// Anything else\n\t\t\t\t\t// Append c to current descriptor.\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcurrentDescriptor = currentDescriptor + c;\n\t\t\t\t\t}\n\t\t\t\t// (end \"in descriptor\"\n\n\t\t\t\t// In parens\n\t\t\t\t} else if (state === \"in parens\") {\n\n\t\t\t\t\t// U+0029 RIGHT PARENTHESIS ())\n\t\t\t\t\t// Append c to current descriptor. Set state to in descriptor.\n\t\t\t\t\tif (c === \")\") {\n\t\t\t\t\t\tcurrentDescriptor = currentDescriptor + c;\n\t\t\t\t\t\tstate = \"in descriptor\";\n\n\t\t\t\t\t// EOF\n\t\t\t\t\t// Append current descriptor to descriptors. Jump to the step labeled\n\t\t\t\t\t// descriptor parser.\n\t\t\t\t\t} else if (c === \"\") {\n\t\t\t\t\t\tdescriptors.push(currentDescriptor);\n\t\t\t\t\t\tparseDescriptors();\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t// Anything else\n\t\t\t\t\t// Append c to current descriptor.\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcurrentDescriptor = currentDescriptor + c;\n\t\t\t\t\t}\n\n\t\t\t\t// After descriptor\n\t\t\t\t} else if (state === \"after descriptor\") {\n\n\t\t\t\t\t// Do the following, depending on the value of c:\n\t\t\t\t\t// Space character: Stay in this state.\n\t\t\t\t\tif (isSpace(c)) {\n\n\t\t\t\t\t// EOF: Jump to the step labeled descriptor parser.\n\t\t\t\t\t} else if (c === \"\") {\n\t\t\t\t\t\tparseDescriptors();\n\t\t\t\t\t\treturn;\n\n\t\t\t\t\t// Anything else\n\t\t\t\t\t// Set state to in descriptor. Set position to the previous character in input.\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstate = \"in descriptor\";\n\t\t\t\t\t\tpos -= 1;\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Advance position to the next character in input.\n\t\t\t\tpos += 1;\n\n\t\t\t// Repeat this step.\n\t\t\t} // (close while true loop)\n\t\t}", "function processInput(input) {\n var lines = input.split('\\n');\n var totalPacket = parseInt(lines[0]);\n var disPacket = parseInt(lines[1]);\n var lstOfCandyCount = [];\n lines.splice(0, 1);\n lines.splice(0, 1);\n lines.forEach( function (num) {\n lstOfCandyCount.push(parseInt(num));\n });\n return { \n 'totalPacket' : totalPacket, \n 'disPacket' : disPacket,\n 'lstOfCandyCount' : lstOfCandyCount\n };\n}", "function parse(input) {\n if (input === undefined || input === '') {\n return undefined;\n }\n\n if (input === 'null') {\n return null;\n }\n\n return JSON.parse(input);\n}" ]
[ "0.6841483", "0.56566375", "0.5566653", "0.5526026", "0.5456903", "0.5456903", "0.5456903", "0.54483175", "0.5422888", "0.5369831", "0.5358722", "0.5331201", "0.53209823", "0.5316571", "0.5296304", "0.5292541", "0.52777135", "0.5256466", "0.52392256", "0.52392256", "0.52392256", "0.52392256", "0.52392256", "0.52392256", "0.52392256", "0.5200901", "0.5200901", "0.5200901", "0.5200901", "0.5200901", "0.51771307", "0.5143324", "0.5119388", "0.5100497", "0.5096972", "0.50962055", "0.50962055", "0.50962055", "0.5091066", "0.5087509", "0.50862694", "0.5084523", "0.506139", "0.5055114", "0.5044839", "0.50289166", "0.50154185", "0.4967381", "0.49323013", "0.4906701", "0.4899057", "0.4894424", "0.4881932", "0.48453704", "0.48334447", "0.48244458", "0.48198056", "0.48198056", "0.48123935", "0.48095357", "0.48089948", "0.48034132", "0.47996187", "0.47982708", "0.4797471", "0.47933665", "0.47872877", "0.47741225", "0.47654966", "0.47605786", "0.47568965", "0.4750528", "0.47388664", "0.47373393", "0.47333217", "0.47107732", "0.47084817", "0.47068757", "0.47055423", "0.47041848", "0.47031945", "0.47001052", "0.4698848", "0.46971726", "0.46884027", "0.46865925", "0.4682623", "0.46797025", "0.46659938", "0.46614832", "0.46614832", "0.46547726", "0.4647277", "0.46466008", "0.46413574", "0.46375245", "0.46350688", "0.4628387" ]
0.68041956
3
60 seconds Extracts RetryAfter value from the request header or returns default value
function parseRetryAfterHeader(now, header) { if (!header) { return defaultRetryAfter; } var headerDelay = parseInt("" + header, 10); if (!isNaN(headerDelay)) { return headerDelay * 1000; } var headerDate = Date.parse("" + header); if (!isNaN(headerDate)) { return headerDate - now; } return defaultRetryAfter; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseRetryAfterHeader(header, now = Date.now()) {\n\t const headerDelay = parseInt(`${header}`, 10);\n\t if (!isNaN(headerDelay)) {\n\t return headerDelay * 1000;\n\t }\n\n\t const headerDate = Date.parse(`${header}`);\n\t if (!isNaN(headerDate)) {\n\t return headerDate - now;\n\t }\n\n\t return DEFAULT_RETRY_AFTER;\n\t}", "function parseRetryAfterHeader(header, now = Date.now()) {\n const headerDelay = parseInt(`${header}`, 10);\n if (!isNaN(headerDelay)) {\n return headerDelay * 1000;\n }\n\n const headerDate = Date.parse(`${header}`);\n if (!isNaN(headerDate)) {\n return headerDate - now;\n }\n\n return DEFAULT_RETRY_AFTER;\n }", "function parseRetryAfterHeader(header, now = Date.now()) {\n const headerDelay = parseInt(`${header}`, 10);\n if (!isNaN(headerDelay)) {\n return headerDelay * 1000;\n }\n\n const headerDate = Date.parse(`${header}`);\n if (!isNaN(headerDate)) {\n return headerDate - now;\n }\n\n return DEFAULT_RETRY_AFTER;\n}", "function getRetryAfterInMs(response) {\n if (!(response && [429, 503].includes(response.status)))\n return undefined;\n try {\n // Headers: \"retry-after-ms\", \"x-ms-retry-after-ms\", \"Retry-After\"\n for (const header of AllRetryAfterHeaders) {\n const retryAfterValue = parseHeaderValueAsNumber(response, header);\n if (retryAfterValue === 0 || retryAfterValue) {\n // \"Retry-After\" header ==> seconds\n // \"retry-after-ms\", \"x-ms-retry-after-ms\" headers ==> milli-seconds\n const multiplyingFactor = header === RetryAfterHeader ? 1000 : 1;\n return retryAfterValue * multiplyingFactor; // in milli-seconds\n }\n }\n // RetryAfterHeader (\"Retry-After\") has a special case where it might be formatted as a date instead of a number of seconds\n const retryAfterHeader = response.headers.get(RetryAfterHeader);\n if (!retryAfterHeader)\n return;\n const date = Date.parse(retryAfterHeader);\n const diff = date - Date.now();\n // negative diff would mean a date in the past, so retry asap with 0 milliseconds\n return Number.isFinite(diff) ? Math.max(0, diff) : undefined;\n }\n catch (e) {\n return undefined;\n }\n}", "function parseRetryHeaders(response) {\n if (response.headers['retry-after'] !== undefined) {\n const retryAfter = parseInt(response.headers['retry-after'], 10);\n if (!Number.isNaN(retryAfter)) {\n return retryAfter;\n }\n }\n return undefined;\n}", "function _getRetryTimeout() {\n return RETRY_SEC * 1000;\n }", "function tryGetRetryAfterValueTimeInMilliseconds(headers) {\n if (headers['retry-after']) {\n const retryTime = Number(headers['retry-after']);\n if (!isNaN(retryTime)) {\n core_1.info(`Retry-After header is present with a value of ${retryTime}`);\n return retryTime * 1000;\n }\n core_1.info(`Returned retry-after header value: ${retryTime} is non-numeric and cannot be used`);\n return undefined;\n }\n core_1.info(`No retry-after header was found. Dumping all headers for diagnostic purposes`);\n // eslint-disable-next-line no-console\n console.log(headers);\n return undefined;\n}", "function tryGetRetryAfterValueTimeInMilliseconds(headers) {\n if (headers['retry-after']) {\n const retryTime = Number(headers['retry-after']);\n if (!isNaN(retryTime)) {\n core_1.info(`Retry-After header is present with a value of ${retryTime}`);\n return retryTime * 1000;\n }\n core_1.info(`Returned retry-after header value: ${retryTime} is non-numeric and cannot be used`);\n return undefined;\n }\n core_1.info(`No retry-after header was found. Dumping all headers for diagnostic purposes`);\n // eslint-disable-next-line no-console\n console.log(headers);\n return undefined;\n}", "function getInitialRetryIntervalInMilliseconds() {\n return 3000;\n}", "function getInitialRetryIntervalInMilliseconds() {\n return 3000;\n}", "parseRetryAfterIntoMillis(retryAfter) {\r\n const delaySeconds = parseInt(retryAfter, 10);\r\n if (!isNaN(delaySeconds)) {\r\n return delaySeconds * 1000;\r\n }\r\n\r\n const date = new Date(retryAfter);\r\n if (!isNaN(date.getTime())) {\r\n return date.getTime() - Date.now();\r\n }\r\n return -1;\r\n }", "function getRetryLimit() {\n return 5;\n}", "function getRetryLimit() {\n return 5;\n}", "customBackoff(retryCount, err) { // eslint-disable-line\n if (!err.retryable) { return -1; }\n return 100 + retryCount * 100;\n // returns delay in ms\n }", "function defaultRetryStrategy() {\n return {\n kind: \"exponentialBackoff\",\n initialTimeout: 1,\n maxBackoffFactor: 8\n };\n}", "function retryRequest() {\n\t var retryDelay = _retryDelays[requestsAttempted - 1];\n\t var retryStartTime = requestStartTime + retryDelay;\n\t // Schedule retry for a configured duration after last request started.\n\t setTimeout(sendTimedRequest, retryStartTime - Date.now());\n\t }", "function retryRequest() {\n\t var retryDelay = _retryDelays[requestsAttempted - 1];\n\t var retryStartTime = requestStartTime + retryDelay;\n\t // Schedule retry for a configured duration after last request started.\n\t setTimeout(sendTimedRequest, retryStartTime - Date.now());\n\t }", "function retryRequest() {\n\t var retryDelay = _retryDelays[requestsAttempted - 1];\n\t var retryStartTime = requestStartTime + retryDelay;\n\t // Schedule retry for a configured duration after last request started.\n\t setTimeout(sendTimedRequest, retryStartTime - Date.now());\n\t }", "function getRetryMultiplier() {\n return 1.5;\n}", "function getRetryMultiplier() {\n return 1.5;\n}", "getPollingTimeout () {\r\n return Math.pow(2, Math.min(this.consecutiveErrorsCount, 4)) * this.pollingTimeout;\r\n }", "createMaxWaitTimer(waitTime) {\n this.cancelMaxWaitTimer();\n \n this.retryMaxTimer = this.service.$setTimer(() => {\n let continueRetry;\n if (this.retryMaxTimeCallback && typeof (this.retryMaxTimeCallback) === \"function\") {\n let result = this.retryMaxTimeCallback();\n continueRetry = result && result === true;\n }\n \n if (!continueRetry) {\n this.cancel('Max time reached');\n this.service.logMessage(`Max wait time reached caller opted to cancel retry. Operation ${this.name} cancelled.`);\n } else {\n this.service.logMessage(`Max wait time reached caller opted to continue retry. Operation ${this.name} continuing`);\n }\n }, waitTime);\n }", "function getTimeout(functionObject) {\n return Number(functionObject.batch.Timeout ? functionObject.batch.Timeout.AttemptDurationSeconds: undefined)\n || Number(functionObject.timeout)\n || 300;\n}", "function trigger (retryAfter) {\n requestsMade = limitNo\n since = (Date.now() + retryAfter * 1000)\n }", "_checkBackoff(path, headers) {\n let api = {\n limit: headers[\"x-rate-limit-limit\"] || 15,\n remain: headers[\"x-rate-limit-remaining\"] || 1,\n reset: headers[\"x-rate-limit-reset\"] || Date.now(),\n };\n \n return new Promise((resolve, reject) => {\n if (headers.status !== \"200 OK\") {\n reject({\n type: \"HTTP_STATUS\",\n headers,\n path,\n api,\n });\n }\n\n if (!api.remain) {\n this._backoff[path] = api.reset;\n reject({\n type: \"RATE_LIMIT\",\n headers,\n path,\n api\n });\n }\n else {\n resolve({\n type: \"SUCCESS\",\n headers,\n path,\n api\n });\n }\n })\n }", "function retry() {\n if (a.withRetry && a.retries > 0) {\n console.log(\"REST: Retrying ! %d more times with delay %s \", a.retries, a.retryInterval);\n a.retries--;\n setTimeout(rest.bind(null, type, apiCall, data, isBinary, extraHeaders, a), a.retryInterval);\n return true;\n }\n return false;\n }", "get refreshInterval() {\n if (this.refreshUrl) {\n return this.polling.seconds;\n }\n }", "function retry(fn, {\n retries = 5,\n interval = 50\n} = {}) {\n return new Promise((resolve, reject) => {\n // run the function, decrement retries\n let run = () => {\n fn(resolve, reject, retry);\n retries--;\n }; // wait an interval to try again or reject with the error\n\n\n let retry = err => {\n if (retries) {\n setTimeout(run, interval);\n } else {\n reject(err);\n }\n }; // start trying\n\n\n run();\n });\n} // Returns the appropriate http or https module for a given URL.", "function getExponentialRetryTimeInMilliseconds(retryCount) {\n if (retryCount < 0) {\n throw new Error('RetryCount should not be negative');\n }\n else if (retryCount === 0) {\n return config_variables_1.getInitialRetryIntervalInMilliseconds();\n }\n const minTime = config_variables_1.getInitialRetryIntervalInMilliseconds() * config_variables_1.getRetryMultiplier() * retryCount;\n const maxTime = minTime * config_variables_1.getRetryMultiplier();\n // returns a random number between the minTime (inclusive) and the maxTime (exclusive)\n return Math.random() * (maxTime - minTime) + minTime;\n}", "retryLater(count, fn) {\n var timeout = this._timeout(count);\n\n if (this.retryTimer) clearTimeout(this.retryTimer);\n this.retryTimer = Meteor.setTimeout(fn, timeout);\n return timeout;\n }", "function constant_timer_retry(x_ms_between_retries_, n_retries_) {\n var x_ms_between_retries = Math.floor(x_ms_between_retries_);\n var n_retries = Math.floor(n_retries_);\n var retries_remaining = n_retries;\n return err => {\n return new Promise((resolve, reject) => {\n if (retries_remaining != 0) {\n //console.log(`Yes, retrying in ${x_ms_between_retries} milliseconds...\\n\\n`);\n setTimeout(() => {\n //console.log(`Retry #${n_retries - retries_remaining + 1}: Trying the subject promise`);\n retries_remaining -= 1;\n resolve();\n }, x_ms_between_retries);\n } else {\n //console.log(`No, enough retries done. Giving up.\\n\\n`);n_retries\n reject(err);\n }\n });\n }\n}", "function defaultDelayDecider(delayBase, attempts) {\n return Math.floor(Math.min(constants_1.MAXIMUM_RETRY_DELAY, Math.random() * Math.pow(2, attempts) * delayBase));\n}", "getTimeoutSeconds() {\n return Math.max(0, this.timeoutSeconds);\n }", "getEnvReminderTimeout() {\n\t\tif (\n\t\t\tthis.config.service.reminderTimeout !== null &&\n\t\t\t!isNaN(this.config.service.reminderTimeout) &&\n\t\t\tthis.config.service.reminderTimeout > 0\n\t\t) {\n\t\t\t// Get timeout from service file\n\t\t\treturn this.config.service.reminderTimeout;\n\t\t}\n\n\t\tif (\n\t\t\t!isNaN(this.config.envReminderTimeout) &&\n\t\t\tthis.config.envReminderTimeout > 0\n\t\t) {\n\t\t\t// Get workspace timeout\n\t\t\treturn this.config.envReminderTimeout;\n\t\t}\n\n\t\t// Return the default\n\t\treturn 30;\n\t}", "function getExponentialRetryTimeInMilliseconds(retryCount) {\n if (retryCount < 0) {\n throw new Error('RetryCount should not be negative');\n }\n else if (retryCount === 0) {\n return config_variables_1.getInitialRetryIntervalInMilliseconds();\n }\n const minTime = config_variables_1.getInitialRetryIntervalInMilliseconds() * config_variables_1.getRetryMultiplier() * retryCount;\n const maxTime = minTime * config_variables_1.getRetryMultiplier();\n // returns a random number between the minTime (inclusive) and the maxTime (exclusive)\n return Math.trunc(Math.random() * (maxTime - minTime) + minTime);\n}", "function retry(retryConfig, retryCall, shouldRetryCondition, callback) {\n let lastResponse;\n if (!retryConfig) {\n return callback(\n \"[Error]: Invalid retry configuration. Retry configuration with values - base, factor and maxRetry needs to be specified\",\n );\n }\n if (!retryConfig.base || retryConfig.base < 0) {\n return callback(\n \"[Error]: Invalid retry configuration: base. Base is a required configuration and its value needs to be greater than 0\",\n );\n }\n if (!retryConfig.factor || retryConfig.factor < 0) {\n return callback(\n \"[Error]: Invalid retry configuration: factor. Factor is a required configuration and its value needs to be greater than 0\",\n );\n }\n if (!retryConfig.maxRetry) {\n return callback(\n \"[Error]: Invalid retry configuration: maxRetry. \" + \"MaxRetry is a required configuration and its value needs to be greater than 0\",\n );\n }\n if (!(Number.isInteger(retryConfig.maxRetry) && retryConfig.maxRetry > 0)) {\n return callback(\"[Error]: Invalid retry configuration: maxRetry. Value needs to be an integer and greater than 0\");\n }\n let pollCount = -1;\n async.doWhilst(\n (loopCallback) => {\n const exponentialBackoff = retryConfig.base * Math.pow(retryConfig.factor, pollCount++);\n let retryInterval = Math.min(exponentialBackoff, CONSTANTS.CONFIGURATION.RETRY.MAX_RETRY_INTERVAL);\n // The very first call is not a retry and hence should not be penalised with a timeout.\n if (pollCount === 0) {\n retryInterval = 0;\n }\n setTimeout(() => {\n retryCall((err, res) => {\n lastResponse = res;\n loopCallback(err, err ? null : res);\n });\n }, retryInterval);\n },\n () => {\n if (!retryConfig.maxRetry || retryConfig.maxRetry > pollCount) {\n return shouldRetryCondition(lastResponse);\n }\n return false;\n },\n (err, res) => {\n if (retryConfig.maxRetry && retryConfig.maxRetry <= pollCount) {\n return callback(\"[Error]: Retry attempt exceeded.\", res);\n }\n callback(err, err ? null : res);\n },\n );\n}", "function calcNextBackoff(attempts) {\n\tvar RECONNECT_INTERVAL = 1000\n\tvar MAX_RECONNECT_INTERVAL = 10000\n\tvar RECONNECT_DECAY = 1.5\n\n\tif (!attempts || attempts === -1) return 0 // first time connect\n\tvar delaytime = RECONNECT_INTERVAL * Math.pow(RECONNECT_DECAY, attempts)\n\treturn Math.min(MAX_RECONNECT_INTERVAL, delaytime)\n}", "function exponentialRetryStrategy(options = {}) {\n var _a, _b;\n const retryInterval = (_a = options.retryDelayInMs) !== null && _a !== void 0 ? _a : DEFAULT_CLIENT_RETRY_INTERVAL;\n const maxRetryInterval = (_b = options.maxRetryDelayInMs) !== null && _b !== void 0 ? _b : DEFAULT_CLIENT_MAX_RETRY_INTERVAL;\n let retryAfterInMs = retryInterval;\n return {\n name: \"exponentialRetryStrategy\",\n retry({ retryCount, response, responseError }) {\n const matchedSystemError = isSystemError(responseError);\n const ignoreSystemErrors = matchedSystemError && options.ignoreSystemErrors;\n const isExponential = isExponentialRetryResponse(response);\n const ignoreExponentialResponse = isExponential && options.ignoreHttpStatusCodes;\n const unknownResponse = response && (isThrottlingRetryResponse(response) || !isExponential);\n if (unknownResponse || ignoreExponentialResponse || ignoreSystemErrors) {\n return { skipStrategy: true };\n }\n if (responseError && !matchedSystemError && !isExponential) {\n return { errorToThrow: responseError };\n }\n // Exponentially increase the delay each time\n const exponentialDelay = retryAfterInMs * Math.pow(2, retryCount);\n // Don't let the delay exceed the maximum\n const clampedExponentialDelay = Math.min(maxRetryInterval, exponentialDelay);\n // Allow the final value to have some \"jitter\" (within 50% of the delay size) so\n // that retries across multiple clients don't occur simultaneously.\n retryAfterInMs =\n clampedExponentialDelay / 2 + coreUtil.getRandomIntegerInclusive(0, clampedExponentialDelay / 2);\n return { retryAfterInMs };\n },\n };\n}", "function getRandomTimeout () {\n return self.intervalMs + Math.floor(Math.random() * self.intervalMs / 5)\n }", "function callApiWithRetry(apiFunction, request, callback, retryOn) {\n var attempt = 0;\n var maxAttempts = 5;\n var timeout = 300;\n var f = function (result, status) {\n if (status == retryOn && attempt++ < maxAttempts) {\n setTimeout(function () { apiFunction(request, f); }, timeout);\n timeout *= 2;\n } else {\n if (status == retryOn) {\n console.log(\"Giving up on:\");\n console.log(request);\n }\n callback(result, status);\n }\n };\n apiFunction(request, f);\n}", "async function attemptFetchDynamicConfigWithRetry(appFields, { throttleEndTimeMillis, backoffCount }, signal, retryData = defaultRetryData // for testing\r\n) {\r\n var _a, _b;\r\n const { appId, measurementId } = appFields;\r\n // Starts with a (potentially zero) timeout to support resumption from stored state.\r\n // Ensures the throttle end time is honored if the last attempt timed out.\r\n // Note the SDK will never make a request if the fetch timeout expires at this point.\r\n try {\r\n await setAbortableTimeout(signal, throttleEndTimeMillis);\r\n }\r\n catch (e) {\r\n if (measurementId) {\r\n logger.warn(`Timed out fetching this Firebase app's measurement ID from the server.` +\r\n ` Falling back to the measurement ID ${measurementId}` +\r\n ` provided in the \"measurementId\" field in the local Firebase config. [${(_a = e) === null || _a === void 0 ? void 0 : _a.message}]`);\r\n return { appId, measurementId };\r\n }\r\n throw e;\r\n }\r\n try {\r\n const response = await fetchDynamicConfig(appFields);\r\n // Note the SDK only clears throttle state if response is success or non-retriable.\r\n retryData.deleteThrottleMetadata(appId);\r\n return response;\r\n }\r\n catch (e) {\r\n const error = e;\r\n if (!isRetriableError(error)) {\r\n retryData.deleteThrottleMetadata(appId);\r\n if (measurementId) {\r\n logger.warn(`Failed to fetch this Firebase app's measurement ID from the server.` +\r\n ` Falling back to the measurement ID ${measurementId}` +\r\n ` provided in the \"measurementId\" field in the local Firebase config. [${error === null || error === void 0 ? void 0 : error.message}]`);\r\n return { appId, measurementId };\r\n }\r\n else {\r\n throw e;\r\n }\r\n }\r\n const backoffMillis = Number((_b = error === null || error === void 0 ? void 0 : error.customData) === null || _b === void 0 ? void 0 : _b.httpStatus) === 503\r\n ? (0,_firebase_util__WEBPACK_IMPORTED_MODULE_2__.calculateBackoffMillis)(backoffCount, retryData.intervalMillis, LONG_RETRY_FACTOR)\r\n : (0,_firebase_util__WEBPACK_IMPORTED_MODULE_2__.calculateBackoffMillis)(backoffCount, retryData.intervalMillis);\r\n // Increments backoff state.\r\n const throttleMetadata = {\r\n throttleEndTimeMillis: Date.now() + backoffMillis,\r\n backoffCount: backoffCount + 1\r\n };\r\n // Persists state.\r\n retryData.setThrottleMetadata(appId, throttleMetadata);\r\n logger.debug(`Calling attemptFetch again in ${backoffMillis} millis`);\r\n return attemptFetchDynamicConfigWithRetry(appFields, throttleMetadata, signal, retryData);\r\n }\r\n}", "delay() {\n return tslib.__awaiter(this, void 0, void 0, function* () {\n return coreHttp.delay(this.intervalInMs);\n });\n }", "delay() {\n return tslib.__awaiter(this, void 0, void 0, function* () {\n return coreHttp.delay(this.intervalInMs);\n });\n }", "function polling(request$, userOptions) {\n var options = Object.assign({}, defaultOptions, userOptions);\n /**\n * Currently any new error, after recover, continues the series of increasing\n * delays, like 2 consequent errors would do. This is a bug of RxJS. To workaround\n * the issue we use the difference with the counter value at the last recover.\n * @see https://github.com/ReactiveX/rxjs/issues/1413\n */\n var allErrorsCount = 0;\n var lastRecoverCount = 0;\n return rxjs_1.fromEvent(document, 'visibilitychange').pipe(operators_1.startWith(null), operators_1.switchMap(function () {\n if (isPageActive() || options.backgroundPolling) {\n var firstRequest$ = request$;\n var polling$ = rxjs_1.interval(options.interval).pipe(operators_1.take(1), operators_1.switchMap(function () { return request$; }), operators_1.repeat());\n return rxjs_1.concat(firstRequest$, polling$).pipe(operators_1.retryWhen(function (errors$) {\n return errors$.pipe(operators_1.scan(function (_a, err) {\n var errorCount = _a.errorCount, error = _a.error;\n return { errorCount: errorCount + 1, error: err };\n }, { errorCount: 0, error: null }), operators_1.switchMap(function (_a) {\n var errorCount = _a.errorCount, error = _a.error;\n allErrorsCount = errorCount;\n var consecutiveErrorsCount = allErrorsCount - lastRecoverCount;\n // If already tempted too many times don't retry\n if (consecutiveErrorsCount > options.attempts)\n throw error;\n var delay = getStrategyDelay(consecutiveErrorsCount, options);\n return rxjs_1.timer(delay, null);\n }));\n }));\n }\n return rxjs_1.empty();\n }), operators_1.tap(function () {\n // Update the counter after every successful polling\n lastRecoverCount = allErrorsCount;\n }));\n}", "async errCheck (res, verb, query) {\n if (typeof res === 'string' && res.includes('timed out')) {\n return this.retry(res, verb, query)\n }\n if (res.body.error) {\n throw res\n } else {\n this.delayCounter = 0\n return res.body\n }\n }", "getExpiresIn() {}", "async delay(isPrimaryRetry, attempt, abortSignal) {\n let delayTimeInMs = 0;\n if (isPrimaryRetry) {\n switch (this.retryOptions.retryPolicyType) {\n case exports.StorageRetryPolicyType.EXPONENTIAL:\n delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * this.retryOptions.retryDelayInMs, this.retryOptions.maxRetryDelayInMs);\n break;\n case exports.StorageRetryPolicyType.FIXED:\n delayTimeInMs = this.retryOptions.retryDelayInMs;\n break;\n }\n }\n else {\n delayTimeInMs = Math.random() * 1000;\n }\n logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`);\n return delay(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR);\n }", "async delay(isPrimaryRetry, attempt, abortSignal) {\n let delayTimeInMs = 0;\n if (isPrimaryRetry) {\n switch (this.retryOptions.retryPolicyType) {\n case exports.StorageRetryPolicyType.EXPONENTIAL:\n delayTimeInMs = Math.min((Math.pow(2, attempt - 1) - 1) * this.retryOptions.retryDelayInMs, this.retryOptions.maxRetryDelayInMs);\n break;\n case exports.StorageRetryPolicyType.FIXED:\n delayTimeInMs = this.retryOptions.retryDelayInMs;\n break;\n }\n }\n else {\n delayTimeInMs = Math.random() * 1000;\n }\n logger.info(`RetryPolicy: Delay for ${delayTimeInMs}ms`);\n return delay(delayTimeInMs, abortSignal, RETRY_ABORT_ERROR);\n }", "function exponentialBackoffWithJitter(numberOfRetries) {\n var rawBackoffTimeMs = internal_config_json_1.default.INITIAL_RETRY_DELAY_IF_RATE_LIMITED * Math.pow(2, numberOfRetries);\n var clippedBackoffTimeMs = Math.min(internal_config_json_1.default.MAX_RETRY_DELAY_IF_RATE_LIMITED, rawBackoffTimeMs);\n var jitteredBackoffTimeMs = Math.random() * clippedBackoffTimeMs;\n return jitteredBackoffTimeMs;\n}", "async setTimeout() {\n const TimeoutRequestsWindowTime = 5*60*1000;\n let timeElapse = await (new Date().getTime().toString().slice(0,-3)) - this.requestTimeStamp;\n let timeLeft = await (TimeoutRequestsWindowTime/1000) - timeElapse;\n this.validationWindow = await timeLeft;\n }", "function isThrottlingRetryResponse(response) {\n return Number.isFinite(getRetryAfterInMs(response));\n}", "function get_json_retry(url, data_fn, fail_fn, attempt=1) {\n\n var success_fn = function(data) {\n\tdata_fn(data);\n };\n \n var error_fn = function(jqXHR, status, error) {\n//\tconsole.log(\"url=\" + url + \" FAIL status=\" + status + \" error=\" + error);\n\tif (fail_fn != null) fail_fn(jqXHR, status, error);\n\t\n\tif (attempt < MAX_AJAX_ATTEMPTS) {\n\t var sleep_secs = Math.pow(2,attempt);\n\t setTimeout(() => get_json_retry(url, data_fn, fail_fn, attempt+1), sleep_secs * 1000);\n\t}\n };\n \n $.getJSON(url, success_fn).fail(error_fn);\n}", "function getTimeOutDelay() {\n\t\treturn 1000;\t// 1 seconds\n\t}", "async function sendRequestWithRetries(state, request, options, createdAt, retries = 0) {\n const timeSinceTokenCreationInMs = +new Date() - +new Date(createdAt);\n try {\n return await request(options);\n }\n catch (error) {\n if (error.status !== 401) {\n throw error;\n }\n if (timeSinceTokenCreationInMs >= FIVE_SECONDS_IN_MS) {\n if (retries > 0) {\n error.message = `After ${retries} retries within ${timeSinceTokenCreationInMs / 1000}s of creating the installation access token, the response remains 401. At this point, the cause may be an authentication problem or a system outage. Please check https://www.githubstatus.com for status information`;\n }\n throw error;\n }\n ++retries;\n const awaitTime = retries * 1000;\n state.log.warn(`[@octokit/auth-app] Retrying after 401 response to account for token replication delay (retry: ${retries}, wait: ${awaitTime / 1000}s)`);\n await new Promise((resolve) => setTimeout(resolve, awaitTime));\n return sendRequestWithRetries(state, request, options, createdAt, retries);\n }\n}", "function retry_timer() {\n timer--;\n if (timer < 0) {\n clearInterval(countdown);\n if (heroes_data.length <= 0) {\n getHeroesData();\n timer = 5;\n }\n }\n}", "static get RETRY() { return 2; }", "get maximumRetryAttemptsInput() {\n return this._maximumRetryAttempts;\n }", "get _closeAfter() {\n if (this.closeAfter && this.closeAfter <= 10) {\n // if the number is 10 or less, it must be ms\n }\n\n if ((this.closeAfter && this.closeAfter > 10000) || (this.closeAfter && this.closeAfter < 2000)) {\n // if this numner is larger than 10s or smaller than 2s, enforce minimum 2s delay\n this.closeAfter = 2000;\n }\n\n return this.closeAfter;\n }", "function attemptFetchDynamicConfigWithRetry(appFields, _a, signal, retryData // for testing\n) {\n var throttleEndTimeMillis = _a.throttleEndTimeMillis, backoffCount = _a.backoffCount;\n if (retryData === void 0) { retryData = defaultRetryData; }\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__awaiter\"])(this, void 0, void 0, function () {\n var appId, measurementId, e_1, response, e_2, backoffMillis, throttleMetadata;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__generator\"])(this, function (_b) {\n switch (_b.label) {\n case 0:\n appId = appFields.appId, measurementId = appFields.measurementId;\n _b.label = 1;\n case 1:\n _b.trys.push([1, 3, , 4]);\n return [4 /*yield*/, setAbortableTimeout(signal, throttleEndTimeMillis)];\n case 2:\n _b.sent();\n return [3 /*break*/, 4];\n case 3:\n e_1 = _b.sent();\n if (measurementId) {\n logger.warn(\"Timed out fetching this Firebase app's measurement ID from the server.\" +\n (\" Falling back to the measurement ID \" + measurementId) +\n (\" provided in the \\\"measurementId\\\" field in the local Firebase config. [\" + e_1.message + \"]\"));\n return [2 /*return*/, { appId: appId, measurementId: measurementId }];\n }\n throw e_1;\n case 4:\n _b.trys.push([4, 6, , 7]);\n return [4 /*yield*/, fetchDynamicConfig(appFields)];\n case 5:\n response = _b.sent();\n // Note the SDK only clears throttle state if response is success or non-retriable.\n retryData.deleteThrottleMetadata(appId);\n return [2 /*return*/, response];\n case 6:\n e_2 = _b.sent();\n if (!isRetriableError(e_2)) {\n retryData.deleteThrottleMetadata(appId);\n if (measurementId) {\n logger.warn(\"Failed to fetch this Firebase app's measurement ID from the server.\" +\n (\" Falling back to the measurement ID \" + measurementId) +\n (\" provided in the \\\"measurementId\\\" field in the local Firebase config. [\" + e_2.message + \"]\"));\n return [2 /*return*/, { appId: appId, measurementId: measurementId }];\n }\n else {\n throw e_2;\n }\n }\n backoffMillis = Number(e_2.customData.httpStatus) === 503\n ? Object(_firebase_util__WEBPACK_IMPORTED_MODULE_4__[\"calculateBackoffMillis\"])(backoffCount, retryData.intervalMillis, LONG_RETRY_FACTOR)\n : Object(_firebase_util__WEBPACK_IMPORTED_MODULE_4__[\"calculateBackoffMillis\"])(backoffCount, retryData.intervalMillis);\n throttleMetadata = {\n throttleEndTimeMillis: Date.now() + backoffMillis,\n backoffCount: backoffCount + 1\n };\n // Persists state.\n retryData.setThrottleMetadata(appId, throttleMetadata);\n logger.debug(\"Calling attemptFetch again in \" + backoffMillis + \" millis\");\n return [2 /*return*/, attemptFetchDynamicConfigWithRetry(appFields, throttleMetadata, signal, retryData)];\n case 7: return [2 /*return*/];\n }\n });\n });\n}", "function retry(attempt) {\n const maxRetry = 3;\n if (attempt > maxRetry) {\n return false;\n }\n // Backoff\n Utilities.sleep(UrlFetcher.DelayMs * attempt);\n return true;\n}", "function fetch_retry(url, n) {\r\n return fetch(url).catch(function(error) {\r\n \tconsole.log(\"Failed request. Trying again\");\r\n if (n === 1) throw error;\r\n return fetch_retry(url, n - 1);\r\n });\r\n}", "function fetchWithRetries(uri, initWithRetries) {\n\t var _ref = initWithRetries || {};\n\n\t var fetchTimeout = _ref.fetchTimeout;\n\t var retryDelays = _ref.retryDelays;\n\n\t var init = _objectWithoutProperties(_ref, ['fetchTimeout', 'retryDelays']);\n\n\t var _fetchTimeout = fetchTimeout != null ? fetchTimeout : DEFAULT_TIMEOUT;\n\t var _retryDelays = retryDelays != null ? retryDelays : DEFAULT_RETRIES;\n\n\t var requestsAttempted = 0;\n\t var requestStartTime = 0;\n\t return new Promise(function (resolve, reject) {\n\t /**\n\t * Sends a request to the server that will timeout after `fetchTimeout`.\n\t * If the request fails or times out a new request might be scheduled.\n\t */\n\t function sendTimedRequest() {\n\t requestsAttempted++;\n\t requestStartTime = Date.now();\n\t var isRequestAlive = true;\n\t var request = fetch(uri, init);\n\t var requestTimeout = setTimeout(function () {\n\t isRequestAlive = false;\n\t if (shouldRetry(requestsAttempted)) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'fetchWithRetries: HTTP timeout, retrying.') : undefined;\n\t retryRequest();\n\t } else {\n\t reject(new Error(sprintf('fetchWithRetries(): Failed to get response from server, ' + 'tried %s times.', requestsAttempted)));\n\t }\n\t }, _fetchTimeout);\n\n\t request.then(function (response) {\n\t clearTimeout(requestTimeout);\n\t if (isRequestAlive) {\n\t // We got a response, we can clear the timeout.\n\t if (response.status >= 200 && response.status < 300) {\n\t // Got a response code that indicates success, resolve the promise.\n\t resolve(response);\n\t } else if (shouldRetry(requestsAttempted)) {\n\t // Fetch was not successful, retrying.\n\t // TODO(#7595849): Only retry on transient HTTP errors.\n\t process.env.NODE_ENV !== 'production' ? process.env.NODE_ENV !== 'production' ? warning(false, 'fetchWithRetries: HTTP error, retrying.') : undefined : undefined, retryRequest();\n\t } else {\n\t // Request was not successful, giving up.\n\t var error = new Error(sprintf('fetchWithRetries(): Still no successful response after ' + '%s retries, giving up.', requestsAttempted));\n\t error.response = response;\n\t reject(error);\n\t }\n\t }\n\t })['catch'](function (error) {\n\t clearTimeout(requestTimeout);\n\t if (shouldRetry(requestsAttempted)) {\n\t retryRequest();\n\t } else {\n\t reject(error);\n\t }\n\t });\n\t }\n\n\t /**\n\t * Schedules another run of sendTimedRequest based on how much time has\n\t * passed between the time the last request was sent and now.\n\t */\n\t function retryRequest() {\n\t var retryDelay = _retryDelays[requestsAttempted - 1];\n\t var retryStartTime = requestStartTime + retryDelay;\n\t // Schedule retry for a configured duration after last request started.\n\t setTimeout(sendTimedRequest, retryStartTime - Date.now());\n\t }\n\n\t /**\n\t * Checks if another attempt should be done to send a request to the server.\n\t */\n\t function shouldRetry(attempt) {\n\t return ExecutionEnvironment.canUseDOM && attempt <= _retryDelays.length;\n\t }\n\n\t sendTimedRequest();\n\t });\n\t}", "function fetchWithRetries(uri, initWithRetries) {\n\t var _ref = initWithRetries || {};\n\n\t var fetchTimeout = _ref.fetchTimeout;\n\t var retryDelays = _ref.retryDelays;\n\n\t var init = _objectWithoutProperties(_ref, ['fetchTimeout', 'retryDelays']);\n\n\t var _fetchTimeout = fetchTimeout != null ? fetchTimeout : DEFAULT_TIMEOUT;\n\t var _retryDelays = retryDelays != null ? retryDelays : DEFAULT_RETRIES;\n\n\t var requestsAttempted = 0;\n\t var requestStartTime = 0;\n\t return new Promise(function (resolve, reject) {\n\t /**\n\t * Sends a request to the server that will timeout after `fetchTimeout`.\n\t * If the request fails or times out a new request might be scheduled.\n\t */\n\t function sendTimedRequest() {\n\t requestsAttempted++;\n\t requestStartTime = Date.now();\n\t var isRequestAlive = true;\n\t var request = fetch(uri, init);\n\t var requestTimeout = setTimeout(function () {\n\t isRequestAlive = false;\n\t if (shouldRetry(requestsAttempted)) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'fetchWithRetries: HTTP timeout, retrying.') : undefined;\n\t retryRequest();\n\t } else {\n\t reject(new Error(sprintf('fetchWithRetries(): Failed to get response from server, ' + 'tried %s times.', requestsAttempted)));\n\t }\n\t }, _fetchTimeout);\n\n\t request.then(function (response) {\n\t clearTimeout(requestTimeout);\n\t if (isRequestAlive) {\n\t // We got a response, we can clear the timeout.\n\t if (response.status >= 200 && response.status < 300) {\n\t // Got a response code that indicates success, resolve the promise.\n\t resolve(response);\n\t } else if (shouldRetry(requestsAttempted)) {\n\t // Fetch was not successful, retrying.\n\t // TODO(#7595849): Only retry on transient HTTP errors.\n\t process.env.NODE_ENV !== 'production' ? process.env.NODE_ENV !== 'production' ? warning(false, 'fetchWithRetries: HTTP error, retrying.') : undefined : undefined, retryRequest();\n\t } else {\n\t // Request was not successful, giving up.\n\t var error = new Error(sprintf('fetchWithRetries(): Still no successful response after ' + '%s retries, giving up.', requestsAttempted));\n\t error.response = response;\n\t reject(error);\n\t }\n\t }\n\t })['catch'](function (error) {\n\t clearTimeout(requestTimeout);\n\t if (shouldRetry(requestsAttempted)) {\n\t retryRequest();\n\t } else {\n\t reject(error);\n\t }\n\t });\n\t }\n\n\t /**\n\t * Schedules another run of sendTimedRequest based on how much time has\n\t * passed between the time the last request was sent and now.\n\t */\n\t function retryRequest() {\n\t var retryDelay = _retryDelays[requestsAttempted - 1];\n\t var retryStartTime = requestStartTime + retryDelay;\n\t // Schedule retry for a configured duration after last request started.\n\t setTimeout(sendTimedRequest, retryStartTime - Date.now());\n\t }\n\n\t /**\n\t * Checks if another attempt should be done to send a request to the server.\n\t */\n\t function shouldRetry(attempt) {\n\t return ExecutionEnvironment.canUseDOM && attempt <= _retryDelays.length;\n\t }\n\n\t sendTimedRequest();\n\t });\n\t}", "SetBackoffParameter(int, int) {\n\n }", "function onAbuseLimit(retryAfter, options, octokit) {\n octokit.log.warn(`Abuse detected for request ${options.method} ${options.url}`);\n if (options.request.retryCount === 0) {\n // only retries once\n octokit.log.info(`Retrying after ${retryAfter} seconds!`);\n return true;\n }\n}", "get _timeout() {\n this._timeoutMS += 500;\n return this._timeoutMS;\n }", "_setupBackoffTimes() {\n return {\n _times: [0, 1000, 5000, 10000, 60000],\n\n _next: 0,\n\n next() {\n let val = this._times[this._next];\n if (this._next < this._times.length - 1) {\n this._next++;\n }\n return val;\n },\n\n reset() {\n this._next = 0;\n },\n };\n }", "static timeout(t) {\n if ( !(typeof t === 'undefined' ))\n _timeout = t;\n else\n return _timeout;\n }", "get SYNC_TIMEOUT() {\n // once a minute\n return 1000 * 60;\n }", "function setDefaultReconnectionTime(value) {\n if (!Number.isFinite(value) || value <= 0) {\n throw new Error(`reconnection time must be a positive number.`);\n }\n defaultReconnectionTime = value;\n}", "async function sendRequestWithRetries(state, request, options, createdAt, retries = 0) {\n const timeSinceTokenCreationInMs = +new Date() - +new Date(createdAt);\n\n try {\n return await request(options);\n } catch (error) {\n if (error.status !== 401) {\n throw error;\n }\n\n if (timeSinceTokenCreationInMs >= FIVE_SECONDS_IN_MS) {\n if (retries > 0) {\n error.message = `After ${retries} retries within ${timeSinceTokenCreationInMs / 1000}s of creating the installation access token, the response remains 401. At this point, the cause may be an authentication problem or a system outage. Please check https://www.githubstatus.com for status information`;\n }\n\n throw error;\n }\n\n ++retries;\n const awaitTime = retries * 1000;\n state.log.warn(`[@octokit/auth-app] Retrying after 401 response to account for token replication delay (retry: ${retries}, wait: ${awaitTime / 1000}s)`);\n await new Promise(resolve => setTimeout(resolve, awaitTime));\n return sendRequestWithRetries(state, request, options, createdAt, retries);\n }\n}", "function retryable(code) {\n\t// code = 0 means server return response without CORS header, so we are unable to read it\n\t// code = -1 means the network connection is dead\n\treturn (code >= 500 && code < 600) || code === 0 || code === -1 || code === 429\n}", "maxAge() {\n if (!this.storable() || this._rescc['no-cache']) {\n return 0;\n }\n\n // Shared responses with cookies are cacheable according to the RFC, but IMHO it'd be unwise to do so by default\n // so this implementation requires explicit opt-in via public header\n if (\n this._isShared &&\n (this._resHeaders['set-cookie'] &&\n !this._rescc.public &&\n !this._rescc.immutable)\n ) {\n return 0;\n }\n\n if (this._resHeaders.vary === '*') {\n return 0;\n }\n\n if (this._isShared) {\n if (this._rescc['proxy-revalidate']) {\n return 0;\n }\n // if a response includes the s-maxage directive, a shared cache recipient MUST ignore the Expires field.\n if (this._rescc['s-maxage']) {\n return parseInt(this._rescc['s-maxage'], 10);\n }\n }\n\n // If a response includes a Cache-Control field with the max-age directive, a recipient MUST ignore the Expires field.\n if (this._rescc['max-age']) {\n return parseInt(this._rescc['max-age'], 10);\n }\n\n const defaultMinTtl = this._rescc.immutable ? this._immutableMinTtl : 0;\n\n const serverDate = this._serverDate();\n if (this._resHeaders.expires) {\n const expires = Date.parse(this._resHeaders.expires);\n // A cache recipient MUST interpret invalid date formats, especially the value \"0\", as representing a time in the past (i.e., \"already expired\").\n if (Number.isNaN(expires) || expires < serverDate) {\n return 0;\n }\n return Math.max(defaultMinTtl, (expires - serverDate) / 1000);\n }\n\n if (this._resHeaders['last-modified']) {\n const lastModified = Date.parse(this._resHeaders['last-modified']);\n if (isFinite(lastModified) && serverDate > lastModified) {\n return Math.max(\n defaultMinTtl,\n ((serverDate - lastModified) / 1000) * this._cacheHeuristic\n );\n }\n }\n\n return defaultMinTtl;\n }", "function retry(fn, {\n retries = 5,\n interval = 50\n}) {\n return new Promise((resolve, reject) => {\n // run the function, decrement retries\n let run = () => {\n fn(resolve, reject, retry);\n retries--;\n }; // wait an interval to try again or reject with the error\n\n\n let retry = err => {\n if (retries) {\n setTimeout(run, interval);\n } else {\n reject(err);\n }\n }; // start trying\n\n\n run();\n });\n} // Returns true if the URL hostname matches any patterns", "ForceBackoffTemporarily(uint, int) {\n\n }", "maxAge() {\n if (!this.storable() || this._rescc['no-cache']) {\n return 0;\n }\n\n // Shared responses with cookies are cacheable according to the RFC, but IMHO it'd be unwise to do so by default\n // so this implementation requires explicit opt-in via public header\n if (\n this._isShared &&\n (this._resHeaders['set-cookie'] &&\n !this._rescc.public &&\n !this._rescc.immutable)\n ) {\n return 0;\n }\n\n if (this._resHeaders.vary === '*') {\n return 0;\n }\n\n if (this._isShared) {\n if (this._rescc['proxy-revalidate']) {\n return 0;\n }\n // if a response includes the s-maxage directive, a shared cache recipient MUST ignore the Expires field.\n if (this._rescc['s-maxage']) {\n return toNumberOrZero(this._rescc['s-maxage']);\n }\n }\n\n // If a response includes a Cache-Control field with the max-age directive, a recipient MUST ignore the Expires field.\n if (this._rescc['max-age']) {\n return toNumberOrZero(this._rescc['max-age']);\n }\n\n const defaultMinTtl = this._rescc.immutable ? this._immutableMinTtl : 0;\n\n const serverDate = this.date();\n if (this._resHeaders.expires) {\n const expires = Date.parse(this._resHeaders.expires);\n // A cache recipient MUST interpret invalid date formats, especially the value \"0\", as representing a time in the past (i.e., \"already expired\").\n if (Number.isNaN(expires) || expires < serverDate) {\n return 0;\n }\n return Math.max(defaultMinTtl, (expires - serverDate) / 1000);\n }\n\n if (this._resHeaders['last-modified']) {\n const lastModified = Date.parse(this._resHeaders['last-modified']);\n if (isFinite(lastModified) && serverDate > lastModified) {\n return Math.max(\n defaultMinTtl,\n ((serverDate - lastModified) / 1000) * this._cacheHeuristic\n );\n }\n }\n\n return defaultMinTtl;\n }", "maxAge() {\n if (!this.storable() || this._rescc['no-cache']) {\n return 0;\n }\n\n // Shared responses with cookies are cacheable according to the RFC, but IMHO it'd be unwise to do so by default\n // so this implementation requires explicit opt-in via public header\n if (\n this._isShared &&\n (this._resHeaders['set-cookie'] &&\n !this._rescc.public &&\n !this._rescc.immutable)\n ) {\n return 0;\n }\n\n if (this._resHeaders.vary === '*') {\n return 0;\n }\n\n if (this._isShared) {\n if (this._rescc['proxy-revalidate']) {\n return 0;\n }\n // if a response includes the s-maxage directive, a shared cache recipient MUST ignore the Expires field.\n if (this._rescc['s-maxage']) {\n return toNumberOrZero(this._rescc['s-maxage']);\n }\n }\n\n // If a response includes a Cache-Control field with the max-age directive, a recipient MUST ignore the Expires field.\n if (this._rescc['max-age']) {\n return toNumberOrZero(this._rescc['max-age']);\n }\n\n const defaultMinTtl = this._rescc.immutable ? this._immutableMinTtl : 0;\n\n const serverDate = this.date();\n if (this._resHeaders.expires) {\n const expires = Date.parse(this._resHeaders.expires);\n // A cache recipient MUST interpret invalid date formats, especially the value \"0\", as representing a time in the past (i.e., \"already expired\").\n if (Number.isNaN(expires) || expires < serverDate) {\n return 0;\n }\n return Math.max(defaultMinTtl, (expires - serverDate) / 1000);\n }\n\n if (this._resHeaders['last-modified']) {\n const lastModified = Date.parse(this._resHeaders['last-modified']);\n if (isFinite(lastModified) && serverDate > lastModified) {\n return Math.max(\n defaultMinTtl,\n ((serverDate - lastModified) / 1000) * this._cacheHeuristic\n );\n }\n }\n\n return defaultMinTtl;\n }", "function onRateLimit(retryAfter, options, octokit) {\n octokit.log.warn(`Request quota exhausted for request ${options.method} ${options.url}`);\n if (options.request.retryCount === 0) {\n // only retries once\n octokit.log.info(`Retrying after ${retryAfter} seconds!`);\n return true;\n }\n}", "constructor(retryOptions) {\n this.retryOptions = retryOptions;\n }", "constructor(retryOptions) {\n this.retryOptions = retryOptions;\n }", "function fetchRetry(url, n = 1) {\n const message = fetch(url)\n .then(response => {\n return response.json()\n })\n .catch(error => {\n if (n === 1) throw error\n setTimeout(() => {\n fetchRetry(url, n - 1)\n }, 500)\n })\n return message\n}", "function Retry(config) {\n \"use strict\";\n var attempts = 0;\n var promise;\n var signal = new Signal_1.default(function () {\n promise.cancel();\n });\n function onSuccess(value) {\n if (config.shouldRestart && config.shouldRestart()) {\n if (config.resetAttemptsOnRestart) {\n attempts = 0;\n }\n callCallback();\n }\n else {\n signal.complete(value);\n }\n }\n function onError(error) {\n if (config.adjustRetries) {\n config.retries = config.adjustRetries(error);\n }\n if (attempts < config.retries && config.canRetry(error)) {\n attempts++;\n if (config.beforeRetry) {\n config.beforeRetry();\n }\n config.async.setTimeout(callCallback, config.delay);\n }\n else {\n signal.error(error);\n }\n }\n function callCallback() {\n promise = config.callback();\n promise.done(onSuccess, onError);\n }\n callCallback();\n return signal.getPromise();\n}", "function Retry(config) {\n var adjustRetries = config.adjustRetries, async = config.async, beforeRetry = config.beforeRetry, callback = config.callback, _a = config.canRetry, canRetry = _a === void 0 ? function () { return true; } : _a, delay = config.delay, resetAttemptsOnRestart = config.resetAttemptsOnRestart, retries = config.retries, shouldRestart = config.shouldRestart;\n var attempts = 0;\n var promise;\n var signal = new Signal_1.default(function () {\n promise.cancel();\n });\n function onSuccess(value) {\n if (shouldRestart && shouldRestart()) {\n if (resetAttemptsOnRestart) {\n attempts = 0;\n }\n callCallback();\n }\n else {\n signal.complete(value);\n }\n }\n function onError(error) {\n if (adjustRetries) {\n retries = adjustRetries(error);\n }\n if (attempts < retries && canRetry(error)) {\n attempts++;\n if (beforeRetry) {\n beforeRetry();\n }\n if (typeof delay === 'number' && async) {\n async.setTimeout(callCallback, delay);\n }\n else {\n callCallback();\n }\n }\n else {\n signal.error(error);\n }\n }\n function callCallback() {\n promise = callback();\n promise.then(onSuccess, onError);\n }\n callCallback();\n return signal.getPromise();\n}", "function fetchDynamicConfigWithRetry(app, \n// retryData and timeoutMillis are parameterized to allow passing a different value for testing.\nretryData, timeoutMillis) {\n if (retryData === void 0) { retryData = defaultRetryData; }\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__awaiter\"])(this, void 0, void 0, function () {\n var _a, appId, apiKey, measurementId, throttleMetadata, signal;\n var _this = this;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__generator\"])(this, function (_b) {\n _a = app.options, appId = _a.appId, apiKey = _a.apiKey, measurementId = _a.measurementId;\n if (!appId) {\n throw ERROR_FACTORY.create(\"no-app-id\" /* NO_APP_ID */);\n }\n if (!apiKey) {\n if (measurementId) {\n return [2 /*return*/, {\n measurementId: measurementId,\n appId: appId\n }];\n }\n throw ERROR_FACTORY.create(\"no-api-key\" /* NO_API_KEY */);\n }\n throttleMetadata = retryData.getThrottleMetadata(appId) || {\n backoffCount: 0,\n throttleEndTimeMillis: Date.now()\n };\n signal = new AnalyticsAbortSignal();\n setTimeout(function () { return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__awaiter\"])(_this, void 0, void 0, function () {\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__generator\"])(this, function (_a) {\n // Note a very low delay, eg < 10ms, can elapse before listeners are initialized.\n signal.abort();\n return [2 /*return*/];\n });\n }); }, timeoutMillis !== undefined ? timeoutMillis : FETCH_TIMEOUT_MILLIS);\n return [2 /*return*/, attemptFetchDynamicConfigWithRetry({ appId: appId, apiKey: apiKey, measurementId: measurementId }, throttleMetadata, signal, retryData)];\n });\n });\n}", "function fetch_retry(url, n) {\n return fetch(url).catch(function(error) {\n if (n === 1) throw error;\n return fetch_retry(url, n - 1);\n })\n}", "decodeTimeout( value ){\n\t\treturn ((value & 0x00FF) << ((value & 0xFF00) >> 8)) + 1;\n\t}", "function fetchWithRetries(uri, initWithRetries) {\n\t var _ref = initWithRetries || {},\n\t fetchTimeout = _ref.fetchTimeout,\n\t retryDelays = _ref.retryDelays,\n\t init = _objectWithoutProperties(_ref, ['fetchTimeout', 'retryDelays']);\n\n\t var _fetchTimeout = fetchTimeout != null ? fetchTimeout : DEFAULT_TIMEOUT;\n\t var _retryDelays = retryDelays != null ? retryDelays : DEFAULT_RETRIES;\n\n\t var requestsAttempted = 0;\n\t var requestStartTime = 0;\n\t return new Promise(function (resolve, reject) {\n\t /**\n\t * Sends a request to the server that will timeout after `fetchTimeout`.\n\t * If the request fails or times out a new request might be scheduled.\n\t */\n\t function sendTimedRequest() {\n\t requestsAttempted++;\n\t requestStartTime = Date.now();\n\t var isRequestAlive = true;\n\t var request = fetch(uri, init);\n\t var requestTimeout = setTimeout(function () {\n\t isRequestAlive = false;\n\t if (shouldRetry(requestsAttempted)) {\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'fetchWithRetries: HTTP timeout, retrying.') : void 0;\n\t retryRequest();\n\t } else {\n\t reject(new Error(sprintf('fetchWithRetries(): Failed to get response from server, ' + 'tried %s times.', requestsAttempted)));\n\t }\n\t }, _fetchTimeout);\n\n\t request.then(function (response) {\n\t clearTimeout(requestTimeout);\n\t if (isRequestAlive) {\n\t // We got a response, we can clear the timeout.\n\t if (response.status >= 200 && response.status < 300) {\n\t // Got a response code that indicates success, resolve the promise.\n\t resolve(response);\n\t } else if (shouldRetry(requestsAttempted)) {\n\t // Fetch was not successful, retrying.\n\t // TODO(#7595849): Only retry on transient HTTP errors.\n\t process.env.NODE_ENV !== 'production' ? warning(false, 'fetchWithRetries: HTTP error, retrying.') : void 0, retryRequest();\n\t } else {\n\t // Request was not successful, giving up.\n\t var error = new Error(sprintf('fetchWithRetries(): Still no successful response after ' + '%s retries, giving up.', requestsAttempted));\n\t error.response = response;\n\t reject(error);\n\t }\n\t }\n\t })['catch'](function (error) {\n\t clearTimeout(requestTimeout);\n\t if (shouldRetry(requestsAttempted)) {\n\t retryRequest();\n\t } else {\n\t reject(error);\n\t }\n\t });\n\t }\n\n\t /**\n\t * Schedules another run of sendTimedRequest based on how much time has\n\t * passed between the time the last request was sent and now.\n\t */\n\t function retryRequest() {\n\t var retryDelay = _retryDelays[requestsAttempted - 1];\n\t var retryStartTime = requestStartTime + retryDelay;\n\t // Schedule retry for a configured duration after last request started.\n\t setTimeout(sendTimedRequest, retryStartTime - Date.now());\n\t }\n\n\t /**\n\t * Checks if another attempt should be done to send a request to the server.\n\t */\n\t function shouldRetry(attempt) {\n\t return ExecutionEnvironment.canUseDOM && attempt <= _retryDelays.length;\n\t }\n\n\t sendTimedRequest();\n\t });\n\t}", "getTimeout() {\n return this._timeout;\n }", "backoff() {\n this.connections.forEach((conn) => conn.backoff())\n\n if (this.backoffId) {\n clearTimeout(this.backoffId)\n }\n\n const onTimeout = () => {\n this.log('Backoff done')\n this.raise('try')\n }\n\n const delay = this.backoffTimer.getInterval() * 1000\n this.backoffId = setTimeout(onTimeout, delay)\n this.log(`Backoff for ${delay}`)\n }", "parseCacheControl(header) {\n let options = { maxAge: 0, staleWhileRevalidate: 0 }, pos = 0, seconds = 0;\n if (header) {\n header = header.toLowerCase();\n if (header.includes(\"no-cache\") || header.includes(\"no-store\") || header.includes(\"private\")) {\n return options;\n } else {\n pos = header.indexOf(\"max-age=\");\n seconds = (pos !== -1) ? parseInt(header.substr(pos + 8), 10) : NaN;\n if (seconds >= 0) { options.maxAge = seconds; }\n pos = header.indexOf(\"stale-while-revalidate=\");\n seconds = (pos !== -1) ? parseInt(header.substr(pos + 23), 10) : NaN;\n if (seconds >= 0) { options.staleWhileRevalidate = seconds; }\n }\n }\n return options;\n }", "function retryAmebaRequest(bot, msg, type, url, attempts, verbose, errmsg, requestFunction) {\n\tconsole.log(errmsg);\n\t// if less than 3 attempts, retry\n\tif (attempts < 3) {\n\t\tconsole.log(\"Retrying...\");\n\t\tvar xhrretry = new XMLHttpRequest();\n\t\txhrretry.setDisableHeaderCheck(true);\n\t\txhrretry.open('GET', url);\n\n\t\t// set auth cookies, and user-agent header to mimic google chrome\n\t\txhrretry.setRequestHeader(\"Cookie\", cookie);\n\t\txhrretry.setRequestHeader(\"User-Agent\", \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36\")\n\n\t\t// send request, and link callback\n\t\txhrretry.send();\n\t\txhrretry.onreadystatechange = function() {\n\t \trequestFunction(bot, msg, xhrretry, type, url, attempts + 1, verbose);\n\t\t}; \n\t} else { // else, send an error message to discord if verbose\n\t\tif (verbose) {\n\t\t\tmsg.channel.sendMessage(\"Whoops, an error occurred! It's not my fault... I think?\");\n\t\t}\n\t}\n}", "async function fetchDynamicConfigWithRetry(app, \r\n// retryData and timeoutMillis are parameterized to allow passing a different value for testing.\r\nretryData = defaultRetryData, timeoutMillis) {\r\n const { appId, apiKey, measurementId } = app.options;\r\n if (!appId) {\r\n throw ERROR_FACTORY.create(\"no-app-id\" /* NO_APP_ID */);\r\n }\r\n if (!apiKey) {\r\n if (measurementId) {\r\n return {\r\n measurementId,\r\n appId\r\n };\r\n }\r\n throw ERROR_FACTORY.create(\"no-api-key\" /* NO_API_KEY */);\r\n }\r\n const throttleMetadata = retryData.getThrottleMetadata(appId) || {\r\n backoffCount: 0,\r\n throttleEndTimeMillis: Date.now()\r\n };\r\n const signal = new AnalyticsAbortSignal();\r\n setTimeout(async () => {\r\n // Note a very low delay, eg < 10ms, can elapse before listeners are initialized.\r\n signal.abort();\r\n }, timeoutMillis !== undefined ? timeoutMillis : FETCH_TIMEOUT_MILLIS);\r\n return attemptFetchDynamicConfigWithRetry({ appId, apiKey, measurementId }, throttleMetadata, signal, retryData);\r\n}", "age() {\n let age = Math.max(0, (this._responseTime - this.date()) / 1000);\n if (this._resHeaders.age) {\n let ageValue = this._ageValue();\n if (ageValue > age) age = ageValue;\n }\n\n const residentTime = (this.now() - this._responseTime) / 1000;\n return age + residentTime;\n }", "handleImageRetries(image) {\n this.setState({ imageWorks: false }, () => {\n\n if (this.state.retryCount <= this.props.retry.count) {\n\n setTimeout(() => {\n // re-attempt fetching the image\n image.src = this.props.src;\n\n // update count and delay\n this.setState((prevState) => {\n let updateDelay;\n if (this.props.retry.accumulate === 'multiply') {\n updateDelay = prevState.retryDelay * this.props.retry.delay;\n } else if (this.props.retry.accumulate === 'add') {\n updateDelay = prevState.retryDelay + this.props.retry.delay;\n } else if (this.props.retry.accumulate === 'noop') {\n updateDelay = this.props.retry.delay;\n } else {\n updateDelay = 'multiply';\n }\n\n return {\n retryDelay: updateDelay,\n retryCount: prevState.retryCount + 1\n };\n });\n }, this.state.retryDelay * 1000);\n }\n\n });\n }", "function tryGetAlternativeUrl(primaryUrl) {\n try {\n var alternativeUrl = _urlTable && _urlTable[primaryUrl];\n if (!alternativeUrl) {\n return undefined;\n }\n // Check for expired items.\n // Private CDN item will have a query string parameter _eat_=xxxx_yyyyyyyyyy, where xxxx is an expiration\n // time in Epoch format (number of seconds since 1970/1/1).\n // The real URL example is\n // https://privatecdn.sharepointonline.com/msft.spoppe.com/sites/wex/SiteAssets/SitePages/SamplePage/image.jpg\n // ?_eat_=1480392900_16330f287fe138cea33c424221c6fa1d79e6cdeb470bc0000894645994ba1a14\n // &_oat_=1480392900_f312136e0ffd87c26165973f042a98dfd40130d4981d6d3fd71643c7e4fdb485\n // &width=300\n // If the parameter is available in the alternative Url,\n // check whether this is at least 30 seconds out in the future, and return the alternative\n // URL only if still valid. Return undefined otherwise, falling back to the original non-optimized behavior\n // note that the URLs provided by the server always have at least 15 minutes of the valid time, so it is\n // unlikely expired situation will appear too often.\n var uri = new Uri_1.default(alternativeUrl);\n var authToken = uri.getQueryParameter(EXPIRATION_TOKEN);\n if (authToken) {\n var split = authToken.split(EXPIRATION_TOKEN_SEPARATOR);\n var expirationTime = undefined;\n if (split.length === 2) {\n expirationTime = Number(split[0]);\n }\n if (!expirationTime) {\n // hightly unexpected, but logging nevertheless\n var qosEvent = new Qos_event_1.Qos({ name: QOS_TRYGETALTERNATIVEURLFAILURE });\n qosEvent.end({\n resultType: Qos_event_1.ResultTypeEnum.Failure,\n resultCode: 'EatParamUnexpectedFormat',\n extraData: {\n eatParam: authToken\n }\n });\n return alternativeUrl;\n }\n // Shift expiration time by 30 seconds to ensure the browser has ample time to fetch the resource\n // before it actually does expire.\n expirationTime -= 30;\n // getTime() returns Epoch time in milliseconds.\n if (Date.now() / 1000 > expirationTime) {\n delete _urlTable[primaryUrl];\n return undefined;\n }\n }\n return alternativeUrl;\n }\n catch (ex) {\n var qosEvent = new Qos_event_1.Qos({ name: QOS_TRYGETALTERNATIVEURLFAILURE });\n qosEvent.end({\n resultType: Qos_event_1.ResultTypeEnum.Failure,\n resultCode: 'Unexpected',\n extraData: {\n error: ex\n }\n });\n }\n return undefined;\n}", "_timeout(count) {\n if (count < this.minCount) {\n return this.minTimeout;\n } // fuzz the timeout randomly, to avoid reconnect storms when a\n // server goes down.\n\n var timeout =\n Math.min(\n this.maxTimeout,\n this.baseTimeout * Math.pow(this.exponent, count)\n ) *\n (Random.fraction() * this.fuzz + (1 - this.fuzz / 2));\n return timeout;\n }", "getCheckIntervalInMinutes() {\n return 15\n }", "async function fetchRetry(url, numRetries) {\n let r = numRetries;\n while (r--) {\n try {\n return await fetch(url);\n } catch (error) {\n if (!r) throw error;\n }\n }\n}" ]
[ "0.73163617", "0.72875464", "0.7255115", "0.72020245", "0.71176016", "0.6877851", "0.6871882", "0.6871882", "0.6702772", "0.6702772", "0.6555678", "0.6312755", "0.6312755", "0.615139", "0.57901984", "0.57498324", "0.57498324", "0.57498324", "0.55866075", "0.55866075", "0.5443139", "0.5355942", "0.53402907", "0.53209805", "0.5304417", "0.52699333", "0.5171678", "0.51464784", "0.513685", "0.51292104", "0.5128322", "0.5125485", "0.51225984", "0.5117298", "0.5090435", "0.5062988", "0.505822", "0.5055959", "0.50138384", "0.50010216", "0.49793103", "0.49680492", "0.49680492", "0.49571696", "0.49420795", "0.49381155", "0.49308577", "0.49308577", "0.49206734", "0.49136886", "0.4908818", "0.48945132", "0.489127", "0.48836932", "0.48831028", "0.48803657", "0.48777393", "0.48766592", "0.4874243", "0.48661697", "0.4849215", "0.48393998", "0.48393998", "0.48369527", "0.4818072", "0.48040134", "0.47966626", "0.4779736", "0.47518793", "0.47514802", "0.47449473", "0.47429946", "0.47347322", "0.4732504", "0.47163847", "0.4713821", "0.4713821", "0.47103697", "0.4706898", "0.4706898", "0.47018045", "0.46873748", "0.4686156", "0.46836522", "0.46834302", "0.4672629", "0.46648985", "0.4638604", "0.4635125", "0.46299136", "0.46260443", "0.46233657", "0.4619651", "0.46089125", "0.46074036", "0.46008235", "0.45942917", "0.45803502" ]
0.72742456
4
This function adds context (pre/post/line) lines to the provided frame
function addContextToFrame(lines, frame, linesOfContext) { if (linesOfContext === void 0) { linesOfContext = 5; } var lineno = frame.lineno || 0; var maxLines = lines.length; var sourceLine = Math.max(Math.min(maxLines, lineno - 1), 0); frame.pre_context = lines .slice(Math.max(0, sourceLine - linesOfContext), sourceLine) .map(function (line) { return Object(_string__WEBPACK_IMPORTED_MODULE_1__[/* snipLine */ "c"])(line, 0); }); frame.context_line = Object(_string__WEBPACK_IMPORTED_MODULE_1__[/* snipLine */ "c"])(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0); frame.post_context = lines .slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext) .map(function (line) { return Object(_string__WEBPACK_IMPORTED_MODULE_1__[/* snipLine */ "c"])(line, 0); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addContextToFrame(lines, frame, linesOfContext = 5) {\n const lineno = frame.lineno || 0;\n const maxLines = lines.length;\n const sourceLine = Math.max(Math.min(maxLines, lineno - 1), 0);\n\n frame.pre_context = lines\n .slice(Math.max(0, sourceLine - linesOfContext), sourceLine)\n .map((line) => string.snipLine(line, 0));\n\n frame.context_line = string.snipLine(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0);\n\n frame.post_context = lines\n .slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext)\n .map((line) => string.snipLine(line, 0));\n}", "function addContextToFrame(lines, frame, linesOfContext) {\n if (linesOfContext === void 0) { linesOfContext = 5; }\n var lineno = frame.lineno || 0;\n var maxLines = lines.length;\n var sourceLine = Math.max(Math.min(maxLines, lineno - 1), 0);\n frame.pre_context = lines\n .slice(Math.max(0, sourceLine - linesOfContext), sourceLine)\n .map(function (line) { return Object(_string__WEBPACK_IMPORTED_MODULE_1__[\"snipLine\"])(line, 0); });\n frame.context_line = Object(_string__WEBPACK_IMPORTED_MODULE_1__[\"snipLine\"])(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0);\n frame.post_context = lines\n .slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext)\n .map(function (line) { return Object(_string__WEBPACK_IMPORTED_MODULE_1__[\"snipLine\"])(line, 0); });\n}", "function addContextToFrame(lines, frame, linesOfContext) {\n if (linesOfContext === void 0) { linesOfContext = 5; }\n var lineno = frame.lineno || 0;\n var maxLines = lines.length;\n var sourceLine = Math.max(Math.min(maxLines, lineno - 1), 0);\n frame.pre_context = lines\n .slice(Math.max(0, sourceLine - linesOfContext), sourceLine)\n .map(function (line) { return string_1.snipLine(line, 0); });\n frame.context_line = string_1.snipLine(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0);\n frame.post_context = lines\n .slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext)\n .map(function (line) { return string_1.snipLine(line, 0); });\n}", "function addPrePostContext(filesToRead, frames, linesOfContext) {\n return new utils_1.SyncPromise(function (resolve) {\n return readSourceFiles(filesToRead).then(function (sourceFiles) {\n var result = frames.map(function (frame) {\n if (frame.filename && sourceFiles[frame.filename]) {\n try {\n var lines = sourceFiles[frame.filename].split('\\n');\n utils_1.addContextToFrame(lines, frame, linesOfContext);\n }\n catch (e) {\n // anomaly, being defensive in case\n // unlikely to ever happen in practice but can definitely happen in theory\n }\n }\n return frame;\n });\n resolve(result);\n });\n });\n}", "enterFrame(frameId) {\n if (this.contexts) {\n this.lastId++;\n this.contexts = this.contexts.slice();\n this.contexts.push(this.newFrame(this.lastId, frameId));\n this._currentContextIds.unshift(this.contextIdforContexts(this.contexts));\n }\n }", "enterFrame(frameId) {\n if (this.contexts) {\n this.lastId++;\n this.contexts = this.contexts.slice();\n this.contexts.push(this.newFrame(this.lastId, frameId));\n this._currentContextIds.unshift(this.contextIdforContexts(this.contexts));\n }\n }", "function context(head, subhead){\n drawLine([190,103],[616,103],2)\n ctx.fillStyle = white;\n ctx.font = '21pt apollo';\n var y = 218\n if(ctx.measureText(head).width < 426){\n y = 218-41\n }\n wrapText(ctx, head, 190, 140, 426, 34)\n ctx.font = '13pt apollo';\n if(typeof subhead == \"string\"){\n wrapText(ctx, subhead, 190, y, 426, 21)\n }else{\n longText(ctx, subhead, 190, y, 426, 21)\n }\n // Added this so that the longText format for text with multiple paragraphs can be used.\n }", "function contextLines(lines) {\n return lines.map(function (entry) {\n return ' ' + entry;\n });\n }", "function contextLines(lines) {\n\t return lines.map(function (entry) {\n\t return ' ' + entry;\n\t });\n\t }", "function contextLines(lines) {\n\t return lines.map(function (entry) {\n\t return ' ' + entry;\n\t });\n\t }", "function contextLines(lines) {\n\t return lines.map(function (entry) {\n\t return ' ' + entry;\n\t });\n\t }", "function contextLines(lines) {\n\t return lines.map(function (entry) {\n\t return ' ' + entry;\n\t });\n\t }", "function contextLines(lines) {\n return lines.map(function(entry) { return ' ' + entry; });\n }", "enterEntityLine(ctx) {\n\t}", "function onAddLineFragments(context) {\n // Fetch the root Sketch object\n var sketch = context.api()\n\n // Iterate over each text layer in the selection, calling our addLineFragments function\n sketch.selectedDocument.selectedLayers.iterateWithFilter(\"isText\", function(layer) {\n addLineFragments(sketch, layer, layer.fragments)\n })\n}", "function contextLines(lines) {\n return lines.map(function (entry) {\n return ' ' + entry;\n });\n }", "function contextLines(lines) {\n return lines.map(function (entry) {\n return ' ' + entry;\n });\n }", "function contextLines(lines) {\n return lines.map(function (entry) {\n return ' ' + entry;\n });\n }", "function contextLines(lines) {\n return lines.map(function (entry) {\n return ' ' + entry;\n });\n }", "function contextLines(lines) {\n return lines.map(function (entry) {\n return ' ' + entry;\n });\n }", "function contextLines(lines) {\n return lines.map(function (entry) {\n return ' ' + entry;\n });\n }", "function contextLines(lines) {\n return lines.map(function (entry) {\n return ' ' + entry;\n });\n }", "function contextLines(lines) {\n return lines.map(function (entry) {\n return ' ' + entry;\n });\n }", "function contextLines(lines) {\n return lines.map(function (entry) {\n return ' ' + entry;\n });\n }", "function contextLines(lines) {\n return lines.map(function (entry) {\n return ' ' + entry;\n });\n }", "function contextLines(lines) {\n return lines.map(function (entry) {\n return ' ' + entry;\n });\n }", "function contextLines( lines ) {\n\t\treturn lines.map( function ( entry ) {\n\t\t\treturn ' ' + entry;\n\t\t} );\n\t}", "enterNewEntityLine(ctx) {\n\t}", "enterFilterLine(ctx) {\n\t}", "enterNewline(ctx) {\n\t}", "function drawFrame() {\n // Draw background and a border\n context.strokeStyle = \"#000000\";\n context.fillStyle = \"#d0d0d0\";\n context.fillRect(0, 0, canvas.width, canvas.height);\n context.fillStyle = \"#e8eaec\";\n context.fillRect(1, 1, canvas.width-2, canvas.height-2);\n \n // Character container\n context.fillStyle = \"#ffffff\";\n context.fillRect(400, 75, 300, 370);\n if (score < (requiredscore/2)) {\n context.drawImage(status1, 400, 75, 300, 370);\n } else {\n context.drawImage(status2, 400, 75, 300, 370);\n }\n \n // Score bar\n context.lineWidth = 3;\n context.fillStyle = \"#ffffff\";\n roundRect(context, 80, 75, 270, 35, 15, true, true);\n \n // Moves left container\n circle(context, 50, 93, 17);\n \n // Draw moves remaining\n context.fillStyle = \"#003300\";\n context.font = \"20px Verdana\";\n context.fillText(movecount, 37, 100);\n \n if (scorechange > 0) {\n // Draw a speech bubble\n drawBubble(context, 500, 125, 90, 30, 5);\n context.fillStyle = \"#003300\";\n context.font = \"10px Verdana\";\n if (!successquote) {\n if (scorechange > 1) {\n successquote = getRandomFromArray(greatquotes);\n } else {\n successquote = getRandomFromArray(goodquotes);\n }\n }\n context.fillText(successquote, 510, 140);\n }\n \n context.lineWidth = 1;\n context.fillStyle = \"#00b300\";\n context.strokeStyle = \"#00b300\";\n // Draw score\n if (score >= requiredscore) {\n roundRect(context, 83, 78, 264, 29, 11, true, true);\n } else if (score > 0) {\n var scorewidth = (score/requiredscore)*(270-6);\n roundOnLeftRect(context, 83, 78, scorewidth, 29, 11, true, true);\n }\n }", "_enterContext(context) {\n this._stack.push(context);\n }", "function enterCtx(ctx) {\n ctxStack.push(ctx);\n }", "function insertFrame(){\n\t\tlet animation_frames = currentFrames.split(\"=====\\n\");\n\t\t$(\"text-area\").value = animation_frames[frameNumber]; \n\t\tframeNumber++;\n\t\tframeNumber = frameNumber % animation_frames.length;\n\t}", "function line_basic_draw(cxt, movex, movey, linex, liney, lineWidth, color) {\n cxt.beginPath();\n cxt.lineWidth = lineWidth;\n cxt.strokeStyle = color;\n cxt.moveTo(movex, movey);\n cxt.lineTo(linex, liney);\n cxt.closePath();\n cxt.stroke();\n}", "function drawFrame() {\n // Draw background and a border\n context.fillStyle = \"#d0d0d0\";\n context.fillRect(0, 0, canvas.width, canvas.height);\n context.fillStyle = \"#e8eaec\";\n context.fillRect(1, 1, canvas.width-2, canvas.height-2);\n \n // Draw header\n context.fillStyle = \"#303030\";\n context.fillRect(0, 0, canvas.width, 65);\n \n // Draw title\n context.fillStyle = \"#ffffff\";\n context.font = \"24px Verdana\";\n context.fillText(\"Match3 Example - Rembound.com\", 10, 30);\n \n // Display fps\n context.fillStyle = \"#ffffff\";\n context.font = \"12px Verdana\";\n context.fillText(\"Fps: \" + fps, 13, 50);\n }", "function drawFrame() {\n context.fillRect(0, 0, canvas.width, canvas.height);\n context.fillStyle = \"#e8eaec\";\n }", "_drawFrame() {\n let rect = this._chartLayout.canvasPlotAreaRect;\n let frameL = rect.left - 1;\n let frameR = rect.right;\n let frameT = rect.top;\n let frameB = rect.bottom - 1;\n\n this._setColor(this.displayOptions.plotArea.backColor);\n this._context.fillRect(rect.left, rect.top, rect.width, rect.height);\n\n this._setColor(this.displayOptions.plotArea.frameColor);\n this._drawLine(frameL, frameT, frameL, frameB);\n this._drawLine(frameR, frameT, frameR, frameB);\n this._drawLine(frameL, frameT, frameR, frameT);\n this._drawLine(frameL, frameB, frameR, frameB);\n }", "function initializeContext(ctx) {\n ctx.lineWidth = 10;\n ctx.lineJoin = \"round\";\n ctx.lineCap = \"round\";\n \n $(\"#mainCanvas\").mousemove(function(event) {\n if (canvasPressed) {\n pointsArray.push({x: event.clientX - canvasPos.left, y: event.clientY - canvasPos.top});\n \n ctx.beginPath();\n ctx.moveTo(pointsArray[0].x, pointsArray[0].y);\n for (var i = 1; i < pointsArray.length; i++) {\n ctx.lineTo(pointsArray[i].x, pointsArray[i].y);\n }\n ctx.stroke();\n }\n });\n \n}", "function redraw(){ \r\n context.clearRect(0, 0, context.canvas.width, context.canvas.height); // Clears the canvas\r\n console.log('frameImage: ' + frameImage);\r\n\r\n\r\n//if (photo != 'none') {\r\n// context.drawImage(photo, 0, 0, photo.width, photo.height,0,0, canvas.width, canvas.height); \r\n// }\r\n // context.strokeStyle = \"#df4b26\";\r\n context.lineJoin = \"round\";\r\n context.lineWidth = 5;\r\n\t// context.drawImage(video, 0, 0);\t\t\r\n for(var i=0; i < clickX.length; i++) {\t\t\r\n\r\n context.beginPath();\r\n if(clickDrag[i] && i){\r\n context.moveTo(clickX[i-1], clickY[i-1]);\r\n }else{\r\n context.moveTo(clickX[i]-1, clickY[i]);\r\n }\r\n \r\n//I add this ; eraser code:\r\n\r\n if(clickTool[i] =='eraser') {\r\n context.globalCompositeOperation = 'destination-out';\r\n context.lineWidth = 50;\r\n }\r\n else {\r\n context.globalCompositeOperation = 'source-over';\r\n context.lineWidth = 5;\r\n }\r\n console.log(clickX[i] + '*' + clickY[i]);\r\n console.log(clickColor[i]);\r\n console.log(clickDrag[i]);\r\n\r\n context.lineTo(clickX[i], clickY[i]);\r\n context.closePath();\r\n context.strokeStyle = clickColor[i];\r\n context.stroke();\r\n }\r\n// if (frameImage != 'none') {\r\n// context.drawImage(frameImage, 0, 0, frameImage.width, frameImage.height,0,0, canvas.width, canvas.height); \r\n// }\r\n \r\n}", "function contextLines(lines) {\n\t return _utilMap2['default'](lines, function (entry) {\n\t return ' ' + entry;\n\t });\n\t }", "drawExtraInfo(context) {\n context.fillStyle = this.textColour;\n context.fillText(this.text, this.x, this.y+7);\n\n if (!this.showExtraInfo) {\n return;\n }\n\n context.beginPath();\n for (let key in this.gridProbes) {\n let gp = this.gridProbes[key];\n\n let x = this.x + gp.distance*Math.cos(this.body.angle + gp.angle); \n let y = this.y + gp.distance*Math.sin(this.body.angle + gp.angle); \n \n context.rect(x, y, 1, 1);\n }\n context.strokeStyle = \"purple\";\n context.stroke();\n context.closePath();\n }", "function addLine(self, to, packet)\n{\n // if we've sent an open and have a line, just use that\n if(to.openSent && to.line) return packet.js.line = to.line;\n\n // make sure to send a signed open\n to.openSent = true;\n if(!to.open) addOpen(self, to);\n packet.js.open = to.open;\n packet.sign = true;\n}", "appendContext(context) {\n if (context && !this.context.includes(context)) {\n let newContext = [...this.context];\n newContext.push(context);\n this.context = [...newContext];\n }\n }", "function fillContext() {\r\n\t\tcontext.lineWidth = lineWidth;\r\n\t\tcontext.fillStyle = color;\r\n\t\tcontext.fill();\r\n\t}", "function drawStage(context, mouse) {\n\n // Clearing canvas\n context.clearRect(0, 0, innerWidth, innerHeight);\n\n // Drawing active line\n if(draw_active) {\n current_line.drawActive(context, mouse);\n }\n // Drawing all previous lines\n for(var i = 0; i < lines.length; i++) {\n lines[i].draw(context);\n }\n}", "function lineInsertDraw(ctx, index)\n{\n ctx.save( );\n ctx.beginPath();\n\tctx.fillStyle = \"green\";\n ctx.moveTo(5 + 40 * index, 5 + 40 * rowNumInsert);\n ctx.lineTo(5 + 40 * index, 45 + 40 * rowNumInsert);\n ctx.lineWidth = 5;\n ctx.stroke();\n ctx.restore( );\n}", "function drawFrame() {\n // Draw background and a border\n context.fillStyle = \"#d0d0d0\";\n context.fillRect(0, 0, canvas.width, canvas.height);\n context.fillStyle = \"#e8eaec\";\n context.fillRect(1, 1, canvas.width-2, canvas.height-2);\n\n // Draw header\n context.fillStyle = \"#303030\";\n context.fillRect(0, 0, canvas.width, 65);\n\n // Draw title\n context.fillStyle = \"#ffffff\";\n context.font = \"24px Verdana\";\n context.fillText(\"Bouncy Square - Physikal\", 10, 30);\n\n // Display fps\n context.fillStyle = \"#ffffff\";\n context.font = \"12px Verdana\";\n context.fillText(\"Fps: \" + fps, 13, 50);\n }", "function renderBox(context, frame, options) {\n const { fill, stroke } = options || {};\n const locs = locsFrameTrans(\n [[-1, -1], [1, -1], [1, 1], [-1, 1]], \n frame,\n identityFrame\n );\n context.beginPath();\n context.moveTo(...locs[0]);\n [1, 2, 3, 0].forEach(i => context.lineTo(...locs[i]));\n if (fill) { context.fill(); }\n if (stroke) { context.stroke(); }\n}", "function PatchLine() { }", "function parseMultilineFrame( frame ) {\n if(multiNode) {\n return swapWhitespace(frame);\n } else {\n return padString(frame.join('\\n'));\n }\n }", "function renderStackFrame() {\n const column = dividerColumn + 1;\n const histEntry = history[currentHistoryIdx];\n const stack = histEntry.stack;\n const lines = [];\n for (let i = stack.length - 1; i >= 0; i--) {\n renderFrame(stack[i], column, lines);\n }\n renderText(column, 1, stackFrameWidth - 1, windowHeight, lines);\n }", "function injectLineNumbers(tokens, idx, options, env, slf) {\n var line, endLine, listLine;\n if (tokens[idx].map && tokens[idx].level === 0) {\n line = tokens[idx].map[0];\n endLine = tokens[idx].map[1];\n listLine = [];\n for (var i = line; i < endLine; i++) {\n listLine.push(i);\n }\n tokens[idx].attrJoin(\"class\", exports.PREVIEW_PARAGRAPH_PREFIX + String(line)\n + ' ' + exports.PREVIEW_LINE_CLASS + ' ' + listLine.join(' '));\n tokens[idx].attrJoin(\"data_line_start\", \"\" + String(line));\n tokens[idx].attrJoin(\"data_line_end\", \"\" + String(endLine - 1));\n tokens[idx].attrJoin(\"data_line\", \"\" + String([line, endLine]));\n tokens[idx].attrJoin(\"count_line\", \"\" + String(endLine - line));\n }\n return slf.renderToken(tokens, idx, options, env, slf);\n}", "enterErrorFilterLine(ctx) {\n\t}", "addFrame(frame) {\n this.frames.push(frame);\n }", "function StackFrameCodeBlock(props) {\n var lines = props.lines,\n lineNum = props.lineNum,\n columnNum = props.columnNum,\n contextSize = props.contextSize,\n main = props.main;\n\n var sourceCode = [];\n var whiteSpace = Infinity;\n lines.forEach(function (e) {\n var text = e.content;\n\n var m = text.match(/^\\s*/);\n if (text === '') {\n return;\n }\n if (m && m[0]) {\n whiteSpace = Math.min(whiteSpace, m[0].length);\n } else {\n whiteSpace = 0;\n }\n });\n lines.forEach(function (e) {\n var text = e.content;\n var line = e.lineNumber;\n\n\n if (isFinite(whiteSpace)) {\n text = text.substring(whiteSpace);\n }\n sourceCode[line - 1] = text;\n });\n var ansiHighlight = __WEBPACK_IMPORTED_MODULE_6_babel_code_frame___default()(sourceCode.join('\\n'), lineNum, columnNum == null ? 0 : columnNum - (isFinite(whiteSpace) ? whiteSpace : 0), {\n forceColor: true,\n linesAbove: contextSize,\n linesBelow: contextSize\n });\n var htmlHighlight = Object(__WEBPACK_IMPORTED_MODULE_5__utils_generateAnsiHTML__[\"a\" /* default */])(ansiHighlight);\n var code = document.createElement('code');\n code.innerHTML = htmlHighlight;\n Object(__WEBPACK_IMPORTED_MODULE_3__utils_dom_absolutifyCaret__[\"a\" /* absolutifyCaret */])(code);\n\n var ccn = code.childNodes;\n // eslint-disable-next-line\n oLoop: for (var index = 0; index < ccn.length; ++index) {\n var node = ccn[index];\n var ccn2 = node.childNodes;\n for (var index2 = 0; index2 < ccn2.length; ++index2) {\n var lineNode = ccn2[index2];\n var text = lineNode.innerText;\n if (text == null) {\n continue;\n }\n if (text.indexOf(' ' + lineNum + ' |') === -1) {\n continue;\n }\n // $FlowFixMe\n Object(__WEBPACK_IMPORTED_MODULE_2__utils_dom_css__[\"a\" /* applyStyles */])(node, main ? __WEBPACK_IMPORTED_MODULE_4__styles__[\"e\" /* primaryErrorStyle */] : __WEBPACK_IMPORTED_MODULE_4__styles__[\"h\" /* secondaryErrorStyle */]);\n // eslint-disable-next-line\n break oLoop;\n }\n }\n\n return __WEBPACK_IMPORTED_MODULE_0_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1__components_CodeBlock__[\"a\" /* default */], { main: main, codeHTML: code.innerHTML });\n}", "function drawLines(context){\r\n\tconsole.log(\"drawing lines\");\r\n\tfor(i = 0; i < lines.length; i++){\r\n\t\tcontext.beginPath();\r\n\t\tcontext.moveTo(lines[i].x1, lines[i].y1);\r\n\t\tcontext.lineTo(lines[i].x2, lines[i].y2);\r\n\t\tcontext.stroke();\r\n\t}\r\n}", "enterDecorated(ctx) {\n\t}", "drawLineCanvas() {\n var minimumLineWidth = 25;\n var maximumLineWidth = 100;\n var lineWidthRange = maximumLineWidth - minimumLineWidth;\n var maximumSpeed = 50;\n \n this.lineCanvasContext.clearRect(0, 0, this.lineCanvas.width, this.lineCanvas.height);\n this.lineCanvasContext.lineCap = 'round';\n this.lineCanvasContext.shadowBlur = 30;\n this.lineCanvasContext.shadowColor = '#FFF';\n \n for (var i = 1; i < this.state.points.length; i++) {\n var point = this.state.points[i];\n var previousPoint = this.state.points[i - 1];\n \n // Change line width based on speed\n var distance = this.getDistanceBetween(point, previousPoint);\n var speed = Math.max(0, Math.min(maximumSpeed, distance));\n var percentageLineWidth = (maximumSpeed - speed) / maximumSpeed;\n this.lineCanvasContext.lineWidth = minimumLineWidth + percentageLineWidth * lineWidthRange;\n \n // Fade points as they age\n var age = Date.now() - point.time;\n var opacity = (this.pointLifetime - age) / this.pointLifetime;\n this.lineCanvasContext.strokeStyle = 'rgba(0, 0, 0, ' + opacity + ')';\n \n this.lineCanvasContext.beginPath();\n this.lineCanvasContext.moveTo(previousPoint.x, previousPoint.y);\n this.lineCanvasContext.lineTo(point.x, point.y);\n this.lineCanvasContext.stroke();\n }\n }", "function createLine(previousLine){\n let element = document.createElement(\"div\");\n element.setAttribute(\"class\", \"line\");\n element.setAttribute(\"id\", lineCounter);\n element.setAttribute(\"contenteditable\", \"true\");\n\n if(document.getElementById(\"starter\").nextElementSibling == null){ /* root level */\n document.getElementById(\"mainTextArea\").appendChild(element);\n element.focus();\n }else if(previousLine.parentElement.classList.contains(\"header\") || previousLine.parentElement.classList.contains(\"headerMargin\")){\n while(previousLine.parentElement.classList.contains(\"root\") != true){\n previousLine = previousLine.parentElement;\n }\n element.classList.add(\"headerMargin\");\n document.getElementById(previousLine.parentElement.id).appendChild(element);\n element.focus();\n }else{\n document.getElementById(\"mainTextArea\").appendChild(element);\n element.focus();\n }\n setLineType(\"paragraph\");\n countersOperations(\"line\",\"add\");\n}", "function injectLineNumbers(tokens, idx, options, env, slf) {\n var line;\n if (tokens[idx].map && tokens[idx].level === 0) {\n line = tokens[idx].map[0];\n tokens[idx].attrJoin('class', 'line');\n tokens[idx].attrSet('data-line', String(line));\n }\n return slf.renderToken(tokens, idx, options, env, slf);\n }", "function injectLineNumbers(tokens, idx, options, env, slf) {\n var line;\n if (tokens[idx].map && tokens[idx].level === 0) {\n line = tokens[idx].map[0];\n tokens[idx].attrJoin('class', 'line');\n tokens[idx].attrSet('data-line', String(line));\n }\n return slf.renderToken(tokens, idx, options, env, slf);\n }", "function drawBackground() {\n var STEP_Y = 12,\n TOP_MARGIN = STEP_Y*4,\n LEFT_MARGIN = 35,\n i = context.canvas.height;\n \n context.save();\n\n context.strokeStyle = 'lightgray';\n context.lineWidth = 0.5;\n\n while(i > TOP_MARGIN) { // Draw horizontal lines from bottom up\n context.beginPath();\n context.moveTo(0, i);\n context.lineTo(context.canvas.width, i);\n context.stroke();\n i -= STEP_Y;\n }\n\n // Draw vertical line\n context.strokeStyle = 'rgba(100,0,0,0.3)';\n context.lineWidth = 1;\n\n context.beginPath();\n context.moveTo(LEFT_MARGIN, 0);\n context.lineTo(LEFT_MARGIN, context.canvas.height);\n context.stroke();\n\n context.restore();\n}", "trace( path, context ) {}", "function withLineNumbers(renderer) {\n renderer.renderer.rules.paragraph_open\n = renderer.renderer.rules.heading_open\n = renderer.renderer.rules.ordered_list_open\n = renderer.renderer.rules.bullet_list_open\n = renderer.renderer.rules.blockquote_open\n = renderer.renderer.rules.dl_open\n = injectLineNumbers;\n renderer.renderer.rules.html_block = html_block_injectLineNumbers;\n renderer.renderer.rules.code_block\n // = renderer.renderer.rules.fence\n = code_block_injectLineNumbers;\n return renderer;\n}", "push(frame) {\n console.log('[CycleList push]:', this.cursor);\n var trace = this.data[this.cursor];\n var rootToken = frame.rootToken;\n\n var keys = Object.keys(trace);\n if (keys.indexOf(rootToken) === -1) {\n trace[rootToken] = [];\n }\n // trace[rootToken].push(frame.toString());\n trace[rootToken].push(frame);\n }", "function pixelPlus(){\n\t\tcontext.lineWidth=context.lineWidth+1;\n}", "_addLine(line) {\n //line.initProgram(this.webgl);\n line._vbuffer = this.webgl.createBuffer();\n this.webgl.bindBuffer(this.webgl.ARRAY_BUFFER, line._vbuffer);\n this.webgl.bufferData(this.webgl.ARRAY_BUFFER, line.xy, this.webgl.STREAM_DRAW);\n this.webgl.bindBuffer(this.webgl.ARRAY_BUFFER, line._vbuffer);\n line._coord = this.webgl.getAttribLocation(this.progThinLine, \"coordinates\");\n this.webgl.vertexAttribPointer(line._coord, 2, this.webgl.FLOAT, false, 0, 0);\n this.webgl.enableVertexAttribArray(line._coord);\n }", "function startLine(e){\n\t\t\tcontext.beginPath();\n\t\t\tcontext.strokeStyle = \"black\";\n\t\t\tcontext.lineCap = \"round\";\n\t\t\tcontext.lineWidth = 5;\n\t\t\tcontext.moveTo(e.clientX - theCanvas.offsetLeft, e.clientY - theCanvas.offsetTop);\n\t\t}", "function createContextLineChart(g, sources, line, color) {\n // TODO: Draw the \"context\" line chart in the \"g\" group\n const blackHex = \"#000000\"\n const paths = g.selectAll(\"context\").data(sources)\n paths.enter()\n .append(\"path\")\n .attr(\"class\", s => \"line context \" + s.name)\n .attr(\"data-legend\", s => s.name)\n .attr(\"stroke\", s => {return (s.name == \"Moyenne\")? blackHex : color(s.name)})\n .attr(\"fill\", \"none\")\n .attr(\"stroke-width\", 1)\n .attr(\"d\", s => line(s.values))\n}", "on_ctx_update(ctx) {\r\n console.trace(\"on_ctx_update\");\r\n \r\n if (ctx.spline === this.spline) {\r\n //XXX leave update for frame change?\r\n //this.update_frame();\r\n } else if (ctx.spline === this.pathspline) {\r\n var resolve = 0;\r\n \r\n for (var v of this.spline.points) {\r\n if (v.eid in this.vertex_animdata) { //&& (v.flag & SplineFlags.FRAME_DIRTY)) {\r\n var vdata = this.get_vdata(v.eid, false);\r\n \r\n v.load(vdata.evaluate(this.time));\r\n\r\n v.flag &= ~SplineFlags.FRAME_DIRTY;\r\n v.flag |= SplineFlags.UPDATE;\r\n \r\n resolve = 1;\r\n }\r\n }\r\n \r\n this.spline.resolve = resolve;\r\n }\r\n }", "_handleNewFrame(frame){\n\t\tif(this._vrDisplay){\n\t\t\tif (this._arCoreCameraRenderer) {\n\t\t\t\tthis._arCoreCameraRenderer.render()\n\t\t\t}\n\t\t\tthis._vrDisplay.getFrameData(this._vrFrameData)\n\t\t}\n\n\t\t// TODO update the anchor positions using ARCore or ARKit\n\t}", "function Frame2(pseudocodeLongLine, pseudocodeShortLine, longTraceLine, shortTraceLine, graph, path, blossom) {\r\n this.pseudocodeLongLine = pseudocodeLongLine;\r\n this.pseudocodeShortLine = pseudocodeShortLine;\r\n this.longTraceLine = longTraceLine;\r\n this.shortTraceLine = shortTraceLine;\r\n this.graph = graph;\r\n this.path = path;\r\n this.blossom = blossom;\r\n}", "function highlightLine(cm, line, context, forceToEnd) {\n // A styles array always starts with a number identifying the\n // mode/overlays that it is based on (for easy invalidation).\n var st = [cm.state.modeGen],\n lineClasses = {}; // Compute the base array of styles\n\n runMode(cm, line.text, cm.doc.mode, context, function (end, style) {\n return st.push(end, style);\n }, lineClasses, forceToEnd);\n var state = context.state; // Run overlays, adjust style array.\n\n var loop = function loop(o) {\n context.baseTokens = st;\n var overlay = cm.state.overlays[o],\n i = 1,\n at = 0;\n context.state = true;\n runMode(cm, line.text, overlay.mode, context, function (end, style) {\n var start = i; // Ensure there's a token end at the current position, and that i points at it\n\n while (at < end) {\n var i_end = st[i];\n\n if (i_end > end) {\n st.splice(i, 1, end, st[i + 1], i_end);\n }\n\n i += 2;\n at = Math.min(end, i_end);\n }\n\n if (!style) {\n return;\n }\n\n if (overlay.opaque) {\n st.splice(start, i - start, end, \"overlay \" + style);\n i = start + 2;\n } else {\n for (; start < i; start += 2) {\n var cur = st[start + 1];\n st[start + 1] = (cur ? cur + \" \" : \"\") + \"overlay \" + style;\n }\n }\n }, lineClasses);\n context.state = state;\n context.baseTokens = null;\n context.baseTokenPos = 1;\n };\n\n for (var o = 0; o < cm.state.overlays.length; ++o) {\n loop(o);\n }\n\n return {\n styles: st,\n classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null\n };\n }", "function viewport_line(e){\n\tsettings.colors.line=e.srcElement.value;\n\tvp.line=settings.colors.line;\t\n}", "function applyLines(){\t\t\t\n\t\t\tscope.clearLines();\n\t\t\t_.chain(controller.lines).each(function(line){\n\t\t\t\t_.chain(line.columns).each(function(column, columnIdx){\t\t\t\t\n\t\t\t\t\tvar $cell = $findCell(line.row, column);\n\t\t\t\t\tscope.addCellState($cell, line, columnIdx);\n\t\t\t\t\tcontroller.onLineCellDrawn(controller, $cell, line, columnIdx);\n\t\t\t\t});\n\t\t\t\tcontroller.onLineDrawn(controller, line);\n\t\t\t});\n\t\t}", "function drawFrame() {\n // Reset background\n gl.clearColor(1, 1, 1, 1);\n gl.enable(gl.DEPTH_TEST);\n gl.clear(gl.COLOR_BUFFER_BIT);\n gl.viewport(0, 0, canvas.width, canvas.height);\n\n // Bind needle speeds\n // Draw Elements!\n // Topmost code is shown at the front! \n drawVertex(canvas, shaderProgram, gl.TRIANGLES, tri, indices, black);\n\n window.requestAnimationFrame(drawFrame);\n }", "_addLine(line) {\n //line.initProgram(this.webgl);\n line._vbuffer = this.webgl.createBuffer();\n this.webgl.bindBuffer(this.webgl.ARRAY_BUFFER, line._vbuffer);\n this.webgl.bufferData(this.webgl.ARRAY_BUFFER, line.xy, this.webgl.STREAM_DRAW);\n //this.webgl.bindBuffer(this.webgl.ARRAY_BUFFER, line._vbuffer);\n line._coord = this.webgl.getAttribLocation(this._progLine, \"coordinates\");\n this.webgl.vertexAttribPointer(line._coord, 2, this.webgl.FLOAT, false, 0, 0);\n this.webgl.enableVertexAttribArray(line._coord);\n }", "function makeHunks (changes, precontext, postcontext) {\n\n //console.log('--------\\nmakeHunks(' + [changes2shorthand(changes), precontext, postcontext].join(', ') + ')')\n let ret = [] // completed hunks to return\n let lchanges = [] // accumulated line changes (continous/no-gap) to put into next hunk\n let lskipped = 0 // skipped context to take into account in next hunk line numbers\n function finishHunk () {\n if (lchanges.length) {\n let aoff = lskipped, boff = lskipped\n if (ret.length) {\n let prev = ret[ret.length-1]\n aoff += prev.aoff + prev.alen\n boff += prev.boff + prev.blen\n }\n // add hunk and reset state\n ret.push(new Hunk(aoff, boff, lchanges))\n lchanges = []\n lskipped = 0\n }\n // else keep state (lskipped) and continue\n }\n\n for (let ci=0; ci < changes.length; ci++) {\n let change = changes[ci]\n if (change.type === UNMODIFIED) {\n // add context\n let ctx_after = ci > 0 ? postcontext : 0 // context lines following previous change\n let ctx_before = ci < changes.length - 1 ? precontext : 0 // context lines preceding next change (iff there are more changes)\n let skip = Math.max(change.count - (ctx_after + ctx_before), 0)\n if (skip > 0) {\n concatTo(lineChanges(change, ctx_after), lchanges) // finish up previous hunk\n finishHunk()\n concatTo(lineChanges(change, -ctx_before), lchanges)\n lskipped = skip // remember skipped for next hunk\n } else {\n concatTo(lineChanges(change), lchanges) // add all context\n }\n } else {\n concatTo(lineChanges(change), lchanges) // add all modifications\n }\n }\n finishHunk()\n //console.log(ret.map(function(h){ return h.toString() }).join('\\n'))\n return ret\n}", "function drawFrame() {\n // Draw background and a border\n\n mycanvas.drawRect({\n fillStyle: '#d0d0d0',\n x: 0, y: 0,\n fromCenter: false,\n width: $(mycanvas)[0].width,\n height: $(mycanvas)[0].height\n });\n \n mycanvas.drawRect({\n fillStyle: '#e8eaec',\n x: 1, y: 1,\n fromCenter: false,\n width: $(mycanvas)[0].width-2,\n height: $(mycanvas)[0].height-2\n \n \n });\n// Draw header\n// mycanvas.drawRect({\n// fillStyle: '#303030',\n// x: 0, y: 0,\n// fromCenter: false,\n// width: $(mycanvas)[0].width,\n// height: 65,\n// \n// \n// });\n// \n // Draw title\n// mycanvas.drawText({\n// fillStyle: \"#ffffff\",\n// fontFamily: 'Verdana',\n// text: \"Match3 Example - Rembound.com\", \n// fontSize: 24,\n// x:220,y:15, \n// });\n \n \n // Display fps\n \n// mycanvas.drawText({\n// fillStyle: \"#ffffff\",\n// fontFamily: 'Verdana',\n// text: \"Fps \" + fps, \n// fontSize: 18,\n// x:45,y:50, \n// });\n\n \n }", "function highlightLine(cm, line, context, forceToEnd) {\n\t\t // A styles array always starts with a number identifying the\n\t\t // mode/overlays that it is based on (for easy invalidation).\n\t\t var st = [cm.state.modeGen], lineClasses = {};\n\t\t // Compute the base array of styles\n\t\t runMode(cm, line.text, cm.doc.mode, context, function (end, style) { return st.push(end, style); },\n\t\t lineClasses, forceToEnd);\n\t\t var state = context.state;\n\n\t\t // Run overlays, adjust style array.\n\t\t var loop = function ( o ) {\n\t\t context.baseTokens = st;\n\t\t var overlay = cm.state.overlays[o], i = 1, at = 0;\n\t\t context.state = true;\n\t\t runMode(cm, line.text, overlay.mode, context, function (end, style) {\n\t\t var start = i;\n\t\t // Ensure there's a token end at the current position, and that i points at it\n\t\t while (at < end) {\n\t\t var i_end = st[i];\n\t\t if (i_end > end)\n\t\t { st.splice(i, 1, end, st[i+1], i_end); }\n\t\t i += 2;\n\t\t at = Math.min(end, i_end);\n\t\t }\n\t\t if (!style) { return }\n\t\t if (overlay.opaque) {\n\t\t st.splice(start, i - start, end, \"overlay \" + style);\n\t\t i = start + 2;\n\t\t } else {\n\t\t for (; start < i; start += 2) {\n\t\t var cur = st[start+1];\n\t\t st[start+1] = (cur ? cur + \" \" : \"\") + \"overlay \" + style;\n\t\t }\n\t\t }\n\t\t }, lineClasses);\n\t\t context.state = state;\n\t\t context.baseTokens = null;\n\t\t context.baseTokenPos = 1;\n\t\t };\n\n\t\t for (var o = 0; o < cm.state.overlays.length; ++o) loop( o );\n\n\t\t return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null}\n\t\t }", "function drawBackground() {\n var STEP_Y = 12,\n i = context.canvas.height;\n \n context.strokeStyle = 'rgba(0,0,200,0.225)';\n context.lineWidth = 0.5;\n\n context.save();\n context.restore();\n\n while(i > STEP_Y*4) {\n context.beginPath();\n context.moveTo(0, i);\n context.lineTo(context.canvas.width, i);\n context.stroke();\n i -= STEP_Y;\n }\n\n context.save();\n\n context.strokeStyle = 'rgba(100,0,0,0.3)';\n context.lineWidth = 1;\n\n context.beginPath();\n\n context.moveTo(35,0);\n context.lineTo(35,context.canvas.height);\n context.stroke();\n\n context.restore();\n}", "newLineString(){\n\t\tthis.currentFeature = new Feature(this.assignId());\n\t}", "function highlightLine(cm, line, context, forceToEnd) {\n // A styles array always starts with a number identifying the\n // mode/overlays that it is based on (for easy invalidation).\n var st = [cm.state.modeGen], lineClasses = {};\n // Compute the base array of styles\n runMode(cm, line.text, cm.doc.mode, context, function (end, style) { return st.push(end, style); },\n lineClasses, forceToEnd);\n var state = context.state;\n\n // Run overlays, adjust style array.\n var loop = function ( o ) {\n context.baseTokens = st;\n var overlay = cm.state.overlays[o], i = 1, at = 0;\n context.state = true;\n runMode(cm, line.text, overlay.mode, context, function (end, style) {\n var start = i;\n // Ensure there's a token end at the current position, and that i points at it\n while (at < end) {\n var i_end = st[i];\n if (i_end > end)\n { st.splice(i, 1, end, st[i+1], i_end); }\n i += 2;\n at = Math.min(end, i_end);\n }\n if (!style) { return }\n if (overlay.opaque) {\n st.splice(start, i - start, end, \"overlay \" + style);\n i = start + 2;\n } else {\n for (; start < i; start += 2) {\n var cur = st[start+1];\n st[start+1] = (cur ? cur + \" \" : \"\") + \"overlay \" + style;\n }\n }\n }, lineClasses);\n context.state = state;\n context.baseTokens = null;\n context.baseTokenPos = 1;\n };\n\n for (var o = 0; o < cm.state.overlays.length; ++o) loop( o );\n\n return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null}\n}", "function highlightLine(cm, line, context, forceToEnd) {\n // A styles array always starts with a number identifying the\n // mode/overlays that it is based on (for easy invalidation).\n var st = [cm.state.modeGen], lineClasses = {};\n // Compute the base array of styles\n runMode(cm, line.text, cm.doc.mode, context, function (end, style) { return st.push(end, style); },\n lineClasses, forceToEnd);\n var state = context.state;\n\n // Run overlays, adjust style array.\n var loop = function ( o ) {\n context.baseTokens = st;\n var overlay = cm.state.overlays[o], i = 1, at = 0;\n context.state = true;\n runMode(cm, line.text, overlay.mode, context, function (end, style) {\n var start = i;\n // Ensure there's a token end at the current position, and that i points at it\n while (at < end) {\n var i_end = st[i];\n if (i_end > end)\n { st.splice(i, 1, end, st[i+1], i_end); }\n i += 2;\n at = Math.min(end, i_end);\n }\n if (!style) { return }\n if (overlay.opaque) {\n st.splice(start, i - start, end, \"overlay \" + style);\n i = start + 2;\n } else {\n for (; start < i; start += 2) {\n var cur = st[start+1];\n st[start+1] = (cur ? cur + \" \" : \"\") + \"overlay \" + style;\n }\n }\n }, lineClasses);\n context.state = state;\n context.baseTokens = null;\n context.baseTokenPos = 1;\n };\n\n for (var o = 0; o < cm.state.overlays.length; ++o) loop( o );\n\n return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null}\n}", "function highlightLine(cm, line, context, forceToEnd) {\n // A styles array always starts with a number identifying the\n // mode/overlays that it is based on (for easy invalidation).\n var st = [cm.state.modeGen], lineClasses = {};\n // Compute the base array of styles\n runMode(cm, line.text, cm.doc.mode, context, function (end, style) { return st.push(end, style); },\n lineClasses, forceToEnd);\n var state = context.state;\n\n // Run overlays, adjust style array.\n var loop = function ( o ) {\n context.baseTokens = st;\n var overlay = cm.state.overlays[o], i = 1, at = 0;\n context.state = true;\n runMode(cm, line.text, overlay.mode, context, function (end, style) {\n var start = i;\n // Ensure there's a token end at the current position, and that i points at it\n while (at < end) {\n var i_end = st[i];\n if (i_end > end)\n { st.splice(i, 1, end, st[i+1], i_end); }\n i += 2;\n at = Math.min(end, i_end);\n }\n if (!style) { return }\n if (overlay.opaque) {\n st.splice(start, i - start, end, \"overlay \" + style);\n i = start + 2;\n } else {\n for (; start < i; start += 2) {\n var cur = st[start+1];\n st[start+1] = (cur ? cur + \" \" : \"\") + \"overlay \" + style;\n }\n }\n }, lineClasses);\n context.state = state;\n context.baseTokens = null;\n context.baseTokenPos = 1;\n };\n\n for (var o = 0; o < cm.state.overlays.length; ++o) loop( o );\n\n return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null}\n}", "function highlightLine(cm, line, context, forceToEnd) {\n // A styles array always starts with a number identifying the\n // mode/overlays that it is based on (for easy invalidation).\n var st = [cm.state.modeGen], lineClasses = {};\n // Compute the base array of styles\n runMode(cm, line.text, cm.doc.mode, context, function (end, style) { return st.push(end, style); },\n lineClasses, forceToEnd);\n var state = context.state;\n\n // Run overlays, adjust style array.\n var loop = function ( o ) {\n context.baseTokens = st;\n var overlay = cm.state.overlays[o], i = 1, at = 0;\n context.state = true;\n runMode(cm, line.text, overlay.mode, context, function (end, style) {\n var start = i;\n // Ensure there's a token end at the current position, and that i points at it\n while (at < end) {\n var i_end = st[i];\n if (i_end > end)\n { st.splice(i, 1, end, st[i+1], i_end); }\n i += 2;\n at = Math.min(end, i_end);\n }\n if (!style) { return }\n if (overlay.opaque) {\n st.splice(start, i - start, end, \"overlay \" + style);\n i = start + 2;\n } else {\n for (; start < i; start += 2) {\n var cur = st[start+1];\n st[start+1] = (cur ? cur + \" \" : \"\") + \"overlay \" + style;\n }\n }\n }, lineClasses);\n context.state = state;\n context.baseTokens = null;\n context.baseTokenPos = 1;\n };\n\n for (var o = 0; o < cm.state.overlays.length; ++o) loop( o );\n\n return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null}\n}", "function highlightLine(cm, line, context, forceToEnd) {\n // A styles array always starts with a number identifying the\n // mode/overlays that it is based on (for easy invalidation).\n var st = [cm.state.modeGen], lineClasses = {};\n // Compute the base array of styles\n runMode(cm, line.text, cm.doc.mode, context, function (end, style) { return st.push(end, style); },\n lineClasses, forceToEnd);\n var state = context.state;\n\n // Run overlays, adjust style array.\n var loop = function ( o ) {\n context.baseTokens = st;\n var overlay = cm.state.overlays[o], i = 1, at = 0;\n context.state = true;\n runMode(cm, line.text, overlay.mode, context, function (end, style) {\n var start = i;\n // Ensure there's a token end at the current position, and that i points at it\n while (at < end) {\n var i_end = st[i];\n if (i_end > end)\n { st.splice(i, 1, end, st[i+1], i_end); }\n i += 2;\n at = Math.min(end, i_end);\n }\n if (!style) { return }\n if (overlay.opaque) {\n st.splice(start, i - start, end, \"overlay \" + style);\n i = start + 2;\n } else {\n for (; start < i; start += 2) {\n var cur = st[start+1];\n st[start+1] = (cur ? cur + \" \" : \"\") + \"overlay \" + style;\n }\n }\n }, lineClasses);\n context.state = state;\n context.baseTokens = null;\n context.baseTokenPos = 1;\n };\n\n for (var o = 0; o < cm.state.overlays.length; ++o) loop( o );\n\n return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null}\n}", "function highlightLine(cm, line, context, forceToEnd) {\n // A styles array always starts with a number identifying the\n // mode/overlays that it is based on (for easy invalidation).\n var st = [cm.state.modeGen], lineClasses = {};\n // Compute the base array of styles\n runMode(cm, line.text, cm.doc.mode, context, function (end, style) { return st.push(end, style); },\n lineClasses, forceToEnd);\n var state = context.state;\n\n // Run overlays, adjust style array.\n var loop = function ( o ) {\n context.baseTokens = st;\n var overlay = cm.state.overlays[o], i = 1, at = 0;\n context.state = true;\n runMode(cm, line.text, overlay.mode, context, function (end, style) {\n var start = i;\n // Ensure there's a token end at the current position, and that i points at it\n while (at < end) {\n var i_end = st[i];\n if (i_end > end)\n { st.splice(i, 1, end, st[i+1], i_end); }\n i += 2;\n at = Math.min(end, i_end);\n }\n if (!style) { return }\n if (overlay.opaque) {\n st.splice(start, i - start, end, \"overlay \" + style);\n i = start + 2;\n } else {\n for (; start < i; start += 2) {\n var cur = st[start+1];\n st[start+1] = (cur ? cur + \" \" : \"\") + \"overlay \" + style;\n }\n }\n }, lineClasses);\n context.state = state;\n context.baseTokens = null;\n context.baseTokenPos = 1;\n };\n\n for (var o = 0; o < cm.state.overlays.length; ++o) loop( o );\n\n return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null}\n}", "function highlightLine(cm, line, context, forceToEnd) {\n // A styles array always starts with a number identifying the\n // mode/overlays that it is based on (for easy invalidation).\n var st = [cm.state.modeGen], lineClasses = {};\n // Compute the base array of styles\n runMode(cm, line.text, cm.doc.mode, context, function (end, style) { return st.push(end, style); },\n lineClasses, forceToEnd);\n var state = context.state;\n\n // Run overlays, adjust style array.\n var loop = function ( o ) {\n context.baseTokens = st;\n var overlay = cm.state.overlays[o], i = 1, at = 0;\n context.state = true;\n runMode(cm, line.text, overlay.mode, context, function (end, style) {\n var start = i;\n // Ensure there's a token end at the current position, and that i points at it\n while (at < end) {\n var i_end = st[i];\n if (i_end > end)\n { st.splice(i, 1, end, st[i+1], i_end); }\n i += 2;\n at = Math.min(end, i_end);\n }\n if (!style) { return }\n if (overlay.opaque) {\n st.splice(start, i - start, end, \"overlay \" + style);\n i = start + 2;\n } else {\n for (; start < i; start += 2) {\n var cur = st[start+1];\n st[start+1] = (cur ? cur + \" \" : \"\") + \"overlay \" + style;\n }\n }\n }, lineClasses);\n context.state = state;\n context.baseTokens = null;\n context.baseTokenPos = 1;\n };\n\n for (var o = 0; o < cm.state.overlays.length; ++o) loop( o );\n\n return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null}\n}", "function highlightLine(cm, line, context, forceToEnd) {\n // A styles array always starts with a number identifying the\n // mode/overlays that it is based on (for easy invalidation).\n var st = [cm.state.modeGen], lineClasses = {};\n // Compute the base array of styles\n runMode(cm, line.text, cm.doc.mode, context, function (end, style) { return st.push(end, style); },\n lineClasses, forceToEnd);\n var state = context.state;\n\n // Run overlays, adjust style array.\n var loop = function ( o ) {\n context.baseTokens = st;\n var overlay = cm.state.overlays[o], i = 1, at = 0;\n context.state = true;\n runMode(cm, line.text, overlay.mode, context, function (end, style) {\n var start = i;\n // Ensure there's a token end at the current position, and that i points at it\n while (at < end) {\n var i_end = st[i];\n if (i_end > end)\n { st.splice(i, 1, end, st[i+1], i_end); }\n i += 2;\n at = Math.min(end, i_end);\n }\n if (!style) { return }\n if (overlay.opaque) {\n st.splice(start, i - start, end, \"overlay \" + style);\n i = start + 2;\n } else {\n for (; start < i; start += 2) {\n var cur = st[start+1];\n st[start+1] = (cur ? cur + \" \" : \"\") + \"overlay \" + style;\n }\n }\n }, lineClasses);\n context.state = state;\n context.baseTokens = null;\n context.baseTokenPos = 1;\n };\n\n for (var o = 0; o < cm.state.overlays.length; ++o) loop( o );\n\n return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null}\n}", "function highlightLine(cm, line, context, forceToEnd) {\n // A styles array always starts with a number identifying the\n // mode/overlays that it is based on (for easy invalidation).\n var st = [cm.state.modeGen], lineClasses = {};\n // Compute the base array of styles\n runMode(cm, line.text, cm.doc.mode, context, function (end, style) { return st.push(end, style); },\n lineClasses, forceToEnd);\n var state = context.state;\n\n // Run overlays, adjust style array.\n var loop = function ( o ) {\n context.baseTokens = st;\n var overlay = cm.state.overlays[o], i = 1, at = 0;\n context.state = true;\n runMode(cm, line.text, overlay.mode, context, function (end, style) {\n var start = i;\n // Ensure there's a token end at the current position, and that i points at it\n while (at < end) {\n var i_end = st[i];\n if (i_end > end)\n { st.splice(i, 1, end, st[i+1], i_end); }\n i += 2;\n at = Math.min(end, i_end);\n }\n if (!style) { return }\n if (overlay.opaque) {\n st.splice(start, i - start, end, \"overlay \" + style);\n i = start + 2;\n } else {\n for (; start < i; start += 2) {\n var cur = st[start+1];\n st[start+1] = (cur ? cur + \" \" : \"\") + \"overlay \" + style;\n }\n }\n }, lineClasses);\n context.state = state;\n context.baseTokens = null;\n context.baseTokenPos = 1;\n };\n\n for (var o = 0; o < cm.state.overlays.length; ++o) loop( o );\n\n return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null}\n}", "function highlightLine(cm, line, context, forceToEnd) {\r\n // A styles array always starts with a number identifying the\r\n // mode/overlays that it is based on (for easy invalidation).\r\n var st = [cm.state.modeGen], lineClasses = {};\r\n // Compute the base array of styles\r\n runMode(cm, line.text, cm.doc.mode, context, function (end, style) { return st.push(end, style); },\r\n lineClasses, forceToEnd);\r\n var state = context.state;\r\n\r\n // Run overlays, adjust style array.\r\n var loop = function ( o ) {\r\n context.baseTokens = st;\r\n var overlay = cm.state.overlays[o], i = 1, at = 0;\r\n context.state = true;\r\n runMode(cm, line.text, overlay.mode, context, function (end, style) {\r\n var start = i;\r\n // Ensure there's a token end at the current position, and that i points at it\r\n while (at < end) {\r\n var i_end = st[i];\r\n if (i_end > end)\r\n { st.splice(i, 1, end, st[i+1], i_end); }\r\n i += 2;\r\n at = Math.min(end, i_end);\r\n }\r\n if (!style) { return }\r\n if (overlay.opaque) {\r\n st.splice(start, i - start, end, \"overlay \" + style);\r\n i = start + 2;\r\n } else {\r\n for (; start < i; start += 2) {\r\n var cur = st[start+1];\r\n st[start+1] = (cur ? cur + \" \" : \"\") + \"overlay \" + style;\r\n }\r\n }\r\n }, lineClasses);\r\n context.state = state;\r\n context.baseTokens = null;\r\n context.baseTokenPos = 1;\r\n };\r\n\r\n for (var o = 0; o < cm.state.overlays.length; ++o) loop( o );\r\n\r\n return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null}\r\n}", "function parseSingleLineFrame( frame ) {\n if (multiNode) {\n return swapWhitespace(frame.split('\\n'));\n } else {\n return padString(frame);\n }\n }", "function unshiftContext(context) {\n this.contexts.unshift(context);\n this.setContext(context);\n}", "function xfmtLineInfo(inlineContext) /* (inlineContext : inlineContext) -> ((context : inlineContext, lineInfo : string) -> string) */ {\n return inlineContext.xfmtLineInfo;\n}", "function nextContext(level){if(level===void 0){level=1;}return nextContextImpl(level);}", "function LineBasicPass() {\n _super.call(this);\n }", "function updateDrawingLineOfAPeer(oldLineObj, newLineObj) {\n oldLineObj.set({\n x2: (newLineObj.x1 < 0) ? newLineObj.left + newLineObj.width : newLineObj.left ,\n y2: (newLineObj.y1 < 0) ? newLineObj.top + newLineObj.height : newLineObj.top\n });\n}", "function drawFLIframe() {\n var i, j, x, y, c, n, idx;\n var skip, chng, size, red, green, blue;\n var linepos, startline, numlines, start, pak, word, wordt, lastp, p1, p2;\n\n // setup timer for next frame\n if (FLIframeNum <= FLIhead.frames) {\n FLItimer = window.setTimeout(drawFLIframe, FLIpause);\n }\n else {\n // last frame, so prepare stop\n //playOrStop();\n }\n\n // draw frame\n var framePos = FLIfile.getPos();\n var frameChunk = FLIfile.read('fli_frame');\n\n if (frameChunk.type == 0xF1FA) {\n // loop thru all chunks in a frame\n for (c=0; c < frameChunk.chunks; c++) {\n var dataPos = FLIfile.getPos();\n var dataChunk = FLIfile.read('fli_data');\n\n //alert('f=' + FLIframeNum + ' chunk: '+ outSource(dataChunk) ); // TEST\n\n switch (dataChunk.type) {\n case 4: // FLI_COLOR256 - 256-level color palette info\n case 11: // FLI_COLOR - 64-level color palette info\n //alert('f=' + FLIframeNum + ' chunk: '+ outSource(dataChunk) ); // TEST\n idx = 0;\n n = FLIfile.read('int16');\n for (i=0; i < n; i++) {\n skip = FLIfile.read('uint8');\n chng = FLIfile.read('uint8');\n idx += skip;\n if (chng == 0) { chng = 256; }\n for (j=0; j < chng; j++) {\n red = FLIfile.read('uint8');\n green = FLIfile.read('uint8');\n blue = FLIfile.read('uint8');\n if (dataChunk.type == 4) {\n FLI_R[idx] = red;\n FLI_G[idx] = green;\n FLI_B[idx] = blue;\n }\n else {\n FLI_R[idx] = (red << 2) & 0xff;\n FLI_G[idx] = (green << 2) & 0xff;\n FLI_B[idx] = (blue << 2) & 0xff;\n }\n idx++;\n }\n }\n drawPalette(); // TEST\n break;\n\n case 7: // FLI_SS2 - Word-oriented delta compression (FLC)\n //alert('f=' + FLIframeNum + ' chunk: '+ outSource(dataChunk) ); // TEST\n\n linepos = 0;\n pak = 0;\n numlines = FLIfile.read('int16');\n for (y=0; y < numlines; y++) {\n do {\n word = FLIfile.read('uint16');\n wordt = (word & 0xC000);\n switch (wordt) {\n case 0: pak = word; break;\n case 0x8000: lastp = (word & 0xFF); break;\n case 0xC000: linepos += ((0x10000 - word) * FLIhead.width); break;\n }\n } while (wordt != 0);\n x = 0;\n for (i=0; i < pak; i++) {\n skip = FLIfile.read('uint8');\n size = FLIfile.read('int8');\n x += skip;\n if (size < 0) {\n size = -size;\n p1 = FLIfile.read('uint8');\n p2 = FLIfile.read('uint8');\n for (j=0; j < size; j++) {\n FLIi.data[linepos + x] = p1;\n FLIi.data[linepos + x + 1] = p2;\n x += 2;\n }\n }\n else {\n for (j=0; j < size; j++) {\n p1 = FLIfile.read('uint8');\n p2 = FLIfile.read('uint8');\n FLIi.data[linepos + x] = p1;\n FLIi.data[linepos + x + 1] = p2;\n x += 2;\n }\n }\n }\n linepos += FLIhead.width;\n }\n break;\n\n case 12: // FLI_LC - Byte-oriented delta compression\n\n startline = FLIfile.read('int16');\n numlines = FLIfile.read('uint8');\n linepos = startline * FLIhead.width;\n start = FLIfile.read('uint8');\n for (y=0; y < numlines; y++) {\n pak = FLIfile.read('uint8');\n x = start;\n for (i=0; i < pak; i++) {\n skip = FLIfile.read('uint8');\n size = FLIfile.read('int8');\n x += skip;\n if (size < 0) {\n size = -size;\n n = FLIfile.read('uint8');\n for (j=0; j < size; j++) {\n FLIi.data[linepos + x] = n;\n x++;\n }\n }\n else {\n for (j=0; j < size; j++) {\n FLIi.data[linepos + x] = FLIfile.read('uint8');\n x++;\n }\n }\n }\n linepos += FLIhead.width;\n }\n break;\n\n case 13: // FLI_BLACK - Entire frame is color index 0\n\n //alert('f=' + FLIframeNum + ' (FLI_BLACK) chunk: '+ outSource(dataChunk) ); // TEST\n for (i=0; i < FLIi.data.length; i++) {\n FLIi.data[i] = 0;\n }\n break;\n\n case 15: // FLI_BRUN - Byte run length compression\n\n linepos = 0;\n for (y=0; y < FLIhead.height; y++) {\n FLIfile.read('int8'); // first byte ignored\n var x=0;\n while (x < FLIhead.width) {\n size = FLIfile.read('int8'); // does 'byte' return correct value?\n if (size < 0) {\n size = -size;\n for (i=0; i < size; i++) {\n FLIi.data[linepos + x] = FLIfile.read('uint8');\n x++;\n }\n }\n else {\n n = FLIfile.read('uint8');\n for (i=0; i < size; i++) {\n FLIi.data[linepos + x] = n;\n x++;\n }\n }\n }\n linepos += FLIhead.width;\n }\n break;\n\n case 16: // TODO: FLI_COPY - No compression\n\n //alert('f=' + FLIframeNum + ' (FLI_COPY) chunk: '+ outSource(dataChunk) ); // TEST\n break;\n\n case 18: // FLI_PSTAMP - Postage stamp sized image (SKIP)\n\n //alert('f=' + FLIframeNum + ' (FLI_PSTAMP) chunk: '+ outSource(dataChunk) ); // TEST\n break;\n\n default: // Unknown\n //alert('f=' + FLIframeNum + ' ('+ dataChunk.type +') chunk: '+ outSource(dataChunk) ); // TEST\n }\n FLIfile.seek(dataPos + dataChunk.size);\n } // next c\n }\n else {\n // Unknown frame chunk type\n //alert('unknown frame type: '+ outSource(frameChunk) ); // TEST\n }\n FLIfile.seek(framePos + frameChunk.size);\n\n document.getElementById('FLIcount').innerHTML = FLIframeNum + '/' + FLIhead.frames;\n FLIframeNum++;\n\n if (FLIframeNum > FLIhead.frames) {\n //alert('done'); // TEST\n // start again from first frame\n FLIframeNum = 1;\n FLIfile.seek(FLIframe1pos);\n }\n\n // draw the image to canvas context\n updateCanvas();\n\n } // end drawFLIframe()" ]
[ "0.82374823", "0.8233265", "0.82141066", "0.6985989", "0.5921603", "0.5921603", "0.5636513", "0.5630872", "0.5587357", "0.5587357", "0.5587357", "0.5587357", "0.5530777", "0.55008274", "0.545962", "0.5453713", "0.5444654", "0.5444654", "0.5444654", "0.5444654", "0.5444654", "0.5444654", "0.5444654", "0.5444654", "0.5444654", "0.5444654", "0.54416287", "0.5398791", "0.5392624", "0.5374434", "0.53541183", "0.5353404", "0.53310406", "0.5286737", "0.5282442", "0.52359855", "0.5193031", "0.5134661", "0.5131435", "0.5129425", "0.5120959", "0.5103616", "0.50796294", "0.50731546", "0.5064996", "0.5052443", "0.5049857", "0.5048176", "0.50462574", "0.50354964", "0.5015201", "0.50107557", "0.4985333", "0.4963442", "0.49369085", "0.49351224", "0.49295816", "0.49282497", "0.49258322", "0.48898226", "0.48891634", "0.48891634", "0.48717445", "0.48713169", "0.48646837", "0.48616302", "0.4861372", "0.48602846", "0.48550993", "0.48495063", "0.48379946", "0.48373142", "0.48270443", "0.48252222", "0.48231676", "0.48219588", "0.4816461", "0.4811321", "0.48083815", "0.47993615", "0.47930998", "0.478646", "0.4780648", "0.47607565", "0.47607565", "0.47607565", "0.47607565", "0.47607565", "0.47607565", "0.47607565", "0.47607565", "0.47607565", "0.47594044", "0.47587666", "0.47579888", "0.47569484", "0.47562864", "0.47460252", "0.47432804", "0.4740231" ]
0.8136935
3
Strip the query string and fragment off of a given URL or path (if present)
function stripUrlQueryAndFragment(urlPath) { // eslint-disable-next-line no-useless-escape return urlPath.split(/[\?#]/, 1)[0]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function stripUrlQueryAndFragment(urlPath) {\n\t // eslint-disable-next-line no-useless-escape\n\t return urlPath.split(/[\\?#]/, 1)[0];\n\t}", "function stripUrlQueryAndFragment(urlPath) {\n // eslint-disable-next-line no-useless-escape\n return urlPath.split(/[\\?#]/, 1)[0];\n }", "function stripUrlQueryAndFragment(urlPath) {\n // eslint-disable-next-line no-useless-escape\n return urlPath.split(/[\\?#]/, 1)[0];\n}", "function stripUrlParams(url, paramsToStrip){\n var urlSplit = url.match(/^([\\w\\.]*\\??)([\\w\\W]*)$/);\n var urlHead = urlSplit[1];\n var queries = urlSplit[2];\n if (queries === \"\") return urlHead;\n if (typeof paramsToStrip === \"undefined\") {\n queries = queries.split(\"&\").uniqueQuery().join(\"&\");\n } else {\n queries = queries.split(\"&\").uniqueQuery(paramsToStrip).join(\"&\");\n }\n return urlHead + queries;\n}", "function stripUrl(url) {\n\t\"use strict\";\n\tif (url.indexOf('?') !== -1 || url.indexOf('//') !== -1 || url.indexOf(';') !== -1) {\n\t\t// remove parameters\n\t\tif (url.indexOf('?') !== -1) {\n\t\t\turl = url.split('?')[0];\n\t\t}\n\t\tif (url.indexOf(';') !== -1) {\n\t\t\turl = url.split(';')[0];\n\t\t}\n\t\t// remove protocol & host (server) name\n\t\tif (url.indexOf('//') !== -1) {\n\t\t\turl = url.replace(location.protocol + '//' + location.host, '').trim();\n\t\t}\n\t}\n\treturn url;\n}", "removeQuery(url) {\n return url ? url.replace(/\\?.*$/, '') : '';\n }", "function extractQuerystring(url) {\n var queryStart = url.indexOf('?');\n if (!queryStart) {\n return '';\n }\n var fragmentStart = url.indexOf('#', queryStart);\n return url.substring(queryStart, fragmentStart > 0 ? fragmentStart : undefined);\n}", "function extractQuerystring(url) {\n var queryStart = url.indexOf('?');\n if (!queryStart) {\n return '';\n }\n var fragmentStart = url.indexOf('#', queryStart);\n return url.substring(queryStart, fragmentStart > 0 ? fragmentStart : undefined);\n}", "function extractQuerystring(url) {\n var queryStart = url.indexOf('?');\n if (!queryStart) {\n return '';\n }\n var fragmentStart = url.indexOf('#', queryStart);\n return url.substring(queryStart, fragmentStart > 0 ? fragmentStart : undefined);\n}", "function extractQuerystring(url) {\n var queryStart = url.indexOf('?');\n if (!queryStart) {\n return '';\n }\n var fragmentStart = url.indexOf('#', queryStart);\n return url.substring(queryStart, fragmentStart > 0 ? fragmentStart : undefined);\n}", "function extractQuerystring(url) {\n var queryStart = url.indexOf('?');\n if (!queryStart) {\n return '';\n }\n var fragmentStart = url.indexOf('#', queryStart);\n return url.substring(queryStart, fragmentStart > 0 ? fragmentStart : undefined);\n}", "function stripHash(location) {\n return location.href.replace(/#.*/, '')\n}", "function stripHash(location) {\n return location.href.replace(/#.*/, '')\n}", "function stripHash(location) {\n return location.href.replace(/#.*/, '')\n}", "function extractQuerystring(url) {\r\n var queryStart = url.indexOf('?');\r\n if (!queryStart) {\r\n return '';\r\n }\r\n var fragmentStart = url.indexOf('#', queryStart);\r\n return url.substring(queryStart, fragmentStart > 0 ? fragmentStart : undefined);\r\n}", "function removePath(url) {\r\n var arr = url.split('?');\r\n arr.pop();\r\n return( arr.join('/') );\r\n}", "function extractQuerystring(url) {\r\n const queryStart = url.indexOf('?');\r\n if (!queryStart) {\r\n return '';\r\n }\r\n const fragmentStart = url.indexOf('#', queryStart);\r\n return url.substring(queryStart, fragmentStart > 0 ? fragmentStart : undefined);\r\n}", "function stripHash(location) {\n return location.href.replace(/#.*/, '');\n }", "getFragment() {\n return this.clearSlashes(decodeURI(window.location.pathname + window.location.search)).replace(/\\?(.*)$/, '');\n }", "function stripHash(location) {\n return location.href.replace(/#.*/, '')\n }", "function maskQueryStringInURL(url) {\n url = url || '';\n return url.replace(/\\?.*?$/, '');\n}", "function get_querystring( url ) {\n return url.replace( /(?:^[^?#]*\\?([^#]*).*$)?.*/, '$1' );\n }", "function urlPathQuery() {\n var hashSlash = location.href.indexOf(hashSlashString);\n\n var pathQuery;\n\n if (hashSlash > -1) {\n pathQuery = location.href.slice(hashSlash + hashSlashString.length);\n }\n else if (isHashMode()) {\n pathQuery = '/';\n }\n else {\n pathQuery = (location.pathname + location.search).slice(1);\n }\n\n return util.normalizePathQuery(pathQuery);\n }", "function pff_removeURLParams( urlTmp ){\n\tvar firstQuesMark = urlTmp.indexOf('?');\n\t// On essai de retirer tous les param�tres URL \n\tif(firstQuesMark != -1){\n var tmp = urlTmp.substring(0,firstQuesMark );\n return tmp;\n\t}\n\treturn urlTmp;\n}", "function stripHash(url) {\n return /^[^#]*/.exec(url)[0];\n}", "function stripInternalParams(url) {\n url.search = url.search.replace(/([?&])(_pjax|_)=[^&]*/g, '')\n return url.href.replace(/\\?($|#)/, '$1')\n}", "function stripInternalParams(url) {\n url.search = url.search.replace(/([?&])(_pjax|_)=[^&]*/g, '')\n return url.href.replace(/\\?($|#)/, '$1')\n}", "function stripInternalParams(url) {\n url.search = url.search.replace(/([?&])(_pjax|_)=[^&]*/g, '')\n return url.href.replace(/\\?($|#)/, '$1')\n }", "function stripRequest(request) {\n const url = new URL(request.url);\n if (url.hash || url.search) {\n url.hash = '';\n url.search = '';\n return new Request(url.toString())\n } else {\n return request\n }\n}", "function stripInternalParams(url) {\n url.search = url.search.replace(/([?&])(_pjax|_)=[^&]*/g, '').replace(/^&/, '');\n return url.href.replace(/\\?($|#)/, '$1');\n }", "function stripUrl(url) {\n // Remove scheme\n if (url.indexOf('//') === 0) {\n url = url.substring(2);\n }\n else {\n var index = url.indexOf('://');\n if (index > -1) {\n var scheme = url.substring(0, index + 3);\n // If scheme is not http or https, discard the url\n if (scheme !== 'http://' && scheme !== 'https://') {\n return null;\n }\n url = url.substring(index + 3);\n }\n }\n\n // Remove query params except\n var delimiters = [';', '#', ':', '?'];\n delimiters.forEach(function (del) {\n var index = url.indexOf(del);\n if (index > -1) {\n url = url.substring(0, index);\n }\n });\n\n var length = url.length;\n // Remove trailing slash\n if (url.charAt(length - 1) === '/') {\n url = url.substring(0, url.length - 1);\n }\n\n //Check filetypes .css, .js and media file extensions.\n for (var f = 0; f < amtFormats; f++) {\n if (url.endsWith(mediaFormats[f])) {\n return null;\n }\n }\n\n // Remove www\n var www = url.indexOf('www.');\n if (www === 0) {\n url = url.substring(4);\n }\n\n return url;\n}", "function stripFragment(s) {\n var hashIndex = s.indexOf('#');\n return (hashIndex !== -1 ? s.substring(0, hashIndex) : s);\n }", "static _removeQueryParams(link) {\n const regexResult = link.match(/(.*\\.[a-zA-Z]{3,4})($|\\?|#)+/);\n if (regexResult !== null && regexResult.length > 1) {\n let matchWithLink = regexResult[1];\n if (/[\\\\?#&]+/.test(matchWithLink)) {\n throw Error('Link does not match');\n } else {\n return matchWithLink;\n }\n } else {\n throw Error('Link does not match');\n }\n }", "static _removeQueryParams(link) {\n const regexResult = link.match(/(.*\\.[a-zA-Z]{3,4})($|\\?|#)+/);\n if (regexResult !== null && regexResult.length > 1) {\n let matchWithLink = regexResult[1];\n if (/[\\\\?#&]+/.test(matchWithLink)) {\n throw Error('Link does not match');\n } else {\n return matchWithLink;\n }\n } else {\n throw Error('Link does not match');\n }\n }", "function removeQS(url, parameter) {\n //prefer to use l.search if you have a location/link object\n var urlparts = url.split('?'); \n if (urlparts.length >= 2) {\n\n var prefix = encodeURIComponent(parameter)+'=';\n var pars = urlparts[1].split(/[&;]/g);\n //reverse iteration as may be destructive\n for (var i = pars.length; i-- > 0;) { \n //idiom for string.startsWith\n if (pars[i].lastIndexOf(prefix, 0) !== -1) { \n pars.splice(i, 1);\n }\n }\n url = urlparts[0]+'?'+pars.join('&');\n return url;\n } else {\n return url;\n }\n}", "function stripUrlParams(url, paramsToStrip) {\n var params = {};\n paramsToStrip = paramsToStrip || [];\n\n return url.replace(/((\\?)|&)([^=])+=([^&]+)/g, function (match, qe, q, name, value) {\n if (params[name] || paramsToStrip.indexOf(name) >= 0) {\n return q || '';\n }\n\n params[name] = value;\n return match;\n });\n}", "function normalizeUrlFragment(url) {\n if (!url) {\n return '/';\n }\n if (url.slice(0, 1) !== '/') {\n url = '/' + url;\n }\n if (url.slice(url.length - 1, 1) !== '/') {\n url += '/';\n }\n return url;\n}", "function remove_hash_from_url() {\n var uri = window.location.toString();\n\n if (uri.indexOf(\"#\") > 0) {\n var clean_uri = uri.substring(0, uri.indexOf(\"#\"));\n\n window.history.replaceState({}, document.title, clean_uri);\n }\n}", "function trimReferrer(args) {\n var referrerInput = args.formElement.querySelector(\"#referrer\");\n var withoutQueryParams = referrerInput.value.split(\"?\")[0];\n referrerInput.value = withoutQueryParams;\n}", "function refineUrl()\n{\n //get full url\n var url = window.location.href;\n //get url after/ \n var value = url = url.slice( 0, url.indexOf('?') );\n //get the part after before ?\n value = value.replace('@System.Web.Configuration.WebConfigurationManager.AppSettings[\"BaseURL\"]',''); \n return value; \n}", "function urlWithoutQueryString(loc) {\n\tloc = loc || self.location;\n\treturn loc.protocol + \"//\" + loc.host + loc.pathname\n}", "static cleanUrl(url) {\n return url.split(\"#\")[0];\n }", "function stripUrlParams(url, paramsToStrip){\n\n var arr = url.split(\"?\");\n\n if (arr[1]) {\n var params = arr[1].split(\"&\");\n\n //if there was params to remove then remove them\n if (paramsToStrip) {\n var paramsToStripObj = {};\n paramsToStrip.forEach(function (item) {\n paramsToStripObj[item] = true;\n });\n var filteredParamsOnce = params.filter(function (item) {\n if (!paramsToStripObj[item[0]]) {\n return item;\n }\n });\n params = filteredParamsOnce;\n }\n\n //now loop through and remove the duplicates\n var seen = {};\n var remDups = params.filter(function (item,i) {\n if (!seen[item[0]]) {\n seen[item[0]] = true;\n return item;\n }\n }).join(\"&\");\n\n return arr[0] + \"?\" + remDups;\n }\n\n return url;\n}", "function stripTrailingSlash(url) {\n var match = url.match(/#|\\?|$/);\n var pathEndIdx = match && match.index || url.length;\n var droppedSlashIdx = pathEndIdx - (url[pathEndIdx - 1] === '/' ? 1 : 0);\n return url.slice(0, droppedSlashIdx) + url.slice(pathEndIdx);\n }", "function strip(url) {\n return url.replace(/(\\?|&)?forcedownload=\\d/g, \"\");\n }", "function pathWithoutQueryParams(currentRoute) {\n const path = currentRoute.path.split('?');\n return path[0]\n }", "function clearQueryString() { // jshint ignore:line\n const newurl = window.location.protocol + \"//\" + window.location.host + window.location.pathname;\n window.history.pushState && window.history.pushState({\n path: newurl\n }, \"\", newurl);\n }", "function clearUrlQuery() {\n if (window.location.search && window.history && window.history.pushState) {\n window.history.pushState({}, document.title, window.location.pathname);\n }\n}", "function stripURL(str){\n\tstr = str.replace('http://paizo.com/pathfinderRPG/prd/', '');\n\treturn str.slice(0, str.indexOf('.html'));\n}", "function remove_query_arg(key, sourceURL) {\r\n\r\n var rtn = sourceURL.split(\"?\")[0],\r\n param,\r\n params_arr = [],\r\n queryString = (sourceURL.indexOf(\"?\") !== -1) ? sourceURL.split(\"?\")[1] : \"\";\r\n\r\n if (queryString !== \"\") {\r\n params_arr = queryString.split(\"&\");\r\n for (var i = params_arr.length - 1; i >= 0; i -= 1) {\r\n param = params_arr[i].split(\"=\")[0];\r\n if (param === key) {\r\n params_arr.splice(i, 1);\r\n }\r\n }\r\n\r\n rtn = rtn + \"?\" + params_arr.join(\"&\");\r\n\r\n }\r\n\r\n if (rtn.split(\"?\")[1] == \"\") {\r\n rtn = rtn.split(\"?\")[0];\r\n }\r\n\r\n return rtn;\r\n }", "function stripTrailingSlash(url) {\n var match = url.match(/#|\\?|$/);\n var pathEndIdx = match && match.index || url.length;\n var droppedSlashIdx = pathEndIdx - (url[pathEndIdx - 1] === '/' ? 1 : 0);\n return url.slice(0, droppedSlashIdx) + url.slice(pathEndIdx);\n}", "function removeParamInUrl(url, param){\n var indexOfParam = url.indexOf(\"?\" + param);\n indexOfParam = indexOfParam == -1? url.indexOf(\"&\" + param): indexOfParam;\n var indexOfAndSign = url.indexOf(\"&\", indexOfParam + 1);\n var urlBeforeParam = url.substr(0, indexOfParam);\n var urlAfterParamValue = indexOfAndSign == -1? \"\": url.substr(indexOfAndSign);\n return urlBeforeParam + urlAfterParamValue;\n}", "function stripTrailingSlash(url) {\n const match = url.match(/#|\\?|$/);\n const pathEndIdx = match && match.index || url.length;\n const droppedSlashIdx = pathEndIdx - (url[pathEndIdx - 1] === '/' ? 1 : 0);\n return url.slice(0, droppedSlashIdx) + url.slice(pathEndIdx);\n}", "function stripTrailingSlash(url) {\n const match = url.match(/#|\\?|$/);\n const pathEndIdx = match && match.index || url.length;\n const droppedSlashIdx = pathEndIdx - (url[pathEndIdx - 1] === '/' ? 1 : 0);\n return url.slice(0, droppedSlashIdx) + url.slice(pathEndIdx);\n}", "function stripTrailingSlash(url) {\n const match = url.match(/#|\\?|$/);\n const pathEndIdx = match && match.index || url.length;\n const droppedSlashIdx = pathEndIdx - (url[pathEndIdx - 1] === '/' ? 1 : 0);\n return url.slice(0, droppedSlashIdx) + url.slice(pathEndIdx);\n}", "function stripTrailingSlash(url) {\n const match = url.match(/#|\\?|$/);\n const pathEndIdx = match && match.index || url.length;\n const droppedSlashIdx = pathEndIdx - (url[pathEndIdx - 1] === '/' ? 1 : 0);\n return url.slice(0, droppedSlashIdx) + url.slice(pathEndIdx);\n}", "function stripTrailingSlash(url) {\n const match = url.match(/#|\\?|$/);\n const pathEndIdx = match && match.index || url.length;\n const droppedSlashIdx = pathEndIdx - (url[pathEndIdx - 1] === '/' ? 1 : 0);\n return url.slice(0, droppedSlashIdx) + url.slice(pathEndIdx);\n}", "function stripTrailingSlash(url) {\n const match = url.match(/#|\\?|$/);\n const pathEndIdx = match && match.index || url.length;\n const droppedSlashIdx = pathEndIdx - (url[pathEndIdx - 1] === '/' ? 1 : 0);\n return url.slice(0, droppedSlashIdx) + url.slice(pathEndIdx);\n}", "function jq_deparam_sub( is_fragment, url_or_params, coerce ) {\n if ( url_or_params === undefined || typeof url_or_params === 'boolean' ) {\n // url_or_params not specified.\n coerce = url_or_params;\n url_or_params = jq_param[ is_fragment ? str_fragment : str_querystring ]();\n } else {\n url_or_params = is_string( url_or_params )\n ? url_or_params.replace( is_fragment ? re_params_fragment : re_params_querystring, '' )\n : url_or_params;\n }\n \n return jq_deparam( url_or_params, coerce );\n }", "function get_fragment( url ) {\nurl = url || location.href;\nreturn '#' + url.replace( /^[^#]*#?(.*)$/, '$1' );\n}", "function stripSlash(url) {\n return url.replace(/\\/$/, '');\n}", "function stripSlash(url) {\n return url.replace(/\\/$/, '');\n}", "function stripHash(href) {\n return href.replace(/#.*/, '');\n }", "function stripHash(href) {\n return href.replace(/#.*/, '');\n }", "function get_fragment( url ) {\n url = url || location.href;\n return '#' + url.replace( /^[^#]*#?(.*)$/, '$1' );\n }", "function get_fragment( url ) {\n url = url || location.href;\n return '#' + url.replace( /^[^#]*#?(.*)$/, '$1' );\n }", "function get_fragment( url ) {\n url = url || location.href;\n return '#' + url.replace( /^[^#]*#?(.*)$/, '$1' );\n }", "function cleanURL(url) {\n\t\t\tvar url_hash = window.location.hash;\n\t\t\tvar hash_regexp = new RegExp(\"STS=\", \"i\");\n\t\t\tvar match_results = url_hash.match(hash_regexp); // elements 1,3\n\t\t\tif( match_results != null ) {\n\t\t\t\tvar url_arr = url.split('#');\n\t\t\t\treturn url_arr[0];\n\t\t\t} else {\n\t\t\t\treturn url;\n\t\t\t}\n\t\t}", "get queryString(){\n\t\tconst qm = this._href.lastIndexOf('?');\n\t\tif(qm < 0){\n\t\t\treturn '';\n\t\t}\n\t\treturn this._href.substring(qm);\n\t}", "function getOmniSplitUrl() {\n var URL = window.location.href;\n var splitURL = URL.split(window.location.protocol + \"//\")[1].split(\"#\")[0].split(\"?\")[0].split(\"/\");\n for (i = 0; i < splitURL.length; i++) {\n if (splitURL[i] === \"\") {\n splitURL.pop();\n }\n }\n return splitURL;\n}", "trim (url) {\n const updated = url.replace(/(.)*github.com\\/[a-zA-Z-]*\\/[a-zA-Z-]*/g, '');\n if (updated.length > 1) return updated.substring(1); // Get rid of starting `/`\n return updated;\n }", "function removeUrlAnchor(url){\n return url.split('#')[0];\n}", "function searchParamsOrEmpty(url) {\r\n if (!(url === null || url === void 0 ? void 0 : url.includes('?'))) {\r\n return {};\r\n }\r\n const [_, ...rest] = url.split('?');\r\n return (0,_firebase_util__WEBPACK_IMPORTED_MODULE_1__.querystringDecode)(rest.join('?'));\r\n}", "function get_fragment( url ) {\n url = url || loc.href;\n return url.replace( /^[^#]*#?(.*)$/, '$1' );\n }", "function removeQueryParameter(_url, parameter) {\n const parsed = url.parse(_url, true, true)\n\n if (parameter in parsed.query) {\n delete parsed.search\n delete parsed.query[parameter]\n }\n\n return url.format(parsed)\n}", "function decodeURL(url) {\n\t// First, delete the unnecessary url\n\tvar questionIndex = url.indexOf(\"?\");\n\turl = url.substring(questionIndex + 1, url.length);\n\turl = decodeURIComponent(url);\n\n\t// Then, remove the other unnecessary comments\n\tvar bracketSubstringIndex = url.indexOf(\"{\");\n\treturn url.substring(bracketSubstringIndex, url.length);\n}", "function get_fragment(url) {\n url = url || location.href;\n return '#' + url.replace(/^[^#]*#?(.*)$/, '$1');\n }", "function get_fragment(url) {\n url = url || location.href;\n return '#' + url.replace(/^[^#]*#?(.*)$/, '$1');\n }", "removeAllURLQueryString() {\n delete this.urlObj.search;\n }", "function get_fragment( url ) {\n return url.replace( re_fragment, '$2' );\n }", "function getURLSearch() {\n return window.location.search.substring(1);\n}", "function cleanHash(hash) {\n if(!hash) {\n hash = window.location.hash;\n }\n return hash.replace(/^#/, '');\n }", "_getPathFromUrl () {\n return window.location.toString().split(/[?#]/)[0]\n }", "function cleanURL(url){\r\n if(typeof(url) == \"undefined\") return \"undefined\";\r\n \r\n url = url.replace(\"http://\", \"\");\r\n url = url.replace(\"https://\", \"\");\r\n url = url.substring(0, url.indexOf('/'));\r\n \r\n return url;\r\n}", "clearQueryString () {\n window.history.replaceState({}, null, this._getPathFromUrl())\n }", "function removeUrlAnchor(url){\n if (url.includes('#')) {\n let place = url.indexOf('#');\n return url.slice(0, place);\n } else {\n return url \n }\n}", "function noSWParam(url) {\n const url2 = new URL(url);\n if (url2.searchParams.has(CACHE_SEARCH_PARAM)) {\n url2.searchParams.delete(CACHE_SEARCH_PARAM);\n return url2.href;\n }\n return url;\n}", "function removeURLParameter(url, parameter) { //prefer to use l.search if you have a location/link object\n var urlparts = url.split('?');\n if (urlparts.length >= 2) {\n\n var prefix = encodeURIComponent(parameter) + '=';\n var pars = urlparts[1].split(/[&;]/g);\n\n //reverse iteration as may be destructive\n for (var i = pars.length; i-- > 0; ) {\n //idiom for string.startsWith\n if (pars[i].lastIndexOf(prefix, 0) !== -1) {\n pars.splice(i, 1);\n }\n }\n url = urlparts[0] + (pars.length > 0 ? '?' + pars.join('&') : \"\");\n return url;\n } else {\n return url;\n }\n}", "function removeUrlAnchor(url) {\n return url.replace(/#.+/, \"\");\n}", "function stripScheme(s) {\n return (s.match(/^.*?:\\/\\//) ? s.substring(s.indexOf('://')+3) : s);\n }", "function stripScheme(s) {\n return (s.match(/^.*?:\\/\\//) ? s.substring(s.indexOf('://')+3) : s);\n }", "function truncUrlFromParameter(page,param) {\r\n if (page.indexOf(\"?\"+param+\"=\") > 0) {\r\n page=page.substring(0,page.indexOf(\"?\"+param+\"=\"));\r\n } else if (page.indexOf(\"&\"+param+\"=\") > 0) {\r\n page=page.substring(0,page.indexOf(\"&\"+param+\"=\"));\r\n }\r\n return page;\r\n}", "function cleanURL() {\n return new Promise(function (resolve, reject) {\n let nurl = '';\n if (window.location.hash) {\n nurl = window.location.href.substr(0, window.location.href.indexOf('#'));\n }\n nurl = nurl.substr(0, window.location.href.indexOf('?'));\n history.pushState('', document.title, nurl);\n resolve();\n });\n}", "function cleanUrl (url) {\r\n // trim leading and trailing spaces, but not spaces inside the url\r\n url = leaflet__WEBPACK_IMPORTED_MODULE_0__[\"Util\"].trim(url);\r\n\r\n // add a trailing slash to the url if the user omitted it\r\n if (url[url.length - 1] !== '/') {\r\n url += '/';\r\n }\r\n\r\n return url;\r\n}", "function m(e){return e.href.replace(/#.*/,\"\")}", "function removeFeedPath(path) {\n var url = '';\n if (path === '/') {\n return '';\n }\n\n path = path.split('/');\n\n _.forEach(path, function(part) {\n if(part !== 'feed' && part !== '') {\n url += part + '/';\n }\n });\n\n return url;\n}", "function QueryString() {\n var query_string = {};\n var query = window.location.search.substring(1);\n return query;\n}", "function QueryString() {\n var query_string = {};\n var query = window.location.search.substring(1);\n return query;\n}", "function d(e){return e.search=e.search.replace(/([?&])(_pjax|_)=[^&]*/g,\"\").replace(/^&/,\"\"),e.href.replace(/\\?($|#)/,\"$1\")}" ]
[ "0.8455415", "0.8417088", "0.8340946", "0.72635466", "0.71312344", "0.69702166", "0.68006474", "0.68006474", "0.68006474", "0.68006474", "0.68006474", "0.6800232", "0.6800232", "0.6800232", "0.67821944", "0.67208296", "0.6709695", "0.6693062", "0.66851175", "0.6646686", "0.6511243", "0.6387359", "0.6377236", "0.6340858", "0.6265421", "0.6215436", "0.6215436", "0.62080956", "0.619778", "0.6191776", "0.61731917", "0.61588573", "0.60979736", "0.60979736", "0.6094783", "0.6054657", "0.60430706", "0.6040987", "0.603405", "0.6029157", "0.6014413", "0.5996788", "0.5994048", "0.59880775", "0.5956551", "0.5949104", "0.5943466", "0.5939826", "0.59116596", "0.5909747", "0.58654124", "0.58496565", "0.5844793", "0.5844793", "0.5844793", "0.5844793", "0.5844793", "0.5835173", "0.58316994", "0.58293337", "0.5808124", "0.5808124", "0.57955295", "0.57955295", "0.5794861", "0.5794861", "0.5794861", "0.5793116", "0.5773539", "0.57644135", "0.5759353", "0.5745696", "0.571902", "0.566942", "0.56679523", "0.56511295", "0.56420034", "0.56420034", "0.56330085", "0.5631808", "0.56069255", "0.56053203", "0.5585188", "0.5572185", "0.55603814", "0.5559111", "0.5551612", "0.5551489", "0.554768", "0.5537825", "0.5535113", "0.55237305", "0.5504461", "0.550224", "0.5500104", "0.54988986", "0.5486884", "0.5486884", "0.54793876" ]
0.8335868
4
Originally detect dimCount by data[0]. Should we optimize it to only by sysDims and dimensions and encode. So only necessary dims will be initialized. But (1) custom series should be considered. where other dims may be visited. (2) sometimes user need to calcualte bubble size or use visualMap on other dimensions besides coordSys needed. So, dims that is not used by system, should be shared in storage?
function getDimCount(source, sysDims, dimsDef, optDimCount) { // Note that the result dimCount should not small than columns count // of data, otherwise `dataDimNameMap` checking will be incorrect. var dimCount = Math.max(source.dimensionsDetectCount || 1, sysDims.length, dimsDef.length, optDimCount || 0); each(sysDims, function (sysDimItem) { var sysDimItemDimsDef = sysDimItem.dimsDef; sysDimItemDimsDef && (dimCount = Math.max(dimCount, sysDimItemDimsDef.length)); }); return dimCount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCustomDims() {\n var dims = [];\n \n // client id\n \n var tracker = ga.getByName('t0');\n \n dims.push( {slot: 11, value: tracker.get('clientId')} );\n \n if (typeof dataLayer.user === 'object') {\n \n var loggedIn = 'not logged in';\n var ban = 'not set';\n var userID = 'not set';\n \n if (dataLayer.user.userid) {\n userID = dataLayer.user.userid;\n loggedIn = 'logged in';\n \n }\n \n dims.push( {slot: 1, value: userID},\n {slot: 4, value: loggedIn});\n \n if (dataLayer.user.ban) {\n ban = dataLayer.user.ban;\n }\n \n dims.push({slot: 2, value: ban});\n \n }\n \n // FlashTalking parameters\n var ft_paramid = self.getQueryParam('FT_ParamIDs');\n\n // check if FT parameters exist but missing '?' so it's a part of the pathname\n if (ft_paramid === null) {\n ft_paramid = self.pathname.match(/FT_ParamIDs=([^&]*)/);\n \n if (ft_paramid)\n ft_paramid = ft_paramid[1];\n }\n \n if (ft_paramid !== null) {\n dims.push( {slot: 8, value: ft_paramid},\n {slot: 9, value: ft_paramid});\n }\n \n // Internal promos\n \n var cm_re = self.getQueryParam('cm_re');\n if (cm_re !== null)\n dims.push({slot: 3, value: cm_re});\n \n var purchaser = 'no';\n \n // purchaser - set on confirmation pages\n if (dataLayer.page && dataLayer.page.type === 'order_receipt_page') {\n purchaser = 'yes';\n }\n \n dims.push({slot: 5, value: purchaser});\n \n // page tracking\n dims.push({slot: 17, value: self.pathname + self.query + self.anchor});\n \n return dims;\n }", "function processDimsWithMeasure()\r\n {\r\n var startIndex = 0,\r\n endIndex = data_.values.length;\r\n var dimInRow = dimInRow_,\r\n dimInCol = dimInCol_;\r\n var bMNDInner = false,\r\n bMNDInRow = true;\r\n var i;\r\n if(data_.values[0].type === \"MND\")\r\n {\r\n ++startIndex;\r\n if(dimInRow > 0){ \r\n --dimInRow;\r\n } else {\r\n --dimInCol;\r\n bMNDInRow = false;\r\n }\r\n }\r\n\r\n if(data_.values[endIndex - 1].type === \"MND\")\r\n {\r\n bMNDInner = true;\r\n --endIndex;\r\n if(dimInCol > 0)\r\n {\r\n --dimInCol;\r\n bMNDInRow = false;\r\n }else{\r\n bMNDInRow = true;\r\n --dimInRow;\r\n }\r\n }\r\n\r\n //process no MND cases first\r\n if(startIndex < endIndex)\r\n {\r\n //some dimension in row and some in column \r\n var rowIndexs = [];\r\n if(dimInCol > 0 || dimInRow > 0)\r\n {\r\n //process row dimension first\r\n rowIndexs[0] = 0;\r\n rowCount_ = 0;\r\n if(dimInRow > 0)\r\n {\r\n buildRowDimension(dimInRow, startIndex, rowIndexs);\r\n }else{\r\n rowCount_ = 1;\r\n for(i = 1; i < data_.values[startIndex].rows.length; ++i){\r\n rowIndexs[i] = 0;\r\n }\r\n }\r\n \r\n //build column dimensions and indexes\r\n var colIndexs = [];\r\n if(dimInCol > 0)\r\n {\r\n colIndexs = processColHeader(startIndex + dimInRow, dimInCol);\r\n }else{\r\n colCount_ = 1;\r\n for(i = 0; i < data_.values[startIndex].rows.length; ++i){\r\n colIndexs[i] = 0;\r\n }\r\n }\r\n \r\n //generate data context for each sub chart\r\n ctx_ = new Array(rowCount_);\r\n for(i = 0; i < rowCount_; ++i)\r\n {\r\n ctx_[i] = [];\r\n for(var j = 0; j < colCount_; ++j){\r\n ctx_[i][j] = null;\r\n }\r\n }\r\n\r\n for(i = 0 ; i < data_.values[startIndex].rows.length; ++i)\r\n {\r\n ctx_[rowIndexs[i]][colIndexs[i]] = data_.values[startIndex + dimInRow + dimInCol - 1].rows[i].ctx;\r\n }\r\n }\r\n \r\n //process measure names at last\r\n if(dimInRow < dimInRow_ || dimInCol < dimInCol_)\r\n {\r\n addMND(bMNDInner, bMNDInRow, dimInRow, dimInCol);\r\n }\r\n }\r\n }", "function summarizeDimensions(data) {\n var summary = {};\n var encode = summary.encode = {};\n var notExtraCoordDimMap = Object(util[\"g\" /* createHashMap */])();\n var defaultedLabel = [];\n var defaultedTooltip = []; // See the comment of `List.js#userOutput`.\n\n var userOutput = summary.userOutput = {\n dimensionNames: data.dimensions.slice(),\n encode: {}\n };\n Object(util[\"k\" /* each */])(data.dimensions, function (dimName) {\n var dimItem = data.getDimensionInfo(dimName);\n var coordDim = dimItem.coordDim;\n\n if (coordDim) {\n if (false) {}\n\n var coordDimIndex = dimItem.coordDimIndex;\n getOrCreateEncodeArr(encode, coordDim)[coordDimIndex] = dimName;\n\n if (!dimItem.isExtraCoord) {\n notExtraCoordDimMap.set(coordDim, 1); // Use the last coord dim (and label friendly) as default label,\n // because when dataset is used, it is hard to guess which dimension\n // can be value dimension. If both show x, y on label is not look good,\n // and conventionally y axis is focused more.\n\n if (mayLabelDimType(dimItem.type)) {\n defaultedLabel[0] = dimName;\n } // User output encode do not contain generated coords.\n // And it only has index. User can use index to retrieve value from the raw item array.\n\n\n getOrCreateEncodeArr(userOutput.encode, coordDim)[coordDimIndex] = dimItem.index;\n }\n\n if (dimItem.defaultTooltip) {\n defaultedTooltip.push(dimName);\n }\n }\n\n util_types[\"i\" /* VISUAL_DIMENSIONS */].each(function (v, otherDim) {\n var encodeArr = getOrCreateEncodeArr(encode, otherDim);\n var dimIndex = dimItem.otherDims[otherDim];\n\n if (dimIndex != null && dimIndex !== false) {\n encodeArr[dimIndex] = dimItem.name;\n }\n });\n });\n var dataDimsOnCoord = [];\n var encodeFirstDimNotExtra = {};\n notExtraCoordDimMap.each(function (v, coordDim) {\n var dimArr = encode[coordDim];\n encodeFirstDimNotExtra[coordDim] = dimArr[0]; // Not necessary to remove duplicate, because a data\n // dim canot on more than one coordDim.\n\n dataDimsOnCoord = dataDimsOnCoord.concat(dimArr);\n });\n summary.dataDimsOnCoord = dataDimsOnCoord;\n summary.encodeFirstDimNotExtra = encodeFirstDimNotExtra;\n var encodeLabel = encode.label; // FIXME `encode.label` is not recommanded, because formatter can not be set\n // in this way. Use label.formatter instead. May be remove this approach someday.\n\n if (encodeLabel && encodeLabel.length) {\n defaultedLabel = encodeLabel.slice();\n }\n\n var encodeTooltip = encode.tooltip;\n\n if (encodeTooltip && encodeTooltip.length) {\n defaultedTooltip = encodeTooltip.slice();\n } else if (!defaultedTooltip.length) {\n defaultedTooltip = defaultedLabel.slice();\n }\n\n encode.defaultedLabel = defaultedLabel;\n encode.defaultedTooltip = defaultedTooltip;\n return summary;\n}", "get ndim() {\n if (this.$isSeries) {\n return 1;\n } else {\n return 2;\n }\n }", "function getDimCount(source, sysDims, dimsDef, optDimCount) {\n\t // Note that the result dimCount should not small than columns count\n\t // of data, otherwise `dataDimNameMap` checking will be incorrect.\n\t var dimCount = Math.max(source.dimensionsDetectedCount || 1, sysDims.length, dimsDef.length, optDimCount || 0);\n\t each(sysDims, function (sysDimItem) {\n\t var sysDimItemDimsDef;\n\t\n\t if (isObject(sysDimItem) && (sysDimItemDimsDef = sysDimItem.dimsDef)) {\n\t dimCount = Math.max(dimCount, sysDimItemDimsDef.length);\n\t }\n\t });\n\t return dimCount;\n\t }", "function getDimCount(source, sysDims, dimsDef, optDimCount) {\n // Note that the result dimCount should not small than columns count\n // of data, otherwise `dataDimNameMap` checking will be incorrect.\n var dimCount = Math.max(source.dimensionsDetectedCount || 1, sysDims.length, dimsDef.length, optDimCount || 0);\n Object(util[\"k\" /* each */])(sysDims, function (sysDimItem) {\n var sysDimItemDimsDef;\n\n if (Object(util[\"z\" /* isObject */])(sysDimItem) && (sysDimItemDimsDef = sysDimItem.dimsDef)) {\n dimCount = Math.max(dimCount, sysDimItemDimsDef.length);\n }\n });\n return dimCount;\n}", "getDimensions(data){\n const n = data.length;\n const p = data[0].length ? data[0].length: 1;\n return {rows: n,cols: p}\n }", "function jdcDataProvider(o){\n\t//Too many characters/values set\n\tvar ret = {};\n\tvar cache = {}; //= dataArray; //cached slices\n\tvar calc = {}; //calculated definitions\n\tvar o;\n\n\tvar def = {\n\t\tall : '_', //used for where no filter on dimension\n\t\tfn : 'fn', //used for function branching\n\t\tresult : function(){ return 0; }, //to be a function - called for default result and map reduce\n\t\tindices : []\n\t}\n\n\tret.init = function(options){\n\t // Extend defaults\n\t var extended = def;\n\t for (var prop in options) {\n\t if (options.hasOwnProperty(prop)) {\n\t extended[prop] = options[prop];\n\t }\n\t }\n\t\to = ret.options = extended; //var o used for shorthand - will this lead to trouble later overriding o?\n\n\t\tret.dims={};\n\n\t\tfor(var i=0;i<o.dims.length;i++){\n\t\t\tconsole.log(i);\n\t\t\tvar d = o.dims[i];\n\t\t\tconsole.log(d);\n\t\t\tret.dims[i] = {}; //ordered map\n\t\t\tret.dims[d] = {}; //associative map\n\t\t\tret.dims[i].val=d; //e.g. [0].val = \"dim 1 Name\"\n\t\t\tret.dims[d].val=i; //e.g. [name].val = order\n\t\t\tret.dims[i].range = [];\n\t\t}\n\t\tconsole.log(o.dims.length);\n\t\t//New version - iterates over population once\n\t\tvar res={}, mre, val;\n\t\tfor(var j=0;j<o.dims.length;j++){\n\t\t\tres[o.dims[j]]={};\n\t\t}\n\t\tvar vals = o.data.reduce(function(res,e,i,a){\n\t\t\tfor(var j=0;j<o.dims.length;j++){\n\t\t\t\tmre=o.dims[j];\n\t\t\t\tval=wlk(e,mre);\n\t\t\t\tif(!res[mre][val]){\n\t\t\t\t\tres[mre][val]={ \"n\":0, \"val\":0.0 };\n\t\t\t\t\tret.dims[j].range.push(val);\n\t\t\t\t}\n\t\t\t\tres[mre][val][\"n\"]++;\n\t\t\t\tres[mre][val][\"val\"]+=e[\"Price\"];\n\t\t\t}\n\t\t\treturn res;\n\t\t},res);\n\t\tfor(var j=0;j<o.dims.length;j++){\n\t\t\tret.dims[j].range.sort();\n\t\t}\n\t\tconsole.log(res);\n\t\tif(o.cache){\n\t\t\tcache = o.cache;\n\t\t}\n\n\t\treturn ret;\n\t}\n\n\t//Where should order of keys be controlled?\n\tret.idString = function(keys){\n\t\tvar res = [];\n\t\tfor(var i=0;i<o.dims.length;i++){\n\t\t\tres.push(def.all); //Push blank for no filter\n\t\t}\n\t\tfor(k in keys){\n\t\t\tif(ret.dims[k]){\n\t\t\t\tvar r = f(keys[k]);\n\t\t\t\tres[ret.dims[k].val] = r.label || r; //use f to resolve function here - need to make this generic\n\t\t\t} else {\n\t\t\t\tif(k.indexOf(def.fn)<1){\n\t\t\t\t\tconsole.log(\"Invalid key: \" + k);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tres[ret.dims[\"mre\"].val]=def.all; //Set mre to all as measures in object\n\t\treturn res.join('|');\n\t}\n\n\t//Key expanded to include all dimensions\n\tret.fullKey = function(keys){\n\t\tvar res = {};\n\t\tfor(var i=0;i<o.dims.length;i++){\n\t\t\tres[o.dims[i]]=def.all; //using '' causes problems - don't know why\n\t\t}\n\t\tfor(k in keys){ //would $.extend be better? - check k is in result\n\t\t\tif(ret.dims[k]){\n\t\t\t\tres[k] = f(keys[k]); //use f to resolve function here - need to make this generic\n\t\t\t} else {\n\t\t\t\tif(k.indexOf(def.fn)<1){\n\t\t\t\t\tconsole.log(\"Invalid key: \" + k);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}\n\n\t//New Reduce Functionality\n\tfunction objInKey(obj,key){\n\t\tres=true;\n\t\tfor(k in key){\n\t\t\tvar v=key[k];\n\t\t\tvar o=wlk(obj,k); // walks if nested\n\t\t\tif(typeof(v)==='object'){ //allDims firing initial function\n\t\t\t\tif(v.fn){\n\t\t\t\t\tres=v.fn(o);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif(v!==\"_\"){\n\t\t\t\t\tif(o){\n\t\t\t\t\t\tres=((o===v)||(+o===+v));\n\t\t\t\t\t//console.log(\"fn objInKey - value comparison - \" + obj[k] + \" with \" + v);\n\t\t\t\t\t} else { return false; } //value key with no corresponding key in object\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(res===false){ return false };\n\t\t}\n\t\treturn true;\n\t}\n\n\tfunction keyFilter(key,field){\n\t\treturn function(obj,i,a){\n\t\t\tif(objInKey(obj,key)){\n\t\t\t\tif(!field) return obj;\n\t\t\t\treturn wlk(obj,field); //return the target field\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction keyFilterReduce(key,field){\n\t\treturn function(res,obj,i,a){\n\t\t\tres.push(wlk(obj,field)); //return the target field\n\t\t\treturn res;\n\t\t}\n\t}\n\n\tfunction kFilter(key){\n\t\treturn function(obj,i,a){\n\t\t\treturn objInKey(obj,key);\n\t\t}\n\t}\n\n\tfunction keyReduce(key){ //want this to be the stats\n\t\treturn function(res, obj) {\n\t\t\tif(objInKey(obj,key)){\n\t\t\t\tvar v=obj.values;\n\t\t\t\tfor(var i=0;i<v.length;i++){\n\t\t\t\t\tres[i]+=v[i];\n\t\t\t\t}\n\t\t\t}\n\t\t return res;\n\t\t}\n\t}\n\n\tfunction fillArray(value, len) {\n\t var arr = [];\n\t for (var i=0; i<len; i++) {\n\t arr.push(value);\n\t };\n\t return arr;\n\t}\n\n\tfunction filterData(key){ //should always be a full key\n\t\t//return a filtered set of data based on ordered indices supplied\n\t\t//if(o.indices.length>0){ //need to ensure default value\n\t\t//o.indices.each(function(index,i,a)){ //object with indices - confirmed can rely on ordering - won't work as return won't exit loop\n\t\tfor (var i=0; i<o.indices.length; i++) {\n\t\t\tvar index = o.indices[i];\n\t\t\tif(index[\"field\"]){\n\t\t\t\tif(index[\"field\"] in key){ //should maybe use hasOwnProperty\n\t\t\t\t\tvar v=key[index[\"field\"]]; //index used\n\t\t\t\t\tif(v!==\"_\" && typeof(v)!=='object'){ //not all and not an object\n\t\t\t\t\t\treturn index[\"index\"][v].map(function(e,i,a){\n\t\t\t\t\t\t\tindex[\"indexMap\"][e]; //iterate through index to return array of objects\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn o.data;\n\t}\n\n\t//may rename to get measures\n\tret.getValues = function(key){ //same interface as previous - key has already been processed though fullkey function\n\t\t//var population = filterData(ret.fullKey(key)).filter(kFilter(key));\n\t\tvar keyAllMre = ret.fullKey(key);\n\t\tkeyAllMre[\"mre\"] = def.all;\n\t\t//console.log(ret.idString(keyAllMre));\n\t\tvar pop = filterData(keyAllMre).filter(kFilter(keyAllMre));\n\t\t//console.log(pop[0]);\n\t\t//console.log(pop.length);\n\t\t//population = population.reduce(keyFilterReduce(key,\"Price\"),[]);\n\t\tvar population = pop.reduce(function(r,e,i,a){ if(e[\"Price\"]) { r.push(e[\"Price\"]);} return r; },[]);\n\t\t//console.log(population[0]);\n\t\t//console.log(population.length);\n\t\tvar r = population.stats();\n\t\t//console.log(r);\n\t\treturn {\n\t\t\tid : ret.idString(key),\n\t\t\tkey : key,\n\t\t\tvalue : population.stats() //introduces filter on an index - need to parameterise\n\t\t}\n\t}\n\n\t//function to return population of array objects without summarisation\n\tret.getPopulation = function(key){ //same interface as previous - key has already been processed though fullkey function\n\t\tconsole.log(\"getPopulation\");\n\t\treturn {\n\t\t\tid : ret.idString(key), //arguable this is not required\n\t\t\tkey : key,\n\t\t\tvalue : filterData(ret.fullKey(key)).filter(kFilter(key)) //introduces filter on an index\n\t\t}\n\t}\n\n\tret.segmentSum = function(key,range){ //this should be accessible as string or object key\n\t\treturn ret.segmentRange(key,range).reduce( function(previousValue, currentValue, index, array){\n\t\t\t\treturn previousValue + currentValue;\n\t\t\t});\n\t}\n\n\tret.segment = function(key,range){ //range can be single value or array with 2 values - index and offset\n\t\tvar res = ret.segmentFromCache(key);\n\t\t/*var r = range;\n\t\tvar r0, r1;\n\t\tif(r){\n\t\t\tr0 = r[0] || r; r0 = f(r0);\n\t\t\tr1 = r[1] || r0+1; r1 = f(r1);\n\t\t\tif(r1<r0){\n\t\t\t\tif(r1<0) {\n\t\t\t\t\tr0 += r1+1;\n\t\t\t\t\tr1 = r0-r1;\n\t\t\t\t} else {\n\t\t\t\t\tr1 += r0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn (!range ? res : res.slice(r0,r1));*/\n\t\treturn res;\n\t}\n\n\tret.segmentFromCache = function(key){ //cache will use string key\n\t\t//console.log(ret.idString(key));\n\t\treturn (cache[ret.idString(key)] ? cache[ret.idString(key)][key[\"mre\"]] : ret.fillCache(key));\n\t}\n\n\tret.fillCache = function(key){ //should be a private function\n\t\tvar res;\n\t\tif(key.xfn){\n\t\t\tif(key.xfn.fn){\n\t\t\t\tif(key.xfn.fn){ //is it a calculated field - check definitions?\n\t\t\t\t\tres = calc[key.xfn.fn](key);\n\t\t\t\t\tcache[res.id] = res.value;\n\t\t\t\t}\n\t\t\t} else if(calc[key.xfn]){ //is it a calculated field - check definitions?\n\t\t\t\tres = calc[key.xfn](key);\n\t\t\t\tcache[res.id] = res.value;\n\t\t\t} else {\n\t\t\t\tconsole.log(\"Error - transform function not logged\");\n\t\t\t}\n\t\t} else {\n\t\t\tres = ret.getValues(ret.fullKey(key));\n\t\t\tcache[res.id] = res.value;\n\t\t}\n\t\treturn cache[res.id][key[\"mre\"]]; //different as now returning a measure within an object of measures - not presently an array - this may need to change\n\t}\n\n\tfunction preCalculated(key){\n\t\t//console.log(\"preCalc Fired\");\n\t\t//console.log(ret.idString(key));\n\t\tfor(k in key){\n\t\t\tif(!preCalc[k][key[k]]){\n\t\t\t\treturn false; //return as soon as failed\n\t\t\t}\n\t\t}\n\t\t//console.log(\"preCalc Fired - & short circuited\");\n\t\treturn true;\n\t}\n\n\tvar measureChange = function(key){\n\t\tvar newKey=$.extend({},key);\n\t\tnewKey.mre = f(newKey.mre).replace('Chg','');\n\t\tdelete newKey.xfn; //need to delete or\n\t\tvar values = ret.segment(newKey);\n\t\tvar res=[0];\n\t\tfor(var i=1;i<values.length;i++){\n\t\t\tres.push(values[i]-values[i-1]);\n\t\t}\n\t\treturn { id : ret.idString(key), key : key, value : res }\n\t}\n\n\tvar chg = function(dim,suffix,transform){\n\t\treturn function(key){\n\t\t\tvar base = $.extend({},key);\n\t\t\tbase[dim] = f(base[dim]).replace(suffix,'');\n\t\t\tdelete base[transform]; //necessary to stop looking in calc\n\t\t\tvar values = ret.segment(base);\n\t\t\tvar res=[0];\n\t\t\tfor(var i=1;i<values.length;i++){\n\t\t\t\tres.push(values[i]-values[i-1]);\n\t\t\t}\n\t\t\treturn { id : ret.idString(key), key : key, value : res }\n\t\t}\n\t}\n\n\tvar ofTotal = function(dim,suffix,transform,total){\n\t\treturn function(key){\n\t\t\tvar base = $.extend({},key);\n\t\t\tbase[dim] = f(base[dim]).replace(suffix,''); //Change this to add suffix later & output\n\t\t\tdelete base[transform];\n\t\t\tvar values = ret.segment(base);\n\t\t\tfor(k in total){\n\t\t\t\tif(base[k]){\n\t\t\t\t\tbase[k]=total[k];\n\t\t\t\t}\n\t\t\t}\n\t\t\tvar div = ret.segment(base);\n\t\t\tvar res = [];\n\t\t\tfor(var i=0;i<values.length;i++){\n\t\t\t\tres.push(div[i]===0 ? 0 : values[i]/div[i] );\n\t\t\t}\n\t\t\treturn { id : ret.idString(key), key : key, value : res }\n\t\t}\n\t}\n\n\tvar ofTot = function(transform){\n\t\treturn function(key){\n\t\t\tvar tfm = $.extend({},key[transform]);\n\t\t\tvar base = $.extend({},key,tfm.args[0]);\n\t\t\tdelete base[transform];\n\t\t\tvar divKey = $.extend({},base,tfm.args[1]);\n\t\t\t//console.log(divKey);\n\t\t\tvar val = ret.segment(base);\n\t\t\tvar div = ret.segment(divKey);\n\t\t\tvar vals = [];\n\t\t\tfor(var i=0;i<val.length;i++){\n\t\t\t\tvals.push(div[i]===0 ? 0 : val[i]/div[i] );\n\t\t\t}\n\t\t\treturn { id : ret.idString(key), key : key, value : vals }\n\t\t}\n\t}\n\n\t//calc['Chg'] = measureChange;\n\tcalc['Chg'] = chg('mre','Chg','xfn');\n\tcalc['ofTotalArr'] = ofTotal('uom','OfTotal','xfn', {arr : xfFilter('arr','All',function(){ return d>0; })});\n\tcalc['ofTotalEnt'] = ofTotal('uom','OfTotal','xfn', {ent : '_'});\n\tcalc['rate'] = ofTotal('mre','Rate','xfn', {mre : 'Bal'});//This will change to the following\n\t//calc['rate'] = ofTotal('mre','Rate','xfn', {mre : 'Bal'});\n\tcalc['ofTotal'] = ofTot('xfn');\n\n\treturn ret.init(o);\n}", "getDimensions() {\n return { x: 1, y: 1, z: 1 };\n }", "calcDimensions () {\n let dayIndex = Math.round (\n (moment () - moment ().subtract (1, 'year').startOf ('week')) / 86400000\n );\n let colIndex = Math.trunc (dayIndex / 7);\n let numWeeks = colIndex + 1;\n\n this.settings.width = this.container.offsetWidth < 1000\n ? 1000\n : this.container.offsetWidth;\n this.settings.item_size =\n (this.settings.width - this.settings.label_padding) / numWeeks -\n this.settings.gutter;\n this.settings.height =\n this.settings.label_padding +\n 7 * (this.settings.item_size + this.settings.gutter);\n this.svg\n .attr ('width', this.settings.width)\n .attr ('height', this.settings.height);\n\n if (!!this.props.data && !!this.props.data[0].summary) {\n this.drawChart ();\n }\n }", "function dimension(value) {\n\t var dimension = {\n\t filter: filter,\n\t filterExact: filterExact,\n\t filterRange: filterRange,\n\t filterFunction: filterFunction,\n\t filterAll: filterAll,\n\t top: top,\n\t bottom: bottom,\n\t group: group,\n\t groupAll: groupAll,\n\t dispose: dispose,\n\t remove: dispose // for backwards-compatibility\n\t };\n\n\t var one = ~m & -~m, // lowest unset bit as mask, e.g., 00001000\n\t zero = ~one, // inverted one, e.g., 11110111\n\t values, // sorted, cached array\n\t index, // value rank ↦ object id\n\t newValues, // temporary array storing newly-added values\n\t newIndex, // temporary array storing newly-added index\n\t sort = quicksort_by(function(i) { return newValues[i]; }),\n\t refilter = crossfilter_filterAll, // for recomputing filter\n\t refilterFunction, // the custom filter function in use\n\t indexListeners = [], // when data is added\n\t dimensionGroups = [],\n\t lo0 = 0,\n\t hi0 = 0;\n\n\t // Updating a dimension is a two-stage process. First, we must update the\n\t // associated filters for the newly-added records. Once all dimensions have\n\t // updated their filters, the groups are notified to update.\n\t dataListeners.unshift(preAdd);\n\t dataListeners.push(postAdd);\n\n\t removeDataListeners.push(removeData);\n\n\t // Incorporate any existing data into this dimension, and make sure that the\n\t // filter bitset is wide enough to handle the new dimension.\n\t m |= one;\n\t if (M >= 32 ? !one : m & -(1 << M)) {\n\t filters = crossfilter_arrayWiden(filters, M <<= 1);\n\t }\n\t preAdd(data, 0, n);\n\t postAdd(data, 0, n);\n\n\t // Incorporates the specified new records into this dimension.\n\t // This function is responsible for updating filters, values, and index.\n\t function preAdd(newData, n0, n1) {\n\n\t // Permute new values into natural order using a sorted index.\n\t newValues = newData.map(value);\n\t newIndex = sort(crossfilter_range(n1), 0, n1);\n\t newValues = permute(newValues, newIndex);\n\n\t // Bisect newValues to determine which new records are selected.\n\t var bounds = refilter(newValues), lo1 = bounds[0], hi1 = bounds[1], i;\n\t if (refilterFunction) {\n\t for (i = 0; i < n1; ++i) {\n\t if (!refilterFunction(newValues[i], i)) filters[newIndex[i] + n0] |= one;\n\t }\n\t } else {\n\t for (i = 0; i < lo1; ++i) filters[newIndex[i] + n0] |= one;\n\t for (i = hi1; i < n1; ++i) filters[newIndex[i] + n0] |= one;\n\t }\n\n\t // If this dimension previously had no data, then we don't need to do the\n\t // more expensive merge operation; use the new values and index as-is.\n\t if (!n0) {\n\t values = newValues;\n\t index = newIndex;\n\t lo0 = lo1;\n\t hi0 = hi1;\n\t return;\n\t }\n\n\t var oldValues = values,\n\t oldIndex = index,\n\t i0 = 0,\n\t i1 = 0;\n\n\t // Otherwise, create new arrays into which to merge new and old.\n\t values = new Array(n);\n\t index = crossfilter_index(n, n);\n\n\t // Merge the old and new sorted values, and old and new index.\n\t for (i = 0; i0 < n0 && i1 < n1; ++i) {\n\t if (oldValues[i0] < newValues[i1]) {\n\t values[i] = oldValues[i0];\n\t index[i] = oldIndex[i0++];\n\t } else {\n\t values[i] = newValues[i1];\n\t index[i] = newIndex[i1++] + n0;\n\t }\n\t }\n\n\t // Add any remaining old values.\n\t for (; i0 < n0; ++i0, ++i) {\n\t values[i] = oldValues[i0];\n\t index[i] = oldIndex[i0];\n\t }\n\n\t // Add any remaining new values.\n\t for (; i1 < n1; ++i1, ++i) {\n\t values[i] = newValues[i1];\n\t index[i] = newIndex[i1] + n0;\n\t }\n\n\t // Bisect again to recompute lo0 and hi0.\n\t bounds = refilter(values), lo0 = bounds[0], hi0 = bounds[1];\n\t }\n\n\t // When all filters have updated, notify index listeners of the new values.\n\t function postAdd(newData, n0, n1) {\n\t indexListeners.forEach(function(l) { l(newValues, newIndex, n0, n1); });\n\t newValues = newIndex = null;\n\t }\n\n\t function removeData(reIndex) {\n\t for (var i = 0, j = 0, k; i < n; ++i) {\n\t if (filters[k = index[i]]) {\n\t if (i !== j) values[j] = values[i];\n\t index[j] = reIndex[k];\n\t ++j;\n\t }\n\t }\n\t values.length = j;\n\t while (j < n) index[j++] = 0;\n\n\t // Bisect again to recompute lo0 and hi0.\n\t var bounds = refilter(values);\n\t lo0 = bounds[0], hi0 = bounds[1];\n\t }\n\n\t // Updates the selected values based on the specified bounds [lo, hi].\n\t // This implementation is used by all the public filter methods.\n\t function filterIndexBounds(bounds) {\n\t var lo1 = bounds[0],\n\t hi1 = bounds[1];\n\n\t if (refilterFunction) {\n\t refilterFunction = null;\n\t filterIndexFunction(function(d, i) { return lo1 <= i && i < hi1; });\n\t lo0 = lo1;\n\t hi0 = hi1;\n\t return dimension;\n\t }\n\n\t var i,\n\t j,\n\t k,\n\t added = [],\n\t removed = [];\n\n\t // Fast incremental update based on previous lo index.\n\t if (lo1 < lo0) {\n\t for (i = lo1, j = Math.min(lo0, hi1); i < j; ++i) {\n\t filters[k = index[i]] ^= one;\n\t added.push(k);\n\t }\n\t } else if (lo1 > lo0) {\n\t for (i = lo0, j = Math.min(lo1, hi0); i < j; ++i) {\n\t filters[k = index[i]] ^= one;\n\t removed.push(k);\n\t }\n\t }\n\n\t // Fast incremental update based on previous hi index.\n\t if (hi1 > hi0) {\n\t for (i = Math.max(lo1, hi0), j = hi1; i < j; ++i) {\n\t filters[k = index[i]] ^= one;\n\t added.push(k);\n\t }\n\t } else if (hi1 < hi0) {\n\t for (i = Math.max(lo0, hi1), j = hi0; i < j; ++i) {\n\t filters[k = index[i]] ^= one;\n\t removed.push(k);\n\t }\n\t }\n\n\t lo0 = lo1;\n\t hi0 = hi1;\n\t filterListeners.forEach(function(l) { l(one, added, removed); });\n\t return dimension;\n\t }\n\n\t // Filters this dimension using the specified range, value, or null.\n\t // If the range is null, this is equivalent to filterAll.\n\t // If the range is an array, this is equivalent to filterRange.\n\t // Otherwise, this is equivalent to filterExact.\n\t function filter(range) {\n\t return range == null\n\t ? filterAll() : Array.isArray(range)\n\t ? filterRange(range) : typeof range === \"function\"\n\t ? filterFunction(range)\n\t : filterExact(range);\n\t }\n\n\t // Filters this dimension to select the exact value.\n\t function filterExact(value) {\n\t return filterIndexBounds((refilter = crossfilter_filterExact(bisect, value))(values));\n\t }\n\n\t // Filters this dimension to select the specified range [lo, hi].\n\t // The lower bound is inclusive, and the upper bound is exclusive.\n\t function filterRange(range) {\n\t return filterIndexBounds((refilter = crossfilter_filterRange(bisect, range))(values));\n\t }\n\n\t // Clears any filters on this dimension.\n\t function filterAll() {\n\t return filterIndexBounds((refilter = crossfilter_filterAll)(values));\n\t }\n\n\t // Filters this dimension using an arbitrary function.\n\t function filterFunction(f) {\n\t refilter = crossfilter_filterAll;\n\n\t filterIndexFunction(refilterFunction = f);\n\n\t lo0 = 0;\n\t hi0 = n;\n\n\t return dimension;\n\t }\n\n\t function filterIndexFunction(f) {\n\t var i,\n\t k,\n\t x,\n\t added = [],\n\t removed = [];\n\n\t for (i = 0; i < n; ++i) {\n\t if (!(filters[k = index[i]] & one) ^ !!(x = f(values[i], i))) {\n\t if (x) filters[k] &= zero, added.push(k);\n\t else filters[k] |= one, removed.push(k);\n\t }\n\t }\n\t filterListeners.forEach(function(l) { l(one, added, removed); });\n\t }\n\n\t // Returns the top K selected records based on this dimension's order.\n\t // Note: observes this dimension's filter, unlike group and groupAll.\n\t function top(k) {\n\t var array = [],\n\t i = hi0,\n\t j;\n\n\t while (--i >= lo0 && k > 0) {\n\t if (!filters[j = index[i]]) {\n\t array.push(data[j]);\n\t --k;\n\t }\n\t }\n\n\t return array;\n\t }\n\n\t // Returns the bottom K selected records based on this dimension's order.\n\t // Note: observes this dimension's filter, unlike group and groupAll.\n\t function bottom(k) {\n\t var array = [],\n\t i = lo0,\n\t j;\n\n\t while (i < hi0 && k > 0) {\n\t if (!filters[j = index[i]]) {\n\t array.push(data[j]);\n\t --k;\n\t }\n\t i++;\n\t }\n\n\t return array;\n\t }\n\n\t // Adds a new group to this dimension, using the specified key function.\n\t function group(key) {\n\t var group = {\n\t top: top,\n\t all: all,\n\t reduce: reduce,\n\t reduceCount: reduceCount,\n\t reduceSum: reduceSum,\n\t order: order,\n\t orderNatural: orderNatural,\n\t size: size,\n\t dispose: dispose,\n\t remove: dispose // for backwards-compatibility\n\t };\n\n\t // Ensure that this group will be removed when the dimension is removed.\n\t dimensionGroups.push(group);\n\n\t var groups, // array of {key, value}\n\t groupIndex, // object id ↦ group id\n\t groupWidth = 8,\n\t groupCapacity = crossfilter_capacity(groupWidth),\n\t k = 0, // cardinality\n\t select,\n\t heap,\n\t reduceAdd,\n\t reduceRemove,\n\t reduceInitial,\n\t update = crossfilter_null,\n\t reset = crossfilter_null,\n\t resetNeeded = true,\n\t groupAll = key === crossfilter_null;\n\n\t if (arguments.length < 1) key = crossfilter_identity;\n\n\t // The group listens to the crossfilter for when any dimension changes, so\n\t // that it can update the associated reduce values. It must also listen to\n\t // the parent dimension for when data is added, and compute new keys.\n\t filterListeners.push(update);\n\t indexListeners.push(add);\n\t removeDataListeners.push(removeData);\n\n\t // Incorporate any existing data into the grouping.\n\t add(values, index, 0, n);\n\n\t // Incorporates the specified new values into this group.\n\t // This function is responsible for updating groups and groupIndex.\n\t function add(newValues, newIndex, n0, n1) {\n\t var oldGroups = groups,\n\t reIndex = crossfilter_index(k, groupCapacity),\n\t add = reduceAdd,\n\t initial = reduceInitial,\n\t k0 = k, // old cardinality\n\t i0 = 0, // index of old group\n\t i1 = 0, // index of new record\n\t j, // object id\n\t g0, // old group\n\t x0, // old key\n\t x1, // new key\n\t g, // group to add\n\t x; // key of group to add\n\n\t // If a reset is needed, we don't need to update the reduce values.\n\t if (resetNeeded) add = initial = crossfilter_null;\n\n\t // Reset the new groups (k is a lower bound).\n\t // Also, make sure that groupIndex exists and is long enough.\n\t groups = new Array(k), k = 0;\n\t groupIndex = k0 > 1 ? crossfilter_arrayLengthen(groupIndex, n) : crossfilter_index(n, groupCapacity);\n\n\t // Get the first old key (x0 of g0), if it exists.\n\t if (k0) x0 = (g0 = oldGroups[0]).key;\n\n\t // Find the first new key (x1), skipping NaN keys.\n\t while (i1 < n1 && !((x1 = key(newValues[i1])) >= x1)) ++i1;\n\n\t // While new keys remain…\n\t while (i1 < n1) {\n\n\t // Determine the lesser of the two current keys; new and old.\n\t // If there are no old keys remaining, then always add the new key.\n\t if (g0 && x0 <= x1) {\n\t g = g0, x = x0;\n\n\t // Record the new index of the old group.\n\t reIndex[i0] = k;\n\n\t // Retrieve the next old key.\n\t if (g0 = oldGroups[++i0]) x0 = g0.key;\n\t } else {\n\t g = {key: x1, value: initial()}, x = x1;\n\t }\n\n\t // Add the lesser group.\n\t groups[k] = g;\n\n\t // Add any selected records belonging to the added group, while\n\t // advancing the new key and populating the associated group index.\n\t while (!(x1 > x)) {\n\t groupIndex[j = newIndex[i1] + n0] = k;\n\t if (!(filters[j] & zero)) g.value = add(g.value, data[j]);\n\t if (++i1 >= n1) break;\n\t x1 = key(newValues[i1]);\n\t }\n\n\t groupIncrement();\n\t }\n\n\t // Add any remaining old groups that were greater than all new keys.\n\t // No incremental reduce is needed; these groups have no new records.\n\t // Also record the new index of the old group.\n\t while (i0 < k0) {\n\t groups[reIndex[i0] = k] = oldGroups[i0++];\n\t groupIncrement();\n\t }\n\n\t // If we added any new groups before any old groups,\n\t // update the group index of all the old records.\n\t if (k > i0) for (i0 = 0; i0 < n0; ++i0) {\n\t groupIndex[i0] = reIndex[groupIndex[i0]];\n\t }\n\n\t // Modify the update and reset behavior based on the cardinality.\n\t // If the cardinality is less than or equal to one, then the groupIndex\n\t // is not needed. If the cardinality is zero, then there are no records\n\t // and therefore no groups to update or reset. Note that we also must\n\t // change the registered listener to point to the new method.\n\t j = filterListeners.indexOf(update);\n\t if (k > 1) {\n\t update = updateMany;\n\t reset = resetMany;\n\t } else {\n\t if (!k && groupAll) {\n\t k = 1;\n\t groups = [{key: null, value: initial()}];\n\t }\n\t if (k === 1) {\n\t update = updateOne;\n\t reset = resetOne;\n\t } else {\n\t update = crossfilter_null;\n\t reset = crossfilter_null;\n\t }\n\t groupIndex = null;\n\t }\n\t filterListeners[j] = update;\n\n\t // Count the number of added groups,\n\t // and widen the group index as needed.\n\t function groupIncrement() {\n\t if (++k === groupCapacity) {\n\t reIndex = crossfilter_arrayWiden(reIndex, groupWidth <<= 1);\n\t groupIndex = crossfilter_arrayWiden(groupIndex, groupWidth);\n\t groupCapacity = crossfilter_capacity(groupWidth);\n\t }\n\t }\n\t }\n\n\t function removeData() {\n\t if (k > 1) {\n\t var oldK = k,\n\t oldGroups = groups,\n\t seenGroups = crossfilter_index(oldK, oldK);\n\n\t // Filter out non-matches by copying matching group index entries to\n\t // the beginning of the array.\n\t for (var i = 0, j = 0; i < n; ++i) {\n\t if (filters[i]) {\n\t seenGroups[groupIndex[j] = groupIndex[i]] = 1;\n\t ++j;\n\t }\n\t }\n\n\t // Reassemble groups including only those groups that were referred\n\t // to by matching group index entries. Note the new group index in\n\t // seenGroups.\n\t groups = [], k = 0;\n\t for (i = 0; i < oldK; ++i) {\n\t if (seenGroups[i]) {\n\t seenGroups[i] = k++;\n\t groups.push(oldGroups[i]);\n\t }\n\t }\n\n\t if (k > 1) {\n\t // Reindex the group index using seenGroups to find the new index.\n\t for (var i = 0; i < j; ++i) groupIndex[i] = seenGroups[groupIndex[i]];\n\t } else {\n\t groupIndex = null;\n\t }\n\t filterListeners[filterListeners.indexOf(update)] = k > 1\n\t ? (reset = resetMany, update = updateMany)\n\t : k === 1 ? (reset = resetOne, update = updateOne)\n\t : reset = update = crossfilter_null;\n\t } else if (k === 1) {\n\t if (groupAll) return;\n\t for (var i = 0; i < n; ++i) if (filters[i]) return;\n\t groups = [], k = 0;\n\t filterListeners[filterListeners.indexOf(update)] =\n\t update = reset = crossfilter_null;\n\t }\n\t }\n\n\t // Reduces the specified selected or deselected records.\n\t // This function is only used when the cardinality is greater than 1.\n\t function updateMany(filterOne, added, removed) {\n\t if (filterOne === one || resetNeeded) return;\n\n\t var i,\n\t k,\n\t n,\n\t g;\n\n\t // Add the added values.\n\t for (i = 0, n = added.length; i < n; ++i) {\n\t if (!(filters[k = added[i]] & zero)) {\n\t g = groups[groupIndex[k]];\n\t g.value = reduceAdd(g.value, data[k]);\n\t }\n\t }\n\n\t // Remove the removed values.\n\t for (i = 0, n = removed.length; i < n; ++i) {\n\t if ((filters[k = removed[i]] & zero) === filterOne) {\n\t g = groups[groupIndex[k]];\n\t g.value = reduceRemove(g.value, data[k]);\n\t }\n\t }\n\t }\n\n\t // Reduces the specified selected or deselected records.\n\t // This function is only used when the cardinality is 1.\n\t function updateOne(filterOne, added, removed) {\n\t if (filterOne === one || resetNeeded) return;\n\n\t var i,\n\t k,\n\t n,\n\t g = groups[0];\n\n\t // Add the added values.\n\t for (i = 0, n = added.length; i < n; ++i) {\n\t if (!(filters[k = added[i]] & zero)) {\n\t g.value = reduceAdd(g.value, data[k]);\n\t }\n\t }\n\n\t // Remove the removed values.\n\t for (i = 0, n = removed.length; i < n; ++i) {\n\t if ((filters[k = removed[i]] & zero) === filterOne) {\n\t g.value = reduceRemove(g.value, data[k]);\n\t }\n\t }\n\t }\n\n\t // Recomputes the group reduce values from scratch.\n\t // This function is only used when the cardinality is greater than 1.\n\t function resetMany() {\n\t var i,\n\t g;\n\n\t // Reset all group values.\n\t for (i = 0; i < k; ++i) {\n\t groups[i].value = reduceInitial();\n\t }\n\n\t // Add any selected records.\n\t for (i = 0; i < n; ++i) {\n\t if (!(filters[i] & zero)) {\n\t g = groups[groupIndex[i]];\n\t g.value = reduceAdd(g.value, data[i]);\n\t }\n\t }\n\t }\n\n\t // Recomputes the group reduce values from scratch.\n\t // This function is only used when the cardinality is 1.\n\t function resetOne() {\n\t var i,\n\t g = groups[0];\n\n\t // Reset the singleton group values.\n\t g.value = reduceInitial();\n\n\t // Add any selected records.\n\t for (i = 0; i < n; ++i) {\n\t if (!(filters[i] & zero)) {\n\t g.value = reduceAdd(g.value, data[i]);\n\t }\n\t }\n\t }\n\n\t // Returns the array of group values, in the dimension's natural order.\n\t function all() {\n\t if (resetNeeded) reset(), resetNeeded = false;\n\t return groups;\n\t }\n\n\t // Returns a new array containing the top K group values, in reduce order.\n\t function top(k) {\n\t var top = select(all(), 0, groups.length, k);\n\t return heap.sort(top, 0, top.length);\n\t }\n\n\t // Sets the reduce behavior for this group to use the specified functions.\n\t // This method lazily recomputes the reduce values, waiting until needed.\n\t function reduce(add, remove, initial) {\n\t reduceAdd = add;\n\t reduceRemove = remove;\n\t reduceInitial = initial;\n\t resetNeeded = true;\n\t return group;\n\t }\n\n\t // A convenience method for reducing by count.\n\t function reduceCount() {\n\t return reduce(crossfilter_reduceIncrement, crossfilter_reduceDecrement, crossfilter_zero);\n\t }\n\n\t // A convenience method for reducing by sum(value).\n\t function reduceSum(value) {\n\t return reduce(crossfilter_reduceAdd(value), crossfilter_reduceSubtract(value), crossfilter_zero);\n\t }\n\n\t // Sets the reduce order, using the specified accessor.\n\t function order(value) {\n\t select = heapselect_by(valueOf);\n\t heap = heap_by(valueOf);\n\t function valueOf(d) { return value(d.value); }\n\t return group;\n\t }\n\n\t // A convenience method for natural ordering by reduce value.\n\t function orderNatural() {\n\t return order(crossfilter_identity);\n\t }\n\n\t // Returns the cardinality of this group, irrespective of any filters.\n\t function size() {\n\t return k;\n\t }\n\n\t // Removes this group and associated event listeners.\n\t function dispose() {\n\t var i = filterListeners.indexOf(update);\n\t if (i >= 0) filterListeners.splice(i, 1);\n\t i = indexListeners.indexOf(add);\n\t if (i >= 0) indexListeners.splice(i, 1);\n\t i = removeDataListeners.indexOf(removeData);\n\t if (i >= 0) removeDataListeners.splice(i, 1);\n\t return group;\n\t }\n\n\t return reduceCount().orderNatural();\n\t }\n\n\t // A convenience function for generating a singleton group.\n\t function groupAll() {\n\t var g = group(crossfilter_null), all = g.all;\n\t delete g.all;\n\t delete g.top;\n\t delete g.order;\n\t delete g.orderNatural;\n\t delete g.size;\n\t g.value = function() { return all()[0].value; };\n\t return g;\n\t }\n\n\t // Removes this dimension and associated groups and event listeners.\n\t function dispose() {\n\t dimensionGroups.forEach(function(group) { group.dispose(); });\n\t var i = dataListeners.indexOf(preAdd);\n\t if (i >= 0) dataListeners.splice(i, 1);\n\t i = dataListeners.indexOf(postAdd);\n\t if (i >= 0) dataListeners.splice(i, 1);\n\t i = removeDataListeners.indexOf(removeData);\n\t if (i >= 0) removeDataListeners.splice(i, 1);\n\t m &= zero;\n\t return filterAll();\n\t }\n\n\t return dimension;\n\t }", "_validateValueArrayDimensions() {\n const that = this;\n let dimensions = 0,\n tempArray = that.value,\n emptyArray = false;\n\n while (tempArray.constructor === Array) {\n dimensions++;\n tempArray = tempArray[0];\n\n if (tempArray === undefined) {\n emptyArray = true;\n break;\n }\n }\n\n if (that.dimensions > dimensions) {\n if (emptyArray) {\n that.value = that._returnEmptyArray();\n return;\n }\n\n while (that.dimensions > dimensions) {\n that._addDimensionToJSArray(dimensions);\n dimensions++;\n }\n }\n }", "get dimensions() { return this._dimensions; }", "function makeSeriesEncodeForAxisCoordSys(coordDimensions, seriesModel, source) {\n\t var encode = {};\n\t var datasetModel = querySeriesUpstreamDatasetModel(seriesModel); // Currently only make default when using dataset, util more reqirements occur.\n\t\n\t if (!datasetModel || !coordDimensions) {\n\t return encode;\n\t }\n\t\n\t var encodeItemName = [];\n\t var encodeSeriesName = [];\n\t var ecModel = seriesModel.ecModel;\n\t var datasetMap = innerGlobalModel(ecModel).datasetMap;\n\t var key = datasetModel.uid + '_' + source.seriesLayoutBy;\n\t var baseCategoryDimIndex;\n\t var categoryWayValueDimStart;\n\t coordDimensions = coordDimensions.slice();\n\t each(coordDimensions, function (coordDimInfoLoose, coordDimIdx) {\n\t var coordDimInfo = isObject(coordDimInfoLoose) ? coordDimInfoLoose : coordDimensions[coordDimIdx] = {\n\t name: coordDimInfoLoose\n\t };\n\t\n\t if (coordDimInfo.type === 'ordinal' && baseCategoryDimIndex == null) {\n\t baseCategoryDimIndex = coordDimIdx;\n\t categoryWayValueDimStart = getDataDimCountOnCoordDim(coordDimInfo);\n\t }\n\t\n\t encode[coordDimInfo.name] = [];\n\t });\n\t var datasetRecord = datasetMap.get(key) || datasetMap.set(key, {\n\t categoryWayDim: categoryWayValueDimStart,\n\t valueWayDim: 0\n\t }); // TODO\n\t // Auto detect first time axis and do arrangement.\n\t\n\t each(coordDimensions, function (coordDimInfo, coordDimIdx) {\n\t var coordDimName = coordDimInfo.name;\n\t var count = getDataDimCountOnCoordDim(coordDimInfo); // In value way.\n\t\n\t if (baseCategoryDimIndex == null) {\n\t var start = datasetRecord.valueWayDim;\n\t pushDim(encode[coordDimName], start, count);\n\t pushDim(encodeSeriesName, start, count);\n\t datasetRecord.valueWayDim += count; // ??? TODO give a better default series name rule?\n\t // especially when encode x y specified.\n\t // consider: when mutiple series share one dimension\n\t // category axis, series name should better use\n\t // the other dimsion name. On the other hand, use\n\t // both dimensions name.\n\t } // In category way, the first category axis.\n\t else if (baseCategoryDimIndex === coordDimIdx) {\n\t pushDim(encode[coordDimName], 0, count);\n\t pushDim(encodeItemName, 0, count);\n\t } // In category way, the other axis.\n\t else {\n\t var start = datasetRecord.categoryWayDim;\n\t pushDim(encode[coordDimName], start, count);\n\t pushDim(encodeSeriesName, start, count);\n\t datasetRecord.categoryWayDim += count;\n\t }\n\t });\n\t\n\t function pushDim(dimIdxArr, idxFrom, idxCount) {\n\t for (var i = 0; i < idxCount; i++) {\n\t dimIdxArr.push(idxFrom + i);\n\t }\n\t }\n\t\n\t function getDataDimCountOnCoordDim(coordDimInfo) {\n\t var dimsDef = coordDimInfo.dimsDef;\n\t return dimsDef ? dimsDef.length : 1;\n\t }\n\t\n\t encodeItemName.length && (encode.itemName = encodeItemName);\n\t encodeSeriesName.length && (encode.seriesName = encodeSeriesName);\n\t return encode;\n\t }", "get flexibleDimensions() { return this._flexibleDimensions; }", "function SizeData() {\n\t\t// #### Y Axis ####\n\t\t// Y Axis Min & Max\n\n\t\t// Get the initial Min & Max\n\t\tvar max = Math.max.apply(null, me.g_data[1]);\n\t\tvar min = Math.min.apply(null, me.g_data[1]);\n\n\t\t// Find the other series max & min\n\t\tfor (var i = me.g_data.length; i > 1; i--) {\n\n\t\t\tvar max2 = Math.max.apply(null, me.g_data[i]);\n\t\t\tvar min2 = Math.min.apply(null, me.g_data[i]);\n\n\t\t\t// If the max or min are more significant, use them\n\t\t\tif (max < max2) {\n\t\t\t\tmax = max2;\n\t\t\t}\n\t\t\tif (min > min2) {\n\t\t\t\tmin = min2;\n\t\t\t}\n\t\t}\n\n\t\t// If the default min & max aren't more relevant, add our derived one in.\n\t\tif (me.maxY == null || me.maxY < max) {\n\t\t\tme.maxY = max;\n\t\t}\n\t\tif (me.minY == null || me.minY > min) {\n\t\t\tme.minY = min;\n\t\t}\n\n\t\t// X Axis\n\n\t\tif (typeof (me.g_data[0][0]) == \"number\") {\n\t\t\t// Get the initial Min & Max\n\t\t\tvar max = Math.max.apply(null, me.g_data[0]);\n\t\t\tvar min = Math.min.apply(null, me.g_data[0]);\n\n\t\t\tme.maxX = max;\n\t\t\tme.minX = min;\n\t\t}\n\t\telse if (typeof (me.g_data[0][0]) == \"object\") {\n\n\t\t\t// We are working with dates\n\t\t\tvar seconds = [];\n\t\t\tfor (var i = 0; i < me.g_data[0].length; i++) {\n\t\t\t\tvar d = new Date(me.g_data[0][i][0], me.g_data[0][i][1], me.g_data[0][i][2]);\n\n\t\t\t\tseconds[i] = d.valueOf();\n\t\t\t}\n\n\t\t\tvar max = Math.max.apply(null, seconds);\n\t\t\tvar min = Math.min.apply(null, seconds);\n\n\t\t\tme.maxX = max;\n\t\t\tme.minX = min;\n\n\t\t}\n\t\telse {\n\t\t\t// Standard string X Axis\n\t\t\tme.maxX = me.g_data[0].length;\n\t\t\tme.minX = 0;\n\t\t}\n\t}", "_addDimensionToJSArray(dimensions) {\n const that = this;\n\n if (that.arrayIndexingMode === 'LabVIEW') {\n that.value = [that.value];\n }\n else {\n if (dimensions === undefined) {\n dimensions = that.dimensions - 1;\n }\n\n const recursion = function (arr, level) {\n for (let i = 0; i < arr.length; i++) {\n if (level !== dimensions) {\n recursion(arr[i], level + 1);\n }\n else {\n arr[i] = [arr[i]];\n }\n }\n };\n\n recursion(that.value, 1);\n }\n }", "get shape() {\n if (this.$data.length === 0) return [0, 0];\n if (this.$isSeries) {\n return [this.$data.length, 1];\n } else {\n const rowLen = (this.$data).length;\n const colLen = (this.$data[0]).length;\n return [rowLen, colLen];\n }\n\n }", "function makeSeriesEncodeForAxisCoordSys(coordDimensions, seriesModel, source) {\n var encode = {};\n var datasetModel = querySeriesUpstreamDatasetModel(seriesModel); // Currently only make default when using dataset, util more reqirements occur.\n\n if (!datasetModel || !coordDimensions) {\n return encode;\n }\n\n var encodeItemName = [];\n var encodeSeriesName = [];\n var ecModel = seriesModel.ecModel;\n var datasetMap = innerGlobalModel(ecModel).datasetMap;\n var key = datasetModel.uid + '_' + source.seriesLayoutBy;\n var baseCategoryDimIndex;\n var categoryWayValueDimStart;\n coordDimensions = coordDimensions.slice();\n Object(zrender_lib_core_util__WEBPACK_IMPORTED_MODULE_1__[/* each */ \"k\"])(coordDimensions, function (coordDimInfoLoose, coordDimIdx) {\n var coordDimInfo = Object(zrender_lib_core_util__WEBPACK_IMPORTED_MODULE_1__[/* isObject */ \"z\"])(coordDimInfoLoose) ? coordDimInfoLoose : coordDimensions[coordDimIdx] = {\n name: coordDimInfoLoose\n };\n\n if (coordDimInfo.type === 'ordinal' && baseCategoryDimIndex == null) {\n baseCategoryDimIndex = coordDimIdx;\n categoryWayValueDimStart = getDataDimCountOnCoordDim(coordDimInfo);\n }\n\n encode[coordDimInfo.name] = [];\n });\n var datasetRecord = datasetMap.get(key) || datasetMap.set(key, {\n categoryWayDim: categoryWayValueDimStart,\n valueWayDim: 0\n }); // TODO\n // Auto detect first time axis and do arrangement.\n\n Object(zrender_lib_core_util__WEBPACK_IMPORTED_MODULE_1__[/* each */ \"k\"])(coordDimensions, function (coordDimInfo, coordDimIdx) {\n var coordDimName = coordDimInfo.name;\n var count = getDataDimCountOnCoordDim(coordDimInfo); // In value way.\n\n if (baseCategoryDimIndex == null) {\n var start = datasetRecord.valueWayDim;\n pushDim(encode[coordDimName], start, count);\n pushDim(encodeSeriesName, start, count);\n datasetRecord.valueWayDim += count; // ??? TODO give a better default series name rule?\n // especially when encode x y specified.\n // consider: when mutiple series share one dimension\n // category axis, series name should better use\n // the other dimsion name. On the other hand, use\n // both dimensions name.\n } // In category way, the first category axis.\n else if (baseCategoryDimIndex === coordDimIdx) {\n pushDim(encode[coordDimName], 0, count);\n pushDim(encodeItemName, 0, count);\n } // In category way, the other axis.\n else {\n var start = datasetRecord.categoryWayDim;\n pushDim(encode[coordDimName], start, count);\n pushDim(encodeSeriesName, start, count);\n datasetRecord.categoryWayDim += count;\n }\n });\n\n function pushDim(dimIdxArr, idxFrom, idxCount) {\n for (var i = 0; i < idxCount; i++) {\n dimIdxArr.push(idxFrom + i);\n }\n }\n\n function getDataDimCountOnCoordDim(coordDimInfo) {\n var dimsDef = coordDimInfo.dimsDef;\n return dimsDef ? dimsDef.length : 1;\n }\n\n encodeItemName.length && (encode.itemName = encodeItemName);\n encodeSeriesName.length && (encode.seriesName = encodeSeriesName);\n return encode;\n}", "function dimension(value) {\n var dimension = {\n filter: filter,\n filterExact: filterExact,\n filterRange: filterRange,\n filterAll: filterAll,\n top: top,\n bottom: bottom,\n group: group,\n groupAll: groupAll,\n remove: remove\n };\n\n var one = ~m & -~m, // lowest unset bit as mask, e.g., 00001000\n zero = ~one, // inverted one, e.g., 11110111\n values, // sorted, cached array\n index, // value rank ↦ object id\n newValues, // temporary array storing newly-added values\n newIndex, // temporary array storing newly-added index\n sort = quicksort_by(function(i) { return newValues[i]; }),\n refilter = crossfilter_filterAll, // for recomputing filter\n indexListeners = [], // when data is added\n dimensionGroups = [],\n lo0 = 0,\n hi0 = 0;\n\n // Updating a dimension is a two-stage process. First, we must update the\n // associated filters for the newly-added records. Once all dimensions have\n // updated their filters, the groups are notified to update.\n dataListeners.unshift(preAdd);\n dataListeners.push(postAdd);\n\n // Incorporate any existing data into this dimension, and make sure that the\n // filter bitset is wide enough to handle the new dimension.\n m |= one;\n if (M >= 32 ? !one : m & (1 << M) - 1) {\n filters = crossfilter_arrayWiden(filters, M <<= 1);\n }\n preAdd(data, 0, n);\n postAdd(data, 0, n);\n\n // Incorporates the specified new records into this dimension.\n // This function is responsible for updating filters, values, and index.\n function preAdd(newData, n0, n1) {\n\n // Permute new values into natural order using a sorted index.\n newValues = newData.map(value);\n newIndex = sort(crossfilter_range(n1), 0, n1);\n newValues = permute(newValues, newIndex);\n\n // Bisect newValues to determine which new records are selected.\n var bounds = refilter(newValues), lo1 = bounds[0], hi1 = bounds[1], i;\n for (i = 0; i < lo1; ++i) filters[newIndex[i] + n0] |= one;\n for (i = hi1; i < n1; ++i) filters[newIndex[i] + n0] |= one;\n\n // If this dimension previously had no data, then we don't need to do the\n // more expensive merge operation; use the new values and index as-is.\n if (!n0) {\n values = newValues;\n index = newIndex;\n lo0 = lo1;\n hi0 = hi1;\n return;\n }\n\n var oldValues = values,\n oldIndex = index,\n i0 = 0,\n i1 = 0;\n\n // Otherwise, create new arrays into which to merge new and old.\n values = new Array(n);\n index = crossfilter_index(n, n);\n\n // Merge the old and new sorted values, and old and new index.\n for (i = 0; i0 < n0 && i1 < n1; ++i) {\n if (oldValues[i0] < newValues[i1]) {\n values[i] = oldValues[i0];\n index[i] = oldIndex[i0++];\n } else {\n values[i] = newValues[i1];\n index[i] = newIndex[i1++] + n0;\n }\n }\n\n // Add any remaining old values.\n for (; i0 < n0; ++i0, ++i) {\n values[i] = oldValues[i0];\n index[i] = oldIndex[i0];\n }\n\n // Add any remaining new values.\n for (; i1 < n1; ++i1, ++i) {\n values[i] = newValues[i1];\n index[i] = newIndex[i1] + n0;\n }\n\n // Bisect again to recompute lo0 and hi0.\n bounds = refilter(values), lo0 = bounds[0], hi0 = bounds[1];\n }\n\n // When all filters have updated, notify index listeners of the new values.\n function postAdd(newData, n0, n1) {\n indexListeners.forEach(function(l) { l(newValues, newIndex, n0, n1); });\n newValues = newIndex = null;\n }\n\n // Updates the selected values based on the specified bounds [lo, hi].\n // This implementation is used by all the public filter methods.\n function filterIndex(bounds) {\n var i,\n j,\n k,\n lo1 = bounds[0],\n hi1 = bounds[1],\n added = [],\n removed = [];\n\n // Fast incremental update based on previous lo index.\n if (lo1 < lo0) {\n for (i = lo1, j = Math.min(lo0, hi1); i < j; ++i) {\n filters[k = index[i]] ^= one;\n added.push(k);\n }\n } else if (lo1 > lo0) {\n for (i = lo0, j = Math.min(lo1, hi0); i < j; ++i) {\n filters[k = index[i]] ^= one;\n removed.push(k);\n }\n }\n\n // Fast incremental update based on previous hi index.\n if (hi1 > hi0) {\n for (i = Math.max(lo1, hi0), j = hi1; i < j; ++i) {\n filters[k = index[i]] ^= one;\n added.push(k);\n }\n } else if (hi1 < hi0) {\n for (i = Math.max(lo0, hi1), j = hi0; i < j; ++i) {\n filters[k = index[i]] ^= one;\n removed.push(k);\n }\n }\n\n lo0 = lo1;\n hi0 = hi1;\n filterListeners.forEach(function(l) { l(one, added, removed); });\n return dimension;\n }\n\n // Filters this dimension using the specified range, value, or null.\n // If the range is null, this is equivalent to filterAll.\n // If the range is an array, this is equivalent to filterRange.\n // Otherwise, this is equivalent to filterExact.\n function filter(range) {\n return range == null\n ? filterAll() : Array.isArray(range)\n ? filterRange(range)\n : filterExact(range);\n }\n\n // Filters this dimension to select the exact value.\n function filterExact(value) {\n return filterIndex((refilter = crossfilter_filterExact(bisect, value))(values));\n }\n\n // Filters this dimension to select the specified range [lo, hi].\n // The lower bound is inclusive, and the upper bound is exclusive.\n function filterRange(range) {\n return filterIndex((refilter = crossfilter_filterRange(bisect, range))(values));\n }\n\n // Clears any filters on this dimension.\n function filterAll() {\n return filterIndex((refilter = crossfilter_filterAll)(values));\n }\n\n // Returns the top K selected records based on this dimension's order.\n // Note: observes this dimension's filter, unlike group and groupAll.\n function top(k) {\n var array = [],\n i = hi0,\n j;\n\n while (--i >= lo0 && k > 0) {\n if (!filters[j = index[i]]) {\n array.push(data[j]);\n --k;\n }\n }\n\n return array;\n }\n\n // Returns the bottom K selected records based on this dimension's order.\n // Note: observes this dimension's filter, unlike group and groupAll.\n function bottom(k) {\n var array = [],\n i = lo0,\n j;\n\n while (i < hi0 && k > 0) {\n if (!filters[j = index[i]]) {\n array.push(data[j]);\n --k;\n }\n i++;\n }\n\n return array;\n }\n\n // Adds a new group to this dimension, using the specified key function.\n function group(key) {\n var group = {\n top: top,\n all: all,\n reduce: reduce,\n reduceCount: reduceCount,\n reduceSum: reduceSum,\n order: order,\n orderNatural: orderNatural,\n size: size,\n remove: remove\n };\n\n // Ensure that this group will be removed when the dimension is removed.\n dimensionGroups.push(group);\n\n var groups, // array of {key, value}\n groupIndex, // object id ↦ group id\n groupWidth = 8,\n groupCapacity = crossfilter_capacity(groupWidth),\n k = 0, // cardinality\n select,\n heap,\n reduceAdd,\n reduceRemove,\n reduceInitial,\n update = crossfilter_null,\n reset = crossfilter_null,\n resetNeeded = true;\n\n if (arguments.length < 1) key = crossfilter_identity;\n\n // The group listens to the crossfilter for when any dimension changes, so\n // that it can update the associated reduce values. It must also listen to\n // the parent dimension for when data is added, and compute new keys.\n filterListeners.push(update);\n indexListeners.push(add);\n\n // Incorporate any existing data into the grouping.\n add(values, index, 0, n);\n\n // Incorporates the specified new values into this group.\n // This function is responsible for updating groups and groupIndex.\n function add(newValues, newIndex, n0, n1) {\n var oldGroups = groups,\n reIndex = crossfilter_index(k, groupCapacity),\n add = reduceAdd,\n initial = reduceInitial,\n k0 = k, // old cardinality\n i0 = 0, // index of old group\n i1 = 0, // index of new record\n j, // object id\n g0, // old group\n x0, // old key\n x1, // new key\n g, // group to add\n x; // key of group to add\n\n // If a reset is needed, we don't need to update the reduce values.\n if (resetNeeded) add = initial = crossfilter_null;\n\n // Reset the new groups (k is a lower bound).\n // Also, make sure that groupIndex exists and is long enough.\n groups = new Array(k), k = 0;\n groupIndex = k0 > 1 ? crossfilter_arrayLengthen(groupIndex, n) : crossfilter_index(n, groupCapacity);\n\n // Get the first old key (x0 of g0), if it exists.\n if (k0) x0 = (g0 = oldGroups[0]).key;\n\n // Find the first new key (x1).\n x1 = key(newValues[i1]);\n\n // While new keys remain…\n while (i1 < n1) {\n\n // Determine the lesser of the two current keys; new and old.\n // If there are no old keys remaining, then always add the new key.\n if (g0 && x0 <= x1) {\n g = g0, x = x0;\n\n // Record the new index of the old group.\n reIndex[i0] = k;\n\n // Retrieve the next old key.\n if (g0 = oldGroups[++i0]) x0 = g0.key;\n } else {\n g = {key: x1, value: initial()}, x = x1;\n }\n\n // Add the lesser group.\n groups[k] = g;\n\n // Add any selected records belonging to the added group, while\n // advancing the new key and populating the associated group index.\n while (x1 <= x || !(x1 <= x1) && !(x <= x)) {\n groupIndex[j = newIndex[i1] + n0] = k;\n if (!(filters[j] & zero)) g.value = add(g.value, data[j]);\n if (++i1 >= n1) break;\n x1 = key(newValues[i1]);\n }\n\n groupIncrement();\n }\n\n // Add any remaining old groups that were greater than all new keys.\n // No incremental reduce is needed; these groups have no new records.\n // Also record the new index of the old group.\n while (i0 < k0) {\n groups[reIndex[i0] = k] = oldGroups[i0++];\n groupIncrement();\n }\n\n // If we added any new groups before any old groups,\n // update the group index of all the old records.\n if (k > i0) for (i0 = 0; i0 < n0; ++i0) {\n groupIndex[i0] = reIndex[groupIndex[i0]];\n }\n\n // Modify the update and reset behavior based on the cardinality.\n // If the cardinality is less than or equal to one, then the groupIndex\n // is not needed. If the cardinality is zero, then there are no records\n // and therefore no groups to update or reset. Note that we also must\n // change the registered listener to point to the new method.\n j = filterListeners.indexOf(update);\n if (k > 1) {\n update = updateMany;\n reset = resetMany;\n } else {\n if (k === 1) {\n update = updateOne;\n reset = resetOne;\n } else {\n update = crossfilter_null;\n reset = crossfilter_null;\n }\n groupIndex = null;\n }\n filterListeners[j] = update;\n\n // Count the number of added groups,\n // and widen the group index as needed.\n function groupIncrement() {\n if (++k === groupCapacity) {\n reIndex = crossfilter_arrayWiden(reIndex, groupWidth <<= 1);\n groupIndex = crossfilter_arrayWiden(groupIndex, groupWidth);\n groupCapacity = crossfilter_capacity(groupWidth);\n }\n }\n }\n\n // Reduces the specified selected or deselected records.\n // This function is only used when the cardinality is greater than 1.\n function updateMany(filterOne, added, removed) {\n if (filterOne === one || resetNeeded) return;\n\n if (!reduceRemove && removed.length) {\n resetNeeded = true;\n return;\n }\n\n var i,\n k,\n n,\n g;\n\n // Add the added values.\n for (i = 0, n = added.length; i < n; ++i) {\n if (!(filters[k = added[i]] & zero)) {\n g = groups[groupIndex[k]];\n g.value = reduceAdd(g.value, data[k]);\n }\n }\n\n // Remove the removed values.\n for (i = 0, n = removed.length; i < n; ++i) {\n if ((filters[k = removed[i]] & zero) === filterOne) {\n g = groups[groupIndex[k]];\n g.value = reduceRemove(g.value, data[k]);\n }\n }\n }\n\n // Reduces the specified selected or deselected records.\n // This function is only used when the cardinality is 1.\n function updateOne(filterOne, added, removed) {\n if (filterOne === one || resetNeeded) return;\n\n if (!reduceRemove && removed.length) {\n resetNeeded = true;\n return;\n }\n\n var i,\n k,\n n,\n g = groups[0];\n\n // Add the added values.\n for (i = 0, n = added.length; i < n; ++i) {\n if (!(filters[k = added[i]] & zero)) {\n g.value = reduceAdd(g.value, data[k]);\n }\n }\n\n // Remove the removed values.\n for (i = 0, n = removed.length; i < n; ++i) {\n if ((filters[k = removed[i]] & zero) === filterOne) {\n g.value = reduceRemove(g.value, data[k]);\n }\n }\n }\n\n // Recomputes the group reduce values from scratch.\n // This function is only used when the cardinality is greater than 1.\n function resetMany() {\n var i,\n g;\n\n // Reset all group values.\n for (i = 0; i < k; ++i) {\n groups[i].value = reduceInitial();\n }\n\n // Add any selected records.\n for (i = 0; i < n; ++i) {\n if (!(filters[i] & zero)) {\n g = groups[groupIndex[i]];\n g.value = reduceAdd(g.value, data[i]);\n }\n }\n }\n\n // Recomputes the group reduce values from scratch.\n // This function is only used when the cardinality is 1.\n function resetOne() {\n var i,\n g = groups[0];\n\n // Reset the singleton group values.\n g.value = reduceInitial();\n\n // Add any selected records.\n for (i = 0; i < n; ++i) {\n if (!(filters[i] & zero)) {\n g.value = reduceAdd(g.value, data[i]);\n }\n }\n }\n\n // Returns the array of group values, in the dimension's natural order.\n function all() {\n if (resetNeeded) reset(), resetNeeded = false;\n return groups;\n }\n\n // Returns a new array containing the top K group values, in reduce order.\n function top(k) {\n var top = select(all(), 0, groups.length, k);\n return heap.sort(top, 0, top.length);\n }\n\n // Sets the reduce behavior for this group to use the specified functions.\n // This method lazily recomputes the reduce values, waiting until needed.\n function reduce(add, remove, initial) {\n reduceAdd = add;\n reduceRemove = remove;\n reduceInitial = initial;\n resetNeeded = true;\n return group;\n }\n\n // A convenience method for reducing by count.\n function reduceCount() {\n return reduce(crossfilter_reduceIncrement, crossfilter_reduceDecrement, crossfilter_zero);\n }\n\n // A convenience method for reducing by sum(value).\n function reduceSum(value) {\n return reduce(crossfilter_reduceAdd(value), crossfilter_reduceSubtract(value), crossfilter_zero);\n }\n\n // Sets the reduce order, using the specified accessor.\n function order(value) {\n select = heapselect_by(valueOf);\n heap = heap_by(valueOf);\n function valueOf(d) { return value(d.value); }\n return group;\n }\n\n // A convenience method for natural ordering by reduce value.\n function orderNatural() {\n return order(crossfilter_identity);\n }\n\n // Returns the cardinality of this group, irrespective of any filters.\n function size() {\n return k;\n }\n\n // Removes this group and associated event listeners.\n function remove() {\n var i = filterListeners.indexOf(update);\n if (i >= 0) filterListeners.splice(i, 1);\n i = indexListeners.indexOf(add);\n if (i >= 0) indexListeners.splice(i, 1);\n return group;\n }\n\n return reduceCount().orderNatural();\n }\n\n // A convenience function for generating a singleton group.\n function groupAll() {\n var g = group(crossfilter_null), all = g.all;\n delete g.all;\n delete g.top;\n delete g.order;\n delete g.orderNatural;\n delete g.size;\n g.value = function() { return all()[0].value; };\n return g;\n }\n\n function remove() {\n dimensionGroups.forEach(function(group) { group.remove(); });\n var i = dataListeners.indexOf(preAdd);\n if (i >= 0) dataListeners.splice(i, 1);\n i = dataListeners.indexOf(postAdd);\n if (i >= 0) dataListeners.splice(i, 1);\n for (i = 0; i < n; ++i) filters[i] &= zero;\n m &= zero;\n return dimension;\n }\n\n return dimension;\n }", "getDataExtents(activeBrushes, includeDiscrete) {\n let dataExtents = {};\n for (let i = 0; i < this.activeDimensions.length; i++) {\n let dimension = this.activeDimensions[i];\n\n //invert not supported for categorical scales, so skip them\n if (this.dimensionMetadata[dimension].discrete && !includeDiscrete) continue;\n\n let activeBrush = activeBrushes.find(\n brush => brush.dimension === dimension\n );\n\n if (!activeBrush) {\n continue;\n }\n\n if (this.dimensionMetadata[dimension].discrete) {\n for (let j = 0; j < this.data.length; j++) {\n let pixelPosition = this.yScales[dimension](this.data[j][dimension]);\n if (pixelPosition >= d3.min(activeBrush.extent) && pixelPosition <= d3.max(activeBrush.extent)) {\n if (!dataExtents[dimension]) {\n dataExtents[dimension] = [];\n }\n\n if (!dataExtents[dimension].includes(this.data[j][dimension])) {\n dataExtents[dimension].push(this.data[j][dimension]);\n }\n }\n }\n } else {\n dataExtents[dimension] = [\n this.yScales[dimension].invert(activeBrush.extent[0]),\n this.yScales[dimension].invert(activeBrush.extent[1])\n ];\n }\n }\n\n return dataExtents;\n }", "function size() {\n out = 1;\n for (var dim in dimensions) {\n out *= dimensions[dim].members.length;\n }\n return out;\n }", "getDim() {\n var width, height;\n\n // If the particle only has a set size (not width/height)\n if (this.size) {\n width = this.size;\n height = this.size;\n } else {\n width = this.width;\n height = this.height;\n }\n\n return {\n width: width,\n height: height\n };\n }", "function single_prepareCustom_dataToCoordSize(dataSize, dataItem) {\n // dataItem is necessary in log axis.\n var axis = this.getAxis();\n var val = dataItem instanceof Array ? dataItem[0] : dataItem;\n var halfSize = (dataSize instanceof Array ? dataSize[0] : dataSize) / 2;\n return axis.type === 'category' ? axis.getBandWidth() : Math.abs(axis.dataToCoord(val - halfSize) - axis.dataToCoord(val + halfSize));\n}", "function getDimCanavs() {\n w = canvas.width;\n h = canvas.height;\n }", "function prepareDataCoordInfo(coordSys, data, valueOrigin) {\n var baseAxis = coordSys.getBaseAxis();\n var valueAxis = coordSys.getOtherAxis(baseAxis);\n var valueStart = getValueStart(valueAxis, valueOrigin);\n var baseAxisDim = baseAxis.dim;\n var valueAxisDim = valueAxis.dim;\n var valueDim = data.mapDimension(valueAxisDim);\n var baseDim = data.mapDimension(baseAxisDim);\n var baseDataOffset = valueAxisDim === 'x' || valueAxisDim === 'radius' ? 1 : 0;\n var dims = Object(util[\"H\" /* map */])(coordSys.dimensions, function (coordDim) {\n return data.mapDimension(coordDim);\n });\n var stacked = false;\n var stackResultDim = data.getCalculationInfo('stackResultDimension');\n\n if (isDimensionStacked(data, dims[0]\n /*, dims[1]*/\n )) {\n // jshint ignore:line\n stacked = true;\n dims[0] = stackResultDim;\n }\n\n if (isDimensionStacked(data, dims[1]\n /*, dims[0]*/\n )) {\n // jshint ignore:line\n stacked = true;\n dims[1] = stackResultDim;\n }\n\n return {\n dataDimsForPoint: dims,\n valueStart: valueStart,\n valueAxisDim: valueAxisDim,\n baseAxisDim: baseAxisDim,\n stacked: !!stacked,\n valueDim: valueDim,\n baseDim: baseDim,\n baseDataOffset: baseDataOffset,\n stackedOverDimension: data.getCalculationInfo('stackedOverDimension')\n };\n}", "get dimensions() {\n var dimensions = new Range();\n this._rows.forEach(function (row) {\n if (row) {\n var rowDims = row.dimensions;\n if (rowDims) {\n dimensions.expand(row.number, rowDims.min, row.number, rowDims.max);\n }\n }\n });\n return dimensions;\n }", "function _default(seriesType) {\n return {\n seriesType: seriesType,\n plan: createRenderPlanner(),\n reset: function (seriesModel) {\n var data = seriesModel.getData();\n var coordSys = seriesModel.coordinateSystem;\n var pipelineContext = seriesModel.pipelineContext;\n var isLargeRender = pipelineContext.large;\n\n if (!coordSys) {\n return;\n }\n\n var dims = map(coordSys.dimensions, function (dim) {\n return data.mapDimension(dim);\n }).slice(0, 2);\n var dimLen = dims.length;\n var stackResultDim = data.getCalculationInfo('stackResultDimension');\n\n if (isDimensionStacked(data, dims[0]\n /*, dims[1]*/\n )) {\n dims[0] = stackResultDim;\n }\n\n if (isDimensionStacked(data, dims[1]\n /*, dims[0]*/\n )) {\n dims[1] = stackResultDim;\n }\n\n function progress(params, data) {\n var segCount = params.end - params.start;\n var points = isLargeRender && new Float32Array(segCount * dimLen);\n\n for (var i = params.start, offset = 0, tmpIn = [], tmpOut = []; i < params.end; i++) {\n var point;\n\n if (dimLen === 1) {\n var x = data.get(dims[0], i);\n point = !isNaN(x) && coordSys.dataToPoint(x, null, tmpOut);\n } else {\n var x = tmpIn[0] = data.get(dims[0], i);\n var y = tmpIn[1] = data.get(dims[1], i); // Also {Array.<number>}, not undefined to avoid if...else... statement\n\n point = !isNaN(x) && !isNaN(y) && coordSys.dataToPoint(tmpIn, null, tmpOut);\n }\n\n if (isLargeRender) {\n points[offset++] = point ? point[0] : NaN;\n points[offset++] = point ? point[1] : NaN;\n } else {\n data.setItemLayout(i, point && point.slice() || [NaN, NaN]);\n }\n }\n\n isLargeRender && data.setLayout('symbolPoints', points);\n }\n\n return dimLen && {\n progress: progress\n };\n }\n };\n}", "function _default(seriesType) {\n return {\n seriesType: seriesType,\n plan: createRenderPlanner(),\n reset: function (seriesModel) {\n var data = seriesModel.getData();\n var coordSys = seriesModel.coordinateSystem;\n var pipelineContext = seriesModel.pipelineContext;\n var isLargeRender = pipelineContext.large;\n\n if (!coordSys) {\n return;\n }\n\n var dims = map(coordSys.dimensions, function (dim) {\n return data.mapDimension(dim);\n }).slice(0, 2);\n var dimLen = dims.length;\n var stackResultDim = data.getCalculationInfo('stackResultDimension');\n\n if (isDimensionStacked(data, dims[0]\n /*, dims[1]*/\n )) {\n dims[0] = stackResultDim;\n }\n\n if (isDimensionStacked(data, dims[1]\n /*, dims[0]*/\n )) {\n dims[1] = stackResultDim;\n }\n\n function progress(params, data) {\n var segCount = params.end - params.start;\n var points = isLargeRender && new Float32Array(segCount * dimLen);\n\n for (var i = params.start, offset = 0, tmpIn = [], tmpOut = []; i < params.end; i++) {\n var point;\n\n if (dimLen === 1) {\n var x = data.get(dims[0], i);\n point = !isNaN(x) && coordSys.dataToPoint(x, null, tmpOut);\n } else {\n var x = tmpIn[0] = data.get(dims[0], i);\n var y = tmpIn[1] = data.get(dims[1], i); // Also {Array.<number>}, not undefined to avoid if...else... statement\n\n point = !isNaN(x) && !isNaN(y) && coordSys.dataToPoint(tmpIn, null, tmpOut);\n }\n\n if (isLargeRender) {\n points[offset++] = point ? point[0] : NaN;\n points[offset++] = point ? point[1] : NaN;\n } else {\n data.setItemLayout(i, point && point.slice() || [NaN, NaN]);\n }\n }\n\n isLargeRender && data.setLayout('symbolPoints', points);\n }\n\n return dimLen && {\n progress: progress\n };\n }\n };\n}", "function _default(seriesType) {\n return {\n seriesType: seriesType,\n plan: createRenderPlanner(),\n reset: function (seriesModel) {\n var data = seriesModel.getData();\n var coordSys = seriesModel.coordinateSystem;\n var pipelineContext = seriesModel.pipelineContext;\n var isLargeRender = pipelineContext.large;\n\n if (!coordSys) {\n return;\n }\n\n var dims = map(coordSys.dimensions, function (dim) {\n return data.mapDimension(dim);\n }).slice(0, 2);\n var dimLen = dims.length;\n var stackResultDim = data.getCalculationInfo('stackResultDimension');\n\n if (isDimensionStacked(data, dims[0]\n /*, dims[1]*/\n )) {\n dims[0] = stackResultDim;\n }\n\n if (isDimensionStacked(data, dims[1]\n /*, dims[0]*/\n )) {\n dims[1] = stackResultDim;\n }\n\n function progress(params, data) {\n var segCount = params.end - params.start;\n var points = isLargeRender && new Float32Array(segCount * dimLen);\n\n for (var i = params.start, offset = 0, tmpIn = [], tmpOut = []; i < params.end; i++) {\n var point;\n\n if (dimLen === 1) {\n var x = data.get(dims[0], i);\n point = !isNaN(x) && coordSys.dataToPoint(x, null, tmpOut);\n } else {\n var x = tmpIn[0] = data.get(dims[0], i);\n var y = tmpIn[1] = data.get(dims[1], i); // Also {Array.<number>}, not undefined to avoid if...else... statement\n\n point = !isNaN(x) && !isNaN(y) && coordSys.dataToPoint(tmpIn, null, tmpOut);\n }\n\n if (isLargeRender) {\n points[offset++] = point ? point[0] : NaN;\n points[offset++] = point ? point[1] : NaN;\n } else {\n data.setItemLayout(i, point && point.slice() || [NaN, NaN]);\n }\n }\n\n isLargeRender && data.setLayout('symbolPoints', points);\n }\n\n return dimLen && {\n progress: progress\n };\n }\n };\n}", "function _default(seriesType) {\n return {\n seriesType: seriesType,\n plan: createRenderPlanner(),\n reset: function (seriesModel) {\n var data = seriesModel.getData();\n var coordSys = seriesModel.coordinateSystem;\n var pipelineContext = seriesModel.pipelineContext;\n var isLargeRender = pipelineContext.large;\n\n if (!coordSys) {\n return;\n }\n\n var dims = map(coordSys.dimensions, function (dim) {\n return data.mapDimension(dim);\n }).slice(0, 2);\n var dimLen = dims.length;\n var stackResultDim = data.getCalculationInfo('stackResultDimension');\n\n if (isDimensionStacked(data, dims[0]\n /*, dims[1]*/\n )) {\n dims[0] = stackResultDim;\n }\n\n if (isDimensionStacked(data, dims[1]\n /*, dims[0]*/\n )) {\n dims[1] = stackResultDim;\n }\n\n function progress(params, data) {\n var segCount = params.end - params.start;\n var points = isLargeRender && new Float32Array(segCount * dimLen);\n\n for (var i = params.start, offset = 0, tmpIn = [], tmpOut = []; i < params.end; i++) {\n var point;\n\n if (dimLen === 1) {\n var x = data.get(dims[0], i);\n point = !isNaN(x) && coordSys.dataToPoint(x, null, tmpOut);\n } else {\n var x = tmpIn[0] = data.get(dims[0], i);\n var y = tmpIn[1] = data.get(dims[1], i); // Also {Array.<number>}, not undefined to avoid if...else... statement\n\n point = !isNaN(x) && !isNaN(y) && coordSys.dataToPoint(tmpIn, null, tmpOut);\n }\n\n if (isLargeRender) {\n points[offset++] = point ? point[0] : NaN;\n points[offset++] = point ? point[1] : NaN;\n } else {\n data.setItemLayout(i, point && point.slice() || [NaN, NaN]);\n }\n }\n\n isLargeRender && data.setLayout('symbolPoints', points);\n }\n\n return dimLen && {\n progress: progress\n };\n }\n };\n}", "function _default(seriesType) {\n return {\n seriesType: seriesType,\n plan: createRenderPlanner(),\n reset: function (seriesModel) {\n var data = seriesModel.getData();\n var coordSys = seriesModel.coordinateSystem;\n var pipelineContext = seriesModel.pipelineContext;\n var isLargeRender = pipelineContext.large;\n\n if (!coordSys) {\n return;\n }\n\n var dims = map(coordSys.dimensions, function (dim) {\n return data.mapDimension(dim);\n }).slice(0, 2);\n var dimLen = dims.length;\n var stackResultDim = data.getCalculationInfo('stackResultDimension');\n\n if (isDimensionStacked(data, dims[0]\n /*, dims[1]*/\n )) {\n dims[0] = stackResultDim;\n }\n\n if (isDimensionStacked(data, dims[1]\n /*, dims[0]*/\n )) {\n dims[1] = stackResultDim;\n }\n\n function progress(params, data) {\n var segCount = params.end - params.start;\n var points = isLargeRender && new Float32Array(segCount * dimLen);\n\n for (var i = params.start, offset = 0, tmpIn = [], tmpOut = []; i < params.end; i++) {\n var point;\n\n if (dimLen === 1) {\n var x = data.get(dims[0], i);\n point = !isNaN(x) && coordSys.dataToPoint(x, null, tmpOut);\n } else {\n var x = tmpIn[0] = data.get(dims[0], i);\n var y = tmpIn[1] = data.get(dims[1], i); // Also {Array.<number>}, not undefined to avoid if...else... statement\n\n point = !isNaN(x) && !isNaN(y) && coordSys.dataToPoint(tmpIn, null, tmpOut);\n }\n\n if (isLargeRender) {\n points[offset++] = point ? point[0] : NaN;\n points[offset++] = point ? point[1] : NaN;\n } else {\n data.setItemLayout(i, point && point.slice() || [NaN, NaN]);\n }\n }\n\n isLargeRender && data.setLayout('symbolPoints', points);\n }\n\n return dimLen && {\n progress: progress\n };\n }\n };\n}", "function _default(seriesType) {\n return {\n seriesType: seriesType,\n plan: createRenderPlanner(),\n reset: function (seriesModel) {\n var data = seriesModel.getData();\n var coordSys = seriesModel.coordinateSystem;\n var pipelineContext = seriesModel.pipelineContext;\n var isLargeRender = pipelineContext.large;\n\n if (!coordSys) {\n return;\n }\n\n var dims = map(coordSys.dimensions, function (dim) {\n return data.mapDimension(dim);\n }).slice(0, 2);\n var dimLen = dims.length;\n var stackResultDim = data.getCalculationInfo('stackResultDimension');\n\n if (isDimensionStacked(data, dims[0]\n /*, dims[1]*/\n )) {\n dims[0] = stackResultDim;\n }\n\n if (isDimensionStacked(data, dims[1]\n /*, dims[0]*/\n )) {\n dims[1] = stackResultDim;\n }\n\n function progress(params, data) {\n var segCount = params.end - params.start;\n var points = isLargeRender && new Float32Array(segCount * dimLen);\n\n for (var i = params.start, offset = 0, tmpIn = [], tmpOut = []; i < params.end; i++) {\n var point;\n\n if (dimLen === 1) {\n var x = data.get(dims[0], i);\n point = !isNaN(x) && coordSys.dataToPoint(x, null, tmpOut);\n } else {\n var x = tmpIn[0] = data.get(dims[0], i);\n var y = tmpIn[1] = data.get(dims[1], i); // Also {Array.<number>}, not undefined to avoid if...else... statement\n\n point = !isNaN(x) && !isNaN(y) && coordSys.dataToPoint(tmpIn, null, tmpOut);\n }\n\n if (isLargeRender) {\n points[offset++] = point ? point[0] : NaN;\n points[offset++] = point ? point[1] : NaN;\n } else {\n data.setItemLayout(i, point && point.slice() || [NaN, NaN]);\n }\n }\n\n isLargeRender && data.setLayout('symbolPoints', points);\n }\n\n return dimLen && {\n progress: progress\n };\n }\n };\n}", "_removeDimensionFromJSArray() {\n const that = this;\n\n if (that.arrayIndexingMode === 'LabVIEW') {\n that.value = that.value[0];\n }\n else {\n const dimensions = that.dimensions + 1,\n recursion = function (arr, level, parent, index) {\n for (let i = 0; i < arr.length; i++) {\n if (level !== dimensions && arr[i].length > 0) {\n recursion(arr[i], level + 1, arr, i);\n }\n else {\n if (parent !== undefined) {\n parent[index] = arr[0];\n }\n else {\n that.value = that.value[0];\n }\n }\n }\n };\n\n recursion(that.value, 1);\n }\n }", "get scalableDimensionInput() {\n return this._scalableDimension;\n }", "getDimensions () {\n return this.properties.length\n }", "function createDimensions( // TODO: TYPE completeDimensions type\nsource, opt) {\n opt = opt || {};\n return helper_completeDimensions(opt.coordDimensions || [], source, {\n // FIXME:TS detect whether source then call `.dimensionsDefine` and `.encodeDefine`?\n dimsDef: opt.dimensionsDefine || source.dimensionsDefine,\n encodeDef: opt.encodeDefine || source.encodeDefine,\n dimCount: opt.dimensionsCount,\n encodeDefaulter: opt.encodeDefaulter,\n generateCoord: opt.generateCoord,\n generateCoordCount: opt.generateCoordCount\n });\n}", "function GetDimension()\n{\n\treturn m_dimension;\n}", "function extractDimensions(aisData,binPayload,start) {\n var d = extractInt(binPayload,start,9);\n if (d!=0) aisData.dimensionToBow = d;\n start += 9;\n d = extractInt(binPayload,start,9);\n if (d!=0) aisData.dimensionToStern = d;\n start += 9;\n d = extractInt(binPayload,start,6);\n if (d!=0) aisData.dimensionToPort = d;\n start += 6;\n d = extractInt(binPayload,start,6);\n if (d!=0) aisData.dimensionToStarboard = d;\n}", "get dimension() {\r\n return this.cpoints.shape[1];\r\n }", "get dimension() {\r\n return this.cpoints.shape[1];\r\n }", "getModuleWidth(){return this.module_base_face_dimensions_axes[0];}", "function determineSourceDimensions(data, sourceFormat, seriesLayoutBy, sourceHeader, // standalone raw dimensions definition, like:\n// {\n// dimensions: ['aa', 'bb', { name: 'cc', type: 'time' }]\n// }\n// in `dataset` or `series`\ndimensionsDefine) {\n var dimensionsDetectedCount;\n var startIndex; // PEDING: could data be null/undefined here?\n // currently, if `dataset.source` not specified, error thrown.\n // if `series.data` not specified, nothing rendered without error thrown.\n // Should test these cases.\n\n if (!data) {\n return {\n dimensionsDefine: normalizeDimensionsOption(dimensionsDefine),\n startIndex: startIndex,\n dimensionsDetectedCount: dimensionsDetectedCount\n };\n }\n\n if (sourceFormat === _util_types__WEBPACK_IMPORTED_MODULE_1__[/* SOURCE_FORMAT_ARRAY_ROWS */ \"c\"]) {\n var dataArrayRows = data; // Rule: Most of the first line are string: it is header.\n // Caution: consider a line with 5 string and 1 number,\n // it still can not be sure it is a head, because the\n // 5 string may be 5 values of category columns.\n\n if (sourceHeader === 'auto' || sourceHeader == null) {\n arrayRowsTravelFirst(function (val) {\n // '-' is regarded as null/undefined.\n if (val != null && val !== '-') {\n if (Object(zrender_lib_core_util__WEBPACK_IMPORTED_MODULE_0__[/* isString */ \"C\"])(val)) {\n startIndex == null && (startIndex = 1);\n } else {\n startIndex = 0;\n }\n } // 10 is an experience number, avoid long loop.\n\n }, seriesLayoutBy, dataArrayRows, 10);\n } else {\n startIndex = Object(zrender_lib_core_util__WEBPACK_IMPORTED_MODULE_0__[/* isNumber */ \"y\"])(sourceHeader) ? sourceHeader : sourceHeader ? 1 : 0;\n }\n\n if (!dimensionsDefine && startIndex === 1) {\n dimensionsDefine = [];\n arrayRowsTravelFirst(function (val, index) {\n dimensionsDefine[index] = val != null ? val + '' : '';\n }, seriesLayoutBy, dataArrayRows, Infinity);\n }\n\n dimensionsDetectedCount = dimensionsDefine ? dimensionsDefine.length : seriesLayoutBy === _util_types__WEBPACK_IMPORTED_MODULE_1__[/* SERIES_LAYOUT_BY_ROW */ \"b\"] ? dataArrayRows.length : dataArrayRows[0] ? dataArrayRows[0].length : null;\n } else if (sourceFormat === _util_types__WEBPACK_IMPORTED_MODULE_1__[/* SOURCE_FORMAT_OBJECT_ROWS */ \"e\"]) {\n if (!dimensionsDefine) {\n dimensionsDefine = objectRowsCollectDimensions(data);\n }\n } else if (sourceFormat === _util_types__WEBPACK_IMPORTED_MODULE_1__[/* SOURCE_FORMAT_KEYED_COLUMNS */ \"d\"]) {\n if (!dimensionsDefine) {\n dimensionsDefine = [];\n Object(zrender_lib_core_util__WEBPACK_IMPORTED_MODULE_0__[/* each */ \"k\"])(data, function (colArr, key) {\n dimensionsDefine.push(key);\n });\n }\n } else if (sourceFormat === _util_types__WEBPACK_IMPORTED_MODULE_1__[/* SOURCE_FORMAT_ORIGINAL */ \"f\"]) {\n var value0 = Object(_util_model__WEBPACK_IMPORTED_MODULE_2__[/* getDataItemValue */ \"h\"])(data[0]);\n dimensionsDetectedCount = Object(zrender_lib_core_util__WEBPACK_IMPORTED_MODULE_0__[/* isArray */ \"t\"])(value0) && value0.length || 1;\n } else if (sourceFormat === _util_types__WEBPACK_IMPORTED_MODULE_1__[/* SOURCE_FORMAT_TYPED_ARRAY */ \"g\"]) {\n if (false) {}\n }\n\n return {\n startIndex: startIndex,\n dimensionsDefine: normalizeDimensionsOption(dimensionsDefine),\n dimensionsDetectedCount: dimensionsDetectedCount\n };\n}", "function determineSourceDimensions(data, sourceFormat, seriesLayoutBy, sourceHeader, // standalone raw dimensions definition, like:\n\t // {\n\t // dimensions: ['aa', 'bb', { name: 'cc', type: 'time' }]\n\t // }\n\t // in `dataset` or `series`\n\t dimensionsDefine) {\n\t var dimensionsDetectedCount;\n\t var startIndex; // PEDING: could data be null/undefined here?\n\t // currently, if `dataset.source` not specified, error thrown.\n\t // if `series.data` not specified, nothing rendered without error thrown.\n\t // Should test these cases.\n\t\n\t if (!data) {\n\t return {\n\t dimensionsDefine: normalizeDimensionsOption(dimensionsDefine),\n\t startIndex: startIndex,\n\t dimensionsDetectedCount: dimensionsDetectedCount\n\t };\n\t }\n\t\n\t if (sourceFormat === SOURCE_FORMAT_ARRAY_ROWS) {\n\t var dataArrayRows = data; // Rule: Most of the first line are string: it is header.\n\t // Caution: consider a line with 5 string and 1 number,\n\t // it still can not be sure it is a head, because the\n\t // 5 string may be 5 values of category columns.\n\t\n\t if (sourceHeader === 'auto' || sourceHeader == null) {\n\t arrayRowsTravelFirst(function (val) {\n\t // '-' is regarded as null/undefined.\n\t if (val != null && val !== '-') {\n\t if (isString(val)) {\n\t startIndex == null && (startIndex = 1);\n\t } else {\n\t startIndex = 0;\n\t }\n\t } // 10 is an experience number, avoid long loop.\n\t\n\t }, seriesLayoutBy, dataArrayRows, 10);\n\t } else {\n\t startIndex = isNumber(sourceHeader) ? sourceHeader : sourceHeader ? 1 : 0;\n\t }\n\t\n\t if (!dimensionsDefine && startIndex === 1) {\n\t dimensionsDefine = [];\n\t arrayRowsTravelFirst(function (val, index) {\n\t dimensionsDefine[index] = val != null ? val + '' : '';\n\t }, seriesLayoutBy, dataArrayRows, Infinity);\n\t }\n\t\n\t dimensionsDetectedCount = dimensionsDefine ? dimensionsDefine.length : seriesLayoutBy === SERIES_LAYOUT_BY_ROW ? dataArrayRows.length : dataArrayRows[0] ? dataArrayRows[0].length : null;\n\t } else if (sourceFormat === SOURCE_FORMAT_OBJECT_ROWS) {\n\t if (!dimensionsDefine) {\n\t dimensionsDefine = objectRowsCollectDimensions(data);\n\t }\n\t } else if (sourceFormat === SOURCE_FORMAT_KEYED_COLUMNS) {\n\t if (!dimensionsDefine) {\n\t dimensionsDefine = [];\n\t each(data, function (colArr, key) {\n\t dimensionsDefine.push(key);\n\t });\n\t }\n\t } else if (sourceFormat === SOURCE_FORMAT_ORIGINAL) {\n\t var value0 = getDataItemValue(data[0]);\n\t dimensionsDetectedCount = isArray(value0) && value0.length || 1;\n\t } else if (sourceFormat === SOURCE_FORMAT_TYPED_ARRAY) {\n\t if (true) {\n\t assert(!!dimensionsDefine, 'dimensions must be given if data is TypedArray.');\n\t }\n\t }\n\t\n\t return {\n\t startIndex: startIndex,\n\t dimensionsDefine: normalizeDimensionsOption(dimensionsDefine),\n\t dimensionsDetectedCount: dimensionsDetectedCount\n\t };\n\t }", "function dimensionConstructor(driver){\n var driver = driver;\n return $rootScope.dataMeta.crossFilterData.dimension(function(d) { return d[driver]; });\n }", "calcRegionSizeGlobal() {\n // this should only get done once\n // scanCol is the column that has the data we care about putting in the color fill\n // this returns a summary object that knows things about the size of the brain json dimensions and also the min and max of hte scan data\n //!! should only do this part once\n let globals = [1000, 1000, -1000, -1000]\n for (let sliceName in this.paneOb.regionBoundaryData) {\n let slice = this.paneOb.regionBoundaryData[sliceName]\n // skip if there's a single point feature\n for (let feature of slice.features) {\n // likely nota loop because coordinates is a single element array\n for (let line of feature.geometry.coordinates) {\n for (let pt of line) {\n if (pt[0] < globals[0]) {\n globals[0] = pt[0]\n }\n if (pt[1] < globals[1]) {\n globals[1] = pt[1]\n }\n if (pt[0] > globals[2]) {\n globals[2] = pt[0]\n }\n if (pt[1] > globals[3]) {\n globals[3] = pt[1]\n }\n }\n }\n }\n\n\n\n }\n /** This is a list of smallest and largest values found in the x,y dimensions within the geojson data provided. This is used to scale the region coordinates to the space of the canvas */\n this.regionSizes = globals\n /** This is a ratio of the heightvs the width of the brain data. Helpful for determining what the maximum value of our y interpolator should be. */\n this.canvasRatio = globals[3] / globals[2]\n }", "function updateXTickCount() {\n // console.log(\"data -> \" + JSON.stringify(data));\n // console.log(\"data.length -> \" + data.length);\n // console.log(\"(.77 * window.innerWidth - 280) / 15 -> \" + (.77 * window.innerWidth - 280) / 15);\n // console.log((Math.floor(data.length / ((.77 * window.innerWidth - 280) / 15))) - 1);\n setXTickInterval((Math.floor(data.length / ((.77 * window.innerWidth - 280) / 15))) - 1);\n }", "function determineSourceDimensions(data, sourceFormat, seriesLayoutBy, sourceHeader, // standalone raw dimensions definition, like:\n// {\n// dimensions: ['aa', 'bb', { name: 'cc', type: 'time' }]\n// }\n// in `dataset` or `series`\ndimensionsDefine) {\n var dimensionsDetectedCount;\n var startIndex; // PEDING: could data be null/undefined here?\n // currently, if `dataset.source` not specified, error thrown.\n // if `series.data` not specified, nothing rendered without error thrown.\n // Should test these cases.\n\n if (!data) {\n return {\n dimensionsDefine: normalizeDimensionsOption(dimensionsDefine),\n startIndex: startIndex,\n dimensionsDetectedCount: dimensionsDetectedCount\n };\n }\n\n if (sourceFormat === SOURCE_FORMAT_ARRAY_ROWS) {\n var dataArrayRows = data; // Rule: Most of the first line are string: it is header.\n // Caution: consider a line with 5 string and 1 number,\n // it still can not be sure it is a head, because the\n // 5 string may be 5 values of category columns.\n\n if (sourceHeader === 'auto' || sourceHeader == null) {\n arrayRowsTravelFirst(function (val) {\n // '-' is regarded as null/undefined.\n if (val != null && val !== '-') {\n if (isString(val)) {\n startIndex == null && (startIndex = 1);\n } else {\n startIndex = 0;\n }\n } // 10 is an experience number, avoid long loop.\n\n }, seriesLayoutBy, dataArrayRows, 10);\n } else {\n startIndex = isNumber(sourceHeader) ? sourceHeader : sourceHeader ? 1 : 0;\n }\n\n if (!dimensionsDefine && startIndex === 1) {\n dimensionsDefine = [];\n arrayRowsTravelFirst(function (val, index) {\n dimensionsDefine[index] = val != null ? val + '' : '';\n }, seriesLayoutBy, dataArrayRows, Infinity);\n }\n\n dimensionsDetectedCount = dimensionsDefine ? dimensionsDefine.length : seriesLayoutBy === SERIES_LAYOUT_BY_ROW ? dataArrayRows.length : dataArrayRows[0] ? dataArrayRows[0].length : null;\n } else if (sourceFormat === SOURCE_FORMAT_OBJECT_ROWS) {\n if (!dimensionsDefine) {\n dimensionsDefine = objectRowsCollectDimensions(data);\n }\n } else if (sourceFormat === SOURCE_FORMAT_KEYED_COLUMNS) {\n if (!dimensionsDefine) {\n dimensionsDefine = [];\n each(data, function (colArr, key) {\n dimensionsDefine.push(key);\n });\n }\n } else if (sourceFormat === SOURCE_FORMAT_ORIGINAL) {\n var value0 = getDataItemValue(data[0]);\n dimensionsDetectedCount = isArray(value0) && value0.length || 1;\n } else if (sourceFormat === SOURCE_FORMAT_TYPED_ARRAY) {\n if (process.env.NODE_ENV !== 'production') {\n assert(!!dimensionsDefine, 'dimensions must be given if data is TypedArray.');\n }\n }\n\n return {\n startIndex: startIndex,\n dimensionsDefine: normalizeDimensionsOption(dimensionsDefine),\n dimensionsDetectedCount: dimensionsDetectedCount\n };\n}", "function _sendCustomDimensions(_slotNums, _val)\n{\n if (_slotNums.length > 0 && _val != '' && _val != undefined)\n\t{\n\t\tif (tObjectCheck != window['GoogleAnalyticsObject'])\n\t\t{\n\t\t\tcreateTracker(false);\n\t\t}\n for (var i = 0; i < oCONFIG.GWT_UAID.length; i++)\n\t\t{\n\t\t\tif(_slotNums[i] != 'dimension0')\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\twindow[window['GoogleAnalyticsObject']](oCONFIG.PUA_NAME + i + '.set', _slotNums[i], _val);\n\t\t\t\t}\n\t\t\t\tcatch(err)\n\t\t\t\t{}\n\t\t\t}\n }\n }\n}", "removeDimension(propertyChangedHandler, changeValueDimensions) {\n const that = this,\n index = that._dimensions.length - 1;\n\n if (that._dimensions.length < 2) {\n return;\n }\n\n if (that._dimensions.length === 2) {\n const oldRowsCount = that.rows;\n\n that.rows = 1;\n that._changeRowsColumns('rows', oldRowsCount, 1, undefined, true);\n }\n\n that.$.indexerContainer.removeChild(that._dimensions[index].indexer);\n that._dimensions.pop();\n\n let indexerValue;\n\n if (that.arrayIndexingMode === 'LabVIEW') {\n indexerValue = that._coordinates[0];\n that._indexers.splice(0, 1);\n that._coordinates.splice(0, 1);\n }\n else {\n indexerValue = that._coordinates[index];\n that._indexers.pop();\n that._coordinates.pop();\n }\n\n if (that._suppressDimensionChange !== true) {\n that.dimensions -= 1;\n that.$.fireEvent('dimensionChange', { 'type': 'remove' });\n }\n\n if (changeValueDimensions !== false) {\n that._removeDimensionFromJSArray();\n\n if (that.arrayIndexingMode === 'LabVIEW') {\n that._filledUpTo.splice(0, 1);\n }\n else {\n that._filledUpTo.pop();\n }\n }\n\n if (that._absoluteSelectionStart !== undefined) {\n if (that.arrayIndexingMode === 'LabVIEW') {\n that._absoluteSelectionStart.splice(0, 1);\n }\n else {\n that._absoluteSelectionStart.pop();\n }\n }\n\n if (that._absoluteSelectionEnd !== undefined) {\n if (that.arrayIndexingMode === 'LabVIEW') {\n that._absoluteSelectionEnd.splice(0, 1);\n }\n else {\n that._absoluteSelectionEnd.pop();\n }\n }\n\n if (indexerValue > 0) {\n that._scroll();\n }\n\n if ((that.dimensions > 1 && that._suppressDimensionChange === false && that.showIndexDisplay === true && ((that.dimensions + 1) * (that.indexerHeight + 4) - 2 >= that._cachedHeight)) || that.dimensions === 1 && propertyChangedHandler !== true) {\n that._updateWidgetHeight('dimensions');\n if (that.dimensions === 1 && that.showVerticalScrollbar) {\n that._showVerticalScrollbar(false);\n }\n }\n }", "getWidth (data, maxTally) {\n const deviceWidth = Dimensions.get('window').width;\n const maxWidth = deviceWidth / 4;\n const multFactor = maxWidth / maxTally;\n\n let width = {};\n\n if (data === 0) {\n width = 0.1;\n } else {\n width = data * multFactor;\n }\n\n return width;\n }", "get scalableComponentsCount() {\n\t\t\tvar scalableComponentIdentifiers = this.scalableHeightComponentIdentifiers;\n\n\t\t\tvar scalableComponentsCount = scalableComponentIdentifiers.dimension.length + scalableComponentIdentifiers.margin.length;\n\n\t\t\treturn scalableComponentsCount;\n\t\t}", "function calculateGraphDim() {\n const w = window.innerWidth;\n const h = window.innerHeight;\n\n function greatestCommonDivisor(x, y) {\n if (typeof x !== 'number' || typeof y !== 'number') return false;\n x = Math.abs(x);\n y = Math.abs(y);\n while (y) {\n var t = y;\n y = x % y;\n x = t;\n }\n return x > 30 ? x : 30; // The minimal size of the table boxes is 20px\n }\n\n const gcd = greatestCommonDivisor(w, h);\n const tableW = Math.floor(w / gcd);\n const tableH = Math.floor(h / gcd);\n return [tableW, tableH];\n }", "function xnat_dicomSeries(){\nthis.xsiType=\"xnat:dicomSeries\";\n\n\tthis.getSchemaElementName=function(){\n\t\treturn \"dicomSeries\";\n\t}\n\n\tthis.getFullSchemaElementName=function(){\n\t\treturn \"xnat:dicomSeries\";\n\t}\nthis.extension=dynamicJSLoad('xnat_abstractResource','generated/xnat_abstractResource.js');\n\n\tthis.Dimensions_x=null;\n\n\n\tfunction getDimensions_x() {\n\t\treturn this.Dimensions_x;\n\t}\n\tthis.getDimensions_x=getDimensions_x;\n\n\n\tfunction setDimensions_x(v){\n\t\tthis.Dimensions_x=v;\n\t}\n\tthis.setDimensions_x=setDimensions_x;\n\n\tthis.Dimensions_y=null;\n\n\n\tfunction getDimensions_y() {\n\t\treturn this.Dimensions_y;\n\t}\n\tthis.getDimensions_y=getDimensions_y;\n\n\n\tfunction setDimensions_y(v){\n\t\tthis.Dimensions_y=v;\n\t}\n\tthis.setDimensions_y=setDimensions_y;\n\n\tthis.Dimensions_z=null;\n\n\n\tfunction getDimensions_z() {\n\t\treturn this.Dimensions_z;\n\t}\n\tthis.getDimensions_z=getDimensions_z;\n\n\n\tfunction setDimensions_z(v){\n\t\tthis.Dimensions_z=v;\n\t}\n\tthis.setDimensions_z=setDimensions_z;\n\n\tthis.Dimensions_volumes=null;\n\n\n\tfunction getDimensions_volumes() {\n\t\treturn this.Dimensions_volumes;\n\t}\n\tthis.getDimensions_volumes=getDimensions_volumes;\n\n\n\tfunction setDimensions_volumes(v){\n\t\tthis.Dimensions_volumes=v;\n\t}\n\tthis.setDimensions_volumes=setDimensions_volumes;\n\n\tthis.Voxelres_x=null;\n\n\n\tfunction getVoxelres_x() {\n\t\treturn this.Voxelres_x;\n\t}\n\tthis.getVoxelres_x=getVoxelres_x;\n\n\n\tfunction setVoxelres_x(v){\n\t\tthis.Voxelres_x=v;\n\t}\n\tthis.setVoxelres_x=setVoxelres_x;\n\n\tthis.Voxelres_y=null;\n\n\n\tfunction getVoxelres_y() {\n\t\treturn this.Voxelres_y;\n\t}\n\tthis.getVoxelres_y=getVoxelres_y;\n\n\n\tfunction setVoxelres_y(v){\n\t\tthis.Voxelres_y=v;\n\t}\n\tthis.setVoxelres_y=setVoxelres_y;\n\n\tthis.Voxelres_z=null;\n\n\n\tfunction getVoxelres_z() {\n\t\treturn this.Voxelres_z;\n\t}\n\tthis.getVoxelres_z=getVoxelres_z;\n\n\n\tfunction setVoxelres_z(v){\n\t\tthis.Voxelres_z=v;\n\t}\n\tthis.setVoxelres_z=setVoxelres_z;\n\n\tthis.Voxelres_units=null;\n\n\n\tfunction getVoxelres_units() {\n\t\treturn this.Voxelres_units;\n\t}\n\tthis.getVoxelres_units=getVoxelres_units;\n\n\n\tfunction setVoxelres_units(v){\n\t\tthis.Voxelres_units=v;\n\t}\n\tthis.setVoxelres_units=setVoxelres_units;\n\n\tthis.Orientation=null;\n\n\n\tfunction getOrientation() {\n\t\treturn this.Orientation;\n\t}\n\tthis.getOrientation=getOrientation;\n\n\n\tfunction setOrientation(v){\n\t\tthis.Orientation=v;\n\t}\n\tthis.setOrientation=setOrientation;\n\tthis.Imageset_image =new Array();\n\n\tfunction getImageset_image() {\n\t\treturn this.Imageset_image;\n\t}\n\tthis.getImageset_image=getImageset_image;\n\n\n\tfunction addImageset_image(v){\n\t\tthis.Imageset_image.push(v);\n\t}\n\tthis.addImageset_image=addImageset_image;\n\n\tthis.Format=null;\n\n\n\tfunction getFormat() {\n\t\treturn this.Format;\n\t}\n\tthis.getFormat=getFormat;\n\n\n\tfunction setFormat(v){\n\t\tthis.Format=v;\n\t}\n\tthis.setFormat=setFormat;\n\n\tthis.Description=null;\n\n\n\tfunction getDescription() {\n\t\treturn this.Description;\n\t}\n\tthis.getDescription=getDescription;\n\n\n\tfunction setDescription(v){\n\t\tthis.Description=v;\n\t}\n\tthis.setDescription=setDescription;\n\n\tthis.Content=null;\n\n\n\tfunction getContent() {\n\t\treturn this.Content;\n\t}\n\tthis.getContent=getContent;\n\n\n\tfunction setContent(v){\n\t\tthis.Content=v;\n\t}\n\tthis.setContent=setContent;\n\n\tthis.Cachepath=null;\n\n\n\tfunction getCachepath() {\n\t\treturn this.Cachepath;\n\t}\n\tthis.getCachepath=getCachepath;\n\n\n\tfunction setCachepath(v){\n\t\tthis.Cachepath=v;\n\t}\n\tthis.setCachepath=setCachepath;\n\n\tthis.Uid=null;\n\n\n\tfunction getUid() {\n\t\treturn this.Uid;\n\t}\n\tthis.getUid=getUid;\n\n\n\tfunction setUid(v){\n\t\tthis.Uid=v;\n\t}\n\tthis.setUid=setUid;\n\n\n\tthis.getProperty=function(xmlPath){\n\t\t\tif(xmlPath.startsWith(this.getFullSchemaElementName())){\n\t\t\t\txmlPath=xmlPath.substring(this.getFullSchemaElementName().length + 1);\n\t\t\t}\n\t\t\tif(xmlPath==\"abstractResource\"){\n\t\t\t\treturn this.Abstractresource ;\n\t\t\t} else \n\t\t\tif(xmlPath.startsWith(\"abstractResource\")){\n\t\t\t\txmlPath=xmlPath.substring(16);\n\t\t\t\tif(xmlPath==\"\")return this.Abstractresource ;\n\t\t\t\tif(xmlPath.startsWith(\"[\")){\n\t\t\t\t\tif (xmlPath.indexOf(\"/\")>-1){\n\t\t\t\t\t\tvar optionString=xmlPath.substring(0,xmlPath.indexOf(\"/\"));\n\t\t\t\t\t\txmlPath=xmlPath.substring(xmlPath.indexOf(\"/\")+1);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tvar optionString=xmlPath;\n\t\t\t\t\t\txmlPath=\"\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tvar options = loadOptions(optionString);//omUtils.js\n\t\t\t\t}else{xmlPath=xmlPath.substring(1);}\n\t\t\t\tif(this.Abstractresource!=undefined)return this.Abstractresource.getProperty(xmlPath);\n\t\t\t\telse return null;\n\t\t\t} else \n\t\t\tif(xmlPath==\"dimensions/x\"){\n\t\t\t\treturn this.Dimensions_x ;\n\t\t\t} else \n\t\t\tif(xmlPath==\"dimensions/y\"){\n\t\t\t\treturn this.Dimensions_y ;\n\t\t\t} else \n\t\t\tif(xmlPath==\"dimensions/z\"){\n\t\t\t\treturn this.Dimensions_z ;\n\t\t\t} else \n\t\t\tif(xmlPath==\"dimensions/volumes\"){\n\t\t\t\treturn this.Dimensions_volumes ;\n\t\t\t} else \n\t\t\tif(xmlPath==\"voxelRes/x\"){\n\t\t\t\treturn this.Voxelres_x ;\n\t\t\t} else \n\t\t\tif(xmlPath==\"voxelRes/y\"){\n\t\t\t\treturn this.Voxelres_y ;\n\t\t\t} else \n\t\t\tif(xmlPath==\"voxelRes/z\"){\n\t\t\t\treturn this.Voxelres_z ;\n\t\t\t} else \n\t\t\tif(xmlPath==\"voxelRes/units\"){\n\t\t\t\treturn this.Voxelres_units ;\n\t\t\t} else \n\t\t\tif(xmlPath==\"orientation\"){\n\t\t\t\treturn this.Orientation ;\n\t\t\t} else \n\t\t\tif(xmlPath==\"imageSet/image\"){\n\t\t\t\treturn this.Imageset_image ;\n\t\t\t} else \n\t\t\tif(xmlPath.startsWith(\"imageSet/image\")){\n\t\t\t\txmlPath=xmlPath.substring(14);\n\t\t\t\tif(xmlPath==\"\")return this.Imageset_image ;\n\t\t\t\tif(xmlPath.startsWith(\"[\")){\n\t\t\t\t\tif (xmlPath.indexOf(\"/\")>-1){\n\t\t\t\t\t\tvar optionString=xmlPath.substring(0,xmlPath.indexOf(\"/\"));\n\t\t\t\t\t\txmlPath=xmlPath.substring(xmlPath.indexOf(\"/\")+1);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tvar optionString=xmlPath;\n\t\t\t\t\t\txmlPath=\"\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tvar options = loadOptions(optionString);//omUtils.js\n\t\t\t\t}else{xmlPath=xmlPath.substring(1);}\n\t\t\t\tvar index=0;\n\t\t\t\tif(options){\n\t\t\t\t\tif(options.index)index=options.index;\n\t\t\t\t}\n\n\t\t\tvar whereArray;\n\t\t\t\tif (options.where){\n\n\t\t\t\twhereArray=new Array();\n\n\t\t\t\tfor(var whereCount=0;whereCount<this.Imageset_image.length;whereCount++){\n\n\t\t\t\t\tvar tempValue=this.Imageset_image[whereCount].getProperty(options.where.field);\n\n\t\t\t\t\tif(tempValue!=null)if(tempValue.toString()==options.where.value.toString()){\n\n\t\t\t\t\t\twhereArray.push(this.Imageset_image[whereCount]);\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t}else{\n\n\t\t\t\twhereArray=this.Imageset_image;\n\t\t\t\t}\n\n\t\t\tvar typeArray;\n\t\t\t\tif (options.xsiType){\n\n\t\t\t\ttypeArray=new Array();\n\n\t\t\t\tfor(var typeCount=0;typeCount<whereArray.length;typeCount++){\n\n\t\t\t\t\tif(whereArray[typeCount].getFullSchemaElementName()==options.xsiType){\n\n\t\t\t\t\t\ttypeArray.push(whereArray[typeCount]);\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t}else{\n\n\t\t\t\ttypeArray=whereArray;\n\t\t\t\t}\n\t\t\t\tif (typeArray.length>index){\n\t\t\t\t\treturn typeArray[index].getProperty(xmlPath);\n\t\t\t\t}else{\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t} else \n\t\t\tif(xmlPath==\"format\"){\n\t\t\t\treturn this.Format ;\n\t\t\t} else \n\t\t\tif(xmlPath==\"description\"){\n\t\t\t\treturn this.Description ;\n\t\t\t} else \n\t\t\tif(xmlPath==\"content\"){\n\t\t\t\treturn this.Content ;\n\t\t\t} else \n\t\t\tif(xmlPath==\"cachePath\"){\n\t\t\t\treturn this.Cachepath ;\n\t\t\t} else \n\t\t\tif(xmlPath==\"UID\"){\n\t\t\t\treturn this.Uid ;\n\t\t\t} else \n\t\t\tif(xmlPath==\"meta\"){\n\t\t\t\treturn this.Meta ;\n\t\t\t} else \n\t\t\t{\n\t\t\t\treturn this.extension.getProperty(xmlPath);\n\t\t\t}\n\t}\n\n\n\tthis.setProperty=function(xmlPath,value){\n\t\t\tif(xmlPath.startsWith(this.getFullSchemaElementName())){\n\t\t\t\txmlPath=xmlPath.substring(this.getFullSchemaElementName().length + 1);\n\t\t\t}\n\t\t\tif(xmlPath==\"abstractResource\"){\n\t\t\t\tthis.Abstractresource=value;\n\t\t\t} else \n\t\t\tif(xmlPath.startsWith(\"abstractResource\")){\n\t\t\t\txmlPath=xmlPath.substring(16);\n\t\t\t\tif(xmlPath==\"\")return this.Abstractresource ;\n\t\t\t\tif(xmlPath.startsWith(\"[\")){\n\t\t\t\t\tif (xmlPath.indexOf(\"/\")>-1){\n\t\t\t\t\t\tvar optionString=xmlPath.substring(0,xmlPath.indexOf(\"/\"));\n\t\t\t\t\t\txmlPath=xmlPath.substring(xmlPath.indexOf(\"/\")+1);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tvar optionString=xmlPath;\n\t\t\t\t\t\txmlPath=\"\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tvar options = loadOptions(optionString);//omUtils.js\n\t\t\t\t}else{xmlPath=xmlPath.substring(1);}\n\t\t\t\tif(this.Abstractresource!=undefined){\n\t\t\t\t\tthis.Abstractresource.setProperty(xmlPath,value);\n\t\t\t\t}else{\n\t\t\t\t\t\tif(options && options.xsiType){\n\t\t\t\t\t\t\tthis.Abstractresource= instanciateObject(options.xsiType);//omUtils.js\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tthis.Abstractresource= instanciateObject(\"xnat:abstractResource\");//omUtils.js\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(options && options.where)this.Abstractresource.setProperty(options.where.field,options.where.value);\n\t\t\t\t\t\tthis.Abstractresource.setProperty(xmlPath,value);\n\t\t\t\t}\n\t\t\t} else \n\t\t\tif(xmlPath==\"dimensions/x\"){\n\t\t\t\tthis.Dimensions_x=value;\n\t\t\t} else \n\t\t\tif(xmlPath==\"dimensions/y\"){\n\t\t\t\tthis.Dimensions_y=value;\n\t\t\t} else \n\t\t\tif(xmlPath==\"dimensions/z\"){\n\t\t\t\tthis.Dimensions_z=value;\n\t\t\t} else \n\t\t\tif(xmlPath==\"dimensions/volumes\"){\n\t\t\t\tthis.Dimensions_volumes=value;\n\t\t\t} else \n\t\t\tif(xmlPath==\"voxelRes/x\"){\n\t\t\t\tthis.Voxelres_x=value;\n\t\t\t} else \n\t\t\tif(xmlPath==\"voxelRes/y\"){\n\t\t\t\tthis.Voxelres_y=value;\n\t\t\t} else \n\t\t\tif(xmlPath==\"voxelRes/z\"){\n\t\t\t\tthis.Voxelres_z=value;\n\t\t\t} else \n\t\t\tif(xmlPath==\"voxelRes/units\"){\n\t\t\t\tthis.Voxelres_units=value;\n\t\t\t} else \n\t\t\tif(xmlPath==\"orientation\"){\n\t\t\t\tthis.Orientation=value;\n\t\t\t} else \n\t\t\tif(xmlPath==\"imageSet/image\"){\n\t\t\t\tthis.Imageset_image=value;\n\t\t\t} else \n\t\t\tif(xmlPath.startsWith(\"imageSet/image\")){\n\t\t\t\txmlPath=xmlPath.substring(14);\n\t\t\t\tif(xmlPath==\"\")return this.Imageset_image ;\n\t\t\t\tif(xmlPath.startsWith(\"[\")){\n\t\t\t\t\tif (xmlPath.indexOf(\"/\")>-1){\n\t\t\t\t\t\tvar optionString=xmlPath.substring(0,xmlPath.indexOf(\"/\"));\n\t\t\t\t\t\txmlPath=xmlPath.substring(xmlPath.indexOf(\"/\")+1);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tvar optionString=xmlPath;\n\t\t\t\t\t\txmlPath=\"\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tvar options = loadOptions(optionString);//omUtils.js\n\t\t\t\t}else{xmlPath=xmlPath.substring(1);}\n\t\t\t\tvar index=0;\n\t\t\t\tif(options){\n\t\t\t\t\tif(options.index)index=options.index;\n\t\t\t\t}\n\n\t\t\tvar whereArray;\n\t\t\t\tif (options && options.where){\n\n\t\t\t\twhereArray=new Array();\n\n\t\t\t\tfor(var whereCount=0;whereCount<this.Imageset_image.length;whereCount++){\n\n\t\t\t\t\tvar tempValue=this.Imageset_image[whereCount].getProperty(options.where.field);\n\n\t\t\t\t\tif(tempValue!=null)if(tempValue.toString()==options.where.value.toString()){\n\n\t\t\t\t\t\twhereArray.push(this.Imageset_image[whereCount]);\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t}else{\n\n\t\t\t\twhereArray=this.Imageset_image;\n\t\t\t\t}\n\n\t\t\tvar typeArray;\n\t\t\t\tif (options && options.xsiType){\n\n\t\t\t\ttypeArray=new Array();\n\n\t\t\t\tfor(var typeCount=0;typeCount<whereArray.length;typeCount++){\n\n\t\t\t\t\tif(whereArray[typeCount].getFullSchemaElementName()==options.xsiType){\n\n\t\t\t\t\t\ttypeArray.push(whereArray[typeCount]);\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t}else{\n\n\t\t\t\ttypeArray=whereArray;\n\t\t\t\t}\n\t\t\t\tif (typeArray.length>index){\n\t\t\t\t\ttypeArray[index].setProperty(xmlPath,value);\n\t\t\t\t}else{\n\t\t\t\t\tvar newChild;\n\t\t\t\t\tif(options && options.xsiType){\n\t\t\t\t\t\tnewChild= instanciateObject(options.xsiType);//omUtils.js\n\t\t\t\t\t}else{\n\t\t\t\t\t\tnewChild= instanciateObject(\"xnat:dicomSeries_image\");//omUtils.js\n\t\t\t\t\t}\n\t\t\t\t\tthis.addImageset_image(newChild);\n\t\t\t\t\tif(options && options.where)newChild.setProperty(options.where.field,options.where.value);\n\t\t\t\t\tnewChild.setProperty(xmlPath,value);\n\t\t\t\t}\n\t\t\t} else \n\t\t\tif(xmlPath==\"format\"){\n\t\t\t\tthis.Format=value;\n\t\t\t} else \n\t\t\tif(xmlPath==\"description\"){\n\t\t\t\tthis.Description=value;\n\t\t\t} else \n\t\t\tif(xmlPath==\"content\"){\n\t\t\t\tthis.Content=value;\n\t\t\t} else \n\t\t\tif(xmlPath==\"cachePath\"){\n\t\t\t\tthis.Cachepath=value;\n\t\t\t} else \n\t\t\tif(xmlPath==\"UID\"){\n\t\t\t\tthis.Uid=value;\n\t\t\t} else \n\t\t\tif(xmlPath==\"meta\"){\n\t\t\t\tthis.Meta=value;\n\t\t\t} else \n\t\t\t{\n\t\t\t\treturn this.extension.setProperty(xmlPath,value);\n\t\t\t}\n\t}\n\n\t/**\n\t * Sets the value for a field via the XMLPATH.\n\t * @param v Value to Set.\n\t */\n\tthis.setReferenceField=function(xmlPath,v) {\n\t\tif (xmlPath==\"imageSet/image\"){\n\t\t\tthis.addImageset_image(v);\n\t\t}\n\t\telse{\n\t\t\tthis.extension.setReferenceField(xmlPath,v);\n\t\t}\n\t}\n\n\t/**\n\t * Gets the value for a field via the XMLPATH.\n\t * @param v Value to Set.\n\t */\n\tthis.getReferenceFieldName=function(xmlPath) {\n\t\tif (xmlPath==\"imageSet/image\"){\n\t\t\treturn \"http://nrg.wustl.edu/xnat:dicomSeries_image\";\n\t\t}\n\t\telse{\n\t\t\treturn this.extension.getReferenceFieldName(xmlPath);\n\t\t}\n\t}\n\n\t/**\n\t * Returns whether or not this is a reference field\n\t */\n\tthis.getFieldType=function(xmlPath){\n\t\tif (xmlPath==\"dimensions/x\"){\n\t\t\treturn \"field_data\";\n\t\t}else if (xmlPath==\"dimensions/y\"){\n\t\t\treturn \"field_data\";\n\t\t}else if (xmlPath==\"dimensions/z\"){\n\t\t\treturn \"field_data\";\n\t\t}else if (xmlPath==\"dimensions/volumes\"){\n\t\t\treturn \"field_data\";\n\t\t}else if (xmlPath==\"voxelRes/x\"){\n\t\t\treturn \"field_data\";\n\t\t}else if (xmlPath==\"voxelRes/y\"){\n\t\t\treturn \"field_data\";\n\t\t}else if (xmlPath==\"voxelRes/z\"){\n\t\t\treturn \"field_data\";\n\t\t}else if (xmlPath==\"voxelRes/units\"){\n\t\t\treturn \"field_data\";\n\t\t}else if (xmlPath==\"orientation\"){\n\t\t\treturn \"field_data\";\n\t\t}else if (xmlPath==\"imageSet/image\"){\n\t\t\treturn \"field_multi_reference\";\n\t\t}else if (xmlPath==\"format\"){\n\t\t\treturn \"field_data\";\n\t\t}else if (xmlPath==\"description\"){\n\t\t\treturn \"field_data\";\n\t\t}else if (xmlPath==\"content\"){\n\t\t\treturn \"field_data\";\n\t\t}else if (xmlPath==\"cachePath\"){\n\t\t\treturn \"field_data\";\n\t\t}else if (xmlPath==\"UID\"){\n\t\t\treturn \"field_data\";\n\t\t}\n\t\telse{\n\t\t\treturn this.extension.getFieldType(xmlPath);\n\t\t}\n\t}\n\n\n\tthis.toXML=function(xmlTxt,preventComments){\n\t\txmlTxt+=\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\";\n\t\txmlTxt+=\"\\n<xnat:dicomSeries\";\n\t\txmlTxt+=this.getXMLAtts();\n\t\txmlTxt+=\" xmlns:arc=\\\"http://nrg.wustl.edu/arc\\\"\";\n\t\txmlTxt+=\" xmlns:cat=\\\"http://nrg.wustl.edu/catalog\\\"\";\n\t\txmlTxt+=\" xmlns:pipe=\\\"http://nrg.wustl.edu/pipe\\\"\";\n\t\txmlTxt+=\" xmlns:prov=\\\"http://www.nbirn.net/prov\\\"\";\n\t\txmlTxt+=\" xmlns:scr=\\\"http://nrg.wustl.edu/scr\\\"\";\n\t\txmlTxt+=\" xmlns:val=\\\"http://nrg.wustl.edu/val\\\"\";\n\t\txmlTxt+=\" xmlns:wrk=\\\"http://nrg.wustl.edu/workflow\\\"\";\n\t\txmlTxt+=\" xmlns:xdat=\\\"http://nrg.wustl.edu/security\\\"\";\n\t\txmlTxt+=\" xmlns:xnat=\\\"http://nrg.wustl.edu/xnat\\\"\";\n\t\txmlTxt+=\" xmlns:xnat_a=\\\"http://nrg.wustl.edu/xnat_assessments\\\"\";\n\t\txmlTxt+=\" xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\"\";\n\t\txmlTxt+=\">\";\n\t\txmlTxt+=this.getXMLBody(preventComments)\n\t\txmlTxt+=\"\\n</xnat:dicomSeries>\";\n\t\treturn xmlTxt;\n\t}\n\n\n\tthis.getXMLComments=function(preventComments){\n\t\tvar str =\"\";\n\t\tif((preventComments==undefined || !preventComments) && this.hasXMLComments()){\n\t\t}\n\t\treturn str;\n\t}\n\n\n\tthis.getXMLAtts=function(){\n\t\tvar attTxt = this.extension.getXMLAtts();\n\t\tif (this.Format!=null)\n\t\t\tattTxt+=\" format=\\\"\" +this.Format +\"\\\"\";\n\t\t//NOT REQUIRED FIELD\n\n\t\tif (this.Description!=null)\n\t\t\tattTxt+=\" description=\\\"\" +this.Description +\"\\\"\";\n\t\t//NOT REQUIRED FIELD\n\n\t\tif (this.Content!=null)\n\t\t\tattTxt+=\" content=\\\"\" +this.Content +\"\\\"\";\n\t\t//NOT REQUIRED FIELD\n\n\t\tif (this.Cachepath!=null)\n\t\t\tattTxt+=\" cachePath=\\\"\" +this.Cachepath +\"\\\"\";\n\t\t//NOT REQUIRED FIELD\n\n\t\tif (this.Uid!=null)\n\t\t\tattTxt+=\" UID=\\\"\" +this.Uid +\"\\\"\";\n\t\telse attTxt+=\" UID=\\\"\\\"\";//REQUIRED FIELD\n\n\t\treturn attTxt;\n\t}\n\n\n\tthis.getXMLBody=function(preventComments){\n\t\tvar xmlTxt=this.getXMLComments(preventComments);\n\t\txmlTxt+=this.extension.getXMLBody(preventComments);\n\t\tvar DimensionsATT = \"\"\n\t\tif (this.Dimensions_x!=null)\n\t\t\tDimensionsATT+=\" x=\\\"\" + this.Dimensions_x + \"\\\"\";\n\t\tif (this.Dimensions_y!=null)\n\t\t\tDimensionsATT+=\" y=\\\"\" + this.Dimensions_y + \"\\\"\";\n\t\tif (this.Dimensions_z!=null)\n\t\t\tDimensionsATT+=\" z=\\\"\" + this.Dimensions_z + \"\\\"\";\n\t\tif (this.Dimensions_volumes!=null)\n\t\t\tDimensionsATT+=\" volumes=\\\"\" + this.Dimensions_volumes + \"\\\"\";\n\t\tif(DimensionsATT!=\"\"){\n\t\t\txmlTxt+=\"\\n<xnat:dimensions\";\n\t\t\txmlTxt+=DimensionsATT;\n\t\t\txmlTxt+=\"/>\";\n\t\t}\n\n\t\tvar VoxelresATT = \"\"\n\t\tif (this.Voxelres_x!=null)\n\t\t\tVoxelresATT+=\" x=\\\"\" + this.Voxelres_x + \"\\\"\";\n\t\tif (this.Voxelres_y!=null)\n\t\t\tVoxelresATT+=\" y=\\\"\" + this.Voxelres_y + \"\\\"\";\n\t\tif (this.Voxelres_z!=null)\n\t\t\tVoxelresATT+=\" z=\\\"\" + this.Voxelres_z + \"\\\"\";\n\t\tif (this.Voxelres_units!=null)\n\t\t\tVoxelresATT+=\" units=\\\"\" + this.Voxelres_units.replace(/>/g,\"&gt;\").replace(/</g,\"&lt;\") + \"\\\"\";\n\t\tif(VoxelresATT!=\"\"){\n\t\t\txmlTxt+=\"\\n<xnat:voxelRes\";\n\t\t\txmlTxt+=VoxelresATT;\n\t\t\txmlTxt+=\"/>\";\n\t\t}\n\n\t\tif (this.Orientation!=null){\n\t\t\txmlTxt+=\"\\n<xnat:orientation\";\n\t\t\txmlTxt+=\">\";\n\t\t\txmlTxt+=this.Orientation.replace(/>/g,\"&gt;\").replace(/</g,\"&lt;\");\n\t\t\txmlTxt+=\"</xnat:orientation>\";\n\t\t}\n\t\t\tvar child0=0;\n\t\t\tvar att0=0;\n\t\t\tchild0+=this.Imageset_image.length;\n\t\t\tif(child0>0 || att0>0){\n\t\t\t\txmlTxt+=\"\\n<xnat:imageSet\";\n\t\t\tif(child0==0){\n\t\t\t\txmlTxt+=\"/>\";\n\t\t\t}else{\n\t\t\t\txmlTxt+=\">\";\n\t\tfor(var Imageset_imageCOUNT=0;Imageset_imageCOUNT<this.Imageset_image.length;Imageset_imageCOUNT++){\n\t\t\txmlTxt +=\"\\n<xnat:image\";\n\t\t\txmlTxt +=this.Imageset_image[Imageset_imageCOUNT].getXMLAtts();\n\t\t\tif(this.Imageset_image[Imageset_imageCOUNT].xsiType!=\"xnat:dicomSeries_image\"){\n\t\t\t\txmlTxt+=\" xsi:type=\\\"\" + this.Imageset_image[Imageset_imageCOUNT].xsiType + \"\\\"\";\n\t\t\t}\n\t\t\tif (this.Imageset_image[Imageset_imageCOUNT].hasXMLBodyContent()){\n\t\t\t\txmlTxt+=\">\";\n\t\t\t\txmlTxt+=this.Imageset_image[Imageset_imageCOUNT].getXMLBody(preventComments);\n\t\t\t\t\txmlTxt+=\"</xnat:image>\";\n\t\t\t}else {xmlTxt+=\"/>\";}\n\t\t}\n\t\t\t\txmlTxt+=\"\\n</xnat:imageSet>\";\n\t\t\t}\n\t\t\t}\n\n\t\treturn xmlTxt;\n\t}\n\n\n\tthis.hasXMLComments=function(){\n\t}\n\n\n\tthis.hasXMLBodyContent=function(){\n\t\tif (this.Dimensions_x!=null)\n\t\t\treturn true;\n\t\tif (this.Dimensions_y!=null)\n\t\t\treturn true;\n\t\tif (this.Dimensions_z!=null)\n\t\t\treturn true;\n\t\tif (this.Dimensions_volumes!=null)\n\t\t\treturn true;\n\t\tif (this.Voxelres_x!=null)\n\t\t\treturn true;\n\t\tif (this.Voxelres_y!=null)\n\t\t\treturn true;\n\t\tif (this.Voxelres_z!=null)\n\t\t\treturn true;\n\t\tif (this.Voxelres_units!=null)\n\t\t\treturn true;\n\t\tif (this.Orientation!=null) return true;\n\t\t\tif(this.Imageset_image.length>0)return true;\n\t\tif(this.hasXMLComments())return true;\n\t\tif(this.extension.hasXMLBodyContent())return true;\n\t\treturn false;\n\t}\n}", "function getSize(dimensions) {\r\n\tvar size = 0;\r\n\tif (dimensions) {\r\n\t\t// get first number in dimensions\r\n\t\tvar dArray = dimensions.split(\" \");\r\n\t\tvar i = dArray.findIndex(Number);\r\n\t\tvar d1 = dArray[i];\r\n\t\tdArray = dArray.slice(i + 1);\r\n\r\n\t\t// get second number, if one exists\r\n\t\ti = dArray.findIndex(Number);\r\n\t\tif (i != -1) {\r\n\t\t\tvar d2 = dArray[i];\r\n\t\t} else {\r\n\t\t\tvar d2 = 1;\r\n\t\t}\r\n\r\n\t\t// cap size \r\n\t\tif (d1 > dimensionCap) {\r\n\t\t\td1 = dimensionCap;\r\n\t\t}\r\n\t\tif (d2 > dimensionCap) {\r\n\t\t\td2 = dimensionCap;\r\n\t\t}\r\n\r\n\t\t// use logarithmic scale\r\n\t\tif ((d1 > 0) && (d2 > 0)) {\r\n\t\t\tsize = Math.round((convolver.length - 1)*Math.log(Math.sqrt(d1*d2))/Math.log(dimensionCap));\r\n\t\t}\r\n\r\n\t\tif (size < 0) {\r\n\t\t\tsize = 0;\r\n\t\t} else if (size > (convolver.length - 1)) {\r\n\t\t\tsize = (convolver.length - 1);\r\n\t\t}\r\n\t\t\r\n\t\tdArray = null;\r\n\t\ti = null;\r\n\t\td1 = null;\r\n\t\td2 = null;\r\n\t}\r\n\r\n\tdimensions = null;\r\n\r\n\treturn size;\r\n}", "function _dim() {\r\n var d = _dfa(arguments);\r\n if (d) {\r\n this.d = objDim(this, d);\r\n }\r\n return objCss(this, \"position\") == \"absolute\" ? this.d : objDim(this);\r\n}", "function createListFromArray(source, seriesModel, opt) {\n opt = opt || {};\n\n if (!Object(Source[\"e\" /* isSourceInstance */])(source)) {\n source = Object(Source[\"c\" /* createSourceFromSeriesDataOption */])(source);\n }\n\n var coordSysName = seriesModel.get('coordinateSystem');\n var registeredCoordSys = CoordinateSystem[\"a\" /* default */].get(coordSysName);\n var coordSysInfo = getCoordSysInfoBySeries(seriesModel);\n var coordSysDimDefs;\n\n if (coordSysInfo && coordSysInfo.coordSysDims) {\n coordSysDimDefs = util[\"H\" /* map */](coordSysInfo.coordSysDims, function (dim) {\n var dimInfo = {\n name: dim\n };\n var axisModel = coordSysInfo.axisMap.get(dim);\n\n if (axisModel) {\n var axisType = axisModel.get('type');\n dimInfo.type = getDimensionTypeByAxis(axisType); // dimInfo.stackable = isStackable(axisType);\n }\n\n return dimInfo;\n });\n }\n\n if (!coordSysDimDefs) {\n // Get dimensions from registered coordinate system\n coordSysDimDefs = registeredCoordSys && (registeredCoordSys.getDimensionsInfo ? registeredCoordSys.getDimensionsInfo() : registeredCoordSys.dimensions.slice()) || ['x', 'y'];\n }\n\n var useEncodeDefaulter = opt.useEncodeDefaulter;\n var dimInfoList = createDimensions(source, {\n coordDimensions: coordSysDimDefs,\n generateCoord: opt.generateCoord,\n encodeDefaulter: util[\"w\" /* isFunction */](useEncodeDefaulter) ? useEncodeDefaulter : useEncodeDefaulter ? util[\"i\" /* curry */](sourceHelper[\"c\" /* makeSeriesEncodeForAxisCoordSys */], coordSysDimDefs, seriesModel) : null\n });\n var firstCategoryDimIndex;\n var hasNameEncode;\n coordSysInfo && util[\"k\" /* each */](dimInfoList, function (dimInfo, dimIndex) {\n var coordDim = dimInfo.coordDim;\n var categoryAxisModel = coordSysInfo.categoryAxisMap.get(coordDim);\n\n if (categoryAxisModel) {\n if (firstCategoryDimIndex == null) {\n firstCategoryDimIndex = dimIndex;\n }\n\n dimInfo.ordinalMeta = categoryAxisModel.getOrdinalMeta();\n\n if (opt.createInvertedIndices) {\n dimInfo.createInvertedIndices = true;\n }\n }\n\n if (dimInfo.otherDims.itemName != null) {\n hasNameEncode = true;\n }\n });\n\n if (!hasNameEncode && firstCategoryDimIndex != null) {\n dimInfoList[firstCategoryDimIndex].otherDims.itemName = 0;\n }\n\n var stackCalculationInfo = enableDataStack(seriesModel, dimInfoList);\n var list = new data_List(dimInfoList, seriesModel);\n list.setCalculationInfo(stackCalculationInfo);\n var dimValueGetter = firstCategoryDimIndex != null && isNeedCompleteOrdinalData(source) ? function (itemOpt, dimName, dataIndex, dimIndex) {\n // Use dataIndex as ordinal value in categoryAxis\n return dimIndex === firstCategoryDimIndex ? dataIndex : this.defaultDimValueGetter(itemOpt, dimName, dataIndex, dimIndex);\n } : null;\n list.hasItemOption = false;\n list.initData(source, null, dimValueGetter);\n return list;\n}", "function handle_data_model(tsnedata,isKeepUndefined) {\n windowsSize = windowsSize||1;\n // get windown surrounding\n let windowSurrounding = (windowsSize - 1)/2;\n let dataIn = [];\n // let timeScale = d3.scaleLinear().domain([0,sampleS.timespan.length-1]).range([0,timeWeight]);\n d3.values(tsnedata).forEach(axis_arr => {\n let lastcluster;\n let lastdataarr;\n let count = 0;\n let timeLength = sampleS.timespan.length;\n sampleS.timespan.forEach((t, i) => {\n let currentData = axis_arr[i].slice();\n currentData.cluster = axis_arr[i].cluster;\n currentData.name = axis_arr[i].name;\n currentData.__timestep = axis_arr[i].timestep;\n let index = currentData.cluster;\n currentData.clusterName = cluster_info[index].name;\n let appendCondition = !cluster_info[currentData.cluster].hide;\n appendCondition = appendCondition && !(lastcluster !== undefined && index === lastcluster) || runopt.suddenGroup && calculateMSE_num(lastdataarr, currentData) > cluster_info[currentData.cluster].mse * runopt.suddenGroup;\n if (appendCondition) {\n // if (!(lastcluster !== undefined && index === lastcluster)|| currentData.cluster===13 || runopt.suddenGroup && calculateMSE_num(lastdataarr, currentData) > cluster_info[currentData.cluster].mse * runopt.suddenGroup) {\n currentData.show = true;\n // // add all points\n // }\n // // timeline precalculate\n // if (true) {\n\n lastcluster = index;\n lastdataarr = currentData.slice();\n currentData.timestep = count; // TODO temperal timestep\n count++;\n // make copy of axis data\n currentData.data = currentData.slice();\n // currentData.push(timeScale(axis_arr[i].timestep))\n // adding window\n for (let w = 0; w<windowSurrounding; w++)\n {\n let currentIndex = i -w;\n let currentWData;\n if (currentIndex<0) // bounder problem\n currentIndex = 0;\n currentWData = axis_arr[currentIndex].slice();\n // currentWData.push(timeScale(axis_arr[currentIndex].timestep))\n currentWData.forEach(d=>{\n currentData.push(d);\n });\n }\n for (let w = 0; w<windowSurrounding; w++)\n {\n let currentIndex = i + w;\n let currentWData;\n if (currentIndex > timeLength-1) // bounder problem\n currentIndex = timeLength-1;\n currentWData = axis_arr[currentIndex];\n // currentWData.push(timeScale(axis_arr[currentIndex].timestep))\n currentWData.forEach(d=>{\n currentData.push(d);\n });\n }\n if (isKeepUndefined)\n {\n for (let i = 0; i< currentData.length; i++){\n if (currentData[i]===0)\n currentData[i] = -1;\n }\n }\n dataIn.push(currentData);\n }\n return index;\n // return cluster_info.findIndex(c=>distance(c.__metrics.normalize,axis_arr)<=c.radius);\n })\n });\n return dataIn;\n}", "function getChartDimensions() {\r\n var chartWidth = aleph.xMain.range()[1] - aleph.xMain.range()[0];\r\n var chartHeight = aleph.yMain.range()[0] - aleph.yMain.range()[1];\r\n\r\n return;\r\n}", "function getSeriesLength(series) {\n var size = 0,\n key;\n\n for (key in series) {\n if (series.hasOwnProperty(key)) {\n size += 1;\n }\n }\n\n return size;\n }", "addDimension(changeValueDimensions) {\n const that = this;\n\n if (that._suppressDimensionChange !== true && that.dimensions === 32) {\n return;\n }\n\n const indexer = document.createElement('jqx-numeric-text-box');\n\n indexer.className = 'jqx-array-indexer';\n indexer.style.height = that.indexerHeight + 'px';\n indexer.inputFormat = 'integer';\n indexer.spinButtons = true;\n indexer.min = 0;\n indexer.max = 4294967295;\n indexer.disabled = that.disabled;\n indexer.animation = that.animation;\n indexer.validation = 'interaction';\n indexer.wordLength = 'uint64';\n indexer.onReady = function () {\n indexer.$upButton.addClass('jqx-array-indexer-increment');\n indexer.$downButton.addClass('jqx-array-indexer-decrement');\n }\n\n that.$.indexerContainer.insertBefore(indexer, that.$.indexerContainer.children ? that.$.indexerContainer.children[0] : null);\n\n indexer.$.listen('change', that._indexerChangeHandler.bind(that));\n\n that._dimensions.push({ index: that._dimensions.length, indexer: indexer });\n\n if (that.arrayIndexingMode === 'LabVIEW') {\n that._indexers.unshift(indexer);\n that._coordinates.unshift(0);\n }\n else {\n that._indexers.push(indexer);\n that._coordinates.push(0);\n }\n\n indexer.dimension = that._indexers.length - 1;\n\n if (that._suppressDimensionChange !== true) {\n that.dimensions += 1;\n that.$.fireEvent('dimensionChange', { 'type': 'add' });\n }\n\n if (that._initialDimensions !== true && changeValueDimensions !== false) {\n that._validateValueArrayDimensions();\n\n if (that.arrayIndexingMode === 'LabVIEW') {\n that._filledUpTo.unshift(0);\n }\n else {\n that._filledUpTo.push(0);\n }\n\n if (that._oneDimensionSpecialCase === true) {\n that._oneDimensionSpecialCase = false;\n that.$.verticalScrollbar.value = 0;\n that._scroll();\n }\n }\n\n if (that._absoluteSelectionStart !== undefined) {\n if (that.arrayIndexingMode === 'LabVIEW') {\n that._absoluteSelectionStart.unshift(0);\n }\n else {\n that._absoluteSelectionStart.push(0);\n }\n }\n\n if (that._absoluteSelectionEnd !== undefined) {\n if (that.arrayIndexingMode === 'LabVIEW') {\n that._absoluteSelectionEnd.unshift(0);\n }\n else {\n that._absoluteSelectionEnd.push(0);\n }\n }\n\n if (!that._initialDimensions) {\n that._refreshSelection();\n }\n\n if (that._suppressDimensionChange === false && that.showIndexDisplay === true && (that.dimensions * (that.indexerHeight + 4) - 2 > that._cachedHeight)) {\n that._updateWidgetHeight('dimensions');\n }\n }", "parseArrayDimension () {\n const dimToken = this.getToken();\n if(dimToken.type === this.lexerClass.INTEGER) {\n //parse as int literal\n this.pos++;\n return this.getIntLiteral(dimToken);\n } else if(dimToken.type === this.lexerClass.ID) {\n //parse as variable\n this.pos++;\n return this.parseVariable(dimToken);\n } else {\n throw SyntaxErrorFactory.invalid_array_dimension(this.lexer.literalNames[this.lexerClass.RK_INTEGER], dimToken);\n }\n }", "function computeSizes () { \n\tvar width = $(window).width();\n\tvar height = $(window).height();\n\tvar margin = 100;\n\tvar dimens = {\n\t\theight:height,\n\t\twidth: width,\n\t\tmargin: margin\n\t}\n\treturn dimens;\n}", "function addDimensions() {\n if (!(`Dimensions` in qlcPlusPhysical)) {\n return;\n }\n\n const width = Number.parseFloat(qlcPlusPhysical.Dimensions[0].$.Width);\n const height = Number.parseFloat(qlcPlusPhysical.Dimensions[0].$.Height);\n const depth = Number.parseFloat(qlcPlusPhysical.Dimensions[0].$.Depth);\n const weight = Number.parseFloat(qlcPlusPhysical.Dimensions[0].$.Weight);\n\n const dimensionsArray = [width, height, depth];\n\n if (width + height + depth !== 0 && JSON.stringify(dimensionsArray) !== JSON.stringify(oflFixturePhysical.dimensions)) {\n physical.dimensions = dimensionsArray;\n }\n\n if (weight !== 0 && oflFixturePhysical.weight !== weight) {\n physical.weight = weight;\n }\n }", "function getGraphWidth() {\n\t\treturn width - xOffset * 2;\n\t}", "function size (x, dim) {\n var m = math.size(x)\n return m.subset(math.index(dim))\n}", "function normalizeDimensionsOption(dimensionsDefine) {\n if (!dimensionsDefine) {\n // The meaning of null/undefined is different from empty array.\n return;\n }\n\n var nameMap = Object(zrender_lib_core_util__WEBPACK_IMPORTED_MODULE_0__[/* createHashMap */ \"g\"])();\n return Object(zrender_lib_core_util__WEBPACK_IMPORTED_MODULE_0__[/* map */ \"H\"])(dimensionsDefine, function (rawItem, index) {\n rawItem = Object(zrender_lib_core_util__WEBPACK_IMPORTED_MODULE_0__[/* isObject */ \"z\"])(rawItem) ? rawItem : {\n name: rawItem\n }; // Other fields will be discarded.\n\n var item = {\n name: rawItem.name,\n displayName: rawItem.displayName,\n type: rawItem.type\n }; // User can set null in dimensions.\n // We dont auto specify name, othewise a given name may\n // cause it be refered unexpectedly.\n\n if (item.name == null) {\n return item;\n } // Also consider number form like 2012.\n\n\n item.name += ''; // User may also specify displayName.\n // displayName will always exists except user not\n // specified or dim name is not specified or detected.\n // (A auto generated dim name will not be used as\n // displayName).\n\n if (item.displayName == null) {\n item.displayName = item.name;\n }\n\n var exist = nameMap.get(item.name);\n\n if (!exist) {\n nameMap.set(item.name, {\n count: 1\n });\n } else {\n item.name += '-' + exist.count++;\n }\n\n return item;\n });\n}", "function graphicSize() {\n var totalWindowWidth = window.innerWidth;\n var totalWindowHeight = window.innerHeight;\n\n var graphWidth = (totalWindowWidth - (windowMargins.left + windowMargins.right))/2;\n var graphHeight = (totalWindowHeight - (windowMargins.top + windowMargins.bottom))/2;\n\n return [graphWidth, 300];\n}", "function graphicSize() {\n var totalWindowWidth = window.innerWidth;\n var totalWindowHeight = window.innerHeight;\n\n var graphWidth = (totalWindowWidth - (windowMargins.left + windowMargins.right))/2;\n var graphHeight = (totalWindowHeight - (windowMargins.top + windowMargins.bottom))/2;\n\n return [graphWidth, 300];\n}", "getDataSize () {\n let size = 0\n\n for (let n=0; n<this.neurons.length; n++) {\n size += this.neurons[n].weights.length + 1\n }\n\n return size\n }", "function dimension(divs) {\n return nodesToRanges(\n coverDomain(\n shapeToNodes(\n makeNodes(divs)\n )\n )\n )\n }", "getDotSize(data) {\r\n var container = $(`#${this.container_id}`);\r\n var diameter = Math.floor(container.width() / data.length);\r\n\r\n return {\r\n diameter: diameter,\r\n unit_height: Math.floor((container.height()-diameter) / (Math.max.apply(null, data)))\r\n };\r\n }", "setChartDimension(){\n // SVG element\n this.svg\n .attr(\"viewBox\", `0 0 ${this.cfg.width+this.cfg.margin.left+this.cfg.margin.right} ${this.cfg.height+this.cfg.margin.top+this.cfg.margin.bottom}`)\n .attr(\"width\", this.cfg.width + this.cfg.margin.left + this.cfg.margin.right)\n .attr(\"height\", this.cfg.height + this.cfg.margin.top + this.cfg.margin.bottom);\n \n // Center element\n this.gcenter\n .attr('transform', `translate(${this.cfg.width/2}, ${this.cfg.height/2})`);\n }", "function changeHis(){\r\n\t\tvar multi = 4;\r\n\t\tfor(var countIndex = 0;countIndex<countArray.length;countIndex++){\r\n\t\t\tcountArray[countIndex] = 0;\r\n\t\t}\r\n\t\ttimeData = _.filter(treeNodeList, function(d) {\r\n\t\t\treturn !Array.isArray(d.values);\r\n\t\t});\r\n\t\tfor(var i=0;i<timeData.length;i++){\r\n\t\t\tvar eachData = + timeData[i].values;\r\n\t\t\ttimeDataSum = timeDataSum + eachData;\r\n\t\t}\r\n\t\t// console.log(\"timeData\",timeData);\r\n\t\tvar count = 0;\r\n\t\tvar sumCount = 0;\r\n\t\tvar ddata = treeNodeList;\r\n\t\tfor(var i = 0; i < timeData.length; i++){\r\n\t\t\tvar d = timeData[i];\r\n\t\t\tdataSizeArray[i] = + d.values;\r\n\t\t\toriginalDataSizeArray[i] = + d.values;\r\n\t\t\tif(dataSizeArray[i] != 0){\r\n\t\t\t\tdataSizeArray[i] = Math.round(Math.log(dataSizeArray[i]) * multi);\r\n\t\t\t}\r\n\t\t}\r\n\t\t// console.log(\"originalDataSizeArray\",originalDataSizeArray);\r\n\t\tvar maxLogData = d3.max(dataSizeArray);\r\n\t\tfor(var i=0;i<=maxLogData;i++){\r\n\t\t\tcountArray[i] = 0;\r\n\t\t\teachTypeIdArray[i] = new Array();\r\n\t\t\teachTypeIndexArray[i] = new Array();\r\n\t\t}\r\n\t\tfor(var i=0;i<dataSizeArray.length;i++){\r\n\t\t\tcountArray[dataSizeArray[i]]++;\r\n\t\t\teachTypeIdArray[dataSizeArray[i]].push(timeData[i].id);\r\n\t\t\teachTypeIndexArray[dataSizeArray[i]].push(i);\r\n\t\t}\r\n\t\tvar sumNode = 0;\r\n\t\tfor(var i=0;i<countArray.length;i++){\r\n\t\t\tsumNode = sumNode + countArray[i];\r\n\t\t}\r\n\t\tfor(var i=0;i<countArray.length;i++){\r\n\t\t\tif(countArray[i] != 0 ){\r\n\t\t\t\tcountArray[i] = Math.log(countArray[i] + 1);\r\n\t\t\t}\r\n\t\t}\r\n\t\tlineX.range([0,width - move_x * 1.2]);\r\n\t\tlineX.domain([0,(d3.max(dataSizeArray) + 1)/multi]);\r\n\t\tvar xAxis = d3.svg.axis()\r\n\t\t.scale(lineX)\r\n\t\t.orient(\"bottom\");\r\n\t\tbrush.x(lineX)\r\n\t\t\t.on(\"brushend\",brushed);\r\n\r\n\t\tfor(var i=0;i<(d3.max(dataSizeArray)+1)/multi;i=i+1){\r\n\t\t\txAxisTicks.push(i);\r\n\t\t}\r\n\t\this_width = (width - 1.2 * move_x)/(d3.max(dataSizeArray) + 1);\r\n\t\txAxis.tickValues(xAxisTicks);\r\n\t\tlineY.domain(d3.extent(countArray));\r\n\t\tfor(var i=0;i<countArray.length;i++){\r\n\t\t\tobjArray[i] = new Object();\r\n\t\t\tobjArray[i].num = i;\r\n\t\t\tobjArray[i].count = countArray[i];\r\n\t\t}\r\n\t\tvar yAxis = d3.svg.axis()\r\n\t\t\t.scale(lineY)\r\n\t\t\t.orient(\"left\");\r\n\t\tvar line = d3.svg.line()\r\n\t\t\t.x(function(d){return (lineX(d.num));})\r\n\t\t\t.y(function(d){return (lineY(d.count));})\r\n\r\n\t\td3.select(\"#histogramView\")\r\n\t\t\t.selectAll(\".his\")\r\n\t\t\t.data(objArray)\r\n\t\t\t.enter()\r\n\t\t\t.append(\"rect\")\r\n\t\t\t.attr(\"id\",function(d,i){\r\n\t\t\t\treturn \"his\" + i; \r\n\t\t\t})\r\n\t\t\t.attr(\"class\",\"his\")\r\n\t\t\t.attr(\"width\",his_width * 0.5)\r\n\t\t\t.attr(\"height\",function(d,i){\r\n\t\t\t\treturn moveHeight - lineY(objArray[i].count);\r\n\t\t\t})\r\n\t\t\t.attr(\"x\",function(d,i){\r\n\t\t\t\treturn his_width * i;\r\n\t\t\t})\r\n\t\t\t.attr(\"y\",function(d,i){\r\n\t\t\t\treturn lineY(objArray[i].count); \r\n\t\t\t})\r\n\t\t\t.attr(\"fill\",\"#1F77B4\");\r\n\t\td3.select(\"#histogramView\")\r\n\t\t.append(\"g\")\r\n\t\t.attr(\"class\",\"y axis\")\r\n\t\t.attr(\"transform\",\"translate(\" + 0 + \",\"+ 0 +\")\")\r\n\t\t.call(yAxis)\r\n\t\t.append(\"text\")\r\n\t\t.attr(\"transform\",\"rotate(-90)\")\r\n\t\t.attr(\"class\",\"label\")\r\n\t\t.attr(\"x\",5)\r\n\t\t.attr(\"y\",16)\r\n\t\t.style(\"text-anchor\",\"end\")\r\n\t\t.text(\"log(Number)\");\r\n\r\n\t\td3.select(\"#histogramView\")\r\n\t\t.append(\"g\")\r\n\t\t.attr(\"class\",\"x axis\")\r\n\t\t.attr(\"transform\",\"translate(\" + 0 + \",\"+ (moveHeight) +\")\")\r\n\t\t.call(xAxis)\r\n\t\t.append(\"text\")\r\n\t\t.attr(\"class\",\"label\")\r\n\t\t.attr(\"x\",width - move_x * 1.2 + 30)\r\n\t\t.attr(\"y\",14)\r\n\t\t.style(\"text-anchor\",\"end\")\r\n\t\t.text(\"log(bytes)\");\r\n\r\n\t\td3.select(\"#histogramView\")\r\n\t\t.append(\"g\")\r\n\t\t.attr(\"class\",\"x brush\")\r\n\t\t.call(brush)\r\n\t\t.selectAll(\"rect\")\r\n\t\t.attr(\"y\",0)\r\n\t\t.attr(\"height\",moveHeight);\r\n\t}", "function findDimensions()\n{\n var pasca = genTwoPascal(7);\n// var pasc = genTwoPascal(12);\n// var pasc = makeSevenBruitForce();\nvar pasc = pascGen(pasca,5,7,0,pasca)\n//var pasc = testRecursion()\n var map =[]\n dimensionRecurse(pasc,map);\n// Logger.log(map);\n \n}", "function aggregateData(data, params) {\n if (data.length == 0) {\n throw {\n fatal: 'Dataset is empty. Can not draw the graph.'\n }\n }\n\n var i, j, l;\n\n var dimHash = [];\n var keyHash = {};\n var dimValues = [];\n var rec, dim, key;\n var dl = params.dimensions.length;\n var dimensions = [];\n\n for (j = 0; j < dl; j++) {\n dimHash[j] = {};\n dimValues[j] = [];\n dimensions.push(params.dimensions[j].name);\n }\n var claimDataIndex = $('.claim-data-tab-container .tab li').index($('.claim-data-tab-container .tab li.active')[0]);\n for (i = 0, l = data.length; i < l; i++) {\n rec = data[i];\n key = [];\n for (j = 0; j < dl; j++) {\n dim = rec[dimensions[j]];\n key.push(dim);\n if (!dimHash[j][dim]) {\n dimHash[j][dim] = 1;\n dimValues[j].push(dim);\n }\n }\n key = key.join('|');\n\n if (!keyHash[key]) {\n keyHash[key] = (fieldTypesAll[claimDataIndex][params.measure] == 'integer' ? rec[params.measure] : 1);\n } else {\n keyHash[key] += (fieldTypesAll[claimDataIndex][params.measure] == 'integer' ? rec[params.measure] : 1);\n }\n }\n\n var res = {\n data: {\n lines: []\n }\n };\n\n // Available data is limited to prevent bad charts drawing\n if (dimValues[0].length > FIRST_DIMENSION_LIMIT) {\n dimValues[0] = dimValues[0].splice(-FIRST_DIMENSION_LIMIT);\n }\n if (dimValues[1] && dimValues[1].length > SECOND_DIMENSION_LIMIT) {\n dimValues[1] = dimValues[1].splice(-SECOND_DIMENSION_LIMIT);\n throw {\n fatal: 'Group dimension limit reached. Chart can not be displayed'\n }\n }\n\n for (i = 0; i < dimValues.length; i++) {\n dimValues[i].sort();\n }\n\n // Copy values to dimension axis\n res.xAxis = dimValues[0].slice();\n\n if (dimValues.length == 1) {\n res.data.lines[0] = {data: [], title: \"\"};\n for (i = 0; i < dimValues[0].length; i++){\n res.data.lines[0].data.push(keyHash[dimValues[0][i]]);\n }\n } else {\n for (j = 0; j < dimValues[1].length; j++) {\n var line = {\n data: [],\n title: dimValues[1][j]\n };\n res.data.lines.push(line);\n for (i = 0; i < dimValues[0].length; i++){\n res.data.lines[j].data.push(keyHash[dimValues[0][i] + '|' + dimValues[1][j]]);\n }\n }\n }\n\n return res;\n }", "function processOneAxisValue(feed)\r\n {\r\n var dataset = [];\r\n var i, j, k;\r\n var measureData;\r\n if (feed.values.length <= 0){\r\n return dataset;\r\n }\r\n if (hasMND && !bMNDOnColor)\r\n {\r\n for(j = 0; j < feed.values[0].rows.length; ++j)\r\n { \r\n measureData = new Array(feed.values.length * feed.values[0].rows[0].length);\r\n for(k = 0; k < feed.values[0].rows[0].length; ++k)\r\n {\r\n for(i = 0 ; i < feed.values.length; ++i)\r\n {\r\n var dataPoint = {};\r\n dataPoint.val = feed.values[i].rows[j][k].val;\r\n dataPoint.ctx = feed.values[i].rows[j][k].ctx;\r\n dataPoint.info = feed.values[i].rows[j][k].info;\r\n if(bMNDInner){\r\n measureData[k * feed.values.length + i] = dataPoint;\r\n } else {\r\n measureData[i * feed.values[0].rows[0].length + k] = dataPoint; \r\n }\r\n }\r\n }\r\n dataset.push(measureData);\r\n } \r\n }\r\n else // MND on Region color or no MND\r\n {\r\n dataset = new Array(feed.values.length * feed.values[0].rows.length);\r\n\r\n for(i = 0 ; i < feed.values.length; ++i)\r\n {\r\n for(j = 0; j < feed.values[0].rows.length; ++j)\r\n { \r\n measureData = feed.values[i].rows[j];\r\n if(!hasMND || !bMNDInner){\r\n dataset[i * feed.values[0].rows.length + j] = measureData;\r\n } else {\r\n dataset[j * feed.values.length + i] = measureData;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return dataset;\r\n }", "function recursiveConvert(value){if(Chartist.safeHasProperty(value,'value')){// We are dealing with value object notation so we need to recurse on value property\nreturn recursiveConvert(value.value);}else if(Chartist.safeHasProperty(value,'data')){// We are dealing with series object notation so we need to recurse on data property\nreturn recursiveConvert(value.data);}else if(value instanceof Array){// Data is of type array so we need to recurse on the series\nreturn value.map(recursiveConvert);}else if(Chartist.isDataHoleValue(value)){// We're dealing with a hole in the data and therefore need to return undefined\n// We're also returning undefined for multi value output\nreturn undefined;}else {// We need to prepare multi value output (x and y data)\nif(multi){var multiValue={};// Single series value arrays are assumed to specify the Y-Axis value\n// For example: [1, 2] => [{x: undefined, y: 1}, {x: undefined, y: 2}]\n// If multi is a string then it's assumed that it specified which dimension should be filled as default\nif(typeof multi==='string'){multiValue[multi]=Chartist.getNumberOrUndefined(value);}else {multiValue.y=Chartist.getNumberOrUndefined(value);}multiValue.x=value.hasOwnProperty('x')?Chartist.getNumberOrUndefined(value.x):multiValue.x;multiValue.y=value.hasOwnProperty('y')?Chartist.getNumberOrUndefined(value.y):multiValue.y;return multiValue;}else {// We can return simple data\nreturn Chartist.getNumberOrUndefined(value);}}}", "_addRemoveMultipleDimensions(oldvalue, value, changeValueDimensions) {\n const that = this;\n\n if (value < 1 || value > 32) {\n that.dimensions = 1;\n\n if (that.dimensions === oldvalue) {\n return;\n }\n }\n\n let difference = that.dimensions - oldvalue;\n\n that._suppressDimensionChange = true;\n\n if (difference > 0) {\n do {\n that.addDimension(changeValueDimensions);\n difference -= 1;\n } while (difference > 0);\n\n that.$.fireEvent('dimensionChange', { 'type': 'add' });\n }\n else if (difference < 0) {\n if (value === 1) {\n const oldRowsCount = that.rows;\n\n that.rows = 1;\n that.dimensions = oldvalue;\n that._changeRowsColumns('rows', oldRowsCount, 1, undefined, true);\n that.dimensions = value;\n }\n do {\n that.removeDimension(true, changeValueDimensions);\n difference += 1;\n } while (difference < 0);\n\n that.$.fireEvent('dimensionChange', { 'type': 'remove' });\n\n if (value === 1 && that.showVerticalScrollbar) {\n that._showVerticalScrollbar(false);\n }\n }\n else {\n return;\n }\n\n that._suppressDimensionChange = false;\n\n if (that.showIndexDisplay === true &&\n !(value !== 1 &&\n ((value - oldvalue > 0 && value * (that.indexerHeight + 4) - 2 < that._cachedHeight) ||\n (value - oldvalue < 0 && oldvalue * (that.indexerHeight + 4) - 2 < that._cachedHeight))) ||\n value === 1) {\n that._updateWidgetHeight('dimensions');\n }\n }", "getModuleDepth(){return this.module_base_face_dimensions_axes[2];}", "function aggregateUsage(data) {\n var chartData = [];\n\n for(var i = 0; i < 27; i++) {\n chartData[i] = 0;\n }\n\n for( var f in data ) {\n for( var j = 0; j < data[ f ].stack.length; j++ ) {\n chartData[j] += data[ f ].stack[ j ] + data[ f ].fugitive[ j ];\n }\n }\n\n return chartData;\n }", "function getDimensionName() {\n var dummyRecord = {};\n Object.keys(dimensions).forEach(function(d) {\n dummyRecord[d] = d;\n });\n\n return dimensionFct(dummyRecord);\n }", "function getLimits() {\n// popUp(\"getLimits\");\n var k = 0;\n var dataCount = 0;\n for (var j=groupCount;j>=groupMin;j--) {\n var sourceLabel = graphSheet.getRange(1,(j+shift));\n var label = sourceLabel.getValue();\n graphSheet.setActiveSelection(sourceLabel);\n k+=3;\n dataCount++;\n var selcData = numCols + dataCount + shift;\n var selc = numCols * 3 + 5 + k + shift;\n if (levels) {\n graphSheet.getRange(1,(selc+1)).setValue(label+\" LCL R\");//these are all temp until i find out how to pass array into graph\n graphSheet.getRange(1,(selc+2)).setValue(label+\" Range\");//these are all temp until i find out how to pass array into graph\n graphSheet.getRange(1,(selc+3)).setValue(label+\" UCL R\");//these are all temp until i find out how to pass array into graph\n graphSheet.getRange(1,(selc+4)).setValue(label+\" LCL Avg\");//these are all temp until i find out how to pass array into graph\n graphSheet.getRange(1,(selc+5)).setValue(label+\" Average\");//these are all temp until i find out how to pass array into graph\n graphSheet.getRange(1,(selc+6)).setValue(label+\" UCL Avg\");//these are all temp until i find out how to pass array into graph\n lclR[j] = D3[j]*rbar[j];\n uclR[j] = D4[j]*rbar[j];\n lclA[j] = xbar[j] - (A2[j]*rbar[j]);\n uclA[j] = xbar[j] + (A2[j]*rbar[j]);\n lclRSeries[j] = fillValue(numRows-1,sampleSize[j],lclR[j]);\n uclRSeries[j] = fillValue(numRows-1,sampleSize[j],uclR[j]);\n lclASeries[j] = fillValue(numRows-1,sampleSize[j],lclA[j]);\n uclASeries[j] = fillValue(numRows-1,sampleSize[j],uclA[j]);\n var templclR = graphSheet.getRange(2,(selc+1),(numRows-1),1).setValues(lclRSeries[j]);//these are all temp until i find out how to pass array into graph\n var tempR = graphSheet.getRange(2,(selc+2),(numRows-1),1).setValues(rSeries[j]);//these are all temp until i find out how to pass array into graph\n var tempuclR = graphSheet.getRange(2,(selc+3),(numRows-1),1).setValues(uclRSeries[j]);//these are all temp until i find out how to pass array into graph\n var templclA = graphSheet.getRange(2,(selc+4),(numRows-1),1).setValues(lclASeries[j]);//these are all temp until i find out how to pass array into graph\n var tempA = graphSheet.getRange(2,(selc+5),(numRows-1),1).setValues(aSeries[j]);//these are all temp until i find out how to pass array into graph\n var tempuclA = graphSheet.getRange(2,(selc+6),(numRows-1),1).setValues(uclASeries[j]);//these are all temp until i find out how to pass array into graph\n var rLabel = label + ' Range Chart';\n var aLabel = label + ' Average Chart';\n controlChart(rLabel,aLabel,templclR,tempR,tempuclR,templclA,tempA,tempuclA);\n }\n if (j == 1) {\n var uclMR = 3.267 * mrbar;\n var lclX = xbar[1] - 3*(mrbar/1.128);\n var uclX = xbar[1] + 3*(mrbar/1.128);\n graphSheet.getRange(1,(selc+7)).setValue(label+\" MR\");//these are all temp until i find out how to pass array into graph\n graphSheet.getRange(1,(selc+8)).setValue(label+\" UCL MR\");//these are all temp until i find out how to pass array into graph\n graphSheet.getRange(1,(selc+9)).setValue(label+\" LCL X\");//these are all temp until i find out how to pass array into graph\n graphSheet.getRange(1,(selc+10)).setValue(label+\" UCL X\");//these are all temp until i find out how to pass array into graph\n var uclMRSeries = fillValue(numRows-1,sampleSize[j],uclMR);\n var lclXSeries = fillValue(numRows-1,sampleSize[j],lclX);\n var uclXSeries = fillValue(numRows-1,sampleSize[j],uclX);\n var tempMR = graphSheet.getRange(2,(selc+7),(numRows-1),1).setValues(mrArray); //these are all temp until i find out how to pass array into graph\n var tempuclMR = graphSheet.getRange(2,(selc+8),(numRows-1),1).setValues(uclMRSeries);//these are all temp until i find out how to pass array into graph\n var templclX = graphSheet.getRange(2,(selc+9),(numRows-1),1).setValues(lclXSeries);//these are all temp until i find out how to pass array into graph\n var tempuclX = graphSheet.getRange(2,(selc+10),(numRows-1),1).setValues(uclXSeries);//these are all temp until i find out how to pass array into graph\n var rLabel = label + ' Moving Range Chart';\n var aLabel = label + ' Individuals Chart';\n controlChart(rLabel,aLabel,tempuclMR,tempMR,tempuclMR,templclX,tempA,tempuclX);\n }\n k+=3;\n dataCount++;\n }\n }", "async function fetchAllDimensionData() {\n setAllDimensionDataLoading(true);\n const dimData = [];\n\n ////////////////////////////////////////\n // Step 1.\n // Get a unique list of model-view pairs based on\n // the query-capable tiles (dashboard_elements)\n // comprising the dashboard\n ////////////////////////////////////////\n const foundCompositeIds = [];\n\n const uniqueModelsAndViews = dashboardElements\n .filter((f) => f.query)\n .map((m) => {\n if (m?.query?.model && m?.query?.view) {\n const foundCompositeId = `${m.query.model}.${m.query.view}`;\n if (foundCompositeIds.indexOf(foundCompositeId) < 0) {\n foundCompositeIds.push(foundCompositeId);\n return {\n id: foundCompositeId,\n model: m?.query?.model || null,\n view: m?.query?.view || null,\n };\n }\n return {\n id: null,\n };\n } else {\n return {\n id: null,\n };\n }\n })\n .filter((f) => f.id);\n\n ////////////////////////////////////////\n // Step 2. For each model and view pair\n // query the dimensions and measures\n ////////////////////////////////////////\n if (uniqueModelsAndViews.length > 0) {\n for (const obj of uniqueModelsAndViews) {\n const { id, model, view } = obj;\n const [, data] = await asyncWrapper(fetchModelExplore(obj.model, obj.view));\n\n if (data) {\n dimData.push({\n id,\n model,\n view,\n dimensionsAndMeasures: [...(data?.fields?.dimensions || []), ...(data?.fields?.measures || [])]\n .filter((f) => {\n return f.name === ctx.selectedFilter.name;\n })\n .map((m) => {\n return {\n label: compositeLabelFromField(m.name),\n type: m?.type || 'string',\n value: m?.name || ctx.selectedFilter.name,\n };\n }),\n });\n }\n }\n }\n\n setAllDimensionData(dimData);\n setAllDimensionDataLoading(false);\n }", "function getSizes(dataset) {\n return dataset.map(f => f.x).map(f => f / 500)\n}", "sizeHeatmap (dim) {\r\n return dim.marginTotal - dim.marginSideColor - dim.marginLabel - dim.marginBrush - dim.marginLabelMini;\r\n }", "_getNonTransformedDimensions() {\n // Object dimensions\n return new fabric.Point(this.width, this.height).scalarAdd(\n this.padding + boundingBoxPadding\n )\n }", "function getTableDimensions(data) {\n\tlet width = 0;\n\tlet height = 0;\n\n\tif (Array.isArray(data)) {\n\t\tdata.forEach(element => {\n\t\t\tif (element.length > width) width = element.length;\n\t\t});\n\n\t\theight = data.length;\n\t}\n\n\treturn [width, height];\n}", "function renderChart() {\n\t\trequestAnimationFrame(renderChart);\n\t\t\n\t\t// Copy frequency data to frequencyData array.\n\t\tanalyser.getByteFrequencyData(frequencyData);\n\t\t//console.log(frequencyData[1]); \n\n\t\tif(globe.points){\n\t\t\tglobe.points.morphTargetInfluences[2] = frequencyData[2]/100; // SO THIS WRONG. I need more morphTargets \n\t\t}\n\t\t//globe._baseGeometry.morphTargets[2].vertices[0].z += 1; \n\t\t//globe._baseGeometry.morphTargets[2].vertices[0].x += 1; \n\t\t//globe._baseGeometry.morphTargets[2].vertices[0].y += 1; \n\t\tconsole.log(undefined);\n\t}", "createScales() {\n const sizeOfData = this.dataset.length;\n\n this.xScale = d3.scaleLinear()\n .domain([0, sizeOfData - 1]) // input\n .range([0, this.width]); // output\n \n this.yScale = d3.scaleLinear()\n .domain([0, 1]) // input is from 0 to 1 on y axis\n .range([this.height, 0]); // height ranges to map input to pixel range.\n }", "function dotFrequency() {\n var selc = numCols + 1 + shift;\n var plotCol = numCols * 3 + shift;\n var plotRow = 1;\n var colCount = subgroupSize[groupCount];\n var dotData = [];\n for (var j=1;j<=colCount;j++) {\n var k = 1;\n var selc2 = plotCol+j;\n dotData[j] = [];\n for (var i=(j-1);i<(numRows-1);i+=colCount) {\n var value = dataSeries[i];\n var tempData = [];\n tempData.push(value);\n dotData[j].push(tempData);\n k++;\n }\n graphSheet.getRange((1+plotRow),selc2,(k-1),1).setValues(dotData[j]);\n }\n graphSheet.getRange(plotRow,(plotCol+1)).setValue(\"Data formatted for dot frequency\");\n var plot = graphSheet.getRange((1+plotRow),(plotCol+1),(k-1),colCount);\n drawDotFreq(plot);\n }", "function _computeSeriesObjectMap(\n // eslint-disable-next-line no-use-before-define\n queryResultData: LegacyQueryResultData,\n): { +[string]: number }", "function generateEmptySeries() {\n //Para cada unidad inicializamos la serie\n Object.keys(global.UNITS).forEach(function(unit) {\n if (unit == 'year') return; \n series[unit] = { label: global.UNITS[unit].label, data: {} }; \n //Para cada métrica inicialiamos los datos con ceros\n for (var i = 0; i < global.METRICS.length; i++) {\n var metric_by_unit = new Array();\n metric_by_unit = {};\n metric_by_unit.data = new Array();\n metric_by_unit.label = global.METRICS[i].label;\n metric_by_unit.top = 0;\n metric_by_unit.tickSize = null;\n var metric = global.METRICS[i].metric;\n series[unit].data[metric] = metric_by_unit;\n }\n });\n}", "getLastResizeDimensions() {\n return this._lastDimensions;\n }", "static is_data_array_ok(data){\n return this.is_1d_array(data) ||\n this.is_2d_array(data) ||\n this.is_3d_array(data) ||\n this.is_heat_map_suitable_data(data)\n }", "function adjustVisualizationToScreenSize(){\n\tif ( $(\"#visualizationDiv\").width() < MOBILEBREAKPOINT+LEGENDWIDHT+20 \n\t\t|| getHeight() < MOBILEBREAKPOINT+LEGENDWIDHT+20){ \n\t\tMARGIN = 20;\n\t}\n\telse{\n\t\tMARGIN = 100;\n\t}\n\n\tif(getWidth() < getHeight()){ narrowerDimension = getWidth(); }\n\telse{ narrowerDimension = getHeight(); }\n}" ]
[ "0.65010047", "0.6482728", "0.63587344", "0.62782633", "0.6267692", "0.61935574", "0.60171443", "0.58644235", "0.5714209", "0.5711893", "0.55884963", "0.55850387", "0.54324347", "0.5410598", "0.53910816", "0.5356613", "0.53496027", "0.53309214", "0.5321984", "0.529007", "0.5282347", "0.5237497", "0.5227721", "0.5183456", "0.51687294", "0.5157917", "0.5151305", "0.5130066", "0.5130066", "0.5130066", "0.5130066", "0.5130066", "0.5130066", "0.5129129", "0.512353", "0.5119292", "0.50859326", "0.50736517", "0.50481075", "0.5045507", "0.5045507", "0.50216854", "0.50200754", "0.50181603", "0.4990464", "0.49859014", "0.49834454", "0.49821234", "0.4973972", "0.49612406", "0.49415103", "0.49276918", "0.49179", "0.48936892", "0.48842424", "0.4882312", "0.48720127", "0.48663655", "0.48503527", "0.4847917", "0.4845169", "0.4843417", "0.4840491", "0.4836927", "0.4835588", "0.48347217", "0.48207527", "0.48128676", "0.48128676", "0.47926316", "0.47879216", "0.47878873", "0.47855964", "0.47852567", "0.47852367", "0.47756693", "0.47746965", "0.47572717", "0.47501495", "0.47467703", "0.47420076", "0.4738854", "0.47370586", "0.4722779", "0.4716164", "0.47142068", "0.4712505", "0.47042283", "0.46976188", "0.46965447", "0.46885222", "0.46859258", "0.46756247", "0.4674771", "0.46721098", "0.46715692" ]
0.61193025
9
add animation to the view
function createGridClipShape(rect, seriesModel, cb) { var rectEl = new graphic.Rect({ shape: { x: rect.x - 10, y: rect.y - 10, width: 0, height: rect.height + 20 } }); graphic.initProps(rectEl, { shape: { width: rect.width + 20, height: rect.height + 20 } }, seriesModel, cb); return rectEl; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Animation (){\n var animation = anime.timeline();\n \n animation.add({\n targets:'.animation',\n height:['100%',0],\n easing:'easeInOutCirc',\n delay:1200\n });\n \n \n }", "function Animation (){\n var animation = anime.timeline();\n \n animation.add({\n targets:'.animat',\n height:['100%',0],\n easing:'easeInOutCirc',\n delay:1200\n });\n \n \n }", "function animate() {\n // is element in view?\n if (inView()) {\n // element is in view, add class to element\n element.classList.add('animate');\n }\n}", "updateAnimation() {\n this.animator.animate();\n }", "function Animation (){\n var animation = anime.timeline();\n \n animation.add({\n targets:'.animation',\n height:['100%',0],\n easing:'easeInOutCirc',\n delay:1000,\n duration:1000\n }).add({\n targets:'.animation h1',\n scale:[1.4, 1],\n duration:1000,\n easing :'easeOutExpo'\n },80);\n\n \n }", "animation() {}", "function contentAnimation() {\n\n var tl = gsap.timeline();\n tl.from('.is-animated', { duration: 1, translateY: 60, opacity: 0, stagger: 0.4 });\n tl.from('.fadein', { duration: 0.5, opacity: 0.9 });\n}", "function initAnimation() {\n}", "function animate(){\n\t\trequestAnimationFrame( animate );\n\t\trender();\n\t}", "function modalAnimation() {}", "function animate(){\n\n\tanimateCloth();\n\trender();\n\trequestAnimationFrame( animate );\n\n\t\n}", "animate() {\n clickAnimation(\"#miracle_div\", this.target);\n }", "function initializeAnimationFramework(view) {\n view.on('frame', function() {\n for (const animation of _activeAnimations) {\n animation.step(animation);\n }\n });\n}", "function animate() {\n\t\t\t\t\t\trequestAnimationFrame(animate);\n\t\t\t\t\t\tupdate();\n\t\t\t\t\t\trender();\n\t\t\t\t\t}", "_startAnimation() {\n // @breaking-change 8.0.0 Combine with _resetAnimation.\n this._panelAnimationState = 'enter';\n }", "function animate() {\r\n if (!doAnim) {\r\n river.context=null; \r\n return;\r\n }\r\n\trequestAnimFrame( animate );\r\n river.background.draw();\r\n}", "function animate() {\n // if (stackHelper) {\n // stackHelper.index += 1;\n // if (stackHelper.outOfBounds === true) {\n // stackHelper.orientation = (stackHelper.orientation + 1) % 3;\n // stackHelper.index = 0;\n // }\n // }\n\n controls.update();\n renderer.render(scene, camera);\n stats.update();\n\n // request new frame\n requestAnimationFrame(function() {\n animate();\n });\n }", "function animate() {\r\n\r\n\trequestAnimationFrame( animate );\r\n\trender();\r\n\r\n}", "function animate() {\n\trequestAnimationFrame(animate);\n\trender();\n}", "start() {\n this._enableAnimation = true;\n this._numberOfAnimationCycles = 0;\n }", "update() {\n this.animation.update()\n }", "function WR_Item_Animation() {\n\t \tif ( typeof ScrollReveal != 'undefined' ) {\n\t \t\twindow.sr = ScrollReveal().reveal( '.wr-item-animation', {\n\t \t\t\tduration: 700\n\t \t\t} );\n\t \t}\n\t }", "createAnimation() {\n this.scene.anims.create({\n key: 'bullet-hit',\n frames: this.scene.anims.generateFrameNumbers('bullet-hit', {\n start: 0,\n end: 10\n }),\n frameRate: FRAMERATE\n });\n }", "animate(inCollection) {\n\n // Don't animate when not visible.\n if (!this.isVisible) { return; }\n\n // Adjust how often the animation occurs.\n this.frameSkipCount++;\n if (this.frameSkipCount < this.frameSkip) {\n return;\n }\n this.frameSkipCount = 0;\n\n // Hide the img of the current frame.\n this[`frame${this.currentFrame}`].style.display = \"none\";\n // Bump to the next frame, reset when it's time to wrap around.\n this.currentFrame++;\n if (this.currentFrame === this.frameCount) {\n this.currentFrame = 0;\n if (this.animationCallback) {\n this.animationCallback(inCollection);\n }\n }\n // Show the new current frame's img.\n this[`frame${this.currentFrame}`].style.display = \"\";\n\n }", "animate() {\n switch(this.options.effect) {\n case 'reveal':\n this.__reveal();\n break;\n \n case 'typewriter':\n this.__typewriter();\n break;\n }\n }", "function animate() {\n requestAnimationFrame(animate);\n render();\n update();\n }", "function doAnimation() {\n slideContainer.children[0].classList.add('moveSlide')\n slideContainer.children[1].classList.add('moveSlide')\n addAnimationEventToChild()\n}", "addAnimation(_animation, _frameStart = 0, _frameEnd = 0, _sound, _animWidth, _animHeight, _frameCount = 0) {\n this.animations.push({\n name: _animation,\n frameStart: _frameStart,\n frameEnd: _frameEnd,\n sound: _sound,\n animWidth: _animWidth,\n animHeight: _animHeight,\n frameCount: _frameCount\n })\n }", "function animationAdded() {\n let animation = document.getElementById('addToCartAnimId');\n let delay = 1500;\n\n animation.className = 'addToCartAnimated';\n setTimeout(function () {\n animation.className = 'addToCartAnim';\n }, delay)\n}", "addanimation(val,x,y){\n this.setState({\n xCor:x,\n yCor:y\n })\n if(val){\n let animateRow=document.getElementsByClassName(\"animateRow\")\n animateRow[0].classList.add(\"animateRowZIndex\")\n let animation=document.getElementsByClassName(\"animateId\")\n animation[0].classList.add(\"animateWishlistButton\");\n setTimeout(()=>{\n animateRow[0].classList.remove(\"animateRowZIndex\")\n animation[0].classList.remove(\"animateWishlistButton\");\n },1000)\n \n }\n }", "function animate(index){\n $rootScope.$emit('setAnimation',{index:index});\n }", "updateAnimation() {\n return;\n }", "function animate() {\n\t\trequestAnimFrame(function(){\n animate();\n });\n\t\t\n\t\tplaceHover();\n\t\titemHover();\n\t\titemDrag();\n\t\t//$('#place').text(getSceneMembers(self.places));\n\t\t//$('#sticky').text(self.items);\n\t\t\n\t\t\n\n self.renderer.render(self.scene, self.camera);\n //self.controls.update(self.clock.getDelta());\n\t\t\n\t}", "function animate() {\n\treqAnimFrame(animate);\n\tcanvasDraw();\n}", "function anim() {\r\n Loop();\r\n requestAnimFrame(anim);\r\n }", "function draw() {\n animationWrapper.classList.add('active')\n}", "function animate() {\n requestAnimationFrame( animate );\n controls.update();\n render();\n }", "animate() {\n this.controls.update();\n if (this.motionPlayer !== null && this.vm_anim.playing) {\n this.motionPlayer.stepFrame(this.vm.vrmRoot, this.vrmRenderer);\n }\n this.renderer.render(this.scene, this.camera);\n requestAnimationFrame(() => this.animate());\n }", "function animate() {\r\n\tif (runAnim) {\r\n\t\trequestAnimationFrame(animate);\r\n\t}\r\n\trender();\r\n}", "mounted() {\n this.animation = new Animation(this);\n this.animation.createMainTimeline();\n this.animation.play();\n }", "function animate() {\n window.requestAnimationFrame(function (now) {\n rotationDif = (now - lastFrame) * .001;\n settings.rotate += rotationDif * 2 * Math.PI * rotationSpeed;\n app.draw(settings);\n lastFrame = now;\n animate();\n });\n }", "function animate() {\n\trequestAnimFrame( animate );\n var scene = SceneManager.currentScene;\n scene.update();\n\trenderer.render(scene.stage);\n}", "function animate()\n{\n\trequestAnimationFrame(animate);\n \trenderer.render(scene, camera);\n}", "function animate() {\n requestAnimationFrame(animate);\n update();\n render();\n }", "didInsertElement() {\n var time = this.get('time') * 1000;\n this.$('.meter').animate({\n width: '100%'\n }, time );\n }", "function animate() {\n requestAnimationFrame( animate );\n render();\n}", "animate() {\n this.update();\n this.draw();\n\n requestAnimationFrame(this.animationHandler);\n }", "animate() {\n if (!window.actionDrivenRender)\n this.render();\n //aktualisiert die Camera\n //this.controls.update();\n //Zeichnet das Bild zum naechsten Visualisierungszeitpunkt (requestanimationFrame) und nimmt eine Callbackfunktion\n requestAnimationFrame(this.animate);\n }", "function animate() {\n requestAnimationFrame( animate );\n renderer.render( scene, camera );\n controls.update();\n }", "function addAnimation() {\n const Burst1 = new mojs.Burst({\n parent: animationDiv,\n top: '50%',\n left: '50%',\n radius: {0: 80},\n count: 8,\n children: {\n shape: 'circle',\n fill: {'red': 'blue'},\n strokeWidth: 1,\n duration: 600,\n stroke: {'red': 'blue'}\n }\n });\n\n\n const Burst2 = new mojs.Burst({\n parent: animationDiv,\n top: '50%',\n left: '50%',\n radius: {0: 100},\n count: 4,\n children: {\n shape: 'rect',\n fill: 'white',\n strokeWidth: 1,\n duration: 300,\n stroke: 'white'\n }\n });\n\n\n const circle1 = new mojs.Shape({\n radius: {0: 40},\n parent: animationDiv,\n fill: 'none',\n stroke: 'white',\n strokeWidth: 15,\n duration: 300,\n opacity: {1: 0}\n });\n\n const circle2 = new mojs.Shape({\n radius: {0: 50},\n parent: animationDiv,\n fill: 'none',\n stroke: 'red',\n strokeWidth: 5,\n duration: 400,\n opacity: {1: 0}\n });\n\n\n const circle3 = new mojs.Shape({\n radius: {0: 60},\n parent: animationDiv,\n fill: 'none',\n stroke: 'blue',\n strokeWidth: 5,\n duration: 500,\n opacity: {1: 0}\n });\n\n const circle4 = new mojs.Shape({\n radius: {0: 70},\n parent: animationDiv,\n fill: 'white',\n\n stroke: 'white',\n strokeWidth: 5,\n duration: 600,\n opacity: {1: 0}\n });\n\n const timeline = new mojs.Timeline({\n\n repeat: 0\n }).add(circle4, circle1, circle2, circle3, Burst1, Burst2);\n\n timeline.play();\n }", "set importAnimation(value) {}", "function addAnimation(element){\n var transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\n\n removeClass(element, NO_TRANSITION);\n return css(element, {\n '-webkit-transition': transition,\n 'transition': transition\n });\n }", "function addAnimation(element){\n var transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\n\n removeClass(element, NO_TRANSITION);\n return css(element, {\n '-webkit-transition': transition,\n 'transition': transition\n });\n }", "function addAnimation(element){\n var transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\n\n removeClass(element, NO_TRANSITION);\n return css(element, {\n '-webkit-transition': transition,\n 'transition': transition\n });\n }", "function addAnimation() {\n let scrollVertical = window.pageYOffset;\n if(scrollVertical > 20 && scrollVertical < 100) {\n // Projects headline animation\n headlineProject.className = \"bounce\";\n }\n if(scrollVertical > 333 && scrollVertical < 360) {\n for(let i = 0; i < 3; i++) {\n if(project[i].className === \"project\") {\n // First three project divs gets faded in, animation.\n project[i].className += \" fadeIn\";\n }\n }\n }\n if(scrollVertical > 550 && scrollVertical < 600) {\n for(let i = 3; i < project.length; i++) {\n if(project[i].className === \"project\") {\n // Last three project divs gets faded in, animation.\n project[i].className += \" fadeIn\";\n }\n }\n }\n}", "function addAnimation(element){\r\n var transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\r\n\r\n removeClass(element, NO_TRANSITION);\r\n return css(element, {\r\n '-webkit-transition': transition,\r\n 'transition': transition\r\n });\r\n }", "function addAnimation(element){\r\n var transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\r\n\r\n removeClass(element, NO_TRANSITION);\r\n return css(element, {\r\n '-webkit-transition': transition,\r\n 'transition': transition\r\n });\r\n }", "function animate() {\n\n window.requestAnimationFrame( animate );\n\n controls.update();\n renderer.render( scene, camera );\n\n}", "animate(ctx){\n this.drawBackground(ctx);\n }", "function animate() { \n console.log('animate')\n \n gsap.registerEffect({\n name: \"fadeIn\",\n effect: (targets, config) => {\n var tlEffect = gsap.timeline();\n tlEffect.from(targets, {duration: config.duration, y:config.y, force3D:true, rotation: 0.01, stagger:config.stagger, ease:\"power2\"})\n .from(targets, {duration: config.duration, stagger:config.stagger, alpha:0, ease:\"none\"}, \"<\")\n return tlEffect;\n },\n defaults: {duration: 1.5, y:\"-=7\", stagger:4.5},\n extendTimeline: true,\n });\n \n gsap.to(plantWraps, {duration:25, rotation:\"+=20\", ease:\"none\"})\n gsap.to(flowerWraps, {duration:25, rotation:\"+=100\", ease:\"none\"})\n \n var imageDivs = selectAll('.imageDiv');\n // logoIntro = false;\n\n\t\t\ttl\n .to(bannerCover, {duration:0.7, alpha:0, ease:\"none\"})\n \n .from(plants, {duration:3, drawSVG:\"50% 50%\", ease:\"sine.inOut\"}, \"<\")\n .from(flowers, {duration:2, alpha:0, ease:\"none\"}, \"<\")\n \n if(logoIntro) {\n tl\n .from(letter_w, {duration:0.5, drawSVG: 0, ease:\"sine.in\"}, \"<\")\n .from(letter_y, {duration:0.3, drawSVG: 0, ease:\"sine.in\"}, \">\")\n .from(letter_nn, {duration:0.8, drawSVG: 0, ease:\"sine.inOut\"}, \">\")\n .from(lasvegas, {duration:0.7, y:\"-=10\", alpha: 0, ease:\"sine\"}, \">\")\n .from(sign_r, {duration:0.5, alpha: 0, ease:\"none\"}, \"<\")\n\n .to(logo, {duration:0.7, alpha:0, ease:\"none\"}, \">1\")\n .set(logo, {scale: 0.37, y:99, x:-60}, \">\")\n } else {\n tl\n .set(logo, {scale: 0.37, alpha:0,y:99, x:-60}, \"<\")\n }\n \n tl\n .from(imageDivs, {duration:1.3, stagger:4, alpha:0, blur:10, force3D:true, rotation: 0.01, ease:\"none\"}, \"<\")\n \n .fadeIn(text_head, \"<0.4\")\n .fadeIn(text_subHead,{y:\"0\", duration: 1,},\"<0.6\")\n .to(logo, {duration:1, alpha:1, ease:\"none\"}, \"<0.4\")\n .from(cta, {duration:0.8, alpha: 0, ease:\"none\"}, \"<\")\n .from(cta, {duration:1.6, rotateX:90, ease:\"power2\"}, \"<\") \n\t\t}", "requestUpdateAnimations () {\n this.animationsUpdateNeeded = true;\n }", "function animate() {\n\n\t\tconst mixer = editor.mixer;\n\t\tconst delta = clock.getDelta();\n\n\t\tlet needsUpdate = false;\n\n\n\t\t//yomotsu camera\n\t\tneedsUpdate = controls.update( delta );\n\n\t\t// Animations\n\n\n\t\tconst actions = mixer.stats.actions;\n\n\t\tif ( actions.inUse > 0 || prevActionsInUse > 0 ) {\n\n\t\t\tprevActionsInUse = actions.inUse;\n\n\t\t\tmixer.update( delta );\n\t\t\tneedsUpdate = true;\n\n\t\t}\n\n\t\t// View Helper\n\n\t\tif ( viewHelper.animating === true ) {\n\n\t\t\tviewHelper.update( delta );\n\t\t\tneedsUpdate = true;\n\n\t\t}\n\n\t\tif ( vr.currentSession !== null ) {\n\n\t\t\tneedsUpdate = true;\n\n\t\t}\n\n\t\tif ( needsUpdate === true ) render();\n\n\t}", "function appModuleAnimation() {\r\n return slideFromBottom();\r\n}", "function animate() {\n requestAnimationFrame(animate);\n renderer.render(stage);\n //checkHelp();\n}", "animateAppear() {\n if (defined(this._selectionIndicatorTween)) {\n if (this._selectionIndicatorIsAppearing) {\n // Already appearing; don't restart the animation.\n return;\n }\n this._selectionIndicatorTween.cancelTween();\n this._selectionIndicatorTween = undefined;\n }\n\n this._selectionIndicatorIsAppearing = true;\n\n var that = this;\n this._selectionIndicatorTween = this._tweens.add({\n startObject: {\n scale: 2.0,\n opacity: 0.0,\n rotate: -180\n },\n stopObject: {\n scale: 1.0,\n opacity: 1.0,\n rotate: 0\n },\n duration: 0.8,\n easingFunction: EasingFunction.EXPONENTIAL_OUT,\n update: function(value) {\n that.opacity = value.opacity;\n that.transform =\n \"scale(\" + value.scale + \") rotate(\" + value.rotate + \"deg)\";\n that.updateStyle();\n },\n complete: function() {\n that._selectionIndicatorTween = undefined;\n },\n cancel: function() {\n that._selectionIndicatorTween = undefined;\n }\n });\n }", "function wowAnimation() {\r\n new WOW({\r\n offset: 100,\r\n animateClass: \"animated\",\r\n mobile: true,\r\n }).init();\r\n }", "function animate() {\n requestAnimationFrame(animate);\n\n renderer.render(scene, camera);\n }", "function animatie(){\n var timeline = new TimelineMax ({repeat:-1});\n timeline.to(\"#klok\", 50, {ease: Elastic.easeOut.config(10), y:6});\n}", "function startAnimation() {\n timerId = setInterval(updateAnimation, 16);\n }", "animate() {\r\n this.draw();\r\n\r\n this.renderer.render(this.scene, this.camera);\r\n\r\n requestAnimationFrame(this.animate.bind(this));\r\n }", "function animate() {\n requestAnimationFrame(animate);\n render();\n}", "function animate() {\n requestAnimationFrame(animate);\n render();\n}", "function animate() {\n\t\t\trequestAnimationFrame( animate );\n\t\t\t//stats.update();\n\t\t\t\n\t\t\tupdate();\n\t\t\tdraw();\n\t\t}", "_animateIn() {\n\n setTimeout(() => {\n document.getElementById(this.id).className += \" animated zoomInLoader\";\n document.getElementById(this.id).style.display = \"\";\n }, 400);\n\n }", "function animate() {\n\n\t\t // Read more about requestAnimationFrame at http://www.paulirish.com/2011/requestanimationframe-for-smart-animating/\n\t\t requestAnimationFrame(animate);\n\t\t \n\t\t // Render the scene.\n\t\t renderer.render(scene, camera);\n\t\t controls.update();\n\n\t\t }", "function addAnimation(element){\n var transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\n\n element.removeClass(NO_TRANSITION);\n return element.css({\n '-webkit-transition': transition,\n 'transition': transition\n });\n }", "function addAnimation(element){\n var transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\n\n element.removeClass(NO_TRANSITION);\n return element.css({\n '-webkit-transition': transition,\n 'transition': transition\n });\n }", "function addAnimation(element){\n var transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\n\n element.removeClass(NO_TRANSITION);\n return element.css({\n '-webkit-transition': transition,\n 'transition': transition\n });\n }", "function addAnimation(element){\n var transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\n\n element.removeClass(NO_TRANSITION);\n return element.css({\n '-webkit-transition': transition,\n 'transition': transition\n });\n }", "function initElementsAnimation() {\n if ($(\".animated\").length > 0) {\n $(\".animated\").each(function() {\n var $this = $(this);\n $this.appear(function() {\n $this.addClass(\"go\");\n }, {\n accX: 0,\n accY: -200\n });\n })\n };\n}", "function animate() {\n // render\n controls.update();\n renderer.render(scene, camera);\n stats.update();\n\n // request new frame\n requestAnimationFrame(function() {\n animate();\n });\n }", "handleAnimationOn(index) {\n //TODO: test adding text instead of animation on the same classes\n const animatedFrame = document.getElementsByClassName(\"itemOnTheList\");\n animatedFrame[index].classList.add('loadingAnimation');\n console.dir(animatedFrame[index]);\n this.setState({\n animationFrame: true\n })\n }", "function appear ()\r\n{\r\n\tpopping_back = 0; \r\n \r\n selectText(); \r\n\t \r\n if (stack_num <= 5)\r\n{\r\n\tvar anim = manager.createAnimObject(\"Stack\" + stack_num); \r\n\tvar anim2 = manager.createAnimObject(\"bottom\" + stack_num);\r\n\tvar anim3 = manager.createAnimObject(\"text\" + stack_num);\r\n anim.add({property: Prop.backgroundColor, from: new Col(255,255,255), to: new Col(100,205,55), \r\n duration:500}); \r\n\t anim2.add({property: Prop.backgroundColor, from: new Col(255,255,255), to: new Col(10,105,55), \r\n duration:500});\r\n\t anim3.add({property: Prop.backgroundColor, from: new Col(255,255,255), to: new Col(100,205,55), \r\n duration:500});// this is for fadeing in to view animation\r\n\t \r\n\t\r\n\t \r\n\t \r\n}\r\n\r\nstack_num++;\r\nlast--;\r\nif(last<1)\r\n{\r\n\tlast = 0; \r\n}\r\nif(stack_num>2)\r\n{\r\nstretch();\r\n}\r\nif(stack_num>5)\r\n{\r\n\tstack_num = 6;\r\n}\r\n\r\n}", "initiateAnimation() {\n let previousPosition = this.gameOrchestrator.gameboard.getPiecePosition(this.firstTile.col, this.firstTile.row);\n previousPosition[1] = 0; //in the start position, the height is not needed \n\n let nextPosition = this.gameOrchestrator.gameboard.getPiecePosition(this.secondTile.col, this.secondTile.row)\n\n let animation = new PieceAnimation(this.gameOrchestrator.scene, previousPosition, nextPosition, MOVE_SPEED);\n\n this.animations.push(animation);\n\n this.gameOrchestrator.gameboard.setPieceAnimation(this.firstTile.col, this.firstTile.row, animation);\n }", "function animationLogo() {\n logo.classList.add('logo-animate');\n}", "function animate()\r\n{\r\n window.requestAnimationFrame( animate );\r\n\trender();\r\n\tTWEEN.update();\r\n}", "function addAnimation(element){\r\n var transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\r\n\r\n element.removeClass(NO_TRANSITION);\r\n return element.css({\r\n '-webkit-transition': transition,\r\n 'transition': transition\r\n });\r\n }", "function addAnimation(element){\r\n var transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\r\n\r\n element.removeClass(NO_TRANSITION);\r\n return element.css({\r\n '-webkit-transition': transition,\r\n 'transition': transition\r\n });\r\n }", "function addAnimation(element){\r\n var transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\r\n\r\n element.removeClass(NO_TRANSITION);\r\n return element.css({\r\n '-webkit-transition': transition,\r\n 'transition': transition\r\n });\r\n }", "function animate() {\n\n // Read more about requestAnimationFrame at http://www.paulirish.com/2011/requestanimationframe-for-smart-animating/\n requestAnimationFrame(animate);\n \n // Render the scene.\n renderer.render(scene, camera);\n controls.update();\n\n }", "function initScene() {\n animate();\n}", "function animate() {\n // render\n controls.update();\n renderer.render(scene, camera);\n stats.update();\n\n // request new frame\n requestAnimationFrame(function() {\n animate();\n });\n }", "putAnimationBoxes() {\n let cf = this.working_model.frames[this.current_frame];\n\n this.animation_display.selection = {\n x: cf.x,\n y: cf.y,\n w: cf.width,\n h: cf.height\n };\n this.animation_display.sprite_origin = {\n x: cf.offset_x,\n y: cf.offset_y\n };\n }", "function addAnimation(elem, animClass) {\n elem.classList.add(animClass);\n}", "function trigger_animation() {\n\t\t\tvar $this = $('#slide-num' + brick.to + ' a');\n\t\t\t\n\t\t\t$num.removeClass('slide-on');\n\t\t\t$this.addClass('slide-on');\n\t\t\t\n\t\t\tgotohere = -((brick.to - 1) * 1024);\n\t\t\t\n\t\t\t$scrollable.stop().animate({\n\t\t\t\tleft: gotohere},\n\t\t\t\t1000,\n\t\t\t\tfunction(){\n\t\t\t\t\tif (!$('#swf-' + brick.from).hasClass('image-loaded')) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t//var image = $('<img>').attr('src', brick.images[function_objs.lang][brick.from]);\n\t\t\t\t\t\tvar useimage = '<img src=\"' + brick.images[function_objs.lang][brick.from] + '\" alt=\"\" />'\n\t\t\t\t\t\t//console.log(useimage);\n\t\t\t\t\t\t$('#swf-' + brick.from)\n\t\t\t\t\t\t\t.parent()\n\t\t\t\t\t\t\t.addClass('image-loaded')\n\t\t\t\t\t\t\t.attr('id','swf-' + brick.from)\n\t\t\t\t\t\t\t.innerHTML = useimage;\n\t\t\t\t\t\t\t//.html(useimage);\n\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (!$('#swf-' + brick.to).hasClass('image-loaded')) {\n\t\t\t\t\t\t//call function to start flash animation\n\t\t\t\t\t\tvar swf = document.getElementById(\"swf-\" + brick.to);\n\t\t\t\t\t\tswf.replay();\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tbrick.from = brick.to;\t\t\t\t\t\n\t\t\t\t}\n\t\t\t);\n\t\t}", "function addAnimation(element) {\n var transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\n\n element.removeClass(NO_TRANSITION);\n return element.css({\n '-webkit-transition': transition,\n 'transition': transition\n });\n }", "function startNewAnimation(v_el, v_text)\n{\n v_el.style.display = \"none\";\n setTimeout(()=>\n {\n if (v_text.length != 0)\n {\n v_el.textContent = v_text;\n }\n v_el.style.display = \"block\";\n }, 50);\n}", "function addAnimation(element) {\n var transition = 'all ' + options.scrollingSpeed + 'ms ' + options.easingcss3;\n removeClass(element, NO_TRANSITION);\n return css(element, {\n '-webkit-transition': transition,\n 'transition': transition\n });\n }", "onAnimationEnd() {\n\n }", "function animateIn() {\n\n chartRing.selectAll('.chart-ring')\n .style('opacity', 0)\n .transition()\n .duration(DURATION)\n .delay(function (d, i) {\n return (DELAY + (i * 100));\n })\n .style('opacity', 1);\n }", "startGlitch() {\n // Add the CSS class\n this.DOM.el.classList.add('content__slide--glitch');\n // After the CSS animation is over remove the class\n let iterationCount = this.itemsTotal;\n this.DOM.el.addEventListener('animationend', () => {\n --iterationCount;\n if ( !iterationCount ) {\n this.DOM.el.classList.remove('content__slide--glitch'); \n }\n });\n }" ]
[ "0.7027817", "0.7003131", "0.68253934", "0.67612547", "0.6724844", "0.6715914", "0.664169", "0.6575103", "0.65643024", "0.6521263", "0.6494047", "0.64796937", "0.64167416", "0.6376061", "0.6361697", "0.6333964", "0.6329555", "0.63251495", "0.63118625", "0.6286675", "0.6267459", "0.6260139", "0.62373394", "0.6211805", "0.6211496", "0.6204965", "0.61987376", "0.61935484", "0.61868185", "0.617117", "0.6170246", "0.6166391", "0.61586976", "0.61503005", "0.61401933", "0.61191744", "0.6115703", "0.6082543", "0.6074189", "0.60721755", "0.6063477", "0.6050288", "0.60358894", "0.6033045", "0.6028832", "0.60138834", "0.60017437", "0.60015845", "0.5998794", "0.59925854", "0.5987386", "0.598282", "0.598282", "0.598282", "0.5971587", "0.59693146", "0.59693146", "0.5966758", "0.5965897", "0.5962881", "0.59622747", "0.59604573", "0.5953483", "0.59523994", "0.59500885", "0.5949739", "0.5942829", "0.5920801", "0.5915907", "0.5907242", "0.5905921", "0.5905921", "0.5903785", "0.5903678", "0.5898754", "0.589578", "0.589578", "0.589578", "0.589578", "0.5893937", "0.5891422", "0.5889262", "0.5886758", "0.58847827", "0.588084", "0.587986", "0.5876064", "0.5876064", "0.5876064", "0.58693624", "0.58638835", "0.5860696", "0.58583033", "0.58572376", "0.5856582", "0.5855119", "0.5846469", "0.584074", "0.5834316", "0.5823521", "0.58233166" ]
0.0
-1
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
function _default(option) { var timelineOpt = option && option.timeline; if (!zrUtil.isArray(timelineOpt)) { timelineOpt = timelineOpt ? [timelineOpt] : []; } zrUtil.each(timelineOpt, function (opt) { if (!opt) { return; } compatibleEC2(opt); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "get Android() {}", "function SBRecordsetPHP_analyzePlatformSpecific()\r\n{\r\n\r\n\r\n}", "onChildAppStart () {\n\n }", "private internal function m248() {}", "private public function m246() {}", "onMessageStart() { }", "createStream () {\n\n }", "_playbackCompatibility() {\n // Detect audio playback capabilities.\n\n // Detect HTML5 Audio playback.\n // http://caniuse.com/#feat=audio\n this.canUseAudio = Boolean(new Audio());\n console.log('Native HTML5 Audio playback capability: ' +\n this.canUseAudio);\n\n // Detect Cordova Media Playback\n // It allows playing audio using the native bridge inside WebView Apps.\n // https://github.com/apache/cordova-plugin-media/blob/master/doc/index.md\n this.canUseCordovaMedia = Boolean(window.Media);\n console.log('Cordova Media playback capability: ' +\n this.canUseCordovaMedia);\n\n if (!(this.canUseAudio || this.canUseCordovaMedia)) {\n throw new Error(\n 'Some form of audio playback capability is required');\n }\n\n var _audio = new Audio();\n if (_audio.canPlayType === 'function') {\n throw new Error(\n 'Unable to detect audio playback capabilities');\n }\n\n var canPlayOggVorbis = _audio.canPlayType(\n 'audio/ogg; codecs=\"vorbis\"') !== '';\n var canPlayOggOpus = _audio.canPlayType(\n 'audio/ogg; codecs=\"opus\"') !== '';\n var canPlayWave = _audio.canPlayType('audio/wav') !== '';\n var canPlayMP3 = _audio.canPlayType('audio/mpeg; codecs=\"mp3\"') !== '';\n var canPlayAAC = _audio.canPlayType(\n 'audio/mp4; codecs=\"mp4a.40.2\"') !== '';\n var canPlay3GPP = _audio.canPlayType(\n 'audio/3gpp; codecs=\"samr\"') !== '';\n\n console.log('Native Vorbis audio in Ogg container playback capability: ' +\n canPlayOggVorbis);\n console.log('Native Opus audio in Ogg container playback capability: ' +\n canPlayOggOpus);\n console.log('Native PCM audio in Waveform Audio File Format (WAVE) ' +\n 'playback capability: ' + canPlayWave);\n console.log('Native MPEG Audio Layer 3 (MP3) playback capability: ' +\n canPlayMP3);\n console.log('Native Low-Complexity AAC audio in MP4 container playback ' +\n 'capability: ' + canPlayAAC);\n console.log('Native AMR audio in 3GPP container playback capability: ' +\n canPlay3GPP);\n\n if (!(canPlayWave || canPlayMP3)) {\n throw new Error(\n 'Native Wave or MP3 playback is required');\n }\n }", "constructor() {\n\t}", "constructor() {\n\t}", "constructor() {\n\n\t}", "onComponentMount() {\n\n }", "constructor() {\n throw new Error('Not implemented');\n }", "supportsPlatform() {\n return true;\n }", "function _____SHARED_functions_____(){}", "constructor() {\n }", "constructor() {\n\t\t// ...\n\t}", "static get tag(){return\"hal-9000\"}", "static getDeviceModel() {\n return \"zhimi.fan.za4\";\n }", "requestContainerInfo() {}", "constructor () { super() }", "function BaseDeviceProfile() {\n \n this.audioNeedsTranscodingCodecs = []; // fill these with audio codecs that the implemented device can handle natively\n this.videoNeedsTranscodingCodecs = []; // fill these with video codecs that the implemented device can handle natively\n this.validFormats = []; // fill these with video formats that the implemented device can handle natively\n\n this.transcodeOptions = {\n rescaleVideo : false, // BaseDeviceProfile.prototype.rescale\n subtitle : false, // BaseDeviceProfile.prototype.hardCodeSubtitle\n audioShiftCorrect : false // BaseDeviceProfile.prototype.correctAudioOffset\n };\n\n /**\n * @todo: whutz this?\n * @param {[type]} probeData [description]\n * @return {[type]} [description]\n */\n this.canPlayContainer = function (probeData) {\n throw new Error(\"canPlayContainer : Not Implemented\");\n };\n\n /**\n * Implement this method to return device specific ffmpeg flags for a probed media\n * @param {object} probeData ffmpeg probe data\n * @param {[type]} forceTranscode force transcode even if native format?\n * @return {Promise} [description]\n */\n this.getFFmpegFlags = function (probeData, forceTranscode) {\n throw new Error(\"getFFmpegFlags : Not Implemented!\");\n };\n\n}", "static get STATUS() {\n return 0;\n }", "static create () {}", "get() {}", "didMount() {\n }", "_onMessage() {\n throw new Error(\"not implemented\");\n }", "onReady() {}", "native() {\n throw new Error('NOT_IMPLEMENTED_EXCEPTION: you must override this method in order to use it')\n }", "function sdk(){\n}", "constructor () {\r\n\t\t\r\n\t}", "transient private protected internal function m182() {}", "function version(){ return \"0.13.0\" }", "static getDeviceModel() {\n return \"zhimi.fan.za5\";\n }", "started () {}", "function getVersion(){return _VERSION}", "transient private internal function m185() {}", "constructor() {\r\n }", "started() { }", "InitVsaEngine() {\n\n }", "started() {\r\n\r\n\t}", "function SigV4Utils() { }", "static get NOT_READY () {return 0}", "started () {\n\n }", "started () {\n\n }", "started () {\n\n }", "initialize() {\n\n }", "onMessageReceive() {}", "initialize()\n {\n }", "_get () {\n throw new Error('_get not implemented')\n }", "get () {\n }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "constructor() { }", "started() {}", "started() {}", "started() {}", "started() {}", "started() {}", "started() {}", "started() {}", "started() {}", "started() {}", "started() {}", "function getImplementation( cb ){\n\n }", "heartbeat () {\n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "constructor() {\n \n }", "initleancloud() {\n AV.init({\n appId: keys.appId,\n appKey: keys.appKey\n })\n this.globalData.AV = AV\n }", "static final private internal function m106() {}", "getStreamPosition() {\n return Native.getStreamPosition();\n }", "onMessage() {}", "onMessage() {}", "get WSAPlayerX64() {}", "constructor() {\n super();\n this._logger = new pip_services3_components_node_3.CompositeLogger();\n this._connectionResolver = new connect_1.AwsConnectionResolver();\n this._connectTimeout = 30000;\n this._client = null; //AmazonCloudWatchClient\n this._opened = false;\n }" ]
[ "0.53492224", "0.48935446", "0.48514137", "0.48082927", "0.47720826", "0.4744996", "0.47347993", "0.47019523", "0.46926585", "0.46926585", "0.46730793", "0.46452278", "0.46379203", "0.46256977", "0.4618543", "0.45818752", "0.45806864", "0.45742333", "0.4568166", "0.45616665", "0.45558366", "0.4549164", "0.45481402", "0.45447382", "0.4537214", "0.4522665", "0.451785", "0.4497493", "0.44942656", "0.4484697", "0.4472648", "0.44683102", "0.4465637", "0.44581723", "0.44557354", "0.4454013", "0.44524705", "0.44436827", "0.44380364", "0.4427005", "0.44242096", "0.44237852", "0.44070554", "0.44050547", "0.44050547", "0.44050547", "0.4404598", "0.4393088", "0.43767613", "0.43684104", "0.43635124", "0.4353219", "0.4353219", "0.4353219", "0.4353219", "0.4353219", "0.4353219", "0.4353219", "0.4353219", "0.4353219", "0.4353219", "0.4353219", "0.43515262", "0.43515262", "0.43515262", "0.43515262", "0.43515262", "0.43515262", "0.43515262", "0.43515262", "0.43515262", "0.43515262", "0.43511948", "0.43502447", "0.43487865", "0.43487865", "0.43487865", "0.43487865", "0.43487865", "0.43487865", "0.43487865", "0.43487865", "0.43487865", "0.43487865", "0.43487865", "0.43487865", "0.43487865", "0.43487865", "0.43487865", "0.43487865", "0.43487865", "0.43487865", "0.43487865", "0.43487865", "0.43443355", "0.43417493", "0.43380377", "0.43350744", "0.43350744", "0.4332956", "0.43327877" ]
0.0
-1
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Backward compat for radar chart in 2
function _default(option) { var polarOptArr = option.polar; if (polarOptArr) { if (!zrUtil.isArray(polarOptArr)) { polarOptArr = [polarOptArr]; } var polarNotRadar = []; zrUtil.each(polarOptArr, function (polarOpt, idx) { if (polarOpt.indicator) { if (polarOpt.type && !polarOpt.shape) { polarOpt.shape = polarOpt.type; } option.radar = option.radar || []; if (!zrUtil.isArray(option.radar)) { option.radar = [option.radar]; } option.radar.push(polarOpt); } else { polarNotRadar.push(polarOpt); } }); option.polar = polarNotRadar; } zrUtil.each(option.series, function (seriesOpt) { if (seriesOpt && seriesOpt.type === 'radar' && seriesOpt.polarIndex) { seriesOpt.radarIndex = seriesOpt.polarIndex; } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function RadarChart(id_sm, data, name, url, options) {\n var cfg = {\n w: 600,\t\t\t\t//Width of the circle\n h: 600,\t\t\t\t//Height of the circle\n margin: {top: 20, right: 20, bottom: 20, left: 20}, //The margins of the SVG\n levels: 3,\t\t\t\t//How many levels or inner circles should there be drawn\n maxValue: 1, \t\t\t//What is the value that the biggest circle will represent\n labelFactor: 1.01, \t//How much farther than the radius of the outer circle should the labels be placed\n wrapWidth: 60, \t\t//The number of pixels after which a label needs to be given a new line\n opacityArea: 0.4, \t//The opacity of the area of the blob\n dotRadius: 4, \t\t\t//The size of the colored circles of each blog\n opacityCircles: 0.05, \t//The opacity of the circles of each blob\n strokeWidth: 2, \t\t//The width of the stroke around each blob\n roundStrokes: false,\t//If true the area and stroke will follow a round path (cardinal-closed)\n showAxisText: false, //If true show the axis label\n enableDrag: false, // If true enable draggable sliders\n color: d3.scaleOrdinal(d3.schemeCategory10)\t//Color function\n };\n\n\n //Put all of the options into a variable called cfg\n if ('undefined' !== typeof options) {\n for (var i in options) {\n if ('undefined' !== typeof options[i]) {\n cfg[i] = options[i];\n }\n }//for i\n }//if\n\n //If the supplied maxValue is smaller than the actual one, replace by the max in the data\n var maxValue = Math.max(cfg.maxValue, d3.max(data, function (i) {\n return d3.max(i.map(function (o) {\n return o.value;\n }))\n }));\n\n var allAxis = (data[0].map(function (i, j) {\n return i.axis\n })),\t//Names of each axis\n total = allAxis.length,\t\t\t\t\t//The number of different axes\n radius = Math.min(cfg.w / 2, cfg.h / 2), \t//Radius of the outermost circle\n Format = d3.format('%'),\t\t\t \t//Percentage formatting\n angleSlice = Math.PI * 2 / total;\t\t//The width in radians of each \"slice\"\n\n //Scale for the radius\n var rScale = d3.scaleLinear()\n .range([0, radius])\n .domain([0, 1]);\n\n /////////////////////////////////////////////////////////\n //////////// Create the container SVG and g /////////////\n /////////////////////////////////////////////////////////\n\n var id = \"#radar_\" + sm_ids;\n\n var title;\n if (url) {\n title = \"<div class='grid-item-content'><a class='sm_title' target='_blank' href=\\\"\" + url + \"\\\">\" + name + \"</a></div>\";\n } else {\n title = name;\n }\n if (cfg.enableDrag) {\n $(id_sm).append('<div id=\"radar_' + sm_ids + '\"></div>');\n }\n else if (!cfg.enableDrag && id_sm == \"#small_multiple\") {\n// if (sm_ids <= 18) {\n $(id_sm).append('<div class=\"radar_chart col-lg-2 col-md-4 col-sm-4 grid-item dynamicnugs hidenug\" id=\"radar_' + sm_ids + '\" data-value=\"' + name + '\" data-dist=\"0\" data-type=\"sm_rank\">' + title + '</div>');\n// }\n // else {\n // $(id_sm).append('<div class=\"radar_chart col-lg-2 col-md-4 col-sm-4 grid-item\" style=\"display: none;\" id=\"radar_' + sm_ids + '\" data-value=\"' + name + '\" data-dist=\"0\">' + title + '</div>');\n // }\n }\n else if (!cfg.enableDrag && id_sm == \"#small_multiple2\") {\n $(id_sm).append('<div onclick=\"topFunction()\" class=\"radar_chart col-lg-2 col-md-2 col-sm-4 fixednugs\" id=\"radar_' + sm_ids + '\" data-value=\"' + name + '\" data-dist=\"0\" data-type=\"sm_chrono\">' + title + '</div>');\n }\n sm_ids += 1;\n\n //Remove whatever chart with the same id/class was present before\n d3.select(id).select(\"svg\").remove();\n\n //Initiate the radar chart SVG\n var svg = d3.select(id).append(\"svg\")\n .attr(\"width\", cfg.w + cfg.margin.left + cfg.margin.right)\n .attr(\"height\", cfg.h + cfg.margin.top + cfg.margin.bottom)\n .attr(\"class\", \"radar\");\n //Append a g element\n var g = svg.append(\"g\")\n .attr(\"transform\", \"translate(\" + (cfg.w / 2 + cfg.margin.left) + \",\" + (cfg.h / 2 + cfg.margin.top) + \")\");\n\n /////////////////////////////////////////////////////////\n ////////// Glow filter for some extra pizzazz ///////////\n /////////////////////////////////////////////////////////\n\n //Filter for the outside glow\n var filter = g.append('defs').append('filter').attr('id', 'glow'),\n feGaussianBlur = filter.append('feGaussianBlur').attr('stdDeviation', '2.5').attr('result', 'coloredBlur'),\n feMerge = filter.append('feMerge'),\n feMergeNode_1 = feMerge.append('feMergeNode').attr('in', 'coloredBlur'),\n feMergeNode_2 = feMerge.append('feMergeNode').attr('in', 'SourceGraphic');\n\n /////////////////////////////////////////////////////////\n /////////////// Draw the Circular grid //////////////////\n /////////////////////////////////////////////////////////\n\n //Wrapper for the grid & axes\n var axisGrid = g.append(\"g\").attr(\"class\", \"axisWrapper\");\n\n //Draw the background circles\n axisGrid.selectAll(\".levels\")\n .data(d3.range(1, (cfg.levels + 1)).reverse())\n .enter()\n .append(\"circle\")\n .attr(\"class\", \"gridCircle\")\n .attr(\"r\", function (d, i) {\n return radius / cfg.levels * d;\n })\n .style(\"fill\", \"#CDCDCD\")\n .style(\"stroke\", \"#CDCDCD\")\n .style(\"stroke-width\", \"0.3\")\n .style(\"fill-opacity\", cfg.opacityCircles)\n .style(\"filter\", \"url(#glow)\");\n\n //Text indicating at what % each level is\n if (cfg.showAxisText) {\n\n axisGrid.selectAll(\".axisLabel\")\n .data(d3.range(1, (cfg.levels + 1)).reverse())\n .enter().append(\"text\")\n .attr(\"class\", \"axisLabel\")\n .attr(\"x\", 2)\n .attr(\"y\", function (d) {\n return -d * radius / cfg.levels;\n })\n .attr(\"dy\", \"0.4em\")\n .style(\"font-size\", \"10px\")\n .attr(\"fill\", \"#737373\")\n .text(function (d, i) {\n return Format(1 * d / cfg.levels);\n }); // Replace 1 by maxValue to get back to defaults\n }\n /////////////////////////////////////////////////////////\n //////////////////// Draw the axes //////////////////////\n /////////////////////////////////////////////////////////\n\n //Create the straight lines radiating outward from the center\n var axis = axisGrid.selectAll(\".axis\")\n .data(allAxis)\n .enter()\n .append(\"g\")\n .attr(\"class\", \"axis\");\n //Append the lines\n\n axis.append(\"line\")\n .attr(\"x1\", 0)\n .attr(\"y1\", 0)\n .attr(\"x2\", function (d, i) {\n return rScale(1) * Math.cos(angleSlice * i - Math.PI / 2);\n })\n .attr(\"y2\", function (d, i) {\n return rScale(1) * Math.sin(angleSlice * i - Math.PI / 2);\n })\n .attr(\"class\", \"line \")\n .style(\"stroke\", \"white\")\n .style(\"stroke-width\", \"2px\");\n\n\n //Append the labels at each axis\n if (cfg.showLabel) {\n axis.append(\"text\")\n .attr(\"class\", \"legend btn critere\")\n .attr(\"id\", function (d, i) {\n if (i == 0) {\n return \"humour\";\n }\n if (i == 1) {\n return \"duree\";\n }\n if (i == 2) {\n return \"abonnes\";\n }\n if (i == 3) {\n return \"frequence\";\n }\n if (i == 4) {\n return \"reflexion\";\n }\n if (i == 5) {\n return \"originalite\";\n }\n })\n\n .style(\"font-size\", \"14px\")\n .attr(\"text-anchor\", function (d, i) {\n if (i == 0 || i == 3) {\n return \"middle\";\n } else if (i == 1 || i == 2) {\n return \"start\"\n } else {\n return \"end\"\n }\n })\n .attr(\"dy\", \"0.35em\")\n .attr(\"x\", function (d, i) {\n return rScale(1.10 * cfg.labelFactor) * Math.cos(angleSlice * i - Math.PI / 2);\n })\n .attr(\"y\", function (d, i) {\n return rScale(1.10 * cfg.labelFactor) * Math.sin(angleSlice * i - Math.PI / 2);\n })\n .text(function (d) {\n return d\n })\n .on(\"click\", function (d, i) {\n var en_cpt = enable_axes.filter(function (x) {\n return x;\n }).length;\n var current_status = enable_axes[i];\n if (current_status && en_cpt <= 3) {\n return;\n }\n enable_axes[i] = enable_axes[i] ? false : true;\n if (enable_axes[i]) {\n $(this).removeClass(\"legend_disabled\");\n $(this).addClass(\"legend_enabled\");\n } else {\n $(this).addClass(\"legend_disabled\");\n $(this).removeClass(\"legend_enabled\");\n }\n data_slider[0][i].value = 0.5;\n circles.each(function (d, i) {\n if (enable_axes[i]) {\n d3.select(this).attr(\"r\", cfg.dotRadius);\n } else {\n d3.select(this).attr(\"r\", 1);\n }\n });\n\n update_path(blobWrapper);\n\n })\n .on(\"mouseover\", function (d, i) {\n tooltip.transition()\n .duration(200)\n .style(\"opacity\", .8)\n .style(\"font-size\", \"12px\")\n .style(\"font-family\", \"Exo\");\n tooltip.html(function () {\n if (enable_axes[i]) {\n return \"Clique pour désactiver si tu t'en fous.\"\n } else {\n return \"Clique pour activer si ça t'intéresse.\"\n }\n })\n .style(\"left\", d3.event.pageX + \"30px\")\n .style(\"top\", d3.event.pageY + \"10px\");\n\n })\n .on(\"mousemove\", function (d) {\n tooltip\n .style(\"left\", d3.event.pageX + \"px\")\n .style(\"top\", d3.event.pageY + \"px\");\n\n })\n .on(\"mouseout\", function (d) {\n tooltip.transition()\n .duration(200)\n .style(\"opacity\", 0);\n });\n //.call(wrap, cfg.wrapWidth);\n }\n /////////////////////////////////////////////////////////\n ///////////// Draw the radar chart blobs ////////////////\n /////////////////////////////////////////////////////////\n\n\n //The radial line function\n var radarLine = d3.lineRadial()\n .radius(function (d, i) {\n return rScale(d.value);\n })\n .angle(function (d, i) {\n return i * angleSlice;\n })\n .curve(d3.curveLinear);\n\n if (cfg.roundStrokes) {\n radarLine.curve(d3.curveCardinalClosed);\n }\n\n var blobWrapper = g.selectAll(\".radarWrapper\")\n .data(data)\n .enter().append(\"g\")\n .attr(\"class\", \"radarWrapper\");\n\n // Draw initial shape\n update_path(blobWrapper);\n\n\n var drag = d3.drag()\n .on(\"start\", dragstarted)\n .on(\"drag\", move)\n .on(\"end\", drageend);\n\n function drageend() {\n d3.select(this).raise().classed(\"active\", false);\n d3.select(\"#CYN\").classed(\"active\", false);\n }\n\n function dragstarted() {\n d3.select(this).raise().classed(\"active\", true);\n d3.select(\"#CYN\").classed(\"active\", true);\n }\n\n function move(dobj, i) {\n this.parentNode.appendChild(this);\n var dragTarget = d3.select(this);\n var oldData = dragTarget.data()[0];\n var oldX = parseFloat(dragTarget.attr(\"cx\"));\n var oldY = parseFloat(dragTarget.attr(\"cy\"));\n\n //Bug for vector @ 270deg -Infinity/Infinity slope\n oldX = (Math.abs(oldX) < 0.0000001) ? 0 : oldX;\n oldY = (Math.abs(oldY) < 0.0000001) ? 0 : oldY;\n\n var newY = 0, newX = 0, newValue = 0;\n var maxX = cfg.w / 2;\n var maxY = cfg.h / 2;\n\n if (oldX === 0) {\n\n newY = oldY + d3.event.dy;\n\n if (Math.abs(newY) > Math.abs(maxY)) {\n newY = maxY;\n }\n\n var ratioY = newY / oldY;\n //newValue = ((newY / oldY) * oldData.value).toFixed(2);\n newValue = Math.abs(newY / radius);\n if (ratioY < 0) {\n newValue = -newValue;\n }\n //console.log(newValue);\n\n }\n else {\n var slope = oldY / oldX;\n\n newX = d3.event.dx + oldX;\n\n if (Math.abs(newX) > Math.abs(maxX)) {\n newX = maxX;\n }\n newY = newX * slope;\n\n var ratio = newX / oldX;\n //newValue = (ratio * oldData.value).toFixed(2);\n newValue = Math.sqrt((newX * newX) + (newY * newY)) / radius;\n if (ratio < 0) {\n newValue = -newValue;\n }\n }\n\n // newX = d3.event.dx + parseFloat(dragTarget.attr(\"cx\"));\n // newY = d3.event.dy + parseFloat(dragTarget.attr(\"cy\"));\n\n //Bound the drag behavior to the max and min of the axis, not by pixels but by value calc (easier)\n if (newValue > 0 && newValue <= 1) {\n\n dragTarget\n .attr(\"cx\", function () {\n return newX;\n })\n .attr(\"cy\", function () {\n return newY;\n });\n\n //Updating the data set with the new value\n (dragTarget.data()[0]).value = newValue;\n //center display for value\n d3.select(\".updatevalue.skill\").text((dragTarget.data()[0]).axis)\n .style(\"display\", \"block\")\n .style(\"font-size\", \"12px\")\n .style(\"text-align\", \"center\")\n .style(\"margin\", \"20px 0 5px 0\");\n\n\n d3.select(\".updatevalue.value\").text(newValue)\n .style(\"display\", \"block\")\n .style(\"text-align\", \"center\")\n .style(\"visibility\", \"visible\");\n\n //console.log(newValue);\n data_slider[0].forEach(function (d, index) {\n if (d.axis == oldData.axis) {\n data_slider[0][index].value = newValue;\n // console.log(\"oui\", data_slider[0][index].value)\n }\n });\n data[0].forEach(function (d, index) {\n if (d.axis == oldData.axis) {\n data_slider[0][index].value = newValue;\n // console.log(\"oui2\", data_slider[0][index].value)\n }\n });\n\n update_path(blobWrapper);\n }\n\n //Release the drag listener on the node if you hit the min/max values\n //https://github.com/mbostock/d3/wiki/Drag-Behavior\n else {\n if (newValue <= 0) {\n newValue = 0;\n }\n else if (newValue >= 1.0) {\n newValue = 1.0;\n }\n dragTarget.on(\"drag\", null);\n }\n }\n\n //Append the circles\n var circles = blobWrapper.selectAll(\".radarCircle\")\n .data(function (d, i) {\n return d;\n })\n .enter().append(\"circle\")\n .attr(\"class\", \"radarCircle\")\n .attr(\"r\", cfg.dotRadius)\n .attr(\"cx\", function (d, i) {\n return rScale(d.value) * Math.cos(angleSlice * i - Math.PI / 2);\n })\n .attr(\"cy\", function (d, i) {\n return rScale(d.value) * Math.sin(angleSlice * i - Math.PI / 2);\n })\n .style(\"fill\", function (d, i, j) {\n return cfg.color(j);\n })\n .style(\"fill-opacity\", 0.8);\n\n if (cfg.enableDrag) {\n circles.call(drag);\n }\n\n\n /////////////////////////////////////////////////////////\n //////// Append invisible circles for tooltip ///////////\n /////////////////////////////////////////////////////////\n\n //Wrapper for the invisible circles on top\n var blobCircleWrapper = g.selectAll(\".radarCircleWrapper\")\n .data(data)\n .enter().append(\"g\")\n .attr(\"class\", \"radarCircleWrapper\");\n\n //Append a set of invisible circles on top for the mouseover pop-up\n /*\n blobCircleWrapper.selectAll(\".radarInvisibleCircle\")\n .data(function (d, i) {\n return d;\n })\n .enter().append(\"circle\")\n .attr(\"class\", \"radarInvisibleCircle\")\n .attr(\"r\", cfg.dotRadius * 1.5)\n .attr(\"cx\", function (d, i) {\n return rScale(d.value) * Math.cos(angleSlice * i - Math.PI / 2);\n })\n .attr(\"cy\", function (d, i) {\n return rScale(d.value) * Math.sin(angleSlice * i - Math.PI / 2);\n })\n .style(\"fill\", \"none\")\n .style(\"pointer-events\", \"all\")\n .on(\"mouseover\", function (d, i) {\n newX = parseFloat(d3.select(this).attr('cx')) - 10;\n newY = parseFloat(d3.select(this).attr('cy')) - 10;\n\n tooltip\n .attr('x', newX)\n .attr('y', newY)\n .text(Format(d.value))\n .transition().duration(200)\n .style('opacity', 1);\n })\n ;*/\n\n /////////////////////////////////////////////////////////\n /////////////////// Helper Function /////////////////////\n /////////////////////////////////////////////////////////\n\n // Update the shape the radar needed\n function update_path(blobWrapper) {\n g.selectAll(\".radarArea\").remove();\n g.selectAll(\".radarStroke\").remove();\n\n\n // Append the backgrounds\n blobWrapper\n .insert(\"path\", \"circle\")\n .attr(\"class\", \"radarArea\")\n .attr(\"id\", \"radarArea\" + sm_ids)\n .attr(\"d\", function (d, i) {\n return radarLine(d);\n })\n .style(\"fill\", function (d, i) {\n return cfg.color(i);\n })\n .style(\"fill-opacity\", cfg.opacityArea)\n .on('mouseover', function (d, i) {\n if (!cfg.enableDrag) {\n d3.select(this)\n .transition()\n .duration(100)\n .style(\"fill-opacity\", 0.7)\n .style(\"cursor\", \"pointer\");\n }\n }\n )\n .on(\"mouseout\", function () {\n if (!cfg.enableDrag) {\n d3.select(this).transition().duration(200)\n .style(\"fill-opacity\", 0.4)\n .style(\"cursor\", \"none\");\n\n }\n }\n )\n .on('click', function () {\n data_slider[0][0][\"value\"] = data[0][0][\"value\"];\n data_slider[0][1][\"value\"] = data[0][1][\"value\"];\n data_slider[0][2][\"value\"] = data[0][2][\"value\"];\n data_slider[0][3][\"value\"] = data[0][3][\"value\"];\n data_slider[0][4][\"value\"] = data[0][4][\"value\"];\n data_slider[0][5][\"value\"] = data[0][5][\"value\"];\n $('#CYN').html('');\n RadarChart(\"#CYN\", data_slider, \"\", null, customRadarChartOptions);\n /*data_slider = [\n [\n {axis: \"Humour\", value: 0.5},\n {axis: \"Durée\", value: 0.5},\n {axis: \"Abonnés\", value: 0.5},\n {axis: \"Fréquence\", value: 0.5},\n {axis: \"Réflexion\", value: 0.5},\n {axis: \"Originalité\", value: 0.5}\n ]\n ];*/\n\n });\n\n// Create the outlines\n blobWrapper.insert(\"path\", \"circle\")\n .attr(\"class\", \"radarStroke\")\n .attr(\"d\", function (d, i) {\n return radarLine(d);\n })\n .style(\"stroke-width\", cfg.strokeWidth + \"px\")\n .style(\"stroke\", function (d, i) {\n return cfg.color(i);\n })\n .style(\"fill\", \"none\")\n .style(\"filter\", \"url(#glow)\");\n\n }\n\n// Taken from http://bl.ocks.org/mbostock/7555321\n// Wraps SVG text\n function wrap(text, width) {\n text.each(function () {\n var text = d3.select(this),\n words = text.text().split(/\\s+/).reverse(),\n word,\n line = [],\n lineNumber = 0, button\n lineHeight = 1.4, // ems\n y = text.attr(\"y\"),\n x = text.attr(\"x\"),\n dy = parseFloat(text.attr(\"dy\")),\n tspan = text.text(null).append(\"tspan\").attr(\"x\", x).attr(\"y\", y).attr(\"dy\", dy + \"em\");\n\n while (word = words.pop()) {\n line.push(word);\n tspan.text(line.join(\" \"));\n if (tspan.node().getComputedTextLength() > width) {\n line.pop();\n tspan.text(line.join(\" \"));\n line = [word];\n tspan = text.append(\"tspan\").attr(\"x\", x).attr(\"y\", y).attr(\"dy\", ++lineNumber * lineHeight + dy + \"em\").text(word);\n }\n }\n });\n }//wrap\n\n}//RadarChart", "function RadarChart(id, data, options) {\n var cfg = {\n w: 20, //Width of the circle\n h: 20, //Height of the circle\n margin_r: { top: 10, right: 10, bottom: 10, left: 10 }, //The margins of the SVG\n levels: 3, //How many levels or inner circles should there be drawn\n //maxValue: 0, //What is the value that the biggest circle will represent\n labelFactor: 1, //How much farther than the radius of the outer circle should the labels be placed\n wrapWidth: 60, //The number of pixels after which a label needs to be given a new line\n opacityArea: 0.35, //The opacity of the area of the blob\n dotRadius: 4, //The size of the colored circles of each blog\n opacityCircles: 0.1, //The opacity of the circles of each blob\n strokeWidth: 1, //The width of the stroke around each blob\n // roundStrokes: false, //If true the area and stroke will follow a round path (cardinal-closed)\n color: d3.schemeCategory10 //Color function\n };\n\n //Put all of the options into a variable called cfg\n if ('undefined' !== typeof options) {\n for (var i in options) {\n if ('undefined' !== typeof options[i]) { cfg[i] = options[i]; }\n } //for i\n } //if\n\n //If the supplied maxValue is smaller than the actual one, replace by the max in the data\n var maxValue1 = d3.max(data, function(d) { return d.GDP }),\n maxValue2 = d3.max(data, function(d) { return d['Happiness Score'] }),\n maxValue3 = d3.max(data, function(d) { return d['Human Development Index'] }),\n maxValue4 = d3.max(data, function(d) { return d['Gender Inequality Index'] }),\n maxValue5 = d3.max(data, function(d) { return d['Corruption Perception Index'] }),\n maxValue6 = d3.max(data, function(d) { return d['Unemployment Rate'] });\n\n\n\n var allAxis = ['GDP', 'Happiness Score', 'Human Development Index', 'Gender Inequality Index', 'Corruption Perception Index', 'Unemployment Rate'], //Names of each axis\n total = allAxis.length, //The number of different axes\n radius = Math.min(cfg.w / 2, cfg.h / 2), //Radius of the outermost circle\n //Format = d3.format('%'), //Percentage formatting\n angleSlice = Math.PI * 2 / total; //The width in radians of each \"slice\"\n\n\n //Scale for the radius\n var rScale1 = d3.scaleLinear()\n .range([0, radius])\n .domain([0, maxValue1]);\n\n var rScale2 = d3.scaleLinear()\n .range([0, radius])\n .domain([0, maxValue2]);\n\n var rScale3 = d3.scaleLinear()\n .range([0, radius])\n .domain([0, maxValue3]);\n\n var rScale4 = d3.scaleLinear()\n .range([0, radius])\n .domain([0, maxValue4]);\n\n var rScale5 = d3.scaleLinear()\n .range([0, radius])\n .domain([0, maxValue5]);\n\n var rScale6 = d3.scaleLinear()\n .range([0, radius])\n .domain([0, maxValue6]);\n\n\n /////////////////////////////////////////////////////////\n //////////// Create the container SVG and g /////////////\n /////////////////////////////////////////////////////////\n\n //Remove whatever chart with the same id/class was present before\n d3.select(id).select(\"svg\").remove();\n\n //Initiate the radar chart SVG\n var svg = d3.select(id).append(\"svg\")\n .attr(\"width\", cfg.w + cfg.margin_r.left + cfg.margin_r.right)\n .attr(\"height\", cfg.h + cfg.margin_r.top + cfg.margin_r.bottom)\n .attr(\"class\", \"radar\" + id);\n //Append a g element \n var g = svg.append(\"g\")\n .attr(\"transform\", \"translate(\" + (cfg.w / 2 + cfg.margin_r.left) + \",\" + (cfg.h / 2 + cfg.margin_r.top) + \")\");\n\n /////////////////////////////////////////////////////////\n ////////// Glow filter for some extra pizzazz ///////////\n /////////////////////////////////////////////////////////\n\n //Filter for the outside glow\n var filter = g.append('defs').append('filter').attr('id', 'glow'),\n feGaussianBlur = filter.append('feGaussianBlur').attr('stdDeviation', '2.5').attr('result', 'coloredBlur'),\n feMerge = filter.append('feMerge'),\n feMergeNode_1 = feMerge.append('feMergeNode').attr('in', 'coloredBlur'),\n feMergeNode_2 = feMerge.append('feMergeNode').attr('in', 'SourceGraphic');\n\n /////////////////////////////////////////////////////////\n /////////////// Draw the Circular grid //////////////////\n /////////////////////////////////////////////////////////\n\n //Wrapper for the grid & axes\n var axisGrid = g.append(\"g\").attr(\"class\", \"axisWrapper\");\n\n //Draw the background circles\n axisGrid.selectAll(\".levels\")\n .data(d3.range(1, (cfg.levels + 1)).reverse())\n .enter()\n .append(\"circle\")\n .attr(\"class\", \"gridCircle\")\n .attr(\"r\", function(d, i) { return radius / cfg.levels * d; })\n .style(\"fill\", \"#CDCDCD\")\n .style(\"stroke\", \"#CDCDCD\")\n .style(\"fill-opacity\", cfg.opacityCircles)\n .style(\"filter\", \"url(#glow)\");\n\n //Text indicating at what % each level is\n axisGrid.selectAll(\".axisLabel\")\n .data(d3.range(1, (cfg.levels + 1)).reverse())\n .enter().append(\"text\")\n .attr(\"class\", \"axisLabel\")\n .attr(\"x\", 4)\n .attr(\"y\", function(d) { return -d * radius / cfg.levels; })\n .attr(\"dy\", \"0.4em\")\n .style(\"font-size\", \"10px\")\n .attr(\"fill\", \"#737373\")\n .text(function(d, i) { return maxValue1 * d / cfg.levels; });\n\n /////////////////////////////////////////////////////////\n //////////////////// Draw the axes //////////////////////\n /////////////////////////////////////////////////////////\n\n //Create the straight lines radiating outward from the center\n var axis = axisGrid.selectAll(\".axis\")\n .data(allAxis)\n .enter()\n .append(\"g\")\n .attr(\"class\", \"axis\");\n //Append the lines\n axis.append(\"line\")\n .attr(\"x1\", 0)\n .attr(\"y1\", 0)\n .attr(\"x2\", function(d, i) {\n\n if (d == 'GDP') { return rScale1(maxValue1 * 1.1) * Math.cos(angleSlice * i - Math.PI / 2); } else\n if (d == 'Happiness Score') { return rScale2(maxValue2 * 1.1) * Math.cos(angleSlice * i - Math.PI / 2); } else\n if (d == 'Human Development Index') { return rScale3(maxValue3 * 1.1) * Math.cos(angleSlice * i - Math.PI / 2); } else\n if (d == 'Gender Inequality Index') { return rScale4(maxValue4 * 1.1) * Math.cos(angleSlice * i - Math.PI / 2); } else\n if (d == 'Corruption Perception Index') { return rScale5(maxValue5 * 1.1) * Math.cos(angleSlice * i - Math.PI / 2); } else\n if (d == 'Unemployment Rate') { return rScale6(maxValue6 * 1.1) * Math.cos(angleSlice * i - Math.PI / 2); };\n })\n .attr(\"y2\", function(d, i) {\n\n if (d == 'GDP') { return rScale1(maxValue1 * 1.1) * Math.sin(angleSlice * i - Math.PI / 2); } else\n if (d == 'Happiness Score') { return rScale2(maxValue2 * 1.1) * Math.sin(angleSlice * i - Math.PI / 2); } else\n if (d == 'Human Development Index') { return rScale3(maxValue3 * 1.1) * Math.sin(angleSlice * i - Math.PI / 2); } else\n if (d == 'Gender Inequality Index') { return rScale4(maxValue4 * 1.1) * Math.sin(angleSlice * i - Math.PI / 2); } else\n if (d == 'Corruption Perception Index') { return rScale5(maxValue5 * 1.1) * Math.sin(angleSlice * i - Math.PI / 2); } else\n if (d == 'Unemployment Rate') { return rScale6(maxValue6 * 1.1) * Math.sin(angleSlice * i - Math.PI / 2); };\n })\n .attr(\"class\", \"line\")\n .style(\"stroke\", \"white\")\n .style(\"stroke-width\", \"2px\");\n\n //Append the labels at each axis\n axis.append(\"text\")\n .attr(\"class\", \"legend\")\n .style(\"font-size\", \"11px\")\n .attr(\"text-anchor\", \"middle\")\n .attr(\"dy\", \"0.35em\")\n .attr(\"x\", function(d, i) { return rScale1(maxValue1 * cfg.labelFactor) * Math.cos(angleSlice * i - Math.PI / 2); })\n .attr(\"y\", function(d, i) { return rScale1(maxValue1 * cfg.labelFactor) * Math.sin(angleSlice * i - Math.PI / 2); })\n .text(function(d) { return d })\n .call(wrap, cfg.wrapWidth);\n\n /////////////////////////////////////////////////////////\n ///////////// Draw the radar chart blobs ////////////////\n /////////////////////////////////////////////////////////\n\n //The radial line function\n var radarLine = d3.lineRadial()\n .curve(d3.curveCardinalClosed)\n .radius(function(d,i) { return rScale1(d[i].GDP)\n \n /* if (i == 0) { return rScale1(d.GDP) } else\n if (i == 1) { return rScale2(d['Happiness Score']) } else\n if (i == 2) { return rScale3(d['Human Development Index']) } else\n if (i == 3) { return rScale4(d['Gender Inequality Index']) } else\n if (i == 4) { return rScale5(d['Corruption Perception Index']) } else\n if (i == 5) { return rScale6(d['Unemployment Rate']) }*/\n })\n .angle(function(d, i) { return i * angleSlice; });\n\nconsole.log(data);\nconsole.log(rScale1(data[1].GDP));\n//console.log(radarLine(data.GDP));\n\n //Create a wrapper for the blobs \n var blobWrapper = g.selectAll(\".radarWrapper\")\n .data(data)\n .enter().append(\"g\")\n .attr(\"class\", \"radarWrapper\");\n\n //Append the backgrounds \n blobWrapper\n .append(\"path\")\n .attr(\"class\", \"radarArea\")\n .attr(\"d\", function(d){console.log(d);console.log(radarLine(d)); return radarLine(d)})\n \n .style(\"fill\", function(d, i) { return cfg.color(i); })\n .style(\"fill-opacity\", cfg.opacityArea)\n .on('mouseover', function(d, i) {\n //Dim all blobs\n d3.selectAll(\".radarArea\")\n .transition().duration(200)\n .style(\"fill-opacity\", 0.1);\n //Bring back the hovered over blob\n d3.select(this)\n .transition().duration(200)\n .style(\"fill-opacity\", 0.7);\n })\n .on('mouseout', function() {\n //Bring back all blobs\n d3.selectAll(\".radarArea\")\n .transition().duration(200)\n .style(\"fill-opacity\", cfg.opacityArea);\n });\n\n //Create the outlines \n blobWrapper.append(\"path\")\n .attr(\"class\", \"radarStroke\")\n .attr(\"d\", function(d, i) { return radarLine(d); })\n .style(\"stroke-width\", cfg.strokeWidth + \"px\")\n .style(\"stroke\", function(d, i) { return cfg.color(i); })\n .style(\"fill\", \"none\")\n .style(\"filter\", \"url(#glow)\");\n\n //Append the circles\n blobWrapper.selectAll(\".radarCircle\")\n .data(function(d, i) { return d; })\n .enter().append(\"circle\")\n .attr(\"class\", \"radarCircle\")\n .attr(\"r\", cfg.dotRadius)\n .attr(\"cx\", function(d, i) { return rScale1(d.value) * Math.cos(angleSlice * i - Math.PI / 2); })\n .attr(\"cy\", function(d, i) { return rScale1(d.value) * Math.sin(angleSlice * i - Math.PI / 2); })\n .style(\"fill\", function(d, i, j) { return cfg.color(j); })\n .style(\"fill-opacity\", 0.8);\n\n /////////////////////////////////////////////////////////\n //////// Append invisible circles for tooltip ///////////\n /////////////////////////////////////////////////////////\n\n //Wrapper for the invisible circles on top\n var blobCircleWrapper = g.selectAll(\".radarCircleWrapper\")\n .data(data)\n .enter().append(\"g\")\n .attr(\"class\", \"radarCircleWrapper\");\n\n //Append a set of invisible circles on top for the mouseover pop-up\n blobCircleWrapper.selectAll(\".radarInvisibleCircle\")\n .data(function(d, i) { return d; })\n .enter().append(\"circle\")\n .attr(\"class\", \"radarInvisibleCircle\")\n .attr(\"r\", cfg.dotRadius * 1.5)\n .attr(\"cx\", function(d, i) { return rScale1(d.value) * Math.cos(angleSlice * i - Math.PI / 2); })\n .attr(\"cy\", function(d, i) { return rScale1(d.value) * Math.sin(angleSlice * i - Math.PI / 2); })\n .style(\"fill\", \"none\")\n .style(\"pointer-events\", \"all\")\n .on(\"mouseover\", function(d, i) {\n newX = parseFloat(d3.select(this).attr('cx')) - 10;\n newY = parseFloat(d3.select(this).attr('cy')) - 10;\n\n tooltip\n .attr('x', newX)\n .attr('y', newY)\n .text(d.value)\n .transition().duration(200)\n .style('opacity', 1);\n })\n .on(\"mouseout\", function() {\n tooltip.transition().duration(200)\n .style(\"opacity\", 0);\n });\n\n //Set up the small tooltip for when you hover over a circle\n var tooltip = g.append(\"text\")\n .attr(\"class\", \"tooltip\")\n .style(\"opacity\", 0);\n\n /////////////////////////////////////////////////////////\n /////////////////// Helper Function /////////////////////\n /////////////////////////////////////////////////////////\n\n //Taken from http://bl.ocks.org/mbostock/7555321\n //Wraps SVG text \n function wrap(text, width) {\n text.each(function() {\n var text = d3.select(this),\n words = text.text().split(/\\s+/).reverse(),\n word,\n line = [],\n lineNumber = 0,\n lineHeight = 1.4, // ems\n y = text.attr(\"y\"),\n x = text.attr(\"x\"),\n dy = parseFloat(text.attr(\"dy\")),\n tspan = text.text(null).append(\"tspan\").attr(\"x\", x).attr(\"y\", y).attr(\"dy\", dy + \"em\");\n\n while (word = words.pop()) {\n line.push(word);\n tspan.text(line.join(\" \"));\n if (tspan.node().getComputedTextLength() > width_r) {\n line.pop();\n tspan.text(line.join(\" \"));\n line = [word];\n tspan = text.append(\"tspan\").attr(\"x\", x).attr(\"y\", y).attr(\"dy\", ++lineNumber * lineHeight + dy + \"em\").text(word);\n }\n }\n });\n } //wrap \n}", "function chartRadarChart () {\n\n /* Default Properties */\n var svg = void 0;\n var chart = void 0;\n var classed = \"radarChart\";\n var width = 400;\n var height = 300;\n var margin = { top: 20, right: 20, bottom: 20, left: 20 };\n var transition = { ease: d3.easeBounce, duration: 500 };\n var colors = palette.categorical(3);\n var dispatch = d3.dispatch(\"customValueMouseOver\", \"customValueMouseOut\", \"customValueClick\", \"customSeriesMouseOver\", \"customSeriesMouseOut\", \"customSeriesClick\");\n\n /* Chart Dimensions */\n var chartW = void 0;\n var chartH = void 0;\n var radius = void 0;\n\n /* Scales */\n var xScale = void 0;\n var yScale = void 0;\n var colorScale = void 0;\n\n /* Other Customisation Options */\n var startAngle = 0;\n var endAngle = 360;\n\n /**\n * Initialise Data and Scales\n *\n * @private\n * @param {Array} data - Chart data.\n */\n function init(data) {\n chartW = width - (margin.left + margin.right);\n chartH = height - (margin.top + margin.bottom);\n\n var _dataTransform$summar = dataTransform(data).summary(),\n rowKeys = _dataTransform$summar.rowKeys,\n columnKeys = _dataTransform$summar.columnKeys,\n valueMax = _dataTransform$summar.valueMax;\n\n var valueExtent = [0, valueMax];\n\n if (typeof radius === \"undefined\") {\n radius = Math.min(chartW, chartH) / 2;\n }\n\n if (typeof colorScale === \"undefined\") {\n colorScale = d3.scaleOrdinal().domain(rowKeys).range(colors);\n }\n\n xScale = d3.scaleBand().domain(columnKeys).range([startAngle, endAngle]);\n\n yScale = d3.scaleLinear().domain(valueExtent).range([0, radius]).nice();\n }\n\n /**\n * Constructor\n *\n * @constructor\n * @alias radarChart\n * @param {d3.selection} selection - The chart holder D3 selection.\n */\n function my(selection) {\n // Create SVG element (if it does not exist already)\n if (!svg) {\n svg = function (selection) {\n var el = selection._groups[0][0];\n if (!!el.ownerSVGElement || el.tagName === \"svg\") {\n return selection;\n } else {\n return selection.append(\"svg\");\n }\n }(selection);\n\n svg.classed(\"d3ez\", true).attr(\"width\", width).attr(\"height\", height);\n\n chart = svg.append(\"g\").classed(\"chart\", true);\n } else {\n chart = selection.select(\".chart\");\n }\n\n // Update the chart dimensions and add layer groups\n var layers = [\"circularAxis\", \"circularSectorLabels\", \"verticalAxis axis\", \"radarGroup\"];\n chart.classed(classed, true).attr(\"transform\", \"translate(\" + width / 2 + \",\" + height / 2 + \")\").attr(\"width\", chartW).attr(\"height\", chartH).selectAll(\"g\").data(layers).enter().append(\"g\").attr(\"class\", function (d) {\n return d;\n });\n\n selection.each(function (data) {\n // Initialise Data\n init(data);\n\n // Create Circular Axis\n var circularAxis = component.circularAxis().radialScale(xScale).ringScale(yScale).radius(radius);\n\n chart.select(\".circularAxis\").call(circularAxis);\n\n var radarArea = component.radarArea().radius(radius).colorScale(colorScale).yScale(yScale).xScale(xScale).dispatch(dispatch);\n\n // Create Radars\n var seriesGroup = chart.select(\".radarGroup\").selectAll(\".seriesGroup\").data(data);\n\n seriesGroup.enter().append(\"g\").classed(\"seriesGroup\", true).attr(\"fill\", function (d) {\n return colorScale(d.key);\n }).style(\"stroke\", function (d) {\n return colorScale(d.key);\n }).merge(seriesGroup).call(radarArea);\n\n // Creating vertical scale\n var axisScale = d3.scaleLinear().domain(yScale.domain()).range(yScale.range().reverse()).nice();\n\n // Render vertical scale on circle\n var verticalAxis = d3.axisLeft(axisScale);\n chart.select(\".verticalAxis\").attr(\"transform\", \"translate(0,\" + -radius + \")\").call(verticalAxis);\n\n // Adding Circular Labels on Page\n var circularSectorLabels = component.circularSectorLabels().radius(radius * 1.04).radialScale(xScale).textAnchor(\"start\");\n\n chart.select(\".circularSectorLabels\").call(circularSectorLabels);\n });\n }\n\n /**\n * Width Getter / Setter\n *\n * @param {number} _v - Width in px.\n * @returns {*}\n */\n my.width = function (_v) {\n if (!arguments.length) return width;\n width = _v;\n return this;\n };\n\n /**\n * Height Getter / Setter\n *\n * @param {number} _v - Height in px.\n * @returns {*}\n */\n my.height = function (_v) {\n if (!arguments.length) return height;\n height = _v;\n return this;\n };\n\n /**\n * Radius Getter / Setter\n *\n * @param {number} _v - Radius in px.\n * @returns {*}\n */\n my.radius = function (_v) {\n if (!arguments.length) return radius;\n radius = _v;\n return this;\n };\n\n /**\n * Colors Getter / Setter\n *\n * @param {Array} _v - Array of colours used by color scale.\n * @returns {*}\n */\n my.colors = function (_v) {\n if (!arguments.length) return colors;\n colors = _v;\n return this;\n };\n\n /**\n * Color Scale Getter / Setter\n *\n * @param {d3.scale} _v - D3 color scale.\n * @returns {*}\n */\n my.colorScale = function (_v) {\n if (!arguments.length) return colorScale;\n colorScale = _v;\n return this;\n };\n\n /**\n * Transition Getter / Setter\n *\n * @param {d3.transition} _v - D3 transition style.\n * @returns {*}\n */\n my.transition = function (_v) {\n if (!arguments.length) return transition;\n transition = _v;\n return this;\n };\n\n /**\n * Dispatch Getter / Setter\n *\n * @param {d3.dispatch} _v - Dispatch event handler.\n * @returns {*}\n */\n my.dispatch = function (_v) {\n if (!arguments.length) return dispatch();\n dispatch = _v;\n return this;\n };\n\n /**\n * Dispatch On Getter\n *\n * @returns {*}\n */\n my.on = function () {\n var value = dispatch.on.apply(dispatch, arguments);\n return value === dispatch ? my : value;\n };\n\n return my;\n }", "function plotRadar(chartCanvas,data) {\n //Get context with jQuery - using jQuery's .get() method.\n var ctx = chartCanvas.get(0).getContext(\"2d\");\n\n options = {\n\n //Boolean - If we show the scale above the chart data \n scaleOverlay : false,\n \n //Boolean - If we want to override with a hard coded scale\n scaleOverride : false,\n \n //** Required if scaleOverride is true **\n //Number - The number of steps in a hard coded scale\n scaleSteps : null,\n //Number - The value jump in the hard coded scale\n scaleStepWidth : null,\n //Number - The centre starting value\n scaleStartValue : null,\n \n //Boolean - Whether to show lines for each scale point\n scaleShowLine : true,\n\n //String - Colour of the scale line \n scaleLineColor : \"rgba(0,0,0,.1)\",\n \n //Number - Pixel width of the scale line \n scaleLineWidth : 1,\n\n //Boolean - Whether to show labels on the scale \n scaleShowLabels : false,\n \n //Interpolated JS string - can access value\n scaleLabel : \"<%=value%>\",\n \n //String - Scale label font declaration for the scale label\n scaleFontFamily : \"'Arial'\",\n \n //Number - Scale label font size in pixels \n scaleFontSize : 12,\n \n //String - Scale label font weight style \n scaleFontStyle : \"normal\",\n \n //String - Scale label font colour \n scaleFontColor : \"#ddd\",\n \n //Boolean - Show a backdrop to the scale label\n scaleShowLabelBackdrop : true,\n \n //String - The colour of the label backdrop \n scaleBackdropColor : \"rgba(255,255,255,0.75)\",\n \n //Number - The backdrop padding above & below the label in pixels\n scaleBackdropPaddingY : 2,\n \n //Number - The backdrop padding to the side of the label in pixels \n scaleBackdropPaddingX : 2,\n \n //Boolean - Whether we show the angle lines out of the radar\n angleShowLineOut : true,\n \n //String - Colour of the angle line\n angleLineColor : \"rgba(0,0,0,.1)\",\n \n //Number - Pixel width of the angle line\n angleLineWidth : 1, \n \n //String - Point label font declaration\n pointLabelFontFamily : \"'Arial'\",\n \n //String - Point label font weight\n pointLabelFontStyle : \"normal\",\n \n //Number - Point label font size in pixels \n pointLabelFontSize : 12,\n \n //String - Point label font colour \n pointLabelFontColor : \"#666\",\n \n //Boolean - Whether to show a dot for each point\n pointDot : true,\n \n //Number - Radius of each point dot in pixels\n pointDotRadius : 3,\n \n //Number - Pixel width of point dot stroke\n pointDotStrokeWidth : 1,\n \n //Boolean - Whether to show a stroke for datasets\n datasetStroke : true,\n \n //Number - Pixel width of dataset stroke\n datasetStrokeWidth : 2,\n \n //Boolean - Whether to fill the dataset with a colour\n datasetFill : true,\n \n //Boolean - Whether to animate the chart\n animation : true,\n\n //Number - Number of animation steps\n animationSteps : 60,\n \n //String - Animation easing effect\n animationEasing : \"easeOutQuart\",\n\n //Function - Fires when the animation is complete\n onAnimationComplete : null\n \n }\n\n //This will get the first returned node in the jQuery collection.\n var myNewChart = new Chart(ctx).Radar(data,options);\n\n}", "function radarChart() {\n\tvar radarClass = 'radar-data',\n\t\taxisClass = 'radar-axis',\n\t\ttickCount = 3,\n\t\ttickSize = 2,\n\t\tradius = 200,\n click = null,\n\t\tmaxValue = 3;\n\n\tfunction chart(selector) {\n\n\t\tselector.each(function (d, i) {\n\t\t var globalG = selector.append('g').attr('class', 'radar-container'),\n axisG = globalG.append('g').attr('class', axisClass),\n\t\t\t\tradarG = globalG.append('g').attr('class', radarClass),\n\t\t\t\tscale = d3.scale.linear().domain([0, maxValue]).range([0, radius]),\n\t\t\t\taxisTicks = scale.ticks(tickCount),\n\t\t\t\tradarPoints = [],\n\t\t\t\taxisPoints = new Array(maxValue);\n\n\t\t\td.forEach(function (serie, index) {\n\t\t\t\tvar angle = Math.PI * 2 * index / d.length;\n\t\t\t\t\txRatio = Math.cos(angle),\n\t\t\t\t\tyRatio = Math.sin(angle),\n\t\t\t\t\tx = xRatio * radius,\n\t\t\t\t\ty = yRatio * radius,\n\t\t\t\t\tlabelX = xRatio * (radius + 20),\n\t\t\t\t\tlabelY = yRatio * (radius + 20),\n\t\t\t\t\tlabelRotation = index / d.length * 360;\n\n\t\t\t\taxisG.append('line')\n\t\t\t\t\t.attr('x1', 0)\n\t\t\t\t\t.attr('y1', 0)\n\t\t\t\t\t.attr('x2', x)\n\t\t\t\t\t.attr('y2', y);\n\n\t\t\t\taxisTicks.forEach(function (t) {\n\t\t\t\t\tvar tRadius = scale(t), x = tRadius * xRatio, y = tRadius * yRatio;\n\n\t\t\t\t\taxisG.append('circle')\n\t\t\t\t\t\t.attr('cx', x)\n\t\t\t\t\t\t.attr('cy', y)\n\t\t\t\t\t\t.attr('r', tickSize);\n\n\t\t\t\t\tif (typeof axisPoints[t] === 'undefined') axisPoints[t] = [];\n\n\t\t\t\t\taxisPoints[t].push( x + ',' + y);\n\t\t\t\t});\n\n\t\t\t\t// serieName\n\t\t\t\tradarG.append('text')\n\t\t\t\t\t.text(serie.serieName)\n\t\t\t\t\t.attr('x', labelX)\n\t\t\t\t\t.attr('y', labelY)\n\t\t\t\t\t.attr('text-anchor', 'end')\n\t\t\t\t\t//.attr('baseline-shift', '30%')\n\t\t\t\t\t.attr('transform', 'rotate(' + labelRotation + ' ' + labelX + ' ' + labelY + ')')\n .attr('data-rotate', labelRotation)\n .on('click', function (d) {\n var that = d3.select(this),\n r = that.attr('data-rotate');\n\n globalG.transition().duration(1000)\n .attr('transform', 'rotate(' + (360 - r) + ')');\n\n if (typeof click === 'function') {\n click(d.filter(function (e) {\n return e.serieName === that.text();\n })[0]);\n }\n });\n\t\t\t\t\n\t\t\t\tradarPoints.push(scale(serie.value) * xRatio + ',' + scale(serie.value) * yRatio);\n\t\t\t});\n\n\t\t\taxisPoints.forEach(function (p) {\n\t\t\t\taxisG.append('polygon')\n\t\t\t\t\t.attr('points', p.join(' '));\n\t\t\t});\n\n\t\t radarG.append('polygon')\n .attr('style', 'pointer-events: none;')\n .attr('points', radarPoints.map(function () { return '0,0'; }).join(' '))\n .transition().duration(1000).attr('points', radarPoints.join(' '));\n\n\t\t if (typeof click === 'function') {\n\t\t click(d[0]);\n\t\t }\n\t\t});\n\t}\n\n\tchart.radarClass = function (c) {\n\t\tif (arguments.length === 0) {\n\t\t\treturn radarClass;\n\t\t} else {\n\t\t\tradarClass = c;\n\t\t\treturn chart;\n\t\t}\n\t};\n\n\tchart.axisClass = function (c) {\n\t\tif (arguments.lngth === 0) {\n\t\t\treturn axisClass;\n\t\t} else {\n\t\t\taxisClass = c;\n\t\t\treturn chart;\n\t\t}\n\t}\n\n\tchart.radius = function (r) {\n\t\tif (arguments.length === 0) {\n\t\t\treturn radius;\n\t\t} else {\n\t\t\tradius = r;\n\t\t\treturn chart;\n\t\t}\n\t};\n\n\tchart.click = function (c) {\n\t if (arguments.length === 0) {\n\t return click;\n\t } else {\n\t click = c;\n\t return chart;\n\t }\n\t};\n\n\treturn chart;\n}", "function componentRadarArea () {\n\n /* Default Properties */\n var width = 300;\n var height = 300;\n var colors = palette.categorical(3);\n var dispatch = d3.dispatch(\"customValueMouseOver\", \"customValueMouseOut\", \"customValueClick\", \"customSeriesMouseOver\", \"customSeriesMouseOut\", \"customSeriesClick\");\n var xScale = void 0;\n var yScale = void 0;\n var colorScale = void 0;\n var radius = 150;\n var angleSlice = void 0;\n var classed = \"radarArea\";\n\n /**\n * Initialise Data and Scales\n *\n * @private\n * @param {Array} data - Chart data.\n */\n function init(data) {\n var _dataTransform$summar = dataTransform(data).summary(),\n columnKeys = _dataTransform$summar.columnKeys,\n valueMax = _dataTransform$summar.valueMax;\n\n var valueExtent = [0, valueMax];\n\n // Slice calculation on circle\n angleSlice = Math.PI * 2 / columnKeys.length;\n\n if (typeof radius === \"undefined\") {\n radius = Math.min(width, height) / 2;\n }\n\n if (typeof colorScale === \"undefined\") {\n colorScale = d3.scaleOrdinal().domain(columnKeys).range(colors);\n }\n\n if (typeof xScale === \"undefined\") {\n xScale = d3.scaleBand().domain(columnKeys).range([0, 360]);\n }\n\n if (typeof yScale === \"undefined\") {\n yScale = d3.scaleLinear().domain(valueExtent).range([0, radius]).nice();\n }\n }\n\n /**\n * Constructor\n *\n * @constructor\n * @alias radarArea\n * @param {d3.selection} selection - The chart holder D3 selection.\n */\n function my(selection) {\n init(selection.data());\n selection.each(function () {\n\n // Function to generate radar line points\n var radarLine = d3.radialLine().radius(function (d) {\n return yScale(d.value);\n }).angle(function (d, i) {\n return i * angleSlice;\n }).curve(d3.curveBasis).curve(d3.curveCardinalClosed);\n\n // Update series group\n var seriesGroup = d3.select(this);\n seriesGroup.append(\"path\").classed(classed, true).attr(\"d\", function (d) {\n return radarLine(d.values);\n }).style(\"fill-opacity\", 0.2).on('mouseover', function () {\n d3.select(this).transition().duration(200).style(\"fill-opacity\", 0.7);\n }).on('mouseout', function () {\n d3.select(this).transition().duration(200).style(\"fill-opacity\", 0.2);\n });\n\n // Creating lines/path on circle\n seriesGroup.append(\"path\").attr(\"class\", \"radarStroke\").attr(\"d\", function (d) {\n return radarLine(d.values);\n }).style(\"stroke-width\", 3 + \"px\").style(\"fill\", \"none\");\n\n // Create Radar Circle points on line\n seriesGroup.selectAll(\".radarCircle\").data(function (d) {\n return d.values;\n }).enter().append(\"circle\").attr(\"class\", \"radarCircle\").attr(\"r\", 4).attr(\"cx\", function (d, i) {\n return yScale(d.value) * Math.cos(angleSlice * i - Math.PI / 2);\n }).attr(\"cy\", function (d, i) {\n return yScale(d.value) * Math.sin(angleSlice * i - Math.PI / 2);\n }).style(\"fill-opacity\", 0.8);\n });\n }\n\n /**\n * Width Getter / Setter\n *\n * @param {number} _v - Width in px.\n * @returns {*}\n */\n my.width = function (_v) {\n if (!arguments.length) return width;\n width = _v;\n return this;\n };\n\n /**\n * Height Getter / Setter\n *\n * @param {number} _v - Height in px.\n * @returns {*}\n */\n my.height = function (_v) {\n if (!arguments.length) return height;\n height = _v;\n return this;\n };\n\n /**\n * Radius Getter / Setter\n *\n * @param {number} _v - Radius in px.\n * @returns {*}\n */\n my.radius = function (_v) {\n if (!arguments.length) return radius;\n radius = _v;\n return this;\n };\n\n /**\n * Color Scale Getter / Setter\n *\n * @param {d3.scale} _v - D3 color scale.\n * @returns {*}\n */\n my.colorScale = function (_v) {\n if (!arguments.length) return colorScale;\n colorScale = _v;\n return my;\n };\n\n /**\n * Colors Getter / Setter\n *\n * @param {Array} _v - Array of colours used by color scale.\n * @returns {*}\n */\n my.colors = function (_v) {\n if (!arguments.length) return colors;\n colors = _v;\n return my;\n };\n\n /**\n * X Scale Getter / Setter\n *\n * @param {d3.scale} _v - D3 scale.\n * @returns {*}\n */\n my.xScale = function (_v) {\n if (!arguments.length) return xScale;\n xScale = _v;\n return my;\n };\n\n /**\n * Y Scale Getter / Setter\n *\n * @param {d3.scale} _v - D3 scale.\n * @returns {*}\n */\n my.yScale = function (_v) {\n if (!arguments.length) return yScale;\n yScale = _v;\n return my;\n };\n\n /**\n * Dispatch Getter / Setter\n *\n * @param {d3.dispatch} _v - Dispatch event handler.\n * @returns {*}\n */\n my.dispatch = function (_v) {\n if (!arguments.length) return dispatch();\n dispatch = _v;\n return this;\n };\n\n /**\n * Dispatch On Getter\n *\n * @returns {*}\n */\n my.on = function () {\n var value = dispatch.on.apply(dispatch, arguments);\n return value === dispatch ? my : value;\n };\n\n return my;\n }", "function RadarChart(id, data, options) { // 3\n\tvar cfg = { // 4\n\t\tw: 600, // 5\n\t\t//Width of the circle // 5\n\t\th: 600, // 6\n\t\t//Height of the circle // 6\n\t\tmargin: { // 7\n\t\t\ttop: 20, // 7\n\t\t\tright: 20, // 7\n\t\t\tbottom: 20, // 7\n\t\t\tleft: 20 // 7\n\t\t}, // 7\n\t\t//The margins of the SVG // 7\n\t\tlevels: 3, // 8\n\t\t//How many levels or inner circles should there be drawn // 8\n\t\tmaxValue: 0, // 9\n\t\t//What is the value that the biggest circle will represent // 9\n\t\tlabelFactor: 1.25, // 10\n\t\t//How much farther than the radius of the outer circle should the labels be placed // 10\n\t\twrapWidth: 60, // 11\n\t\t//The number of pixels after which a label needs to be given a new line // 11\n\t\topacityArea: 0.35, // 12\n\t\t//The opacity of the area of the blob // 12\n\t\tdotRadius: 4, // 13\n\t\t//The size of the colored circles of each blog // 13\n\t\topacityCircles: 0.1, // 14\n\t\t//The opacity of the circles of each blob // 14\n\t\tstrokeWidth: 2, // 15\n\t\t//The width of the stroke around each blob // 15\n\t\troundStrokes: false, // 16\n\t\t//If true the area and stroke will follow a round path (cardinal-closed) // 16\n\t\tcolor: d3.scaleOrdinal(d3.schemeCategory10) // 17\n\t}; //Put all of the options into a variable called cfg // 4\n //\n\tif ('undefined' !== typeof options) { // 21\n\t\tfor (var i in meteorBabelHelpers.sanitizeForInObject(options)) { // 22\n\t\t\tif ('undefined' !== typeof options[i]) { // 23\n\t\t\t\tcfg[i] = options[i]; // 23\n\t\t\t} // 23\n\t\t} //for i // 24\n //\n\t} //if // 25\n\t//If the supplied maxValue is smaller than the actual one, replace by the max in the data // 27\n //\n //\n\tvar maxValue = Math.max(cfg.maxValue, d3.max(data, function (i) { // 28\n\t\treturn d3.max(i.map(function (o) { // 28\n\t\t\treturn o.value; // 28\n\t\t})); // 28\n\t})); // 28\n\tvar allAxis = data[0].map(function (i, j) { // 30\n\t\treturn i.axis; // 30\n\t}), // 30\n\t //Names of each axis // 30\n\ttotal = allAxis.length, // 31\n\t //The number of different axes // 30\n\tradius = Math.min(cfg.w / 2, cfg.h / 2), // 32\n\t //Radius of the outermost circle // 30\n\tFormat = d3.format('%'), // 33\n\t //Percentage formatting // 30\n\tangleSlice = Math.PI * 2 / total; //The width in radians of each \"slice\" // 34\n\t//Scale for the radius // 36\n //\n\tvar rScale = d3.scaleLinear().range([0, radius]).domain([0, maxValue]); /////////////////////////////////////////////////////////\n\t//////////// Create the container SVG and g ///////////// // 42\n\t///////////////////////////////////////////////////////// // 43\n\t//Remove whatever chart with the same id/class was present before // 45\n //\n\td3.select(id).select(\"svg\").remove(); //Initiate the radar chart SVG // 46\n //\n\tvar svg = d3.select(id).append(\"svg\").attr(\"width\", cfg.w + cfg.margin.left + cfg.margin.right).attr(\"height\", cfg.h + cfg.margin.top + cfg.margin.bottom).attr(\"class\", \"radar\" + id); //Append a g element\n //\n\tvar g = svg.append(\"g\").attr(\"transform\", \"translate(\" + (cfg.w / 2 + cfg.margin.left) + \",\" + (cfg.h / 2 + cfg.margin.top) + \")\"); /////////////////////////////////////////////////////////\n\t////////// Glow filter for some extra pizzazz /////////// // 58\n\t///////////////////////////////////////////////////////// // 59\n\t//Filter for the outside glow // 61\n //\n\tvar filter = g.append('defs').append('filter').attr('id', 'glow'), // 62\n\t feGaussianBlur = filter.append('feGaussianBlur').attr('stdDeviation', '2.5').attr('result', 'coloredBlur'), // 62\n\t feMerge = filter.append('feMerge'), // 62\n\t feMergeNode_1 = feMerge.append('feMergeNode').attr('in', 'coloredBlur'), // 62\n\t feMergeNode_2 = feMerge.append('feMergeNode').attr('in', 'SourceGraphic'); /////////////////////////////////////////////////////////\n\t/////////////// Draw the Circular grid ////////////////// // 69\n\t///////////////////////////////////////////////////////// // 70\n\t//Wrapper for the grid & axes // 72\n //\n\tvar axisGrid = g.append(\"g\").attr(\"class\", \"axisWrapper\"); //Draw the background circles // 73\n //\n\taxisGrid.selectAll(\".levels\").data(d3.range(1, cfg.levels + 1).reverse()).enter().append(\"circle\").attr(\"class\", \"gridCircle\").attr(\"r\", function (d, i) {\n\t\treturn radius / cfg.levels * d; // 81\n\t}).style(\"fill\", \"#CDCDCD\").style(\"stroke\", \"#CDCDCD\").style(\"fill-opacity\", cfg.opacityCircles).style(\"filter\", \"url(#glow)\"); //Text indicating at what % each level is\n //\n\taxisGrid.selectAll(\".axisLabel\").data(d3.range(1, cfg.levels + 1).reverse()).enter().append(\"text\").attr(\"class\", \"axisLabel\").attr(\"x\", 4).attr(\"y\", function (d) {\n\t\treturn -d * radius / cfg.levels; // 93\n\t}).attr(\"dy\", \"0.4em\").style(\"font-size\", \"10px\").attr(\"fill\", \"#737373\").text(function (d, i) { // 93\n\t\treturn Format(maxValue * d / cfg.levels); // 97\n\t}); ///////////////////////////////////////////////////////// // 97\n\t//////////////////// Draw the axes ////////////////////// // 100\n\t///////////////////////////////////////////////////////// // 101\n\t//Create the straight lines radiating outward from the center // 103\n //\n\tvar axis = axisGrid.selectAll(\".axis\").data(allAxis).enter().append(\"g\").attr(\"class\", \"axis\"); //Append the lines // 104\n //\n\taxis.append(\"line\").attr(\"x1\", 0).attr(\"y1\", 0).attr(\"x2\", function (d, i) { // 110\n\t\treturn rScale(maxValue * 1.1) * Math.cos(angleSlice * i - Math.PI / 2); // 113\n\t}).attr(\"y2\", function (d, i) { // 113\n\t\treturn rScale(maxValue * 1.1) * Math.sin(angleSlice * i - Math.PI / 2); // 114\n\t}).attr(\"class\", \"line\").style(\"stroke\", \"white\").style(\"stroke-width\", \"2px\"); //Append the labels at each axis // 114\n //\n\taxis.append(\"text\").attr(\"class\", \"legend\").style(\"font-size\", \"11px\").attr(\"text-anchor\", \"middle\").attr(\"dy\", \"0.35em\").attr(\"x\", function (d, i) {\n\t\treturn rScale(maxValue * cfg.labelFactor) * Math.cos(angleSlice * i - Math.PI / 2); // 125\n\t}).attr(\"y\", function (d, i) { // 125\n\t\treturn rScale(maxValue * cfg.labelFactor) * Math.sin(angleSlice * i - Math.PI / 2); // 126\n\t}).text(function (d) { // 126\n\t\treturn d; // 127\n\t}).call(wrap, cfg.wrapWidth); ///////////////////////////////////////////////////////// // 127\n\t///////////// Draw the radar chart blobs //////////////// // 131\n\t///////////////////////////////////////////////////////// // 132\n\t//The radial line function // 134\n //\n\tvar radarLine = d3.lineRadial().curve(d3.curveBasisClosed).radius(function (d) { // 135\n\t\treturn rScale(d.value); // 136\n\t}).angle(function (d, i) { // 136\n\t\treturn i * angleSlice; // 137\n\t}); // 137\n //\n\tif (cfg.roundStrokes) { // 139\n\t\tradarLine.curve(d3.curveCardinalClosed); // 140\n\t} //Create a wrapper for the blobs // 141\n //\n //\n\tvar blobWrapper = g.selectAll(\".radarWrapper\").data(data).enter().append(\"g\").attr(\"class\", \"radarWrapper\"); //Append the backgrounds\n //\n\tblobWrapper.append(\"path\").attr(\"class\", \"radarArea\").attr(\"d\", function (d, i) { // 150\n\t\treturn radarLine(d); // 153\n\t}).style(\"fill\", function (d, i) { // 153\n\t\treturn cfg.color(i); // 154\n\t}).style(\"fill-opacity\", cfg.opacityArea).on('mouseover', function (d, i) { // 154\n\t\t//Dim all blobs // 157\n\t\td3.selectAll(\".radarArea\").transition().duration(200).style(\"fill-opacity\", 0.1); //Bring back the hovered over blob\n //\n\t\td3.select(this).transition().duration(200).style(\"fill-opacity\", 0.7); // 162\n\t}).on('mouseout', function () { // 165\n\t\t//Bring back all blobs // 167\n\t\td3.selectAll(\".radarArea\").transition().duration(200).style(\"fill-opacity\", cfg.opacityArea); // 168\n\t}); //Create the outlines // 171\n //\n\tblobWrapper.append(\"path\").attr(\"class\", \"radarStroke\").attr(\"d\", function (d, i) { // 174\n\t\treturn radarLine(d); // 176\n\t}).style(\"stroke-width\", cfg.strokeWidth + \"px\").style(\"stroke\", function (d, i) { // 176\n\t\treturn cfg.color(i); // 178\n\t}).style(\"fill\", \"none\").style(\"filter\", \"url(#glow)\"); //Append the circles // 178\n //\n\tblobWrapper.selectAll(\".radarCircle\").data(function (d, i) { // 183\n\t\treturn d; // 184\n\t}).enter().append(\"circle\").attr(\"class\", \"radarCircle\").attr(\"r\", cfg.dotRadius).attr(\"cx\", function (d, i) { // 184\n\t\treturn rScale(d.value) * Math.cos(angleSlice * i - Math.PI / 2); // 188\n\t}).attr(\"cy\", function (d, i) { // 188\n\t\treturn rScale(d.value) * Math.sin(angleSlice * i - Math.PI / 2); // 189\n\t}).style(\"fill\", function (d, i, j) { // 189\n\t\treturn cfg.color(j); // 190\n\t}).style(\"fill-opacity\", 0.8); ///////////////////////////////////////////////////////// // 190\n\t//////// Append invisible circles for tooltip /////////// // 194\n\t///////////////////////////////////////////////////////// // 195\n\t//Wrapper for the invisible circles on top // 197\n //\n\tvar blobCircleWrapper = g.selectAll(\".radarCircleWrapper\").data(data).enter().append(\"g\").attr(\"class\", \"radarCircleWrapper\"); //Append a set of invisible circles on top for the mouseover pop-up\n //\n\tblobCircleWrapper.selectAll(\".radarInvisibleCircle\").data(function (d, i) { // 204\n\t\treturn d; // 205\n\t}).enter().append(\"circle\").attr(\"class\", \"radarInvisibleCircle\").attr(\"r\", cfg.dotRadius * 1.5).attr(\"cx\", function (d, i) {\n\t\treturn rScale(d.value) * Math.cos(angleSlice * i - Math.PI / 2); // 209\n\t}).attr(\"cy\", function (d, i) { // 209\n\t\treturn rScale(d.value) * Math.sin(angleSlice * i - Math.PI / 2); // 210\n\t}).style(\"fill\", \"none\").style(\"pointer-events\", \"all\").on(\"mouseover\", function (d, i) { // 210\n\t\tnewX = parseFloat(d3.select(this).attr('cx')) - 10; // 214\n\t\tnewY = parseFloat(d3.select(this).attr('cy')) - 10; // 215\n\t\ttooltip.attr('x', newX).attr('y', newY).text(Format(d.value)).transition().duration(200).style('opacity', 1); // 217\n\t}).on(\"mouseout\", function () { // 223\n\t\ttooltip.transition().duration(200).style(\"opacity\", 0); // 225\n\t}); //Set up the small tooltip for when you hover over a circle // 227\n //\n\tvar tooltip = g.append(\"text\").attr(\"class\", \"tooltip\").style(\"opacity\", 0); /////////////////////////////////////////////////////////\n\t/////////////////// Helper Function ///////////////////// // 235\n\t///////////////////////////////////////////////////////// // 236\n\t//Taken from http://bl.ocks.org/mbostock/7555321 // 238\n\t//Wraps SVG text // 239\n //\n\tfunction wrap(text, width) { // 240\n\t\ttext.each(function () { // 241\n\t\t\tvar text = d3.select(this), // 242\n\t\t\t words = text.text().split(/\\s+/).reverse(), // 242\n\t\t\t word, // 242\n\t\t\t line = [], // 242\n\t\t\t lineNumber = 0, // 242\n\t\t\t lineHeight = 1.4, // 242\n\t\t\t // ems // 242\n\t\t\ty = text.attr(\"y\"), // 248\n\t\t\t x = text.attr(\"x\"), // 242\n\t\t\t dy = parseFloat(text.attr(\"dy\")), // 242\n\t\t\t tspan = text.text(null).append(\"tspan\").attr(\"x\", x).attr(\"y\", y).attr(\"dy\", dy + \"em\"); // 242\n //\n\t\t\twhile (word = words.pop()) { // 253\n\t\t\t\tline.push(word); // 254\n\t\t\t\ttspan.text(line.join(\" \")); // 255\n //\n\t\t\t\tif (tspan.node().getComputedTextLength() > width) { // 256\n\t\t\t\t\tline.pop(); // 257\n\t\t\t\t\ttspan.text(line.join(\" \")); // 258\n\t\t\t\t\tline = [word]; // 259\n\t\t\t\t\ttspan = text.append(\"tspan\").attr(\"x\", x).attr(\"y\", y).attr(\"dy\", ++lineNumber * lineHeight + dy + \"em\").text(word);\n\t\t\t\t} // 261\n\t\t\t} // 262\n\t\t}); // 263\n\t} //wrap // 264\n //\n}", "function bangleChart(){\n var radarIv;\n function init(){\n require(\"Font8x12\").add(Graphics);\n g.setFont8x12();\n }\n function getArcXY(centerX,centerY,radius,angle){\n var s,r = [];\n s = 2 * Math.PI * angle / 360;\n r.push(centerX + Math.round(Math.cos(s) * radius));\n r.push(centerY + Math.round(Math.sin(s) * radius));\n return r;\n }\n function getArc(centerX,centerY,radius,startAngle,endAngle){\n var xy,r = [], actAngle = startAngle;\n var stepAngle = (radius + radius) * Math.PI / 60;\n stepAngle = 6;\n while(actAngle < endAngle){\n r = r.concat(getArcXY(centerX,centerY,radius,actAngle));\n actAngle += stepAngle;\n actAngle = Math.min(actAngle,endAngle);\n }\n return r.concat(getArcXY(centerX,centerY,radius,endAngle));\n }\n function drawPiece(centerX,centerY,radius,startAngle,endAngle){\n var polyData = [centerX,centerY];\n polyData = polyData.concat(getArc(centerX,centerY,radius,startAngle,endAngle));\n g.fillPoly(polyData,true);\n }\n function dataToRange(data,range){\n var sum = 0;\n data.map(function(num){return sum += num;});\n return data.map(function(num){return num * range / sum;});\n }\n this.cols = [2016,63489,65504,31];\n this.Slices = function(drawCircle, bgcolor, centerX,centerY,radius,data){\n var rad = radius;\n g.setColor(bgcolor);\n g.fillCircle(centerX,centerY,radius);\n var sliceSize = parseInt(radius / data.length) * 0.8;\n for(var i = 0; i < data.length;i++){\n g.setColor(this.cols[i]);\n drawPiece(centerX,centerY,rad,0,data[i] * 3.6);\n g.setColor(bgcolor);\n rad -= sliceSize;\n g.fillCircle(centerX,centerY,rad);\n }\n if (drawCircle){\n g.setColor(65535);\n g.drawCircle(centerX,centerY,radius);\n }\n };\n init();\n }", "_setChartOptions() {\n /**\n * the animated loader\n */\n const _loader = this.loader\n /**\n * chart default options\n */\n let _options = {\n hoverOffset: 8,\n layout: {},\n chartArea: {\n backgroundColor: \"transparent\"\n },\n elements: {},\n spanGaps: true,\n plugins: {\n title: {},\n tooltip: {},\n legend: {\n display: CT_SHOWLEGEND.includes(this.chart_type) || false\n }\n },\n animation: {\n onComplete: function () {\n if (_loader) _loader.style.display = \"none\"\n }\n }\n }\n /**\n * check enable gradient colors for state charts or\n */\n if (this.graphData.config.gradient === true && this.graphData.config.mode === \"simple\") {\n _options.gradientcolor = {\n color: true,\n type: this.chart_type\n }\n }\n /**\n * check enable gradient colors for data series chart\n */\n if (plugin_gradient && this.graphData.config.gradient) {\n _options.plugins = {\n plugin_gradient\n }\n }\n /**\n * check secondary axis\n * this.graphData.config holds the configruation data\n * this.graphData.data.datasets data per series\n */\n if (this.graphData.config.secondaryAxis && this.graphData && this.graphData.data && this.graphData.data.datasets) {\n let _scaleOptions = {}\n this.graphData.data.datasets.forEach((dataset) => {\n if (dataset.yAxisID) {\n _scaleOptions[dataset.yAxisID] = {}\n _scaleOptions[dataset.yAxisID].id = dataset.yAxisID\n _scaleOptions[dataset.yAxisID].type = \"linear\"\n _scaleOptions[dataset.yAxisID].position = dataset.yAxisID\n _scaleOptions[dataset.yAxisID].display = true\n if (dataset.yAxisID.toLowerCase() == \"right\") {\n _scaleOptions[dataset.yAxisID].grid = {\n drawOnChartArea: false\n }\n }\n }\n if (dataset.xAxisID) {\n _scaleOptions[dataset.xAxisID] = {}\n _scaleOptions[dataset.xAxisID].id = dataset.xAxisID\n _scaleOptions[dataset.xAxisID].type = \"linear\"\n _scaleOptions[dataset.xAxisID].position = dataset.xAxisID\n _scaleOptions[dataset.xAxisID].display = true\n if (dataset.xAxisID.toLowerCase() == \"top\") {\n _scaleOptions[dataset.xAxisID].grid = {\n drawOnChartArea: false\n }\n }\n }\n })\n if (_scaleOptions) {\n _options.scales = _scaleOptions\n }\n }\n /**\n * bubble axis label based on the data settings\n *\n */\n if (this.chart_type.isChartType(\"bubble\")) {\n const _itemlist = this.entity_items.getEntitieslist()\n let labelX = _itemlist[0].name\n labelX += _itemlist[0].unit ? \" (\" + _itemlist[0].unit + \")\" : \"\"\n let labelY = _itemlist[1].name\n labelY += _itemlist[1].unit ? \" (\" + _itemlist[1].unit + \")\" : \"\"\n _options.scales = {\n x: {\n id: \"x\",\n title: {\n display: true,\n text: labelX\n }\n },\n y: {\n id: \"y\",\n title: {\n display: true,\n text: labelY\n }\n }\n }\n /**\n * scale bubble (optional)\n */\n if (this.graphData.config.bubbleScale) {\n _options.elements = {\n point: {\n radius: (context) => {\n const value = context.dataset.data[context.dataIndex]\n return value._r * this.graphData.config.bubbleScale\n }\n }\n }\n }\n }\n /**\n * special case for timescales to translate the date format\n */\n if (this.graphData.config.timescale && this.graphData.config.datascales) {\n _options.scales = _options.scales || {}\n _options.scales.x = _options.scales.x || {}\n _options.scales.x.maxRotation = 0\n _options.scales.x.autoSkip = true\n _options.scales.x.major = true\n _options.scales.x.type = \"time\"\n _options.scales.x.time = {\n unit: this.graphData.config.datascales.unit,\n format: this.graphData.config.datascales.format,\n isoWeekday: this.graphData.config.datascales.isoWeekday\n }\n _options.scales.x.ticks = {\n callback: xAxisFormat\n }\n }\n /**\n * case barchart segment\n * TODO: better use a plugin for this feature.\n * set bar as stacked, hide the legend for the segmentbar,\n * hide the tooltip item for the segmentbar.\n */\n if (this.graphData.config.segmentbar === true) {\n _options.scales = {\n x: {\n id: \"x\",\n stacked: true\n },\n y: {\n id: \"y\",\n stacked: true\n }\n }\n _options.plugins.legend = {\n labels: {\n filter: (legendItem, data) => {\n return data.datasets[legendItem.datasetIndex].tooltip !== false\n }\n },\n display: false\n }\n _options.plugins.tooltip.callbacks = {\n label: (chart) => {\n if (chart.dataset.tooltip === false || !chart.dataset.label) {\n return null\n }\n return `${chart.formattedValue} ${chart.dataset.unit || \"\"}`\n }\n }\n _options.interaction = {\n intersect: false,\n mode: \"index\"\n }\n } else {\n /**\n * callbacks for tooltip\n */\n _options.plugins.tooltip = {\n callbacks: {\n label: formatToolTipLabel,\n title: formatToolTipTitle\n }\n }\n _options.interaction = {\n intersect: true,\n mode: \"point\"\n }\n }\n /**\n * disable bubble legend\n */\n if (this.chart_type.isChartType(\"bubble\")) {\n _options.plugins.legend = {\n display: false\n }\n }\n /**\n * multiseries for pie and doughnut charts\n */\n if (this.graphData.config.multiseries === true) {\n _options.plugins.legend = {\n labels: {\n generateLabels: function (chart) {\n const original = Chart.overrides.pie.plugins.legend.labels.generateLabels,\n labelsOriginal = original.call(this, chart)\n let datasetColors = chart.data.datasets.map(function (e) {\n return e.backgroundColor\n })\n datasetColors = datasetColors.flat()\n labelsOriginal.forEach((label) => {\n label.datasetIndex = label.index\n label.hidden = !chart.isDatasetVisible(label.datasetIndex)\n label.fillStyle = datasetColors[label.index]\n })\n return labelsOriginal\n }\n },\n onClick: function (mouseEvent, legendItem, legend) {\n legend.chart.getDatasetMeta(legendItem.datasetIndex).hidden = legend.chart.isDatasetVisible(\n legendItem.datasetIndex\n )\n legend.chart.update()\n }\n }\n _options.plugins.tooltip = {\n callbacks: {\n label: function (context) {\n const labelIndex = context.datasetIndex\n return `${context.chart.data.labels[labelIndex]}: ${context.formattedValue} ${context.dataset.unit || \"\"}`\n }\n }\n }\n }\n /**\n * preset cart current config\n */\n let chartCurrentConfig = {\n type: this.chart_type,\n data: {\n datasets: []\n },\n options: _options\n }\n /**\n * merge default with chart config options\n * this.chartconfig.options see yaml config\n * - chart\n * - options:\n */\n if (this.chartconfig.options) {\n chartCurrentConfig.options = deepMerge(_options, this.chartconfig.options)\n } else {\n chartCurrentConfig.options = _options\n }\n return chartCurrentConfig\n }", "function chartPolarAreaChart () {\n\n /* Default Properties */\n var svg = void 0;\n var chart = void 0;\n var classed = \"polarAreaChart\";\n var width = 400;\n var height = 300;\n var margin = { top: 20, right: 20, bottom: 20, left: 20 };\n var transition = { ease: d3.easeBounce, duration: 500 };\n var colors = palette.categorical(3);\n var dispatch = d3.dispatch(\"customValueMouseOver\", \"customValueMouseOut\", \"customValueClick\", \"customSeriesMouseOver\", \"customSeriesMouseOut\", \"customSeriesClick\");\n\n /* Chart Dimensions */\n var chartW = void 0;\n var chartH = void 0;\n var radius = void 0;\n\n /* Scales */\n var xScale = void 0;\n var yScale = void 0;\n var colorScale = void 0;\n\n /* Other Customisation Options */\n var startAngle = 0;\n var endAngle = 360;\n var capitalizeLabels = false;\n var colorLabels = false;\n\n /**\n * Initialise Data and Scales\n *\n * @private\n * @param {Array} data - Chart data.\n */\n function init(data) {\n chartW = width - (margin.left + margin.right);\n chartH = height - (margin.top + margin.bottom);\n\n var _dataTransform$summar = dataTransform(data).summary(),\n columnKeys = _dataTransform$summar.columnKeys,\n valueMax = _dataTransform$summar.valueMax;\n\n var valueExtent = [0, valueMax];\n\n if (typeof radius === \"undefined\") {\n radius = Math.min(chartW, chartH) / 2;\n }\n\n if (typeof colorScale === \"undefined\") {\n colorScale = d3.scaleOrdinal().domain(columnKeys).range(colors);\n }\n\n xScale = d3.scaleBand().domain(columnKeys).rangeRound([startAngle, endAngle]).padding(0.15);\n\n yScale = d3.scaleLinear().domain(valueExtent).range([0, radius]).nice();\n }\n\n /**\n * Constructor\n *\n * @constructor\n * @alias polarAreaChart\n * @param {d3.selection} selection - The chart holder D3 selection.\n */\n function my(selection) {\n // Create SVG element (if it does not exist already)\n if (!svg) {\n svg = function (selection) {\n var el = selection._groups[0][0];\n if (!!el.ownerSVGElement || el.tagName === \"svg\") {\n return selection;\n } else {\n return selection.append(\"svg\");\n }\n }(selection);\n\n svg.classed(\"d3ez\", true).attr(\"width\", width).attr(\"height\", height);\n\n chart = svg.append(\"g\").classed(\"chart\", true);\n } else {\n chart = selection.select(\".chart\");\n }\n\n // Update the chart dimensions and add layer groups\n var layers = [\"circularAxis\", \"polarArea\", \"circularSectorLabels\", \"verticalAxis axis\"];\n chart.classed(classed, true).attr(\"transform\", \"translate(\" + width / 2 + \",\" + height / 2 + \")\").attr(\"width\", chartW).attr(\"height\", chartH).selectAll(\"g\").data(layers).enter().append(\"g\").attr(\"class\", function (d) {\n return d;\n });\n\n selection.each(function (data) {\n // Initialise Data\n init(data);\n\n // Circular Axis\n var circularAxis = component.circularAxis().radialScale(xScale).ringScale(yScale).radius(radius);\n\n chart.select(\".circularAxis\").call(circularAxis);\n\n // Radial Bar Chart\n var polarArea = component.polarArea().radius(radius).colorScale(colorScale).xScale(xScale).yScale(yScale).dispatch(dispatch);\n\n chart.select(\".polarArea\").datum(data).call(polarArea);\n\n // Vertical Axis\n // We reverse the yScale\n var axisScale = d3.scaleLinear().domain(yScale.domain()).range(yScale.range().reverse()).nice();\n\n var verticalAxis = d3.axisLeft(axisScale);\n\n chart.select(\".verticalAxis\").attr(\"transform\", \"translate(0,\" + -radius + \")\").call(verticalAxis);\n\n // Circular Labels\n var circularSectorLabels = component.circularSectorLabels().radius(radius * 1.04).radialScale(xScale).textAnchor(\"start\");\n\n chart.select(\".circularSectorLabels\").call(circularSectorLabels);\n });\n }\n\n /**\n * Width Getter / Setter\n *\n * @param {number} _v - Width in px.\n * @returns {*}\n */\n my.width = function (_v) {\n if (!arguments.length) return width;\n width = _v;\n return this;\n };\n\n /**\n * Height Getter / Setter\n *\n * @param {number} _v - Height in px.\n * @returns {*}\n */\n my.height = function (_v) {\n if (!arguments.length) return height;\n height = _v;\n return this;\n };\n\n /**\n * Margin Getter / Setter\n *\n * @param {number} _v - Margin in px.\n * @returns {*}\n */\n my.margin = function (_v) {\n if (!arguments.length) return margin;\n margin = _v;\n return this;\n };\n\n /**\n * Radius Getter / Setter\n *\n * @param {number} _v - Radius in px.\n * @returns {*}\n */\n my.radius = function (_v) {\n if (!arguments.length) return radius;\n radius = _v;\n return this;\n };\n\n /**\n * Colors Getter / Setter\n *\n * @param {Array} _v - Array of colours used by color scale.\n * @returns {*}\n */\n my.colors = function (_v) {\n if (!arguments.length) return colors;\n colors = _v;\n return this;\n };\n\n /**\n * Color Scale Getter / Setter\n *\n * @param {d3.scale} _v - D3 color scale.\n * @returns {*}\n */\n my.colorScale = function (_v) {\n if (!arguments.length) return colorScale;\n colorScale = _v;\n return this;\n };\n\n /**\n * Capital Labels Getter / Setter\n *\n * @param {boolean} _v - Display capital labels or not?\n * @returns {*}\n */\n my.capitalizeLabels = function (_v) {\n if (!arguments.length) return capitalizeLabels;\n capitalizeLabels = _v;\n return this;\n };\n\n /**\n * Color Labels Getter / Setter\n *\n * @param {Array} _v - Array of color labels.\n * @returns {*}\n */\n my.colorLabels = function (_v) {\n if (!arguments.length) return colorLabels;\n colorLabels = _v;\n return this;\n };\n\n /**\n * Transition Getter / Setter\n *\n * @param {d3.transition} _v - D3 transition style.\n * @returns {*}\n */\n my.transition = function (_v) {\n if (!arguments.length) return transition;\n transition = _v;\n return this;\n };\n\n /**\n * Dispatch Getter / Setter\n *\n * @param {d3.dispatch} _v - Dispatch event handler.\n * @returns {*}\n */\n my.dispatch = function (_v) {\n if (!arguments.length) return dispatch();\n dispatch = _v;\n return this;\n };\n\n /**\n * Dispatch On Getter\n *\n * @returns {*}\n */\n my.on = function () {\n var value = dispatch.on.apply(dispatch, arguments);\n return value === dispatch ? my : value;\n };\n\n return my;\n }", "function RadarChart (parent_selector, data, options) {\n // Wraps SVG text - Taken from http://bl.ocks.org/mbostock/7555321\n const wrap = (text, width) => {\n text.each(function () {\n const text = d3.select(this)\n const words = text.text().split(/\\s+/).reverse()\n let word\n let line = []\n let lineNumber = 0\n const lineHeight = 1.4 // ems\n const y = text.attr('y')\n const x = text.attr('x')\n const dy = parseFloat(text.attr('dy'))\n let tspan = text.text(null).append('tspan').attr('x', x).attr('y', y).attr('dy', dy + 'em')\n\n while (word = words.pop()) {\n line.push(word)\n tspan.text(line.join(' '))\n if (tspan.node().getComputedTextLength() > width) {\n line.pop()\n tspan.text(line.join(' '))\n line = [word]\n tspan = text.append('tspan').attr('x', x).attr('y', y).attr('dy', ++lineNumber * lineHeight + dy + 'em').text(word)\n }\n }\n })\n } // wrap\n\n const cfg = {\n w: 600, // Width of the circle\n h: 600, // Height of the circle\n margin: { top: 20, right: 20, bottom: 20, left: 20 }, // The margins of the SVG\n levels: 3,\t\t\t\t// How many levels or inner circles should be drawn\n minValue: 0, // What is the value that the center will represent\n maxValue: 0, \t\t\t// What is the value that the biggest circle will represent\n startAngle: 0, // The starting angle for the radar, 0 means the 1st axe is vertical\n labelFactor: 1.25, // How much farther than the radius of the outer circle should the labels be placed\n wrapWidth: 60, // The number of pixels after which a label needs to be given a new line\n opacityArea: 0.35, // The opacity of the area of the blob\n dotRadius: 3, \t\t\t// The size of the colored circles of each blog\n opacityCircles: 0.1, \t// The opacity of the circles of each blob\n strokeWidth: 1, \t\t// The width of the stroke around each blob\n roundStrokes: false,\t// If true the area and stroke will follow a round path (cardinal-closed)\n color: d3.scaleOrdinal(d3.schemeCategory10), // Color function,\n format: '.2%',\n unit: ''\n }\n\n // Put all of the options into a variable called cfg\n if (typeof options !== 'undefined') {\n for (const i in options) {\n if (typeof options[i] !== 'undefined') { cfg[i] = options[i] }\n }\n }\n\n const allAxis = data[0].axes.map(i => i.axis) // Names of each axis\n const total = allAxis.length // The number of different axes\n const radius = Math.min(cfg.w / 2, cfg.h / 2) // Radius of the outermost circle\n const Format = d3.format(cfg.format) // Formatting\n const angleSlice = Math.PI * 2 / total // The width in radians of each \"slice\"\n\n // Scale for the radius\n const rScale = d3.scaleLinear()\n .range([0, radius])\n .domain([cfg.minValue, cfg.maxValue])\n\n /** * --------------------------------------------- ***/\n /** * ------- Create the container SVG and g ------ ***/\n /** * --------------------------------------------- ***/\n\n const parent = d3.select(parent_selector)\n\n // Remove whatever chart with the same id/class was present before\n parent.select('svg').remove()\n\n // Initiate the radar chart SVG\n const svg = parent.append('svg')\n .attr('width', cfg.w + cfg.margin.left + cfg.margin.right)\n .attr('height', cfg.h + cfg.margin.top + cfg.margin.bottom)\n .attr('class', 'radar')\n\n // Append a g element\n const g = svg.append('g')\n .attr('transform', 'translate(' + (cfg.w / 2 + cfg.margin.left) + ',' + (cfg.h / 2 + cfg.margin.top) + ')')\n\n /** * --------------------------------------------- ***/\n /** * ----- Glow filter for some extra pizzazz ---- ***/\n /** * --------------------------------------------- ***/\n\n // Filter for the outside glow\n const filter = g.append('defs').append('filter').attr('id', 'glow')\n filter.append('feGaussianBlur').attr('stdDeviation', '2.5').attr('result', 'coloredBlur')\n const feMerge = filter.append('feMerge')\n feMerge.append('feMergeNode').attr('in', 'coloredBlur')\n feMerge.append('feMergeNode').attr('in', 'SourceGraphic')\n\n /** * --------------------------------------------- ***/\n /** * ------------------ Tooltip ------------------ ***/\n /** * --------------------------------------------- ***/\n\n const tooltipDiv = d3.select('body').append('div')\n .attr('class', 'tooltip tooltip-radar')\n .style('opacity', 0)\n\n /** * --------------------------------------------- ***/\n /** * ----------- Draw the circular grid ---------- ***/\n /** * --------------------------------------------- ***/\n\n // Wrapper for the grid & axes\n const axisGrid = g.append('g').attr('class', 'axisWrapper')\n\n // Draw the background circles\n axisGrid.selectAll('.levels')\n .data(d3.range(1, (cfg.levels + 1)).reverse())\n .enter()\n .append('circle')\n .attr('class', 'gridCircle')\n .attr('r', d => radius / cfg.levels * d)\n .style('fill-opacity', cfg.opacityCircles)\n\n // Text indicating at what % each level is\n axisGrid.selectAll('.axisLabel')\n .data(d3.range(options.type === 'big5' ? 1 : 0, (cfg.levels + 1)).reverse())\n .enter().append('text')\n .attr('class', 'axisLabel')\n .attr('x', 4)\n .attr('y', d => -d * radius / cfg.levels)\n .attr('dy', '0.4em')\n .text(d => {\n if (options.type === 'big5') return d3.format('.0f')(cfg.maxValue * d / cfg.levels) + cfg.unit\n else if (options.type === 'tipi_pos') return d3.format('.0f')((cfg.maxValue - 1) * d / cfg.levels + 1) + cfg.unit\n else if (options.type === 'tipi_neg') return d3.format('.0f')(8 - ((cfg.maxValue - 1) * d / cfg.levels + 1)) + cfg.unit\n })\n\n /** * --------------------------------------------- ***/\n /** * ---------------- Draw the axes -------------- ***/\n /** * --------------------------------------------- ***/\n\n // Create the straight lines radiating outward from the center\n const axis = axisGrid.selectAll('.axis')\n .data(allAxis)\n .enter()\n .append('g')\n .attr('class', d => 'axis ' + d)\n\n // Append the lines\n axis.append('line')\n .attr('x1', 0)\n .attr('y1', 0)\n .attr('x2', (d, i) => rScale(cfg.maxValue * 1.1) * Math.cos(cfg.startAngle + angleSlice * i - (Math.PI / 2)))\n .attr('y2', (d, i) => rScale(cfg.maxValue * 1.1) * Math.sin(cfg.startAngle + angleSlice * i - (Math.PI / 2)))\n .attr('class', 'line')\n\n // Append the labels at each axis\n axis.append('text')\n .attr('class', 'legend')\n .attr('text-anchor', 'middle')\n .attr('dy', '0.35em')\n .attr('x', (d, i) => rScale(cfg.maxValue * cfg.labelFactor) * Math.cos(cfg.startAngle + angleSlice * i - (Math.PI / 2)))\n .attr('y', (d, i) => rScale(cfg.maxValue * cfg.labelFactor) * Math.sin(cfg.startAngle + angleSlice * i - (Math.PI / 2)))\n .text(d => d)\n .call(wrap, cfg.wrapWidth)\n .on('mouseover', event => event.target.classList.toggle('hover'))\n .on('mouseout', event => event.target.classList.toggle('hover'))\n .on('click', (event, datum) => selectTrait(event.target, datum))\n\n /** * --------------------------------------------- ***/\n /** * --------- Draw the radar chart blobs -------- ***/\n /** * --------------------------------------------- ***/\n\n // The radial line function\n const radarLine = d3.radialLine()\n .curve(d3.curveLinearClosed)\n .radius(d => rScale(d.value))\n .angle((d, i) => cfg.startAngle + i * angleSlice)\n\n if (cfg.roundStrokes) {\n radarLine.curve(d3.curveCardinalClosed)\n }\n\n // Create a wrapper for the blobs\n const blobWrapper = g.selectAll('.radarWrapper')\n .data(data)\n .enter().append('g')\n .attr('class', 'radarWrapper')\n\n // Append the backgrounds\n blobWrapper\n .append('path')\n .attr('class', 'radarArea')\n .attr('d', d => radarLine(d.axes))\n .style('fill', d => d.visibility ? d.color !== -1 ? cfg.color(d.color) : '#b9b9d2' : 'transparent')\n .style('fill-opacity', cfg.opacityArea)\n .on('mouseover', function () {\n // Dim all blobs\n parent.selectAll('.radarArea')\n .transition().duration(200)\n .style('fill-opacity', 0.1)\n\n // Bring back the hovered over blob\n d3.select(this)\n .transition().duration(200)\n .style('fill-opacity', 0.7)\n })\n .on('mouseout', () => {\n // Bring back all blobs\n parent.selectAll('.radarArea')\n .transition().duration(200)\n .style('fill-opacity', cfg.opacityArea)\n })\n\n // Create the outlines\n blobWrapper.append('path')\n .attr('class', 'radarStroke')\n .attr('d', function (d, i) { return radarLine(d.axes) })\n .style('stroke-width', cfg.strokeWidth + 'px')\n .style('stroke', d => d.visibility ? d.color !== -1 ? cfg.color(d.color) : '#b9b9d2' : 'transparent')\n .style('fill', 'none')\n .style('filter', 'url(#glow)')\n\n // Append the circles\n blobWrapper.selectAll('.radarCircle')\n .data(d => d.axes)\n .enter()\n .append('circle')\n .attr('class', 'radarCircle')\n .attr('r', cfg.dotRadius)\n .attr('cx', (d, i) => rScale(d.value) * Math.cos(cfg.startAngle + angleSlice * i - (Math.PI / 2)))\n .attr('cy', (d, i) => rScale(d.value) * Math.sin(cfg.startAngle + angleSlice * i - (Math.PI / 2)))\n .style('fill', (d) => d.visibility ? d.color !== -1 ? cfg.color(d.color) : '#b9b9d2' : 'transparent')\n .style('fill-opacity', 0.8)\n\n /** * --------------------------------------------- ***/\n /** * ---- Append invisible circles for tooltip --- ***/\n /** * --------------------------------------------- ***/\n\n // Wrapper for the invisible circles on top\n const blobCircleWrapper = g.selectAll('.radarCircleWrapper')\n .data(data)\n .enter().append('g')\n .attr('class', 'radarCircleWrapper')\n\n // Wrapper for a group of invisible circles\n const blobCircleGroup = blobCircleWrapper.selectAll('.radarCircleGroup')\n .data(data)\n .enter().append('g')\n .attr('class', 'radarCircleGroup')\n .style('display', d => d.visibility ? 'block' : 'none')\n\n // Append a set of invisible circles on top for the mouseover pop-up\n blobCircleGroup.selectAll('.radarInvisibleCircle')\n .data(d => d.axes)\n .enter().append('circle')\n .attr('class', 'radarInvisibleCircle')\n .attr('r', cfg.dotRadius + 1)\n .attr('cx', (d, i) => rScale(d.value) * Math.cos(cfg.startAngle + angleSlice * i - (Math.PI / 2)))\n .attr('cy', (d, i) => rScale(d.value) * Math.sin(cfg.startAngle + angleSlice * i - (Math.PI / 2)))\n .style('fill', 'none')\n .style('pointer-events', 'all')\n .on('mouseover', (event, d) => {\n tooltipDiv.transition()\n .duration(200)\n .style('opacity', 1)\n tooltipDiv.html('<strong>' + text(d) + '</strong>')\n .style('left', (event.pageX - 20) + 'px')\n .style('top', (event.pageY - 35) + 'px')\n })\n .on('mouseout', () => {\n tooltipDiv.transition()\n .duration(500)\n .style('opacity', 0)\n })\n\n function text (d) {\n if (options.type === 'big5' || options.type === 'tipi_pos') return Format(d.value) + cfg.unit\n else if (options.type === 'tipi_neg') return Format(8 - d.value) + cfg.unit\n }\n\n return svg\n}", "function RatioChart_implementChart(containerID, chartDivID, floatsArray) {\n\n var xDist = 3.0 / floatsArray.length; // Value for setting the equidistance Band wavelength which should be between 1 and 4\n var xPrev = 1.0; // Value used for storing the Band wavelength of the previous Band\n var Ymin = Infinity,\n Ymax = -Infinity; // Values for getting the minimum and maximum out of the array\n\n var spectraDataProviderChart = [];\n\n\n function SpectraDataConstructor(bandIndex, bandValue) {\n this.bandIndex = bandIndex;\n this.value = bandValue;\n }\n\n for (var i = 0; i < floatsArray.length; i++) {\n // Only get points with valid value\n var relectance = 0;\n\n if (floatsArray[i] != -999 && floatsArray[i] != 0 && floatsArray[i] < 20 && floatsArray[i] > 0.0001) {\n relectance = floatsArray[i];\n } else {\n relectance = null;\n }\n\n var spectraObj = new SpectraDataConstructor(parseFloat(xPrev).toFixed(3), relectance);\n spectraDataProviderChart.push(spectraObj);\n\n if (Ymin > floatsArray[i]) { // Getting the minimum of value to draw chart\n Ymin = floatsArray[i];\n } else if (Ymax < floatsArray[i]) { // Getting the maximum of value to draw chart\n Ymax = floatsArray[i];\n // console.log(\"max: \" + Ymax);\n }\n\n // If point value is valid or not valid still need to calculate the X coordinate for it.\n xPrev = xPrev + xDist; // Setting the correct X-axis wavelength of the current Band/point\n }\n\n // Only add chart div when it does not exist and CONTAINERID is not empty\n //if(!$(\"#\" + chartDivID).length) {\n //\t $(\"#\" + containerID).append(\"<div class='chartdiv' id='\" + chartDivID + \"' style='width:100%; height:560px;'></div>\");\n //}\n\n var chart = AmCharts.makeChart(\"#\" + chartDivID, {\n \"type\": \"serial\",\n \"theme\": \"light\",\n \"marginRight\": 10,\n \"marginLeft\": 10,\n \"backgroundColor\": \"#2F5597\",\n \"backgroundAlpha\": 1,\n \"autoMarginOffset\": 20,\n \"mouseWheelZoomEnabled\": true,\n \"dataProvider\": spectraDataProviderChart,\n \"fontSize\": 14,\n \"color\": \"#ffffff\",\n \"marginTop\": 50,\n \"valueAxes\": [{\n \"axisAlpha\": 0,\n \"guides\": [{\n \"fillAlpha\": 0.1,\n \"fillColor\": \"#888888\",\n \"lineAlpha\": 0,\n \"toValue\": 16,\n \"value\": 10\n }],\n \"position\": \"left\",\n \"tickLength\": 0,\n \"title\": \"Reflectance\"\n }],\n \"categoryAxis\": {\n \"title\": \"Wavelength (µm)\"\n },\n \"graphs\": [{\n \"id\": \"g2\",\n \"balloonText\": \"<span style='font-size:14px; color: #ff0000'> Wavelength:[[bandIndex]]<br><b> Reflectance:[[value]]</span></b>\",\n // \"bullet\": \"round\",\n // \"bulletSize\": 0,\n \"dashLength\": 0,\n \"lineThickness\": 2,\n \"colorField\": \"color\",\n \"valueField\": \"value\",\n \"connect\": false,\n }],\n\n \"chartCursor\": {\n \"pan\": true,\n \"valueLineEnabled\": true,\n \"valueLineBalloonEnabled\": false,\n \"cursorAlpha\": 1,\n \"cursorColor\": \"#258cbb\",\n \"limitToGraph\": \"g1\",\n \"valueLineAlpha\": 0.2,\n \"valueZoomable\": true,\n \"valueBalloonsEnabled\": true,\n \"categoryBalloonEnabled\": true\n },\n \"categoryField\": \"bandIndex\",\n \"categoryAxis\": {\n //\"parseDates\": true,\n \"axisAlpha\": 0,\n \"gridAlpha\": 0.1,\n \"minorGridAlpha\": 0.1,\n \"minorGridEnabled\": true,\n \"title\": \"Wavelength (µm)\"\n },\n \"export\": {\n \"enabled\": true,\n \"fileName\": \"ps2_\" + drawCoverageID + \"_lat_\" + drawLat + \"_lon_\" + drawLon\n }\n });\n\n // it needs to resize the chart and write it when it is hidden\n chart.invalidateSize();\n chart.write(chartDivID);\n\n $(\".ratio-dock\").css(\"background\", \"#2F5597\");\n}", "function initRightChart() {\n\n var option1 = {\n title: {\n text: '',\n subtext: '',\n x: 'center'\n },\n tooltip: {\n trigger: 'item',\n formatter: \"{b} : {c} ({d}%)\"\n },\n label: { normal: {show:true}},\n legend: {\n orient: 'vertical',\n right: 50,\n bottom: 20,\n data: [\n {name:'箱式',icon:'circle' },\n { name: '柜式', icon: 'circle' },\n { name: '卧式', icon: 'circle' }\n ]\n },\n series: [\n {\n name: '访问来源',\n type: 'pie',\n radius: '55%',\n center: ['40%', '45%'],\n selectedOffset: 4,\n label: {\n normal: {\n show: true,\n position:'inside',\n formatter: \"{c}\"\n }\n },\n data: [\n { itemStyle: { normal: { color: '#ffab5a' } } },\n { selected: true, itemStyle: { normal: { color: '#a0e792' } } },\n { itemStyle: { normal: { color: '#5ebfe7' } } },\n \n ],\n \n }\n ]\n };\n\n var option2 = {\n color: ['#3398DB'],\n tooltip: {\n trigger: 'axis',\n axisPointer: { // 坐标轴指示器,坐标轴触发有效\n type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'\n }\n },\n grid: {\n left: '3%',\n right: '30px',\n bottom: '20px',\n top: '20px',\n containLabel: true\n },\n xAxis: [\n {\n type: 'category',\n data: [],\n axisTick: {\n alignWithLabel: true\n },\n axisLine: {\n lineStyle: {\n color: \"#dddddd\"\n }\n },\n axisTick: {\n show: false\n },\n axisLabel: {\n textStyle: {\n color: '#c6c6c6'\n }\n }\n }\n ],\n yAxis: [\n {\n type: 'value',\n axisLine: {\n lineStyle: {\n color: \"#dddddd\"\n }\n },\n axisTick: {\n show: false\n },\n axisLabel: {\n textStyle: {\n color: '#c6c6c6'\n }\n }\n }\n ],\n series: [\n {\n name: '用水量',\n type: 'bar',\n barWidth: '50%',\n itemStyle: {\n normal: {\n color: new echarts.graphic.LinearGradient(\n 0, 0, 0, 1,\n [\n { offset: 0, color: '#59cdfd' },\n { offset: 0.5, color: '#27befd' },\n { offset: 1, color: '#07b4fd' }\n ]\n )\n }\n },\n data: []\n }\n ]\n };\n var option3 = {\n color: ['#3398DB'],\n tooltip: {\n trigger: 'axis',\n axisPointer: { // 坐标轴指示器,坐标轴触发有效\n type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'\n }\n },\n grid: {\n left: '3%',\n right: '30px',\n bottom: '20px',\n top:'20px',\n containLabel: true\n },\n xAxis: [\n {\n type: 'category',\n data: [1,2,3,4,5,6,7],\n axisTick: {\n alignWithLabel: true\n },\n axisLine: {\n lineStyle: {\n color: \"#dddddd\"\n }\n },\n axisTick: {\n show: false\n },\n axisLabel: {\n textStyle: {\n color: '#c6c6c6'\n }\n }\n }\n ],\n yAxis: [\n {\n type: 'value',\n axisLine: {\n lineStyle: {\n color: \"#dddddd\"\n }\n },\n axisTick: {\n show: false\n },\n axisLabel: {\n textStyle: {\n color: '#c6c6c6'\n }\n }\n }\n ],\n series: [\n {\n name: '用电量',\n type: 'bar',\n barWidth: '50%',\n itemStyle: {\n normal: {\n color: new echarts.graphic.LinearGradient(\n 0, 0, 0, 1,\n [\n { offset: 0, color: '#fdc959' },\n { offset: 0.5, color: '#fd8723' },\n { offset: 1, color: '#fd6407' }\n ]\n )\n }\n },\n data: []\n }\n ]\n };\n mapChart1.setOption(option1);\n //mapChart2.setOption(option2);\n //mapChart3.setOption(option3);\n}", "function createRadarChart(){\n // Chart.js Radar chart\n if(ctx.length > 0){\n prepareChartData().then((chartData)=> {\n \n \n var myRadarChart = new Chart(ctx, {\n\n type: 'radar',\n data: {\n labels: ['Goalkeeping', 'Defending', 'Movement', 'Passing', 'Finishing'],\n datasets: [{\n data: chartData,\n backgroundColor: 'rgba(35, 230, 35, 0.3)',\n borderColor: 'rgba(35, 230, 35, 0.9)'\n }]\n },\n options: {\n legend: {\n display: false,\n },\n title: {\n display: false,\n },\n scale: {\n ticks: {\n beginAtZero: true,\n max: 10,\n stepSize: 2,\n display: false\n }\n }\n }\n }); \n }) \n }\n}", "_drawChart()\n {\n\n }", "get Charting() {}", "function buildRadarChart() {\n\n //Initiate the radar chart SVG\n var g = d3.select(\"#radarChartId\").append(\"svg\")\n .attr(\"width\", cfg.w + cfg.margin.left + cfg.margin.right)\n .attr(\"height\", cfg.h + cfg.margin.top + cfg.margin.bottom)\n .append(\"g\")\n .attr(\"transform\", \"translate(\" + (cfg.w / 2 + cfg.margin.left) + \",\" + (cfg.h / 2 + cfg.margin.top) + \")\");\n\n //Wrapper for the grid & axes\n var axisGrid = g.append(\"g\").attr(\"class\", \"axisWrapper\");\n\n //Draw the background circles\n axisGrid.selectAll(\".levels\")\n .data(d3.range(1, (cfg.levels + 1)).reverse())\n .enter()\n .append(\"circle\")\n .attr(\"class\", \"gridCircle\")\n .attr(\"r\", function(d, i) {\n return radius / cfg.levels * d;\n })\n .style(\"fill\", \"#CDCDCD\")\n .style(\"stroke\", \"#CDCDCD\")\n .style(\"fill-opacity\", cfg.opacityCircles);\n\n //Text indicating at what % each level is\n axisGrid.selectAll(\".axisLabel\")\n .data(d3.range(1, (cfg.levels + 1)).reverse())\n .enter().append(\"text\")\n .attr(\"class\", \"axisLabel\")\n .attr(\"x\", 4)\n .attr(\"y\", function(d) {\n return -d * radius / cfg.levels;\n })\n .attr(\"dy\", \"0.4em\")\n .style(\"font-size\", \"10px\")\n .attr(\"fill\", \"#737373\")\n .text(function(d, i) {\n return d3.format(\".2f\")(maxValue * d / cfg.levels);\n });\n\n //Create the straight lines radiating outward from the center\n var axis = axisGrid.selectAll(\".axis\")\n .data(allAxis)\n .enter()\n .append(\"g\")\n .attr(\"class\", \"axis\");\n //Append the lines\n axis.append(\"line\")\n .attr(\"x1\", 0)\n .attr(\"y1\", 0)\n .attr(\"x2\", function(d, i) {\n return rScale(maxValue * 1.1) * Math.cos(angleSlice * i - Math.PI / 2);\n })\n .attr(\"y2\", function(d, i) {\n return rScale(maxValue * 1.1) * Math.sin(angleSlice * i - Math.PI / 2);\n })\n .attr(\"class\", \"line\")\n .style(\"stroke\", \"white\")\n .style(\"stroke-width\", \"2px\");\n\n //Append the labels at each axis\n axis.append(\"text\")\n .attr(\"class\", \"legend\")\n .style(\"font-size\", \"9px\")\n .attr(\"text-anchor\", \"middle\")\n .attr(\"dy\", \"0.35em\")\n .attr(\"x\", function(d, i) {\n return rScale(maxValue * cfg.labelFactor) * Math.cos(angleSlice * i - Math.PI / 2);\n })\n .attr(\"y\", function(d, i) {\n return rScale(maxValue * cfg.labelFactor) * Math.sin(angleSlice * i - Math.PI / 2);\n })\n .text(function(d) {\n return d\n })\n .call(wrap, cfg.wrapWidth);\n} //buildRadarChart", "renderBarGraph() {\n let data = this.addNumDrawingsToData() \n return (\n <ResponsiveBar\n data={data}\n keys={['numDrawings']}\n indexBy={indexFunc}\n margin={{ top: 50, right: 130, bottom: 50, left: 60 }}\n padding={0.3}\n colors={{ scheme: 'nivo' }}\n borderColor={{ from: 'color', modifiers: [ [ 'darker', 1.6 ] ] }}\n axisTop={null}\n axisRight={null}\n axisBottom={{\n tickSize: 5,\n tickPadding: 5,\n tickRotation: 0,\n legend: 'country',\n legendPosition: 'middle',\n legendOffset: 32\n }}\n axisLeft={{\n tickSize: 5,\n tickPadding: 5,\n tickRotation: 0,\n legend: 'numDrawings',\n legendPosition: 'middle',\n legendOffset: -40\n }}\n labelSkipWidth={12}\n labelSkipHeight={12}\n enableGridY={true}\n labelTextColor={{ from: 'color', modifiers: [ [ 'darker', 1.6 ] ] }}\n legends={[\n {\n dataFrom: 'keys',\n anchor: 'bottom-right',\n direction: 'column',\n justify: false,\n translateX: 120,\n translateY: 0,\n itemsSpacing: 2,\n itemWidth: 100,\n itemHeight: 20,\n itemDirection: 'left-to-right',\n itemOpacity: 0.85,\n symbolSize: 20,\n effects: [\n {\n on: 'hover',\n style: {\n itemOpacity: 1\n }\n }\n ]\n }\n ]}\n animate={true}\n motionStiffness={90}\n motionDamping={15}\n />\n )\n }", "componentDidMount() {\n const interfaceColors = new am4core.InterfaceColorSet();\n const chart = am4core.create(`div${this.props.id}`, am4charts.XYChart);\n\n chart.data = this.props.data;\n // the following line makes value axes to be arranged vertically.\n chart.bottomAxesContainer.layout = 'horizontal';\n chart.bottomAxesContainer.reverseOrder = true;\n\n const categoryAxis = chart.yAxes.push(new am4charts.CategoryAxis());\n categoryAxis.dataFields.category = 'month';\n categoryAxis.renderer.grid.template.stroke = interfaceColors.getFor('background');\n categoryAxis.renderer.grid.template.strokeOpacity = 1;\n categoryAxis.renderer.grid.template.location = 1;\n categoryAxis.renderer.minGridDistance = 20;\n\n const valueAxis1 = chart.xAxes.push(new am4charts.ValueAxis());\n valueAxis1.tooltip.disabled = true;\n valueAxis1.renderer.baseGrid.disabled = true;\n valueAxis1.marginRight = 30;\n valueAxis1.renderer.gridContainer.background.fill = interfaceColors.getFor('alternativeBackground');\n valueAxis1.renderer.gridContainer.background.fillOpacity = 0.05;\n valueAxis1.renderer.grid.template.stroke = interfaceColors.getFor('background');\n valueAxis1.renderer.grid.template.strokeOpacity = 1;\n valueAxis1.title.text = 'Incassi €';\n\n const series1 = chart.series.push(new am4charts.LineSeries());\n series1.dataFields.categoryY = 'month';\n series1.dataFields.valueX = 'paymentsDone';\n series1.xAxis = valueAxis1;\n series1.name = 'paymentsDone';\n const bullet1 = series1.bullets.push(new am4charts.CircleBullet());\n bullet1.tooltipText = '{valueX.value}';\n\n const valueAxis2 = chart.xAxes.push(new am4charts.ValueAxis());\n valueAxis2.tooltip.disabled = true;\n valueAxis2.renderer.baseGrid.disabled = true;\n valueAxis2.marginRight = 30;\n valueAxis2.renderer.gridContainer.background.fill = interfaceColors.getFor('alternativeBackground');\n valueAxis2.renderer.gridContainer.background.fillOpacity = 0.05;\n valueAxis2.renderer.grid.template.stroke = interfaceColors.getFor('background');\n valueAxis2.renderer.grid.template.strokeOpacity = 1;\n valueAxis2.title.text = 'Delta Quote €';\n\n const series2 = chart.series.push(new am4charts.ColumnSeries());\n series2.dataFields.categoryY = 'month';\n series2.dataFields.valueX = 'delta';\n series2.xAxis = valueAxis2;\n series2.name = 'Delta Quote';\n const bullet2 = series2.bullets.push(new am4charts.CircleBullet());\n bullet2.fillOpacity = 0;\n bullet2.strokeOpacity = 0;\n bullet2.tooltipText = '{valueX.value}';\n\n const valueAxis3 = chart.xAxes.push(new am4charts.ValueAxis());\n valueAxis3.tooltip.disabled = true;\n valueAxis3.renderer.baseGrid.disabled = true;\n valueAxis3.renderer.gridContainer.background.fill = interfaceColors.getFor('alternativeBackground');\n valueAxis3.renderer.gridContainer.background.fillOpacity = 0.05;\n valueAxis3.renderer.grid.template.stroke = interfaceColors.getFor('background');\n valueAxis3.renderer.grid.template.strokeOpacity = 1;\n valueAxis3.title.text = 'Quote Totali €';\n\n const series3 = chart.series.push(new am4charts.LineSeries());\n series3.dataFields.categoryY = 'month';\n series3.dataFields.valueX = 'feesValue';\n series3.xAxis = valueAxis3;\n series3.name = 'Quote Totali';\n const bullet3 = series3.bullets.push(new am4charts.CircleBullet());\n bullet3.tooltipText = '{valueX.value}';\n\n chart.cursor = new am4charts.XYCursor();\n chart.cursor.behavior = 'zoomY';\n\n /* const scrollbarY = new am4core.Scrollbar();\n chart.scrollbarY = scrollbarY; */\n }", "function makeStandardChart(title, subtitle, units, utcData) {\r\n\twindow.utcData = utcData;\r\n\tdataVals = (document.getElementById(\"utcGraph\").checked) ? utcData : adjustDataToTZO(utcData);\r\n\tconsole.log($(\"#duration\").val(), dataVals.length );\r\n\tmarkerRadius = (utcData.length > 200) ? 1 : 2;\r\n\tunits = $.trim(units).toLowerCase();\r\n\tif (units.toLowerCase() in unitAlias) {\r\n\t console.log(units, unitAlias[units.toLowerCase()]); \r\n\t units = unitAlias[units.toLowerCase()]; \r\n\t}\r\n\tvar yAxisArr = [{\r\n title: { \r\n text: units,\n align: 'high',\n rotation:0,\n offset: 10,\n y: -10\n } \r\n }];\r\n //Have two y-axises if there is a conversion\r\n if (units in conversions) {\r\n yAxisArr.push({\r\n title: {\r\n text: conversions[units][0],\r\n align: 'high',\r\n rotation:0,\r\n offset: 20,\r\n y: -10\r\n },\r\n opposite: true,\r\n linkedTo:0,\r\n labels: {\n formatter: function() {\r\n // console.log(\"label converted:\", this.value, convert(this.value, units)[0]);\n return convert(this.value, units)[0];\n }\r\n } \r\n });\r\n }\r\n /// define the options\r\n\tvar options = {\r\n\t\tchart: \r\n\t\t\t{ \r\n\t\t\t\trenderTo: 'chart',\r\n\t\t\t\tevents: {\r\n\t\t\t\t\tload: function(event) {\r\n\t\t\t\t\t chartBusyDone(); \r\n\t\t\t\t\t}\r\n\t\t\t\t} \r\n\t\t\t},\r\n\t\ttitle: { text: title },\r\n\t\tsubtitle: { text: subtitle },\r\n\t\txAxis: { type: 'datetime' },\r\n yAxis: yAxisArr,\r\n\t\t// yAxis: [\n\t\t\t// { title: \n\t\t\t\t// { \n\t\t\t\t\t// text: unitStr,\n\t\t\t\t\t// align: 'high',\n\t\t\t\t\t// rotation:0,\n\t\t\t\t\t// offset: 10,\n\t\t\t\t\t// y: -10\n\t\t\t\t// } \n\t\t\t// }],\r\n\t\tlegend: { enabled: false },\r\n\t\ttooltip: {\r\n\t\t\tshared: true,\r\n\t\t\tcrosshairs: true,\r\n\t\t\tpointFormat: '{series.name}: <b>{point.y}</b> '+units,\r\n\t\t\tformatter: function () {\r\n\t\t\t thisDate = Highcharts.dateFormat('%a %b %e %Y %H:%M', this.x)+\"<br>\";\r\n\t\t\t var value = ((typeof this.y == 'number') && (this.y % 1 != 0))? this.y.toFixed(2) : this.y;\r\n if (units in conversions) {\r\n post = convert(this.y, units);\r\n // var post = parseFloat(this.y*conversions[units][1]).toFixed(1);\r\n // var postUnit = conversions[units][0];\r\n thisDate += title+\": <b>\"+value+units+\"</b>,<b>\"+post[0]+post[1]+\"</b>\";\r\n } else {\r\n thisDate += title+\": <b>\"+value+units+\"</b>\";\r\n } \r\n if (dataVals[0].length == 3) {\r\n thisDate += \"<br>Direction: <b>\"+this.points[0].key+\"\\u00B0</b>\"; //\\u00B0 is degree symbol\r\n }\r\n return thisDate;\r\n\t\t\t},\r\n\t\t\tdateTimeLabelFormats: {\r\n\t\t\t\tmillisecond: '%b %e %y %H:%M:%S.%L',\r\n\t\t\t\tsecond: '%b %e %y %H:%M:%S',\r\n\t\t\t\tminute: '%b %e %y %H:%M',\r\n\t\t\t\thour: '%b %e %y %H:%M',\r\n\t\t\t\tday: '%b %e %y %H:%M',\r\n\t\t\t\tmonth: '%b \\'%y',\r\n\t\t\t\tyear: '%Y'\r\n\t\t\t}\r\n\t\t},\r\n\t\tplotOptions: { \r\n\t\t\tline: {\r\n\t\t\t\tmarker: { radius: markerRadius}\r\n\t\t\t}\r\n\t\t},\r\n\t\tseries: [{ \r\n\t\t\t\t\tname: title,\r\n\t\t\t\t\t// data: dataVals\r\n\t\t\t\t\tdata:[] \r\n\t\t\t\t}]\r\n\t};\r\n\r\n //Direction\r\n if ((typeof dataVals[0] != 'undefined') && (dataVals[0].length == 3)) {\r\n for (i in dataVals){\r\n arr = dataVals[i];\r\n //only use marker symbol if less than 50 points\r\n if (dataVals.length > 100) { //50?!!!\r\n options.series[0].data.push({ x: arr[0], y: arr[1], name: arr[2].toFixed().toString() });\r\n } else {\r\n if(/wind/i.test(title) || /wind/i.test(subtitle)) {\r\n dirMarker = 'url(http://neocoweb.ucsd.edu/cgi-bin/asbs/barb.py?sp='+arr[1]+'&dir='+arr[2]+')'\r\n } else {\r\n //ocean current\r\n dirMarker = 'url(http://neocoweb.ucsd.edu/cgi-bin/asbs/arrow.py?dir='+arr[2]+')'\r\n }\r\n options.series[0].data.push({ x: arr[0], y: arr[1], marker: {symbol: dirMarker}, name: arr[2].toFixed().toString()}); \r\n }\r\n }\r\n } else {\r\n options.series[0].data = dataVals;\r\n // options.tooltip.formatter = function () {}\r\n }\r\n \r\n \r\n\tht = $(\"#chartWrapper\").height();\r\n\twd = $(\"#chartWrapper\").width();\r\n\tmyLayout.south.options.onresize_end = function () {setChartSize();}\r\n\t\r\n\t// if (myLayout.state.south.isVisible == false) {\n\t\t// myLayout.open('south', false);\n\t// }\r\n\r\n\tnoDataMsg = 'No data is available at the selected location and/or with in the \"Time Span\"';\r\n\tif (dataVals.length == 0) {\r\n\t\torig = $(\"#duration\").val();\r\n\t\tvar loop = ((typeof chart == 'undefined') || (loop == true)) ? true: false;\r\n\t\tif ((document.getElementById(\"now\").checked == true) && (orig != 31536000) && (typeof loop != 'undefined') && (loop)) {\r\n\t\t\t$(\"#duration option\").each(function(){\r\n\t\t\t\toptVal = parseInt($(this).val())\r\n\t\t\t\tif (optVal > orig) {\r\n\t\t\t\t\tvar step = function (optVal) {\r\n\t\t\t\t\t\tvar dfrd = $.Deferred();\r\n\t\t\t\t\t\t$(\"#duration\").val(optVal.toString());\r\n\t\t\t\t\t\tconsole.log(\"setting duration:\", optVal);\r\n\t\t\t\t\t\ttimeSpan();\r\n\t\t\t\t\t\tsetGraph();\r\n\t\t\t\t\t\tdfrd.resolve(); // use Deferred??\r\n\t\t\t\t\t\treturn dfrd.promise();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvar callstep = step(optVal);\r\n\t\t\t\t\tstep.done(); //Doesn't work with callstep.done()??\r\n\t\t\t\t\t// step.done(function() {console.log(\"post setGraph\");}); //Not right console log\r\n\t\t\t\t} //else { console.log(\"ignore - smaller duration\");}\r\n\t\t\t});\r\n\t\t\tloop = false;\r\n\t\t} else {\r\n\t\t\tchartError(noDataMsg);\r\n\t\t}\r\n\t\tdelete loop;\r\n\t\t// chartError(noDataMsg);\r\n\t}\t\r\n\tchart = new Highcharts.Chart(options);\r\n\tsetChartSize();\r\n\t$(\"#chart\").val(\"usingChart\");\r\n\r\n}", "function rickshawChartCtrl() {\n\n /**\n * Data for simple chart\n */\n var simpleChartSeries = [\n {\n color: '#1ab394',\n data: [\n { x: 0, y: 40 },\n { x: 1, y: 49 },\n { x: 2, y: 38 },\n { x: 3, y: 30 },\n { x: 4, y: 32 }\n ]\n }\n ];\n /**\n * Options for simple chart\n */\n var simpleChartOptions = {\n renderer: 'area'\n };\n\n /**\n * Data for Multi Area chart\n */\n var multiAreaChartSeries = [\n {\n data: [\n { x: 0, y: 40 },\n { x: 1, y: 49 },\n { x: 2, y: 38 },\n { x: 3, y: 20 },\n { x: 4, y: 16 }\n ],\n color: '#1ab394',\n stroke: '#17997f'\n },\n {\n data: [\n { x: 0, y: 22 },\n { x: 1, y: 25 },\n { x: 2, y: 38 },\n { x: 3, y: 44 },\n { x: 4, y: 46 }\n ],\n color: '#eeeeee',\n stroke: '#d7d7d7'\n }\n ];\n\n /**\n * Options for Multi chart\n */\n var multiAreaChartOptions = {\n renderer: 'area',\n stroke: true\n };\n\n /**\n * Options for one line chart\n */\n var oneLineChartOptions = {\n renderer: 'line'\n };\n\n /**\n * Data for one line chart\n */\n var oneLineChartSeries = [\n {\n data: [\n { x: 0, y: 40 },\n { x: 1, y: 49 },\n { x: 2, y: 38 },\n { x: 3, y: 30 },\n { x: 4, y: 32 }\n ],\n color: '#1ab394'\n }\n ];\n\n /**\n * Options for Multi line chart\n */\n var multiLineChartOptions = {\n renderer: 'line'\n };\n\n /**\n * Data for Multi line chart\n */\n var multiLineChartSeries = [\n {\n data: [\n { x: 0, y: 40 },\n { x: 1, y: 49 },\n { x: 2, y: 38 },\n { x: 3, y: 30 },\n { x: 4, y: 32 }\n ],\n color: '#1ab394'\n },\n {\n data: [\n { x: 0, y: 20 },\n { x: 1, y: 24 },\n { x: 2, y: 19 },\n { x: 3, y: 15 },\n { x: 4, y: 16 }\n ],\n color: '#d7d7d7'\n }\n ];\n\n /**\n * Options for Bars chart\n */\n var barsChartOptions = {\n renderer: 'bar'\n };\n\n /**\n * Data for Bars chart\n */\n var barsChartSeries = [\n {\n data: [\n { x: 0, y: 40 },\n { x: 1, y: 49 },\n { x: 2, y: 38 },\n { x: 3, y: 30 },\n { x: 4, y: 32 }\n ],\n color: '#1ab394'\n }\n ];\n\n /**\n * Options for Stacked chart\n */\n var stackedChartOptions = {\n renderer: 'bar'\n };\n\n /**\n * Data for Stacked chart\n */\n var stackedChartSeries = [\n {\n data: [\n { x: 0, y: 40 },\n { x: 1, y: 49 },\n { x: 2, y: 38 },\n { x: 3, y: 30 },\n { x: 4, y: 32 }\n ],\n color: '#1ab394'\n },\n {\n data: [\n { x: 0, y: 20 },\n { x: 1, y: 24 },\n { x: 2, y: 19 },\n { x: 3, y: 15 },\n { x: 4, y: 16 }\n ],\n color: '#d7d7d7'\n }\n ];\n\n /**\n * Options for Scatterplot chart\n */\n var scatterplotChartOptions = {\n renderer: 'scatterplot',\n stroke: true,\n padding: { top: 0.05, left: 0.05, right: 0.05 }\n }\n\n /**\n * Data for Scatterplot chart\n */\n var scatterplotChartSeries = [\n {\n data: [\n { x: 0, y: 15 },\n { x: 1, y: 18 },\n { x: 2, y: 10 },\n { x: 3, y: 12 },\n { x: 4, y: 15 },\n { x: 5, y: 24 },\n { x: 6, y: 28 },\n { x: 7, y: 31 },\n { x: 8, y: 22 },\n { x: 9, y: 18 },\n { x: 10, y: 16 }\n ],\n color: '#1ab394'\n }\n ]\n\n /**\n * Definition all variables\n * Rickshaw chart\n */\n this.simpleSeries = simpleChartSeries;\n this.simpleOptions = simpleChartOptions;\n this.multiAreaOptions = multiAreaChartOptions;\n this.multiAreaSeries = multiAreaChartSeries;\n this.oneLineOptions = oneLineChartOptions;\n this.oneLineSeries = oneLineChartSeries;\n this.multiLineOptions = multiLineChartOptions;\n this.multiLineSeries = multiLineChartSeries;\n this.barsOptions = barsChartOptions;\n this.barsSeries = barsChartSeries;\n this.stackedOptions = stackedChartOptions;\n this.stackedSeries = stackedChartSeries;\n this.scatterplotOptions = scatterplotChartOptions;\n this.scatterplotSeries = scatterplotChartSeries;\n\n}", "function rawChart() {\r\n\tvar chart_title = \"VLMO\";\r\n\t$('#container').highcharts(\r\n\t\t\t{\r\n\t\t\t\tchart : {\r\n\t\t\t\t\tzoomType : 'xy'\r\n\t\t\t\t},\r\n\t\t\t\ttitle : {\r\n\t\t\t\t\ttext : chart_title\r\n\t\t\t\t},\r\n\t\t\t\tsubtitle : {\r\n\t\t\t\t\ttext : 'From ' + selectStartDate.format('yyyy-mm-dd')\r\n\t\t\t\t\t\t\t+ ' To ' + selectEndDate.format('yyyy-mm-dd')\r\n\t\t\t\t},\r\n\t\t\t\tcredits : {\r\n\t\t\t\t\thref : 'http://www.vervemobile.com',\r\n\t\t\t\t\ttext : 'vervemobile.com'\r\n\t\t\t\t},\r\n\t\t\t\txAxis : [ {\r\n\t\t\t\t\tcategories : categories,\r\n\t\t\t\t\t// tickmarkPlacement: 'on',\r\n\t\t\t\t\ttitle : {\r\n\t\t\t\t\t\tenabled : false\r\n\t\t\t\t\t},\r\n\t\t\t\t\t// gridLineWidth: 1,\r\n\t\t\t\t\tlabels : {\r\n\t\t\t\t\t\trotation : -45,\r\n\t\t\t\t\t\tformatter : function() {\r\n\t\t\t\t\t\t\tvar value = this.value;\r\n\t\t\t\t\t\t\tvar now = new Date(value);\r\n\t\t\t\t\t\t\treturn now.format(\"mmm dd\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} ],\r\n\t\t\t\tyAxis : [ { // Primary\r\n\t\t\t\t\tlabels : {\r\n\t\t\t\t\t\tformatter : function() {\r\n\t\t\t\t\t\t\treturn accounting.formatNumber(this.value);\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tstyle : {\r\n\t\t\t\t\t\t\tcolor : '#01A9DB '\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\ttitle : {\r\n\t\t\t\t\t\ttext : 'Clicks',\r\n\t\t\t\t\t\tstyle : {\r\n\t\t\t\t\t\t\tcolor : '#01A9DB'\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\topposite : true\r\n\r\n\t\t\t\t}, { // Tertiary\r\n\t\t\t\t\tlabels : {\r\n\t\t\t\t\t\tformatter : function() {\r\n\t\t\t\t\t\t\treturn accounting.formatNumber(this.value);\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tstyle : {\r\n\t\t\t\t\t\t\tcolor : '#DBA901'\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\ttitle : {\r\n\t\t\t\t\t\ttext : 'Impressions',\r\n\t\t\t\t\t\tstyle : {\r\n\t\t\t\t\t\t\tcolor : '#DBA901'\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t} ],\r\n\t\t\t\ttooltip : {\r\n\t\t\t\t\tshared : true,\r\n\t\t\t\t\tformatter : function() {\r\n\t\t\t\t\t\tvar date_Value = new Date(this.x);\r\n\t\t\t\t\t\tvar s = '<b>' + date_Value.format('mmm d, yyyy')\r\n\t\t\t\t\t\t\t\t+ '</b>';\r\n\t\t\t\t\t\t$.each(this.points, function(i, point) {\r\n\t\t\t\t\t\t\tif (point.series.name == 'Impressions') {\r\n\t\t\t\t\t\t\t\ts += '<br/><font style=\"color: #DBA901;\">'\r\n\t\t\t\t\t\t\t\t\t\t+ point.series.name + ': '\r\n\t\t\t\t\t\t\t\t\t\t+ accounting.formatNumber(point.y)\r\n\t\t\t\t\t\t\t\t\t\t+ '</font>';\r\n\t\t\t\t\t\t\t} else if (point.series.name == 'Clicks') {\r\n\t\t\t\t\t\t\t\ts += '<br/><font style=\"color: #01A9DB;\">'\r\n\t\t\t\t\t\t\t\t\t\t+ point.series.name + ': '\r\n\t\t\t\t\t\t\t\t\t\t+ accounting.formatNumber(point.y)\r\n\t\t\t\t\t\t\t\t\t\t+ '</font>';\r\n\t\t\t\t\t\t\t} else if (point.series.name == 'Cta any') {\r\n\t\t\t\t\t\t\t\ts += '<br/><font style=\"color: #80FF00;\">'\r\n\t\t\t\t\t\t\t\t\t\t+ point.series.name + ': '\r\n\t\t\t\t\t\t\t\t\t\t+ accounting.formatNumber(point.y)\r\n\t\t\t\t\t\t\t\t\t\t+ '</font>';\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\ts += '<br/>' + point.series.name + ': '\r\n\t\t\t\t\t\t\t\t\t\t+ accounting.formatMoney(point.y);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\treturn s;\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\tlegend : {\r\n\t\t\t\t\t// layout: 'vertical',\r\n\t\t\t\t\t// align: 'left',\r\n\t\t\t\t\t// x: 100,\r\n\t\t\t\t\t// verticalAlign: 'top',\r\n\t\t\t\t\t// y: 0,\r\n\t\t\t\t\t// floating: true,\r\n\t\t\t\t\tbackgroundColor : '#FFFFFF'\r\n\t\t\t\t},\r\n\t\t\t\tseries : [ {\r\n\t\t\t\t\tname : 'Clicks',\r\n\t\t\t\t\tcolor : '#01A9DB',\r\n\t\t\t\t\ttype : 'areaspline',\r\n\t\t\t\t\tyAxis : 1,\r\n\t\t\t\t\tdata : secondData\r\n\t\t\t\t}, {\r\n\t\t\t\t\tname : 'Impressions',\r\n\t\t\t\t\tcolor : '#DBA901',\r\n\t\t\t\t\ttype : 'column',\t\t\t\t\t\r\n\t\t\t\t\tdata : firstData\r\n\t\t\t\t} ]\r\n\t\t\t});\r\n\tchart = $('#container').highcharts();\r\n}", "function updateRadarChart(dataArray, chartTitle) {\n\n var massPopChart = new Chart(chart, {\n type: 'radar', // bar, horizontal, pie, line, donut, radar, polar charts supported\n data: {\n labels: ['Danceability', 'Energy', 'Speechiness', 'Acousticness',\n 'Instrumentalness', 'Liveness', 'Valence'],\n datasets: [\n {\n data: dataArray,\n label: 'Last Listened Track Audio Features',\n backgroundColor: 'rgb(255, 18, 227, 0.4)',\n borderColor: '#ff4dea',\n borderWidth: 2,\n fill: true,\n pointHoverBackgroundColor: '#ff78ef'\n }\n ]\n },\n options: {\n title: {\n display: true,\n text: chartTitle\n },\n scale: {\n ticks: {\n min: 0.0,\n max: 1.0,\n stepSize: 0.1\n }\n },\n tooltips: {\n enabled: true,\n callbacks: {\n title: function(tooltipItem, data) {\n /* Return the title of each label */\n return data['labels'][tooltipItem[0]['index']];\n },\n label: function(tooltipItem, data) {\n /* Return the value audio feature of the track */\n return data['datasets'][0]['data'][tooltipItem['index']];\n },\n afterLabel: function(tooltipItem, data) {\n /* Return the description of the audio feature. */\n return desc[[tooltipItem['index']]];\n }\n },\n titleFontSize: 24,\n titleFontColor: '#ffffff',\n titleMarginBottom: 6,\n bodyFontSize: 10\n }\n }\n });\n}", "function AbstractChartPainter() {\n\n}", "render() {\n\t\treturn (\n\t\t\t<div style={{width: '180px', height: '180px'}}>\n\t\t\t\t<EasiCircleChart value={80.} animationTime={500}\n\t\t\t\t\tmax={100}\n\t\t\t\t\tcolors={['#00D561', '#FFD71E', '#FFA86D', '#F6502F']} title=\"使用率(%)\"/>\n\t\t\t\t<DashboardCircleChart value={340} animationTime={500}\n\t\t\t\t\tmax={500}\n\t\t\t\t\tisScaleVisible={true}\n\t\t\t\t\ttitle=\"重度污染\"\n\t\t\t\t\tcolors={['#00D561', '#FFD71E', '#ffaf52', '#fb9a29', '#F6502F']}/>\n\t\t\t</div>\n\t\t);\n\t}", "function renderSvgRadar() {\n let datapoint = svg.selectAll(\".linkLinegg\").interrupt().data(d => datain.map(e => e.__metrics), d => d.name + d.timestep);\n datapoint.exit().remove();\n let datapoint_n = datapoint.enter().append('g')\n .attr('class', 'linkLinegg timeline');\n // datapoint_n.each(function (d, i) {\n // createRadar(d3.select(this).select('.linkLineg'), d3.select(this), d, {colorfill: true}).classed('hide', d.hide);// hide 1st radar\n // });\n\n datapoint_n.merge(datapoint).attr('transform', function (d) {\n return `translate(${xscale(d.position[0])},${yscale(d.position[1])})`\n })\n .on('mouseover', d => {\n master.hightlight([d.name_or])\n svg.selectAll('.linkLinegg').filter(e => d.name_or !== e.name_or).classed('hide', true)\n // d3.selectAll('.h'+d[0].name).dispatch('mouseover');\n }).on('mouseleave', d => {\n master.unhightlight(d.name_or);\n svg.selectAll('.linkLinegg.hide').classed('hide', false)\n // d3.selectAll('.h'+d[0].name).dispatch('mouseleave');\n })\n }", "function chartRoseChart () {\n\n /* Default Properties */\n var svg = void 0;\n var chart = void 0;\n var classed = \"roseChart\";\n var width = 400;\n var height = 300;\n var margin = { top: 20, right: 20, bottom: 20, left: 20 };\n var transition = { ease: d3.easeBounce, duration: 500 };\n var colors = palette.categorical(3);\n var dispatch = d3.dispatch(\"customValueMouseOver\", \"customValueMouseOut\", \"customValueClick\", \"customSeriesMouseOver\", \"customSeriesMouseOut\", \"customSeriesClick\");\n\n /* Chart Dimensions */\n var chartW = void 0;\n var chartH = void 0;\n var radius = void 0;\n\n /* Scales */\n var xScale = void 0;\n var yScale = void 0;\n var colorScale = void 0;\n\n /**\n * Initialise Data and Scales\n *\n * @private\n * @param {Array} data - Chart data.\n */\n function init(data) {\n chartW = width - margin.left - margin.right;\n chartH = height - margin.top - margin.bottom;\n\n var _dataTransform$summar = dataTransform(data).summary(),\n rowKeys = _dataTransform$summar.rowKeys,\n columnKeys = _dataTransform$summar.columnKeys,\n valueMax = _dataTransform$summar.valueMax;\n\n var valueExtent = [0, valueMax];\n\n if (typeof radius === \"undefined\") {\n radius = Math.min(chartW, chartH) / 2;\n }\n\n if (typeof colorScale === \"undefined\") {\n colorScale = d3.scaleOrdinal().domain(columnKeys).range(colors);\n }\n\n xScale = d3.scaleBand().domain(rowKeys).rangeRound([0, 360]);\n\n yScale = d3.scaleLinear().domain(valueExtent).range([0, radius]);\n }\n\n /**\n * Constructor\n *\n * @constructor\n * @alias roseChart\n * @param {d3.selection} selection - The chart holder D3 selection.\n */\n function my(selection) {\n // Create SVG element (if it does not exist already)\n if (!svg) {\n svg = function (selection) {\n var el = selection._groups[0][0];\n if (!!el.ownerSVGElement || el.tagName === \"svg\") {\n return selection;\n } else {\n return selection.append(\"svg\");\n }\n }(selection);\n\n svg.classed(\"d3ez\", true).attr(\"width\", width).attr(\"height\", height);\n\n chart = svg.append(\"g\").classed(\"chart\", true);\n } else {\n chart = selection.select(\".chart\");\n }\n\n // Update the chart dimensions and add layer groups\n var layers = [\"circularSectorLabels\", \"rosePetalGroups\"];\n chart.classed(classed, true).attr(\"transform\", \"translate(\" + width / 2 + \",\" + height / 2 + \")\").attr(\"width\", chartW).attr(\"height\", chartH).selectAll(\"g\").data(layers).enter().append(\"g\").attr(\"class\", function (d) {\n return d;\n });\n\n selection.each(function (data) {\n // Initialise Data\n init(data);\n\n // Rose Sectors\n var roseChartSector = component.roseChartSector().radius(radius).colorScale(colorScale).yScale(yScale).stacked(false).dispatch(dispatch);\n\n // Create Series Group\n var seriesGroup = chart.select(\".rosePetalGroups\").selectAll(\".seriesGroup\").data(data);\n\n seriesGroup.enter().append(\"g\").classed(\"seriesGroup\", true).merge(seriesGroup).each(function (d) {\n var startAngle = xScale(d.key);\n var endAngle = xScale(d.key) + xScale.bandwidth();\n roseChartSector.startAngle(startAngle).endAngle(endAngle);\n d3.select(this).call(roseChartSector);\n });\n\n seriesGroup.exit().remove();\n\n // Circular Labels\n var circularSectorLabels = component.circularSectorLabels().radius(radius * 1.04).radialScale(xScale).textAnchor(\"start\").capitalizeLabels(true);\n\n chart.select(\".circularSectorLabels\").call(circularSectorLabels);\n });\n }\n\n /**\n * Width Getter / Setter\n *\n * @param {number} _v - Width in px.\n * @returns {*}\n */\n my.width = function (_v) {\n if (!arguments.length) return width;\n width = _v;\n return this;\n };\n\n /**\n * Height Getter / Setter\n *\n * @param {number} _v - Height in px.\n * @returns {*}\n */\n my.height = function (_v) {\n if (!arguments.length) return height;\n height = _v;\n return this;\n };\n\n /**\n * Margin Getter / Setter\n *\n * @param {number} _v - Margin in px.\n * @returns {*}\n */\n my.margin = function (_v) {\n if (!arguments.length) return margin;\n margin = _v;\n return this;\n };\n\n /**\n * Radius Getter / Setter\n *\n * @param {number} _v - Radius in px.\n * @returns {*}\n */\n my.radius = function (_v) {\n if (!arguments.length) return radius;\n radius = _v;\n return this;\n };\n\n /**\n * Transition Getter / Setter\n *\n * @param {d3.transition} _v - D3 transition style.\n * @returns {*}\n */\n my.transition = function (_v) {\n if (!arguments.length) return transition;\n transition = _v;\n return this;\n };\n\n /**\n * Colors Getter / Setter\n *\n * @param {Array} _v - Array of colours used by color scale.\n * @returns {*}\n */\n my.colors = function (_v) {\n if (!arguments.length) return colors;\n colors = _v;\n return this;\n };\n\n /**\n * Color Scale Getter / Setter\n *\n * @param {d3.scale} _v - D3 color scale.\n * @returns {*}\n */\n my.colorScale = function (_v) {\n if (!arguments.length) return colorScale;\n colorScale = _v;\n return this;\n };\n\n /**\n * Dispatch Getter / Setter\n *\n * @param {d3.dispatch} _v - Dispatch event handler.\n * @returns {*}\n */\n my.dispatch = function (_v) {\n if (!arguments.length) return dispatch();\n dispatch = _v;\n return this;\n };\n\n /**\n * Dispatch On Getter\n *\n * @returns {*}\n */\n my.on = function () {\n var value = dispatch.on.apply(dispatch, arguments);\n return value === dispatch ? my : value;\n };\n\n return my;\n }", "function Radar(radarModel, ecModel, api) {\n this._model = radarModel;\n /**\n * Radar dimensions\n * @type {Array.<string>}\n */\n\n this.dimensions = [];\n this._indicatorAxes = zrUtil.map(radarModel.getIndicatorModels(), function (indicatorModel, idx) {\n var dim = 'indicator_' + idx;\n var indicatorAxis = new IndicatorAxis(dim, new IntervalScale());\n indicatorAxis.name = indicatorModel.get('name'); // Inject model and axis\n\n indicatorAxis.model = indicatorModel;\n indicatorModel.axis = indicatorAxis;\n this.dimensions.push(dim);\n return indicatorAxis;\n }, this);\n this.resize(radarModel, api);\n /**\n * @type {number}\n * @readOnly\n */\n\n this.cx;\n /**\n * @type {number}\n * @readOnly\n */\n\n this.cy;\n /**\n * @type {number}\n * @readOnly\n */\n\n this.r;\n /**\n * @type {number}\n * @readOnly\n */\n\n this.r0;\n /**\n * @type {number}\n * @readOnly\n */\n\n this.startAngle;\n}", "updateChart () {\n \n }", "function SVGRowChart() {\r\n }", "function Radar(radarModel, ecModel, api) {\n this._model = radarModel;\n /**\n * Radar dimensions\n * @type {Array.<string>}\n */\n\n this.dimensions = [];\n this._indicatorAxes = zrUtil.map(radarModel.getIndicatorModels(), function (indicatorModel, idx) {\n var dim = 'indicator_' + idx;\n var indicatorAxis = new IndicatorAxis(dim, indicatorModel.get('axisType') === 'log' ? new LogScale() : new IntervalScale());\n indicatorAxis.name = indicatorModel.get('name'); // Inject model and axis\n\n indicatorAxis.model = indicatorModel;\n indicatorModel.axis = indicatorAxis;\n this.dimensions.push(dim);\n return indicatorAxis;\n }, this);\n this.resize(radarModel, api);\n /**\n * @type {number}\n * @readOnly\n */\n\n this.cx;\n /**\n * @type {number}\n * @readOnly\n */\n\n this.cy;\n /**\n * @type {number}\n * @readOnly\n */\n\n this.r;\n /**\n * @type {number}\n * @readOnly\n */\n\n this.r0;\n /**\n * @type {number}\n * @readOnly\n */\n\n this.startAngle;\n}", "function Radar(radarModel, ecModel, api) {\n this._model = radarModel;\n /**\n * Radar dimensions\n * @type {Array.<string>}\n */\n\n this.dimensions = [];\n this._indicatorAxes = zrUtil.map(radarModel.getIndicatorModels(), function (indicatorModel, idx) {\n var dim = 'indicator_' + idx;\n var indicatorAxis = new IndicatorAxis(dim, indicatorModel.get('axisType') === 'log' ? new LogScale() : new IntervalScale());\n indicatorAxis.name = indicatorModel.get('name'); // Inject model and axis\n\n indicatorAxis.model = indicatorModel;\n indicatorModel.axis = indicatorAxis;\n this.dimensions.push(dim);\n return indicatorAxis;\n }, this);\n this.resize(radarModel, api);\n /**\n * @type {number}\n * @readOnly\n */\n\n this.cx;\n /**\n * @type {number}\n * @readOnly\n */\n\n this.cy;\n /**\n * @type {number}\n * @readOnly\n */\n\n this.r;\n /**\n * @type {number}\n * @readOnly\n */\n\n this.r0;\n /**\n * @type {number}\n * @readOnly\n */\n\n this.startAngle;\n}", "function SVGStackedAreaChart() {\r\n }", "function createLevel3Chart() {\n $(\"#divlevel3chart\").kendoChart({\n\n dataSource: Level3dataSource,\n dataBound: onDB,\n title: {\n text: \"Click graph for more details\",\n color: \"#C61835\"\n },\n legend: {\n position: \"bottom\"\n },\n plotArea: {\n margin: {\n top: 20,\n left: 5,\n right: 5,\n bottom: 5\n }\n },\n seriesDefaults: {\n type: \"column\",\n stack: true,\n labels: {\n visible: true,\n font: \"bold 14px Arial,Helvetica,sans-serif\",\n background: \"transparent\",\n position: \"center\"\n }\n },\n series: [{\n field: \"FindingCount\",\n name: \"Mock Survey Findings\",\n color: \"#6495ED\",\n axis: \"Default\",\n width: 90,\n gap: 0.3\n }, {\n field: \"RFICount\",\n\n name: \"TJC RFI Findings\",\n color: \"#800000\",\n width: 90,\n axis: \"Default\",\n gap: 0.3,\n\n },\n\n {\n type: \"line\",\n style: \"rigid\",\n name: \"Cumulative %\",\n color: \"#010101\",\n missingValues: \"interpolate\",\n markers: {\n background: \"#010101\",\n type: \"square\"\n },\n labels: {\n color: \"DarkBlue\",\n format: \"{0:n0}\",\n visible: false\n },\n width: 1,\n field: \"CumulativePercentage\",\n axis: \"%\"\n }\n ],\n valueAxes: [{\n name: \"Default\",\n title: {\n text: \"Findings\"\n },\n min: 0,\n pane: \"default-pane\"\n },\n {\n name: \"%\",\n min: 0,\n max: 100,\n title: {\n text: \"Cumulative %\",\n rotation: 450\n },\n color: \"#4e4141\"\n }],\n panes: [{\n name: \"default-pane\",\n clip: false\n }],\n categoryAxis: {\n\n field: \"Label\",\n axisCrossingValue: [0, 140],\n labels: {\n visible: true,\n rotation: 270\n }\n\n },\n tooltip: {\n visible: true,\n format: \"N0\"\n },\n //End CateogryAxis\n seriesClick: onLevel3SeriesClick\n });\n}", "function createLevel3Chart() {\n\n $(\"#divlevel3chart\").kendoChart({\n dataSource: Level3dataSourceChart,\n dataBound: onDB,\n data: {\n Accept: \"application/json\"\n },\n title: {\n text: \"Click graph for more details\",\n color: \"#C61835\"\n },\n legend: {\n position: \"bottom\"\n },\n seriesDefaults: {\n type: \"bar\",\n stack: {\n type: \"100%\"\n },\n labels: {\n visible: true,\n font: \"bold 14px Arial,Helvetica,sans-serif\",\n background: \"transparent\",\n position: \"center\",\n template: function (e) {\n\n var percentage = 0;\n var numerator = 0;\n var totalCount = e.dataItem.EPCount;\n var seriesFieldName = e.series.field;\n\n switch (seriesFieldName) {\n case ScoreCompletePercentage:\n percentage = e.dataItem.ScoreCompletePercentage;\n numerator = e.dataItem.ScoreCompleteCount;\n break;\n\n case ScorePastDueDatePercentage:\n percentage = e.dataItem.ScorePastDueDatePercentage;\n numerator = e.dataItem.ScorePastDueDateCount;\n break;\n\n case ScoreNotCompletePercentage:\n percentage = e.dataItem.ScoreNotCompletePercentage;\n numerator = e.dataItem.ScoreNotCompleteCount;\n break;\n\n }\n\n if (percentage <= 15) {\n return percentage.toFixed(2) + \"%\";\n }\n else { return percentage.toFixed(2) + \"% (\" + numerator + \"/\" + totalCount + \")\"; }\n\n }\n }\n },\n series:\n [{\n field: ScoreCompletePercentage,\n name: \"Score Complete\",\n color: \"#5da5da\",\n labels: {\n color: \"black\"\n\n }\n }, {\n field: ScorePastDueDatePercentage,\n name: \"Score Past Due Date\",\n color: \"#faa43a\",\n labels: {\n color: \"black\",\n }\n }\n , {\n field: ScoreNotCompletePercentage,\n name: \"Score Not Complete\",\n color: \"#b7b7b7\",\n labels: {\n color: \"black\"\n }\n }\n\n ],\n categoryAxis: {\n field: \"StandardLabel\",\n value: \"StandardID\",\n majorGridLines: {\n visible: false\n }\n },\n valueAxis: {\n min: 0,\n line: {\n visible: false\n },\n minorGridLines: {\n visible: false\n }\n },\n tooltip: {\n visible: true,\n //template: \"#= series.name #: #= kendo.format('{0:n2}%',value) #\"\n template: function (e) {\n\n var percentage = 0;\n var numerator = 0;\n var totalCount = e.dataItem.EPCount;\n var seriesFieldName = e.series.field;\n var seriesName = e.series.name;\n\n switch (seriesFieldName) {\n case ScoreCompletePercentage:\n percentage = e.dataItem.ScoreCompletePercentage;\n numerator = e.dataItem.ScoreCompleteCount;\n break;\n\n case ScorePastDueDatePercentage:\n percentage = e.dataItem.ScorePastDueDatePercentage;\n numerator = e.dataItem.ScorePastDueDateCount;\n break;\n\n case ScoreNotCompletePercentage:\n percentage = e.dataItem.ScoreNotCompletePercentage;\n numerator = e.dataItem.ScoreNotCompleteCount;\n break;\n\n }\n\n return seriesName + \": \" + percentage.toFixed(2) + \"% (\" + numerator + \"/\" + totalCount + \")\";\n\n }\n\n },\n seriesClick: onLevel3SeriesClick\n });\n\n}", "function RadialChart() {\n\n const url = \"/api/housing_data\";\n d3.json(url).then(function (d) {\n console.log(\"Homeownership Rate API\", d);\n var homeownership_rate = d[0].Homeownership_Rate;\n console.log(\"Homeownership Rate Array\", homeownership_rate);\n\n var options = {\n chart: {\n height: 250,\n type: \"radialBar\"\n },\n series: [homeownership_rate[125]],\n plotOptions: {\n radialBar: {\n hollow: {\n margin: 15,\n size: \"70%\"\n },\n dataLabels: {\n showOn: \"always\",\n name: {\n offsetY: -10,\n show: true,\n color: \"#888\",\n fontSize: \"13px\"\n },\n value: {\n color: \"#111\",\n fontSize: \"30px\",\n show: true\n }\n }\n }\n },\n responsive: [{\n breakpoint: undefined,\n options: {},\n }],\n stroke: {\n lineCap: \"round\",\n },\n labels: [\"Homeownership Rate\"],\n };\n\n var chart = new ApexCharts(document.querySelector(\"#homeownership\"), options);\n\n chart.render();\n });\n}", "function makechartswithdata(dataprovider,variablel) {\n if (chart != null) {chart.clear(); chart=null;}\n // SERIAL CHART\n chart = new AmCharts.AmSerialChart();\n chart.pathToImages = \"/static/amcharts/amcharts/images/\";\n chart.dataProvider = dataprovider;\n chart.categoryField = \"time\";\n\n // listen for \"dataUpdated\" event (fired when chart is inited) and call zoomChart method when it happens\n chart.addListener(\"dataUpdated\", zoomChart);\n\n // AXES\n // category -- xaxis\n var categoryAxis = chart.categoryAxis;\n categoryAxis.parseDates = false; // as our data is date-based, we set parseDates to true\n categoryAxis.minorGridEnabled = true;\n categoryAxis.axisColor = \"#DADADA\";\n categoryAxis.twoLineMode = false;\n categoryAxis.title = \"Hour\";\n\n // first value axis (on the left)\n var valueAxis1 = new AmCharts.ValueAxis();\n valueAxis1.axisColor = \"#FF6600\";\n valueAxis1.axisThickness = 2;\n valueAxis1.gridAlpha = 0;\n valueAxis1.title=\"Wait Time (mins)\"\n chart.addValueAxis(valueAxis1);\n\n // GRAPHS\n // first graph\n \n var axisl = [valueAxis1];\n var bulletl = [\"round\",\"square\",\"triangleUp\"];\n var thicknessl = [3,3,1,2,2,2,4,4,4,1,1,1,1,1,1,1,1,1,1,];\n for (var graphi=0; graphi<variablel.length; graphi++) {\n var vard = variablel[graphi];\n\n var graph1 = new AmCharts.AmGraph();\n //select axis\n graph1.valueAxis = axisl[vard.axis]; // we have to indicate which value axis should be used\n graph1.title = vard.description;\n graph1.valueField = vard.name;\n graph1.bullet = bulletl[graphi%(bulletl.length)];//\"round\";\n graph1.hideBulletsCount = 30;\n graph1.bulletBorderThickness = 1;\n graph1.lineThickness = thicknessl[graphi%(thicknessl.length)];\n //graph1.type = \"smoothedLine\";\n graph1.balloonText=\"<span style='font-size:12px;'>[[title]]: <b>[[value]]</b></span>\"\n graph1.hidden = (vard.h == \"t\");\n chart.addGraph(graph1);\n\n\n }\n \n // CURSOR\n var chartCursor = new AmCharts.ChartCursor();\n chartCursor.cursorAlpha = 0.1;\n chartCursor.fullWidth = true;\n chart.addChartCursor(chartCursor);\n\n // SCROLLBAR\n var chartScrollbar = new AmCharts.ChartScrollbar();\n chart.addChartScrollbar(chartScrollbar);\n\n // LEGEND\n //var legend = new AmCharts.AmLegend();\n //legend.marginLeft = 10;\n //legend.useGraphSettings = true;\n //chart.addLegend(legend);\n\n // WRITE\n chart.write(\"chartdiv\");\n}", "function init() {\n var scrollFlag = true;\n window.addEventListener('scroll', function(e){\n var distanceY = window.pageYOffset || document.documentElement.scrollTop,\n shrinkOn = 200,\n fadeOn = 100,\n graphOn = 2248;\n // console.log(distanceY);\n // if (distanceY > 3200 || distanceY < 1400){\n // scrollFlag = true;\n // }\n if(scrollFlag)\n {\n if (distanceY > graphOn){\n // console.log(\"creating chart\");\n var polardata = [\n {\n value: 300,\n color:\"#f44336\",\n highlight: \"#FF5A5E\",\n label: \"Red\"\n },\n {\n value: 50,\n color: \"#46BFBD\",\n highlight: \"#5AD3D1\",\n label: \"Green\"\n },\n {\n value: 100,\n color: \"#03A9F4\",\n highlight: \"#FFC870\",\n label: \"Yellow\"\n },\n {\n value: 40,\n color: \"#949FB1\",\n highlight: \"#A8B3C5\",\n label: \"Grey\"\n },\n {\n value: 120,\n color: \"#4D5360\",\n highlight: \"#616774\",\n label: \"Dark Grey\"\n }\n\n ];\n\n var radardata = {\n labels: [\"Eating\", \"Drinking\", \"Sleeping\", \"Designing\", \"Coding\", \"Cycling\", \"Running\"],\n datasets: [\n {\n label: \"My First dataset\",\n fillColor: \"rgba(229,57,53, 1)\",\n strokeColor: \"rgba(220,220,220,1)\",\n pointColor: \"rgba(220,220,220,1)\",\n pointStrokeColor: \"#fff\",\n pointHighlightFill: \"#fff\",\n pointHighlightStroke: \"rgba(220,220,220,1)\",\n data: [65, 59, 90, 81, 56, 55, 40]\n },\n {\n label: \"My Second dataset\",\n fillColor: \"#03A9F4\",\n strokeColor: \"rgba(151,187,205,1)\",\n pointColor: \"rgba(151,187,205,1)\",\n pointStrokeColor: \"#fff\",\n pointHighlightFill: \"#fff\",\n pointHighlightStroke: \"rgba(151,187,205,1)\",\n data: [28, 48, 40, 19, 96, 27, 100]\n }\n ]\n };\n var bardata = {\n labels: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\"],\n datasets: [\n {\n label: \"My First dataset\",\n fillColor: \"rgba(229,57,53, 1)\",\n strokeColor: \"rgba(220,220,220,0.8)\",\n highlightFill: \"rgba(220,220,220,0.75)\",\n highlightStroke: \"rgba(220,220,220,1)\",\n data: [65, 59, 80, 81, 56, 55, 40]\n },\n {\n label: \"My Second dataset\",\n fillColor: \"#03A9F4\",\n strokeColor: \"rgba(151,187,205,0.8)\",\n highlightFill: \"rgba(151,187,205,0.75)\",\n highlightStroke: \"rgba(151,187,205,1)\",\n data: [28, 48, 40, 19, 86, 27, 90]\n }\n ]\n };\n var linedata = {\n labels: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\"],\n datasets: [\n {\n label: \"My First dataset\",\n fillColor: \"rgba(229,57,53, 1)\",\n strokeColor: \"rgba(220,220,220,1)\",\n pointColor: \"rgba(220,220,220,1)\",\n pointStrokeColor: \"#fff\",\n pointHighlightFill: \"#fff\",\n pointHighlightStroke: \"rgba(220,220,220,1)\",\n data: [65, 59, 80, 81, 56, 55, 40]\n },\n {\n label: \"My Second dataset\",\n fillColor: \"#03A9F4\",\n strokeColor: \"rgba(151,187,205,1)\",\n pointColor: \"rgba(151,187,205,1)\",\n pointStrokeColor: \"#fff\",\n pointHighlightFill: \"#fff\",\n pointHighlightStroke: \"rgba(151,187,205,1)\",\n data: [28, 48, 40, 19, 86, 27, 90]\n }\n ]\n };\n var context = document.getElementById('skills').getContext('2d');\n var skillsChart = new Chart(context).PolarArea(polardata);\n var context2 = document.getElementById('skills2').getContext('2d');\n var skills2Chart = new Chart(context2).Line(linedata);\n var context3 = document.getElementById('skills3').getContext('2d');\n var skills3Chart = new Chart(context3).Bar(bardata);\n var context4 = document.getElementById('skills4').getContext('2d');\n var skills4Chart = new Chart(context4).Radar(radardata);\n scrollFlag=false;\n }\n }\n if (distanceY > fadeOn) {\n $(\".header\").css(\"opacity\", 1 + (.8 - distanceY/100 ));\n }\n else{\n $(\".header\").css(\"opacity\", 1);\n }\n if (distanceY > shrinkOn) {\n $(\".lifebar-container\").addClass(\"smaller\");\n $(\".xp-text\").text(\"+\" + distanceY + \" XP\");\n $(\".xp-text\").css(\"opacity\", distanceY / 1000 - .5);\n // console.log(distanceY/100);\n $(\".lifebar-container.smaller .lifebar-bar\").css(\"width\", 40+ distanceY/4);\n // Get the context of the canvas element we want to select\n\n\n } else {\n if ($(\".lifebar-container\").hasClass(\"smaller\")) {\n $(\".lifebar-container\").removeClass(\"smaller\");\n }\n }\n\n });\n}", "function chartHeatMapRadial () {\n\n /* Default Properties */\n var svg = void 0;\n var chart = void 0;\n var classed = \"heatMapRadial\";\n var width = 400;\n var height = 300;\n var margin = { top: 20, right: 20, bottom: 20, left: 20 };\n var transition = { ease: d3.easeBounce, duration: 500 };\n var colors = [\"#D34152\", \"#f4bc71\", \"#FBF6C4\", \"#9bcf95\", \"#398abb\"];\n var dispatch = d3.dispatch(\"customValueMouseOver\", \"customValueMouseOut\", \"customValueClick\", \"customSeriesMouseOver\", \"customSeriesMouseOut\", \"customSeriesClick\");\n\n /* Chart Dimensions */\n var chartW = void 0;\n var chartH = void 0;\n var radius = void 0;\n var innerRadius = void 0;\n\n /* Scales */\n var xScale = void 0;\n var yScale = void 0;\n var colorScale = void 0;\n\n /* Other Customisation Options */\n var startAngle = 0;\n var endAngle = 270;\n var thresholds = void 0;\n\n /**\n * Initialise Data and Scales\n *\n * @private\n * @param {Array} data - Chart data.\n */\n function init(data) {\n chartW = width - (margin.left + margin.right);\n chartH = height - (margin.top + margin.bottom);\n\n var _dataTransform$summar = dataTransform(data).summary(),\n rowKeys = _dataTransform$summar.rowKeys,\n columnKeys = _dataTransform$summar.columnKeys,\n tmpThresholds = _dataTransform$summar.thresholds;\n\n if (typeof thresholds === \"undefined\") {\n thresholds = tmpThresholds;\n }\n\n if (typeof radius === \"undefined\") {\n radius = Math.min(chartW, chartH) / 2;\n }\n\n if (typeof innerRadius === \"undefined\") {\n innerRadius = radius / 4;\n }\n\n if (typeof colorScale === \"undefined\") {\n colorScale = d3.scaleThreshold().domain(thresholds).range(colors);\n }\n\n xScale = d3.scaleBand().domain(columnKeys).rangeRound([startAngle, endAngle]).padding(0.1);\n\n yScale = d3.scaleBand().domain(rowKeys).rangeRound([radius, innerRadius]).padding(0.1);\n }\n\n /**\n * Constructor\n *\n * @constructor\n * @alias heatMapRadial\n * @param {d3.selection} selection - The chart holder D3 selection.\n */\n function my(selection) {\n // Create SVG element (if it does not exist already)\n if (!svg) {\n svg = function (selection) {\n var el = selection._groups[0][0];\n if (!!el.ownerSVGElement || el.tagName === \"svg\") {\n return selection;\n } else {\n return selection.append(\"svg\");\n }\n }(selection);\n\n svg.classed(\"d3ez\", true).attr(\"width\", width).attr(\"height\", height);\n\n chart = svg.append(\"g\").classed(\"chart\", true);\n } else {\n chart = selection.select(\".chart\");\n }\n\n // Update the chart dimensions and add layer groups\n var layers = [\"heatRingsGroups\", \"circularSectorLabels\", \"circularRingLabels\"];\n chart.classed(classed, true).attr(\"transform\", \"translate(\" + width / 2 + \",\" + height / 2 + \")\").attr(\"width\", chartW).attr(\"height\", chartH).selectAll(\"g\").data(layers).enter().append(\"g\").attr(\"class\", function (d) {\n return d;\n });\n\n selection.each(function (data) {\n // Initialise Data\n init(data);\n\n // Heat Map Rings\n var heatMapRing = component.heatMapRing().radius(function (d) {\n return yScale(d.key);\n }).innerRadius(function (d) {\n return yScale(d.key) + yScale.bandwidth();\n }).startAngle(startAngle).endAngle(endAngle).colorScale(colorScale).xScale(xScale).yScale(yScale).dispatch(dispatch).thresholds(thresholds);\n\n // Create Series Group\n var seriesGroup = chart.select(\".heatRingsGroups\").selectAll(\".seriesGroup\").data(data);\n\n seriesGroup.enter().append(\"g\").attr(\"class\", \"seriesGroup\").merge(seriesGroup).call(heatMapRing);\n\n seriesGroup.exit().remove();\n\n // Circular Labels\n var circularSectorLabels = component.circularSectorLabels().radius(radius * 1.04).radialScale(xScale).textAnchor(\"start\");\n\n chart.select(\".circularSectorLabels\").call(circularSectorLabels);\n\n // Ring Labels\n var circularRingLabels = component.circularRingLabels().radialScale(yScale).textAnchor(\"middle\");\n\n chart.select(\".circularRingLabels\").call(circularRingLabels);\n });\n }\n\n /**\n * Width Getter / Setter\n *\n * @param {number} _v - Width in px.\n * @returns {*}\n */\n my.width = function (_v) {\n if (!arguments.length) return width;\n width = _v;\n return this;\n };\n\n /**\n * Height Getter / Setter\n *\n * @param {number} _v - Height in px.\n * @returns {*}\n */\n my.height = function (_v) {\n if (!arguments.length) return height;\n height = _v;\n return this;\n };\n\n /**\n * Margin Getter / Setter\n *\n * @param {number} _v - Margin in px.\n * @returns {*}\n */\n my.margin = function (_v) {\n if (!arguments.length) return margin;\n margin = _v;\n return this;\n };\n\n /**\n * Radius Getter / Setter\n *\n * @param {number} _v - Radius in px.\n * @returns {*}\n */\n my.radius = function (_v) {\n if (!arguments.length) return radius;\n radius = _v;\n return this;\n };\n\n /**\n * Inner Radius Getter / Setter\n *\n * @param {number} _v - Inner radius in px.\n * @returns {*}\n */\n my.innerRadius = function (_v) {\n if (!arguments.length) return innerRadius;\n innerRadius = _v;\n return this;\n };\n\n /**\n * Colors Getter / Setter\n *\n * @param {Array} _v - Array of colours used by color scale.\n * @returns {*}\n */\n my.colors = function (_v) {\n if (!arguments.length) return colors;\n colors = _v;\n return this;\n };\n\n /**\n * Color Scale Getter / Setter\n *\n * @param {d3.scale} _v - D3 color scale.\n * @returns {*}\n */\n my.colorScale = function (_v) {\n if (!arguments.length) return colorScale;\n colorScale = _v;\n return this;\n };\n\n /**\n * Thresholds Getter / Setter\n *\n * @param {Array} _v - Array of thresholds.\n * @returns {*}\n */\n my.thresholds = function (_v) {\n if (!arguments.length) return thresholds;\n thresholds = _v;\n return my;\n };\n\n /**\n * Transition Getter / Setter\n *\n * @param {d3.transition} _v - D3 transition style.\n * @returns {*}\n */\n my.transition = function (_v) {\n if (!arguments.length) return transition;\n transition = _v;\n return this;\n };\n\n /**\n * Dispatch Getter / Setter\n *\n * @param {d3.dispatch} _v - Dispatch event handler.\n * @returns {*}\n */\n my.dispatch = function (_v) {\n if (!arguments.length) return dispatch();\n dispatch = _v;\n return this;\n };\n\n /**\n * Dispatch On Getter\n *\n * @returns {*}\n */\n my.on = function () {\n var value = dispatch.on.apply(dispatch, arguments);\n return value === dispatch ? my : value;\n };\n\n return my;\n }", "_convertData() {\n this._initEmptySeries();\n\n const graphType = this.parentElement.getAttribute('chart-type');\n const dataFields = this.dataField.replace(/ /g, '').split(',');\n\n switch (graphType) {\n case 'donut':\n case 'radialBar':\n case 'polarArea':\n case 'pie':\n this.repeater.repeats.forEach(row => {\n if (this.categoryField && this._pathGet(row, this.categoryField)) {\n this.categories.push(this._pathGet(row, this.categoryField)._value);\n } else {\n this.categories.push('');\n }\n if (this._pathGet(row, dataFields[0])) {\n this.dataSeries.data.push(this._pathGet(row, dataFields[0])._value);\n } else {\n this.dataSeries.data.push(null);\n }\n });\n break;\n case 'bubble':\n /**\n * bubble series expects following format:\n * series = [{\n * data: [\n * [3, 3, 3],\n * [4, 4, 4],\n * [1, 1, 1],\n * ],\n * }];\n *\n */\n\n this.repeater.repeats.forEach(row => {\n const v = [];\n\n // build multidimensional data\n if (dataFields.length === 3) {\n v.y = [];\n dataFields.forEach(field => {\n if (this._pathGet(row, field)) {\n v.push(this._pathGet(row, field)._value);\n } else {\n v.push(null);\n }\n });\n } else {\n // eslint-disable-next-line no-console\n console.warn('You must give exact 3 fields for bubble charts');\n }\n\n this.dataSeries.data.push(v);\n });\n\n break;\n case 'line':\n default:\n this.repeater.repeats.forEach(row => {\n const v = { x: '', y: null };\n if (this.categoryField && this._pathGet(row, this.categoryField)) {\n const fieldNode = this._pathGet(row, this.categoryField);\n if (fieldNode._spec.type === 'google.type.Date') {\n const date = new Date(\n Date.UTC(\n fieldNode.year._value,\n fieldNode.month._value - 1,\n fieldNode.day._value,\n 0,\n 0,\n 0,\n 0,\n ),\n );\n v.x = date.getTime();\n } else {\n v.x = fieldNode._value;\n }\n }\n if (dataFields.length === 1) {\n if (this._pathGet(row, dataFields[0])) {\n const fieldNode = this._pathGet(row, this.dataField);\n if (fieldNode._spec.type === 'google.type.Date') {\n const date = new Date(\n Date.UTC(\n fieldNode.year._value,\n fieldNode.month._value - 1,\n fieldNode.day._value,\n 0,\n 0,\n 0,\n 0,\n ),\n );\n v.y = date.getTime();\n } else {\n v.y = fieldNode._value;\n }\n } else {\n v.y = null;\n }\n }\n // build multidimensional data\n if (dataFields.length > 1) {\n v.y = [];\n dataFields.forEach(field => {\n if (this._pathGet(row, field)) {\n const fieldNode = this._pathGet(row, field);\n\n if (fieldNode._spec.type === 'google.type.Date') {\n const date = new Date(\n Date.UTC(\n fieldNode.year._value,\n fieldNode.month._value - 1,\n fieldNode.day._value,\n 0,\n 0,\n 0,\n 0,\n ),\n );\n v.y.push(date.getTime());\n } else {\n v.y.push(fieldNode._value);\n }\n } else {\n v.y.push(null);\n }\n });\n }\n\n this.dataSeries.data.push(v);\n });\n }\n /**\n * @event data-updated\n * Fired when datasource has updated data\n * detail payload: data-series\n */\n const customEvent = new Event('data-updated', { composed: true, bubbles: true });\n customEvent.detail = this;\n this.dispatchEvent(customEvent);\n }", "function createChart(options){var data=Chartist.normalizeData(this.data);var seriesGroups=[],labelsGroup,chartRect,radius,labelRadius,totalDataSum,startAngle=options.startAngle;// Create SVG.js draw\nthis.svg=Chartist.createSvg(this.container,options.width,options.height,options.donut?options.classNames.chartDonut:options.classNames.chartPie);// Calculate charting rect\nchartRect=Chartist.createChartRect(this.svg,options,defaultOptions.padding);// Get biggest circle radius possible within chartRect\nradius=Math.min(chartRect.width()/2,chartRect.height()/2);// Calculate total of all series to get reference value or use total reference from optional options\ntotalDataSum=options.total||data.normalized.series.reduce(function(previousValue,currentValue){return previousValue+currentValue;},0);var donutWidth=Chartist.quantity(options.donutWidth);if(donutWidth.unit==='%'){donutWidth.value*=radius/100;}// If this is a donut chart we need to adjust our radius to enable strokes to be drawn inside\n// Unfortunately this is not possible with the current SVG Spec\n// See this proposal for more details: http://lists.w3.org/Archives/Public/www-svg/2003Oct/0000.html\nradius-=options.donut&&!options.donutSolid?donutWidth.value/2:0;// If labelPosition is set to `outside` or a donut chart is drawn then the label position is at the radius,\n// if regular pie chart it's half of the radius\nif(options.labelPosition==='outside'||options.donut&&!options.donutSolid){labelRadius=radius;}else if(options.labelPosition==='center'){// If labelPosition is center we start with 0 and will later wait for the labelOffset\nlabelRadius=0;}else if(options.donutSolid){labelRadius=radius-donutWidth.value/2;}else {// Default option is 'inside' where we use half the radius so the label will be placed in the center of the pie\n// slice\nlabelRadius=radius/2;}// Add the offset to the labelRadius where a negative offset means closed to the center of the chart\nlabelRadius+=options.labelOffset;// Calculate end angle based on total sum and current data value and offset with padding\nvar center={x:chartRect.x1+chartRect.width()/2,y:chartRect.y2+chartRect.height()/2};// Check if there is only one non-zero value in the series array.\nvar hasSingleValInSeries=data.raw.series.filter(function(val){return val.hasOwnProperty('value')?val.value!==0:val!==0;}).length===1;// Creating the series groups\ndata.raw.series.forEach(function(series,index){seriesGroups[index]=this.svg.elem('g',null,null);}.bind(this));//if we need to show labels we create the label group now\nif(options.showLabel){labelsGroup=this.svg.elem('g',null,null);}// Draw the series\n// initialize series groups\ndata.raw.series.forEach(function(series,index){// If current value is zero and we are ignoring empty values then skip to next value\nif(data.normalized.series[index]===0&&options.ignoreEmptyValues)return;// If the series is an object and contains a name or meta data we add a custom attribute\nseriesGroups[index].attr({'ct:series-name':series.name});// Use series class from series data or if not set generate one\nseriesGroups[index].addClass([options.classNames.series,series.className||options.classNames.series+'-'+Chartist.alphaNumerate(index)].join(' '));// If the whole dataset is 0 endAngle should be zero. Can't divide by 0.\nvar endAngle=totalDataSum>0?startAngle+data.normalized.series[index]/totalDataSum*360:0;// Use slight offset so there are no transparent hairline issues\nvar overlappigStartAngle=Math.max(0,startAngle-(index===0||hasSingleValInSeries?0:0.2));// If we need to draw the arc for all 360 degrees we need to add a hack where we close the circle\n// with Z and use 359.99 degrees\nif(endAngle-overlappigStartAngle>=359.99){endAngle=overlappigStartAngle+359.99;}var start=Chartist.polarToCartesian(center.x,center.y,radius,overlappigStartAngle),end=Chartist.polarToCartesian(center.x,center.y,radius,endAngle);var innerStart,innerEnd,donutSolidRadius;// Create a new path element for the pie chart. If this isn't a donut chart we should close the path for a correct stroke\nvar path=new Chartist.Svg.Path(!options.donut||options.donutSolid).move(end.x,end.y).arc(radius,radius,0,endAngle-startAngle>180,0,start.x,start.y);// If regular pie chart (no donut) we add a line to the center of the circle for completing the pie\nif(!options.donut){path.line(center.x,center.y);}else if(options.donutSolid){donutSolidRadius=radius-donutWidth.value;innerStart=Chartist.polarToCartesian(center.x,center.y,donutSolidRadius,startAngle-(index===0||hasSingleValInSeries?0:0.2));innerEnd=Chartist.polarToCartesian(center.x,center.y,donutSolidRadius,endAngle);path.line(innerStart.x,innerStart.y);path.arc(donutSolidRadius,donutSolidRadius,0,endAngle-startAngle>180,1,innerEnd.x,innerEnd.y);}// Create the SVG path\n// If this is a donut chart we add the donut class, otherwise just a regular slice\nvar pathClassName=options.classNames.slicePie;if(options.donut){pathClassName=options.classNames.sliceDonut;if(options.donutSolid){pathClassName=options.classNames.sliceDonutSolid;}}var pathElement=seriesGroups[index].elem('path',{d:path.stringify()},pathClassName);// Adding the pie series value to the path\npathElement.attr({'ct:value':data.normalized.series[index],'ct:meta':Chartist.serialize(series.meta)});// If this is a donut, we add the stroke-width as style attribute\nif(options.donut&&!options.donutSolid){pathElement._node.style.strokeWidth=donutWidth.value+'px';}// Fire off draw event\nthis.eventEmitter.emit('draw',{type:'slice',value:data.normalized.series[index],totalDataSum:totalDataSum,index:index,meta:series.meta,series:series,group:seriesGroups[index],element:pathElement,path:path.clone(),center:center,radius:radius,startAngle:startAngle,endAngle:endAngle});// If we need to show labels we need to add the label for this slice now\nif(options.showLabel){var labelPosition;if(data.raw.series.length===1){// If we have only 1 series, we can position the label in the center of the pie\nlabelPosition={x:center.x,y:center.y};}else {// Position at the labelRadius distance from center and between start and end angle\nlabelPosition=Chartist.polarToCartesian(center.x,center.y,labelRadius,startAngle+(endAngle-startAngle)/2);}var rawValue;if(data.normalized.labels&&!Chartist.isFalseyButZero(data.normalized.labels[index])){rawValue=data.normalized.labels[index];}else {rawValue=data.normalized.series[index];}var interpolatedValue=options.labelInterpolationFnc(rawValue,index);if(interpolatedValue||interpolatedValue===0){var labelElement=labelsGroup.elem('text',{dx:labelPosition.x,dy:labelPosition.y,'text-anchor':determineAnchorPosition(center,labelPosition,options.labelDirection)},options.classNames.label).text(''+interpolatedValue);// Fire off draw event\nthis.eventEmitter.emit('draw',{type:'label',index:index,group:labelsGroup,element:labelElement,text:''+interpolatedValue,x:labelPosition.x,y:labelPosition.y});}}// Set next startAngle to current endAngle.\n// (except for last slice)\nstartAngle=endAngle;}.bind(this));this.eventEmitter.emit('created',{chartRect:chartRect,svg:this.svg,options:options});}", "function plotRadars(sense) {\n d3.selectAll(\".radarStroke\")\n .attr(\"d\", function(d) {\n return radarLine(extractAvgs(d, sense));\n })\n // .style(\"stroke\", cfg.radarColor[showOrHide][sense])\n .style(\"stroke\", function(d) {\n return vizStatus[d.hop] ? d3.select(this).style(\"stroke\") : cfg.radarColor[showOrHide][sense]\n })\n}", "componentDidMount() {\n this.initializeChart({\n // Invokes initializeChart which creates new chart using these options:\n //\n data: this.data,\n options: {\n title: {\n display: true,\n text: 'Acceleration Data',\n fontSize: 25\n },\n legend: {\n labels: {\n fontSize: 16\n },\n position: 'bottom'\n },\n scales: {\n xAxes: [\n {\n scaleLabel: {\n display: true,\n labelString: 'Time (milliseconds)',\n fontSize: 20\n },\n ticks: {\n beginAtZero: true,\n fontSize: 20\n }\n }\n ],\n yAxes: [\n {\n type: 'linear',\n scaleLabel: {\n display: true,\n labelString: 'Acceleration (gravity)',\n fontSize: 20\n },\n ticks: {\n beginAtZero: true,\n fontSize: 20\n }\n }\n ]\n }\n },\n responsive: true,\n maintainAspectRatio: false,\n type: 'line',\n legend: {display: false},\n tooltips: {\n enabled: false\n }\n })\n }", "function changeSingleChart_drone(data, thresholdTrendlinePercentage, thresholdRangePercentage, trendline) {\n\n /**\n * Method to get the count of the current sensor\n * @param sensor\n * @returns {number}\n */\n function getSensorCount_drone(sensor) {\n var count = 0;\n switch(sensor) {\n case \"battery\":\n count = 0;\n break;\n case \"barometer\":\n count = 1;\n break;\n case \"gps\":\n count = 2;\n break;\n case \"photo\":\n count = 3;\n break;\n case \"video\":\n count = 4;\n break;\n }\n return count;\n }\n\n /**\n * Method to calculate the speed of the drone for each point\n * @param timestamp\n * @param coordinates\n * @returns {*[]}\n */\n function getSpeedArray(timestamp, coordinates) {\n var values = [];\n var speed = 0;\n var lastJ = 0;\n for(var i = 0; i < coordinates.length; i++) {\n if(i === 0) {\n values.push(speed.toFixed(5));\n } else {\n var latitudeA = coordinates[i].split(\",\")[0];\n var longitudeA = coordinates[i].split(\",\")[1];\n var timestampA = timestamp[i].split(\" \");\n var timeA = new Date(timestampA[0].split(\"-\")[0], timestampA[0].split(\"-\")[1], timestampA[0].split(\"-\")[2], timestampA[1].split(\":\")[0], timestampA[1].split(\":\")[1], timestampA[1].split(\":\")[2]).getTime();\n\n var latitudeB = coordinates[i].split(\",\")[0];\n var longitudeB = coordinates[i].split(\",\")[1];\n var timestampB = timestamp[i].split(\" \");\n var timeB = new Date(timestampB[0].split(\"-\")[0], timestampB[0].split(\"-\")[1], timestampB[0].split(\"-\")[2], timestampB[1].split(\":\")[0], timestampB[1].split(\":\")[1], timestampB[1].split(\":\")[2]).getTime();\n if(timeA === timeB) {\n for (var j = i+1; j < coordinates.length; j++) {\n timestampB = timestamp[j].split(\" \");\n timeB = new Date(timestampB[0].split(\"-\")[0], timestampB[0].split(\"-\")[1], timestampB[0].split(\"-\")[2], timestampB[1].split(\":\")[0], timestampB[1].split(\":\")[1], timestampB[1].split(\":\")[2]).getTime();\n if (timeA === timeB) {\n values.push(speed.toFixed(5));\n } else {\n lastJ = j;\n latitudeB = coordinates[j].split(\",\")[0];\n longitudeB = coordinates[j].split(\",\")[1];\n speed = calculateSpeed(timeA, latitudeA, longitudeA, timeB, latitudeB, longitudeB);\n values.push(speed.toFixed(5));\n i = lastJ + 1;\n break;\n }\n }\n } else {\n speed = calculateSpeed(timeA, latitudeA, longitudeA, timeB, latitudeB, longitudeB).toFixed(2);\n values.push(speed.toFixed(5));\n }\n }\n }\n for (var i = values.length; i < coordinates.length; i++) {\n values.push(speed.toFixed(5));\n }\n return values;\n }\n\n /**\n * Method to calculate the coordinates of the gps for each point\n * @param data\n * @returns {*[]}\n */\n function getCoordinates(data) {\n var values = [];\n $.each(data.results, function(index, row) {\n $.each(row, function(index, item) {\n if (index.match(\"gps_coordinates\")) {\n values.push(item);\n }\n });\n });\n return values;\n }\n\n\n var count = 0;\n var sensors = [\"battery\", \"barometer\", \"gps\", \"photo\", \"video\"];\n var lineLabels = [\"Voltage\", \"Altitude\", \"# Satellites\", \"Photo\", \"Video\"];\n\n count = getSensorCount_drone($(\"#sensor-name\").text());\n\n var trendlineData = [];\n switch(trendline) {\n case 'linear':\n var dataForTrendline = changeIndexValues(getSensorMeasurementValues_drone(sensors[count], data));\n trendlineData = getLinearTrendline(dataForTrendline);\n break;\n case 'frequent':\n trendlineData = getStaticMostFrequentValueTrendline(getSensorMeasurementValues_drone(sensors[count], data));\n break;\n case 'avg':\n trendlineData = getStaticAverageValueTrendline(getSensorMeasurementValues_drone(sensors[count], data));\n break;\n case 'min':\n trendlineData = getStaticMinValueTrendline(getSensorMeasurementValues_drone(sensors[count], data));\n break;\n case 'max':\n trendlineData = getStaticMaxValueTrendline(getSensorMeasurementValues_drone(sensors[count], data));\n break;\n case 'trendzone':\n let interval = parseInt($(\"#timestamp-trendzone\").val());\n trendlineData = [];\n let dataForBaseline = changeIndexValues(getSensorMeasurementValues_drone(sensors[count], data));\n for(let i = 0; i < dataForBaseline.length; i += interval) {\n let currentDataSplitted = dataForBaseline.slice(i, Math.min(i+interval-1, dataForBaseline.length));\n trendlineData = trendlineData.concat(getLinearTrendline(currentDataSplitted));\n }\n break;\n }\n\n // Carico subito il sensore battery\n genereteSingleChart(lineLabels[count], getSensorMeasurementLabels(data), getSensorMeasurementValues_drone(sensors[count], data), trendlineData, thresholdTrendlinePercentage, thresholdRangePercentage);\n\n var arrayBattery = getSensorMeasurementValues_drone(\"battery\", data);\n var arrayBarometer = etSensorMeasurementValues_drone(\"barometer\", data);\n var arrayGPS = getSensorMeasurementValues_drone(\"gps\", data);\n\n var arrayCoordinates = getCoordinates(data);\n var arraySpeed = getSpeedArray(getSensorMeasurementLabels(data), arrayCoordinates);\n\n generateMultipleChart_drone(getSensorMeasurementLabels(data), arrayBattery, arrayBarometer, arrayGPS, arraySpeed);\n\n\n $('.btn-forward').off().on('click', function() {\n count = getSensorCount_drone($(\"#sensor-name\").text());\n count++;\n\n if (count >= sensors.length) {\n count = 0;\n }\n var sensor = sensors[count];\n var lineLabel = lineLabels[count];\n\n var thresholdTrendlinePercentage = $(\"#threshold\").val();\n var thresholdRangePercentage = $(\"#threshold-range\").val();\n\n var trendline = $(\"#select-trendline\").val();\n var trendlineData = [];\n switch(trendline) {\n case 'linear':\n var dataForTrendline = changeIndexValues(getSensorMeasurementValues_drone(sensors[count], data));\n trendlineData = getLinearTrendline(dataForTrendline);\n break;\n case 'frequent':\n trendlineData = getStaticMostFrequentValueTrendline(getSensorMeasurementValues_drone(sensors[count], data));\n break;\n case 'avg':\n trendlineData = getStaticAverageValueTrendline(getSensorMeasurementValues_drone(sensors[count], data));\n break;\n case 'min':\n trendlineData = getStaticMinValueTrendline(getSensorMeasurementValues_drone(sensors[count], data));\n break;\n case 'max':\n trendlineData = getStaticMaxValueTrendline(getSensorMeasurementValues_drone(sensors[count], data));\n break;\n case 'trendzone':\n let interval = parseInt($(\"#timestamp-trendzone\").val());\n trendlineData = [];\n let dataForBaseline = changeIndexValues(getSensorMeasurementValues_drone(sensors[count], data));\n for(let i = 0; i < dataForBaseline.length; i += interval) {\n let currentDataSplitted = dataForBaseline.slice(i, Math.min(i+interval-1, dataForBaseline.length));\n trendlineData = trendlineData.concat(getLinearTrendline(currentDataSplitted));\n }\n break;\n }\n\n $(\"#sensor-name\").val(sensor);\n $(\"#sensor-name\").text(sensor);\n genereteSingleChart(lineLabel, getSensorMeasurementLabels(data), getSensorMeasurementValues_drone(sensor, data), trendlineData, thresholdTrendlinePercentage, thresholdRangePercentage);\n\n var arrayBattery = getSensorMeasurementValues_drone(\"battery\", data);\n var arrayBarometer = etSensorMeasurementValues_drone(\"barometer\", data);\n var arrayGPS = getSensorMeasurementValues_drone(\"gps\", data);\n\n var arrayCoordinates = getCoordinates(data);\n var arraySpeed = getSpeedArray(getSensorMeasurementLabels(data), arrayCoordinates);\n\n generateMultipleChart_drone(getSensorMeasurementLabels(data), arrayBattery, arrayBarometer, arrayGPS, arraySpeed);\n\n });\n\n $('.btn-back').off().on('click', function() {\n\n count = getSensorCount_drone($(\"#sensor-name\").text());\n count--;\n\n if (count < 0) {\n count = sensors.length-1;\n }\n var sensor = sensors[count];\n var lineLabel = lineLabels[count];\n\n var thresholdTrendlinePercentage = $(\"#threshold\").val();\n var thresholdRangePercentage = $(\"#threshold-range\").val();\n\n var trendline = $(\"#select-trendline\").val();\n var trendlineData = [];\n switch(trendline) {\n case 'linear':\n var dataForTrendline = changeIndexValues(getSensorMeasurementValues_drone(sensors[count], data));\n trendlineData = getLinearTrendline(dataForTrendline);\n break;\n case 'frequent':\n trendlineData = getStaticMostFrequentValueTrendline(getSensorMeasurementValues_drone(sensors[count], data));\n break;\n case 'avg':\n trendlineData = getStaticAverageValueTrendline(getSensorMeasurementValues_drone(sensors[count], data));\n break;\n case 'min':\n trendlineData = getStaticMinValueTrendline(getSensorMeasurementValues_drone(sensors[count], data));\n break;\n case 'max':\n trendlineData = getStaticMaxValueTrendline(getSensorMeasurementValues_drone(sensors[count], data));\n break;\n case 'trendzone':\n let interval = parseInt($(\"#timestamp-trendzone\").val());\n trendlineData = [];\n let dataForBaseline = changeIndexValues(getSensorMeasurementValues_drone(sensors[count], data));\n for(let i = 0; i < dataForBaseline.length; i += interval) {\n let currentDataSplitted = dataForBaseline.slice(i, Math.min(i+interval-1, dataForBaseline.length));\n trendlineData = trendlineData.concat(getLinearTrendline(currentDataSplitted));\n }\n break;\n }\n\n $(\"#sensor-name\").val(sensor);\n $(\"#sensor-name\").text(sensor);\n genereteSingleChart(lineLabel, getSensorMeasurementLabels(data), getSensorMeasurementValues_drone(sensor, data), trendlineData, thresholdTrendlinePercentage, thresholdRangePercentage);\n\n var arrayBattery = getSensorMeasurementValues_drone(\"battery\", data);\n var arrayBarometer = etSensorMeasurementValues_drone(\"barometer\", data);\n var arrayGPS = getSensorMeasurementValues_drone(\"gps\", data);\n\n var arrayCoordinates = getCoordinates(data);\n var arraySpeed = getSpeedArray(getSensorMeasurementLabels(data), arrayCoordinates);\n\n generateMultipleChart_drone(getSensorMeasurementLabels(data), arrayBattery, arrayBarometer, arrayGPS, arraySpeed);\n\n });\n }", "function componentRoseChartSector () {\n\n /* Default Properties */\n var width = 300;\n var height = 300;\n var transition = { ease: d3.easeBounce, duration: 500 };\n var radius = void 0;\n var startAngle = 0;\n var endAngle = 45;\n var colors = palette.categorical(3);\n var colorScale = void 0;\n var xScale = void 0;\n var yScale = void 0;\n var stacked = false;\n var dispatch = d3.dispatch(\"customValueMouseOver\", \"customValueMouseOut\", \"customValueClick\", \"customSeriesMouseOver\", \"customSeriesMouseOut\", \"customSeriesClick\");\n var classed = \"roseChartSector\";\n\n /**\n * Initialise Data and Scales\n *\n * @private\n * @param {Array} data - Chart data.\n */\n function init(data) {\n var _dataTransform$summar = dataTransform(data).summary(),\n columnKeys = _dataTransform$summar.columnKeys,\n valueMax = _dataTransform$summar.valueMax,\n rowTotalsMax = _dataTransform$summar.rowTotalsMax;\n\n var max = stacked ? rowTotalsMax : valueMax;\n var valueExtent = [0, max];\n\n if (typeof radius === \"undefined\") {\n radius = Math.min(width, height) / 2;\n }\n\n if (typeof colorScale === \"undefined\") {\n colorScale = d3.scaleOrdinal().domain(columnKeys).range(colors);\n }\n\n if (typeof xScale !== \"undefined\") {\n startAngle = xScale(data.key);\n endAngle = xScale(data.key) + xScale.bandwidth();\n }\n\n if (typeof yScale === \"undefined\") {\n yScale = d3.scaleLinear().domain(valueExtent).range([0, radius]);\n }\n }\n\n /**\n * Constructor\n *\n * @constructor\n * @alias roseChartSector\n * @param {d3.selection} selection - The chart holder D3 selection.\n */\n function my(selection) {\n init(selection.data());\n selection.each(function () {\n // Stack Generator\n var stacker = function stacker(data) {\n // Calculate inner and outer radius values\n var series = [];\n var innerRadius = 0;\n var outerRadius = 0;\n data.forEach(function (d, i) {\n outerRadius = innerRadius + d.value;\n series[i] = {\n key: d.key,\n value: d.value,\n innerRadius: yScale(innerRadius),\n outerRadius: yScale(outerRadius)\n };\n innerRadius += stacked ? d.value : 0;\n });\n\n return series;\n };\n\n // Arc Generator\n var arc = d3.arc().innerRadius(function (d) {\n return d.innerRadius;\n }).outerRadius(function (d) {\n return d.outerRadius;\n }).startAngle(startAngle * (Math.PI / 180)).endAngle(endAngle * (Math.PI / 180));\n\n // Update series group\n var seriesGroup = d3.select(this);\n seriesGroup.classed(classed, true).attr(\"id\", function (d) {\n return d.key;\n }).on(\"mouseover\", function (d) {\n dispatch.call(\"customSeriesMouseOver\", this, d);\n }).on(\"click\", function (d) {\n dispatch.call(\"customSeriesClick\", this, d);\n });\n\n // Add arcs to series group\n var arcs = seriesGroup.selectAll(\".arc\").data(function (d) {\n return stacker(d.values);\n });\n\n arcs.enter().append(\"path\").classed(\"arc\", true).attr(\"fill\", function (d) {\n return colorScale(d.key);\n }).on(\"mouseover\", function (d) {\n dispatch.call(\"customValueMouseOver\", this, d);\n }).on(\"click\", function (d) {\n dispatch.call(\"customValueClick\", this, d);\n }).merge(arcs).transition().ease(transition.ease).duration(transition.duration).attr(\"d\", arc);\n\n arcs.exit().transition().style(\"opacity\", 0).remove();\n });\n }\n\n /**\n * Width Getter / Setter\n *\n * @param {number} _v - Width in px.\n * @returns {*}\n */\n my.width = function (_v) {\n if (!arguments.length) return width;\n width = _v;\n return this;\n };\n\n /**\n * Height Getter / Setter\n *\n * @param {number} _v - Height in px.\n * @returns {*}\n */\n my.height = function (_v) {\n if (!arguments.length) return height;\n height = _v;\n return this;\n };\n\n /**\n * Radius Getter / Setter\n *\n * @param {number} _v - Radius in px.\n * @returns {*}\n */\n my.radius = function (_v) {\n if (!arguments.length) return radius;\n radius = _v;\n return this;\n };\n\n /**\n * Start Angle Getter / Setter\n *\n * @param {number} _v - Angle in degrees.\n * @returns {*}\n */\n my.startAngle = function (_v) {\n if (!arguments.length) return startAngle;\n startAngle = _v;\n return this;\n };\n\n /**\n * End Angle Getter / Setter\n *\n * @param {number} _v - Angle in degrees.\n * @returns {*}\n */\n my.endAngle = function (_v) {\n if (!arguments.length) return endAngle;\n endAngle = _v;\n return this;\n };\n\n /**\n * Color Scale Getter / Setter\n *\n * @param {d3.scale} _v - D3 color scale.\n * @returns {*}\n */\n my.colorScale = function (_v) {\n if (!arguments.length) return colorScale;\n colorScale = _v;\n return my;\n };\n\n /**\n * Colors Getter / Setter\n *\n * @param {Array} _v - Array of colours used by color scale.\n * @returns {*}\n */\n my.colors = function (_v) {\n if (!arguments.length) return colors;\n colors = _v;\n return my;\n };\n\n /**\n * X Scale Getter / Setter\n *\n * @param {d3.scale} _v - D3 scale.\n * @returns {*}\n */\n my.xScale = function (_v) {\n if (!arguments.length) return xScale;\n xScale = _v;\n return my;\n };\n\n /**\n * Y Scale Getter / Setter\n *\n * @param {d3.scale} _v - D3 scale.\n * @returns {*}\n */\n my.yScale = function (_v) {\n if (!arguments.length) return yScale;\n yScale = _v;\n return my;\n };\n\n /**\n * Stacked Getter / Setter\n *\n * @param {boolean} _v - Stacked bars or grouped?\n * @returns {*}\n */\n my.stacked = function (_v) {\n if (!arguments.length) return stacked;\n stacked = _v;\n return my;\n };\n\n /**\n * Dispatch Getter / Setter\n *\n * @param {d3.dispatch} _v - Dispatch event handler.\n * @returns {*}\n */\n my.dispatch = function (_v) {\n if (!arguments.length) return dispatch();\n dispatch = _v;\n return this;\n };\n\n /**\n * Dispatch On Getter\n *\n * @returns {*}\n */\n my.on = function () {\n var value = dispatch.on.apply(dispatch, arguments);\n return value === dispatch ? my : value;\n };\n\n return my;\n }", "function createLevel3Chart() {\n changeLegendNames();\n $(\"#divlevel3chart\").kendoChart({\n\n dataSource: Level3dataSource,\n dataBound: onDB,\n title: {\n text: \"Click graph for more details\",\n color: \"#C61835\"\n },\n overlay: {\n gradient: null\n },\n legend: {\n position: \"bottom\"\n },\n seriesDefaults: {\n type: \"bar\",\n stack: {\n type: \"100%\"\n }\n },\n series:\n [{\n field: \"AssignedPercent\",\n name: legendAssigned,\n color: \"#5da5da\",\n labels: {\n visible: true,\n position: \"center\",\n background: \"transparent\",\n template: function (e) {\n if (e.dataItem.AssignedPercent <= \"15\") {\n return e.dataItem.AssignedPercent.toFixed(1) + \"%\";\n }\n else { return e.dataItem.AssignedPercent.toFixed(1) + \"% (\" + e.dataItem.AssignedCount + \"/\" + e.dataItem.EPCount + \")\"; }\n\n }\n\n }\n }, {\n field: \"NotAssignedPercent\",\n name: legendNotAssigned,\n color: \"#b7b7b7\",\n labels: {\n visible: true,\n position: \"center\",\n background: \"transparent\",\n template: function (e) {\n if (e.dataItem.NotAssignedPercent <= \"15\") {\n return e.dataItem.NotAssignedPercent.toFixed(1) + \"%\";\n }\n else {\n return e.dataItem.NotAssignedPercent.toFixed(1) + \"% (\" + e.dataItem.NotAssignedCount + \"/\" + e.dataItem.EPCount + \")\";\n }\n }\n }\n }\n\n\n ],\n categoryAxis: {\n field: \"StandardLabel\",\n labels: {\n visual: function (e) {\n var layout = new kendo.drawing.Layout(e.rect, {\n justifyContent: \"center\"\n });\n var addLabel = new kendo.drawing.Text(e.dataItem.StandardLabel);\n addLabel.options.set(\"font\", \"bold 12px sans-serif\");\n layout.append(addLabel, new kendo.drawing.Text('(EP Count : ' + e.dataItem.EPCount + ')'));\n layout.reflow();\n return layout;\n }\n },\n majorGridLines: {\n visible: false\n }\n },\n valueAxis: {\n min: 0,\n line: {\n visible: false\n },\n minorGridLines: {\n visible: false\n }\n },\n tooltip: {\n visible: true,\n template: function (e) {\n var sn = e.series.name;\n\n if (sn.indexOf(\"Not Assigned\") == -1)\n return sn + \" : \" + e.dataItem.AssignedPercent.toFixed(1) + \"% (\" + e.dataItem.AssignedCount + \"/\" + e.dataItem.EPCount + \")\";\n\n else\n return sn + \" : \" + e.dataItem.NotAssignedPercent.toFixed(1) + \"% (\" + e.dataItem.NotAssignedCount + \"/\" + e.dataItem.EPCount + \")\";\n\n\n }\n },\n seriesClick: onLevel3SeriesClick\n });\n\n\n}", "_updateIndicators() {\n const _this = this;\n this.duration = this.model.time.delayAnimations;\n this.yScale = this.model.marker.axis_y.getScale();\n this.xScale = this.model.marker.axis_x.getScale();\n this.yAxis.tickFormat(_this.model.marker.axis_y.getTickFormatter());\n this.xAxis.tickFormat(_this.model.marker.axis_x.getTickFormatter());\n this.xAxisLeft.tickFormat(_this.model.marker.axis_x.getTickFormatter());\n\n const sideDim = this.SIDEDIM;\n const stackDim = this.STACKDIM;\n\n const stacks = this.model.marker.getKeys(stackDim);\n let stackKeys = [];\n stackKeys = stacks.map(m => m[stackDim]);\n this.stackKeys = stackKeys;\n\n const sideItems = this.model.marker.label_side.getItems();\n //var sideKeys = Object.keys(sideItems);\n let sideKeys = [];\n if (!utils.isEmpty(sideItems)) {\n const sideFiltered = !!this.model.marker.side.getEntity().show[sideDim];\n const sides = this.model.marker.getKeys(sideDim)\n .filter(f => !sideFiltered || this.model.marker.side.getEntity().isShown(f));\n sideKeys = sides.map(m => m[sideDim]);\n\n if (sideKeys.length > 2) sideKeys.length = 2;\n if (sideKeys.length > 1) {\n const sortFunc = this.ui.chart.flipSides ? d3.ascending : d3.descending;\n sideKeys.sort(sortFunc);\n }\n }\n if (!sideKeys.length) sideKeys.push(\"undefined\");\n this.sideKeys = sideKeys;\n\n this.twoSided = this.sideKeys.length > 1;\n this.titleRight.classed(\"vzb-hidden\", !this.twoSided);\n if (this.twoSided) {\n this.xScaleLeft = this.xScale.copy();\n this.title.text(sideItems[this.sideKeys[1]]);\n this.titleRight.text(sideItems[this.sideKeys[0]]);\n } else {\n const title = this.sideKeys.length && sideItems[this.sideKeys[0]] ? sideItems[this.sideKeys[0]] : \"\";\n this.title.text(title);\n }\n\n this.cScale = this.model.marker.color.getScale();\n }", "renderChartType(dataset){\n\n if(this.state.chartType == \"line\"){\n return(\n <Line\n data={dataset}\n\n />\n );\n }\n else if(this.state.chartType == \"bar\"){\n return(\n <Bar\n data={dataset}\n\n />\n );\n }\n else if(this.state.chartType == \"polar\"){\n return(\n <Polar\n data={dataset}\n\n />\n );\n }\n else if(this.state.chartType == \"radar\"){\n return(\n <Radar\n data={dataset}\n\n />\n );\n }\n else if(this.state.chartType == \"doughnut\"){\n return(\n <Doughnut\n data={dataset}\n\n />\n );\n }\n else if(this.state.chartType == \"scatter\"){\n return(\n <Scatter\n data={dataset}\n\n />\n );\n }\n else if(this.state.chartType == \"bubble\"){\n return(\n <Bubble\n data={dataset}\n\n />\n );\n }\n else if(this.state.chartType == \"pie\"){\n return(\n <Pie\n data={dataset}\n\n />\n );\n }\n }", "function Cherry2() {\r\n const opts = {\r\n options: {\r\n chart: {\r\n fontFamily: chartFont,\r\n zoom: {\r\n enabled: false,\r\n },\r\n },\r\n //fill: {\r\n // type: 'solid',\r\n //},\r\n title: {\r\n text: 'Japanese cherry full flowering vs CO₂ by year',\r\n align: 'left',\r\n style: titleStyle\r\n },\r\n subtitle: {\r\n text: 'Source: Osaka Prefecture University'\r\n },\r\n yaxis: {\r\n tickAmount: 7,\r\n max: res_df.cherry2.max + 3,\r\n min: res_df.cherry2.min - 3,\r\n labels: {\r\n formatter: function (val) {\r\n return round(val)\r\n }\r\n },\r\n title: {\r\n text: 'Days from the beginning of the year'\r\n }\r\n },\r\n colors: ['#e1477d', '#999'],\r\n annotations: {\r\n yaxis: [{\r\n y: 90,\r\n borderColor: '#7057c2',\r\n opacity: 0.2,\r\n label: {\r\n borderColor: '#7057c2',\r\n style: {\r\n fontSize: '10px',\r\n color: '#fff',\r\n background: '#7057c2',\r\n },\r\n text: '1st April',\r\n position: 'left',\r\n offsetX: '45%'\r\n },\r\n }, {\r\n y: 120.25,\r\n borderColor: '#7057c2',\r\n opacity: 0.2,\r\n label: {\r\n borderColor: '#7057c2',\r\n style: {\r\n fontSize: '10px',\r\n color: '#fff',\r\n background: '#7057c2',\r\n },\r\n text: '1st May',\r\n position: 'left',\r\n offsetX: '45%'\r\n }\r\n }],\r\n xaxis: [{\r\n x: 2016,\r\n x2: 2045,\r\n borderColor: '#000',\r\n fillColor: '#eee',\r\n opacity: 0.2,\r\n label: {\r\n style: {\r\n fontSize: '10px',\r\n color: '#111',\r\n background: '#eee',\r\n },\r\n text: 'Forecast',\r\n }\r\n }]\r\n },\r\n markers: {\r\n size: res_df.cherry2.markers\r\n },\r\n tooltip: {\r\n y: {\r\n formatter: function(val, opt) {\r\n return round(val) + '-th day';\r\n }\r\n }\r\n\r\n },\r\n stroke: {\r\n curve: 'smooth'\r\n },\r\n legend: {\r\n show: true\r\n },\r\n xaxis: {\r\n type: 'numeric',\r\n tickAmount: 12\r\n }\r\n },\r\n series: res_df.cherry2.series\r\n };\r\n\r\n return (\r\n <ReactApexChart options={opts.options} series={opts.series} type='line' height={500} />\r\n );\r\n}", "function calRadialBar(barSeries, api) {\n // Columns info on each category axis. Key is polar name\n var columnsMap = {};\n zrUtil.each(barSeries, function (seriesModel, idx) {\n var data = seriesModel.getData();\n var polar = seriesModel.coordinateSystem;\n var baseAxis = polar.getBaseAxis();\n var axisExtent = baseAxis.getExtent();\n var bandWidth = baseAxis.type === 'category' ? baseAxis.getBandWidth() : Math.abs(axisExtent[1] - axisExtent[0]) / data.count();\n var columnsOnAxis = columnsMap[getAxisKey(baseAxis)] || {\n bandWidth: bandWidth,\n remainedWidth: bandWidth,\n autoWidthCount: 0,\n categoryGap: '20%',\n gap: '30%',\n stacks: {}\n };\n var stacks = columnsOnAxis.stacks;\n columnsMap[getAxisKey(baseAxis)] = columnsOnAxis;\n var stackId = getSeriesStackId(seriesModel);\n\n if (!stacks[stackId]) {\n columnsOnAxis.autoWidthCount++;\n }\n\n stacks[stackId] = stacks[stackId] || {\n width: 0,\n maxWidth: 0\n };\n var barWidth = parsePercent(seriesModel.get('barWidth'), bandWidth);\n var barMaxWidth = parsePercent(seriesModel.get('barMaxWidth'), bandWidth);\n var barGap = seriesModel.get('barGap');\n var barCategoryGap = seriesModel.get('barCategoryGap');\n\n if (barWidth && !stacks[stackId].width) {\n barWidth = Math.min(columnsOnAxis.remainedWidth, barWidth);\n stacks[stackId].width = barWidth;\n columnsOnAxis.remainedWidth -= barWidth;\n }\n\n barMaxWidth && (stacks[stackId].maxWidth = barMaxWidth);\n barGap != null && (columnsOnAxis.gap = barGap);\n barCategoryGap != null && (columnsOnAxis.categoryGap = barCategoryGap);\n });\n var result = {};\n zrUtil.each(columnsMap, function (columnsOnAxis, coordSysName) {\n result[coordSysName] = {};\n var stacks = columnsOnAxis.stacks;\n var bandWidth = columnsOnAxis.bandWidth;\n var categoryGap = parsePercent(columnsOnAxis.categoryGap, bandWidth);\n var barGapPercent = parsePercent(columnsOnAxis.gap, 1);\n var remainedWidth = columnsOnAxis.remainedWidth;\n var autoWidthCount = columnsOnAxis.autoWidthCount;\n var autoWidth = (remainedWidth - categoryGap) / (autoWidthCount + (autoWidthCount - 1) * barGapPercent);\n autoWidth = Math.max(autoWidth, 0); // Find if any auto calculated bar exceeded maxBarWidth\n\n zrUtil.each(stacks, function (column, stack) {\n var maxWidth = column.maxWidth;\n\n if (maxWidth && maxWidth < autoWidth) {\n maxWidth = Math.min(maxWidth, remainedWidth);\n\n if (column.width) {\n maxWidth = Math.min(maxWidth, column.width);\n }\n\n remainedWidth -= maxWidth;\n column.width = maxWidth;\n autoWidthCount--;\n }\n }); // Recalculate width again\n\n autoWidth = (remainedWidth - categoryGap) / (autoWidthCount + (autoWidthCount - 1) * barGapPercent);\n autoWidth = Math.max(autoWidth, 0);\n var widthSum = 0;\n var lastColumn;\n zrUtil.each(stacks, function (column, idx) {\n if (!column.width) {\n column.width = autoWidth;\n }\n\n lastColumn = column;\n widthSum += column.width * (1 + barGapPercent);\n });\n\n if (lastColumn) {\n widthSum -= lastColumn.width * barGapPercent;\n }\n\n var offset = -widthSum / 2;\n zrUtil.each(stacks, function (column, stackId) {\n result[coordSysName][stackId] = result[coordSysName][stackId] || {\n offset: offset,\n width: column.width\n };\n offset += column.width * (1 + barGapPercent);\n });\n });\n return result;\n}", "function calRadialBar(barSeries, api) {\n // Columns info on each category axis. Key is polar name\n var columnsMap = {};\n zrUtil.each(barSeries, function (seriesModel, idx) {\n var data = seriesModel.getData();\n var polar = seriesModel.coordinateSystem;\n var baseAxis = polar.getBaseAxis();\n var axisExtent = baseAxis.getExtent();\n var bandWidth = baseAxis.type === 'category' ? baseAxis.getBandWidth() : Math.abs(axisExtent[1] - axisExtent[0]) / data.count();\n var columnsOnAxis = columnsMap[getAxisKey(baseAxis)] || {\n bandWidth: bandWidth,\n remainedWidth: bandWidth,\n autoWidthCount: 0,\n categoryGap: '20%',\n gap: '30%',\n stacks: {}\n };\n var stacks = columnsOnAxis.stacks;\n columnsMap[getAxisKey(baseAxis)] = columnsOnAxis;\n var stackId = getSeriesStackId(seriesModel);\n\n if (!stacks[stackId]) {\n columnsOnAxis.autoWidthCount++;\n }\n\n stacks[stackId] = stacks[stackId] || {\n width: 0,\n maxWidth: 0\n };\n var barWidth = parsePercent(seriesModel.get('barWidth'), bandWidth);\n var barMaxWidth = parsePercent(seriesModel.get('barMaxWidth'), bandWidth);\n var barGap = seriesModel.get('barGap');\n var barCategoryGap = seriesModel.get('barCategoryGap');\n\n if (barWidth && !stacks[stackId].width) {\n barWidth = Math.min(columnsOnAxis.remainedWidth, barWidth);\n stacks[stackId].width = barWidth;\n columnsOnAxis.remainedWidth -= barWidth;\n }\n\n barMaxWidth && (stacks[stackId].maxWidth = barMaxWidth);\n barGap != null && (columnsOnAxis.gap = barGap);\n barCategoryGap != null && (columnsOnAxis.categoryGap = barCategoryGap);\n });\n var result = {};\n zrUtil.each(columnsMap, function (columnsOnAxis, coordSysName) {\n result[coordSysName] = {};\n var stacks = columnsOnAxis.stacks;\n var bandWidth = columnsOnAxis.bandWidth;\n var categoryGap = parsePercent(columnsOnAxis.categoryGap, bandWidth);\n var barGapPercent = parsePercent(columnsOnAxis.gap, 1);\n var remainedWidth = columnsOnAxis.remainedWidth;\n var autoWidthCount = columnsOnAxis.autoWidthCount;\n var autoWidth = (remainedWidth - categoryGap) / (autoWidthCount + (autoWidthCount - 1) * barGapPercent);\n autoWidth = Math.max(autoWidth, 0); // Find if any auto calculated bar exceeded maxBarWidth\n\n zrUtil.each(stacks, function (column, stack) {\n var maxWidth = column.maxWidth;\n\n if (maxWidth && maxWidth < autoWidth) {\n maxWidth = Math.min(maxWidth, remainedWidth);\n\n if (column.width) {\n maxWidth = Math.min(maxWidth, column.width);\n }\n\n remainedWidth -= maxWidth;\n column.width = maxWidth;\n autoWidthCount--;\n }\n }); // Recalculate width again\n\n autoWidth = (remainedWidth - categoryGap) / (autoWidthCount + (autoWidthCount - 1) * barGapPercent);\n autoWidth = Math.max(autoWidth, 0);\n var widthSum = 0;\n var lastColumn;\n zrUtil.each(stacks, function (column, idx) {\n if (!column.width) {\n column.width = autoWidth;\n }\n\n lastColumn = column;\n widthSum += column.width * (1 + barGapPercent);\n });\n\n if (lastColumn) {\n widthSum -= lastColumn.width * barGapPercent;\n }\n\n var offset = -widthSum / 2;\n zrUtil.each(stacks, function (column, stackId) {\n result[coordSysName][stackId] = result[coordSysName][stackId] || {\n offset: offset,\n width: column.width\n };\n offset += column.width * (1 + barGapPercent);\n });\n });\n return result;\n}", "function calRadialBar(barSeries, api) {\n // Columns info on each category axis. Key is polar name\n var columnsMap = {};\n zrUtil.each(barSeries, function (seriesModel, idx) {\n var data = seriesModel.getData();\n var polar = seriesModel.coordinateSystem;\n var baseAxis = polar.getBaseAxis();\n var axisExtent = baseAxis.getExtent();\n var bandWidth = baseAxis.type === 'category' ? baseAxis.getBandWidth() : Math.abs(axisExtent[1] - axisExtent[0]) / data.count();\n var columnsOnAxis = columnsMap[getAxisKey(baseAxis)] || {\n bandWidth: bandWidth,\n remainedWidth: bandWidth,\n autoWidthCount: 0,\n categoryGap: '20%',\n gap: '30%',\n stacks: {}\n };\n var stacks = columnsOnAxis.stacks;\n columnsMap[getAxisKey(baseAxis)] = columnsOnAxis;\n var stackId = getSeriesStackId(seriesModel);\n\n if (!stacks[stackId]) {\n columnsOnAxis.autoWidthCount++;\n }\n\n stacks[stackId] = stacks[stackId] || {\n width: 0,\n maxWidth: 0\n };\n var barWidth = parsePercent(seriesModel.get('barWidth'), bandWidth);\n var barMaxWidth = parsePercent(seriesModel.get('barMaxWidth'), bandWidth);\n var barGap = seriesModel.get('barGap');\n var barCategoryGap = seriesModel.get('barCategoryGap');\n\n if (barWidth && !stacks[stackId].width) {\n barWidth = Math.min(columnsOnAxis.remainedWidth, barWidth);\n stacks[stackId].width = barWidth;\n columnsOnAxis.remainedWidth -= barWidth;\n }\n\n barMaxWidth && (stacks[stackId].maxWidth = barMaxWidth);\n barGap != null && (columnsOnAxis.gap = barGap);\n barCategoryGap != null && (columnsOnAxis.categoryGap = barCategoryGap);\n });\n var result = {};\n zrUtil.each(columnsMap, function (columnsOnAxis, coordSysName) {\n result[coordSysName] = {};\n var stacks = columnsOnAxis.stacks;\n var bandWidth = columnsOnAxis.bandWidth;\n var categoryGap = parsePercent(columnsOnAxis.categoryGap, bandWidth);\n var barGapPercent = parsePercent(columnsOnAxis.gap, 1);\n var remainedWidth = columnsOnAxis.remainedWidth;\n var autoWidthCount = columnsOnAxis.autoWidthCount;\n var autoWidth = (remainedWidth - categoryGap) / (autoWidthCount + (autoWidthCount - 1) * barGapPercent);\n autoWidth = Math.max(autoWidth, 0); // Find if any auto calculated bar exceeded maxBarWidth\n\n zrUtil.each(stacks, function (column, stack) {\n var maxWidth = column.maxWidth;\n\n if (maxWidth && maxWidth < autoWidth) {\n maxWidth = Math.min(maxWidth, remainedWidth);\n\n if (column.width) {\n maxWidth = Math.min(maxWidth, column.width);\n }\n\n remainedWidth -= maxWidth;\n column.width = maxWidth;\n autoWidthCount--;\n }\n }); // Recalculate width again\n\n autoWidth = (remainedWidth - categoryGap) / (autoWidthCount + (autoWidthCount - 1) * barGapPercent);\n autoWidth = Math.max(autoWidth, 0);\n var widthSum = 0;\n var lastColumn;\n zrUtil.each(stacks, function (column, idx) {\n if (!column.width) {\n column.width = autoWidth;\n }\n\n lastColumn = column;\n widthSum += column.width * (1 + barGapPercent);\n });\n\n if (lastColumn) {\n widthSum -= lastColumn.width * barGapPercent;\n }\n\n var offset = -widthSum / 2;\n zrUtil.each(stacks, function (column, stackId) {\n result[coordSysName][stackId] = result[coordSysName][stackId] || {\n offset: offset,\n width: column.width\n };\n offset += column.width * (1 + barGapPercent);\n });\n });\n return result;\n}", "function calRadialBar(barSeries, api) {\n // Columns info on each category axis. Key is polar name\n var columnsMap = {};\n zrUtil.each(barSeries, function (seriesModel, idx) {\n var data = seriesModel.getData();\n var polar = seriesModel.coordinateSystem;\n var baseAxis = polar.getBaseAxis();\n var axisExtent = baseAxis.getExtent();\n var bandWidth = baseAxis.type === 'category' ? baseAxis.getBandWidth() : Math.abs(axisExtent[1] - axisExtent[0]) / data.count();\n var columnsOnAxis = columnsMap[getAxisKey(baseAxis)] || {\n bandWidth: bandWidth,\n remainedWidth: bandWidth,\n autoWidthCount: 0,\n categoryGap: '20%',\n gap: '30%',\n stacks: {}\n };\n var stacks = columnsOnAxis.stacks;\n columnsMap[getAxisKey(baseAxis)] = columnsOnAxis;\n var stackId = getSeriesStackId(seriesModel);\n\n if (!stacks[stackId]) {\n columnsOnAxis.autoWidthCount++;\n }\n\n stacks[stackId] = stacks[stackId] || {\n width: 0,\n maxWidth: 0\n };\n var barWidth = parsePercent(seriesModel.get('barWidth'), bandWidth);\n var barMaxWidth = parsePercent(seriesModel.get('barMaxWidth'), bandWidth);\n var barGap = seriesModel.get('barGap');\n var barCategoryGap = seriesModel.get('barCategoryGap');\n\n if (barWidth && !stacks[stackId].width) {\n barWidth = Math.min(columnsOnAxis.remainedWidth, barWidth);\n stacks[stackId].width = barWidth;\n columnsOnAxis.remainedWidth -= barWidth;\n }\n\n barMaxWidth && (stacks[stackId].maxWidth = barMaxWidth);\n barGap != null && (columnsOnAxis.gap = barGap);\n barCategoryGap != null && (columnsOnAxis.categoryGap = barCategoryGap);\n });\n var result = {};\n zrUtil.each(columnsMap, function (columnsOnAxis, coordSysName) {\n result[coordSysName] = {};\n var stacks = columnsOnAxis.stacks;\n var bandWidth = columnsOnAxis.bandWidth;\n var categoryGap = parsePercent(columnsOnAxis.categoryGap, bandWidth);\n var barGapPercent = parsePercent(columnsOnAxis.gap, 1);\n var remainedWidth = columnsOnAxis.remainedWidth;\n var autoWidthCount = columnsOnAxis.autoWidthCount;\n var autoWidth = (remainedWidth - categoryGap) / (autoWidthCount + (autoWidthCount - 1) * barGapPercent);\n autoWidth = Math.max(autoWidth, 0); // Find if any auto calculated bar exceeded maxBarWidth\n\n zrUtil.each(stacks, function (column, stack) {\n var maxWidth = column.maxWidth;\n\n if (maxWidth && maxWidth < autoWidth) {\n maxWidth = Math.min(maxWidth, remainedWidth);\n\n if (column.width) {\n maxWidth = Math.min(maxWidth, column.width);\n }\n\n remainedWidth -= maxWidth;\n column.width = maxWidth;\n autoWidthCount--;\n }\n }); // Recalculate width again\n\n autoWidth = (remainedWidth - categoryGap) / (autoWidthCount + (autoWidthCount - 1) * barGapPercent);\n autoWidth = Math.max(autoWidth, 0);\n var widthSum = 0;\n var lastColumn;\n zrUtil.each(stacks, function (column, idx) {\n if (!column.width) {\n column.width = autoWidth;\n }\n\n lastColumn = column;\n widthSum += column.width * (1 + barGapPercent);\n });\n\n if (lastColumn) {\n widthSum -= lastColumn.width * barGapPercent;\n }\n\n var offset = -widthSum / 2;\n zrUtil.each(stacks, function (column, stackId) {\n result[coordSysName][stackId] = result[coordSysName][stackId] || {\n offset: offset,\n width: column.width\n };\n offset += column.width * (1 + barGapPercent);\n });\n });\n return result;\n}", "function createChart(options){var data;var highLow;if(options.distributeSeries){data=Chartist.normalizeData(this.data,options.reverseData,options.horizontalBars?'x':'y');data.normalized.series=data.normalized.series.map(function(value){return [value];});}else {data=Chartist.normalizeData(this.data,options.reverseData,options.horizontalBars?'x':'y');}// Create new svg element\nthis.svg=Chartist.createSvg(this.container,options.width,options.height,options.classNames.chart+(options.horizontalBars?' '+options.classNames.horizontalBars:''));// Drawing groups in correct order\nvar gridGroup=this.svg.elem('g').addClass(options.classNames.gridGroup);var seriesGroup=this.svg.elem('g');var labelGroup=this.svg.elem('g').addClass(options.classNames.labelGroup);if(options.stackBars&&data.normalized.series.length!==0){// If stacked bars we need to calculate the high low from stacked values from each series\nvar serialSums=Chartist.serialMap(data.normalized.series,function serialSums(){return Array.prototype.slice.call(arguments).map(function(value){return value;}).reduce(function(prev,curr){return {x:prev.x+(curr&&curr.x)||0,y:prev.y+(curr&&curr.y)||0};},{x:0,y:0});});highLow=Chartist.getHighLow([serialSums],options,options.horizontalBars?'x':'y');}else {highLow=Chartist.getHighLow(data.normalized.series,options,options.horizontalBars?'x':'y');}// Overrides of high / low from settings\nhighLow.high=+options.high||(options.high===0?0:highLow.high);highLow.low=+options.low||(options.low===0?0:highLow.low);var chartRect=Chartist.createChartRect(this.svg,options,defaultOptions.padding);var valueAxis,labelAxisTicks,labelAxis,axisX,axisY;// We need to set step count based on some options combinations\nif(options.distributeSeries&&options.stackBars){// If distributed series are enabled and bars need to be stacked, we'll only have one bar and therefore should\n// use only the first label for the step axis\nlabelAxisTicks=data.normalized.labels.slice(0,1);}else {// If distributed series are enabled but stacked bars aren't, we should use the series labels\n// If we are drawing a regular bar chart with two dimensional series data, we just use the labels array\n// as the bars are normalized\nlabelAxisTicks=data.normalized.labels;}// Set labelAxis and valueAxis based on the horizontalBars setting. This setting will flip the axes if necessary.\nif(options.horizontalBars){if(options.axisX.type===undefined){valueAxis=axisX=new Chartist.AutoScaleAxis(Chartist.Axis.units.x,data.normalized.series,chartRect,Chartist.extend({},options.axisX,{highLow:highLow,referenceValue:0}));}else {valueAxis=axisX=options.axisX.type.call(Chartist,Chartist.Axis.units.x,data.normalized.series,chartRect,Chartist.extend({},options.axisX,{highLow:highLow,referenceValue:0}));}if(options.axisY.type===undefined){labelAxis=axisY=new Chartist.StepAxis(Chartist.Axis.units.y,data.normalized.series,chartRect,{ticks:labelAxisTicks});}else {labelAxis=axisY=options.axisY.type.call(Chartist,Chartist.Axis.units.y,data.normalized.series,chartRect,options.axisY);}}else {if(options.axisX.type===undefined){labelAxis=axisX=new Chartist.StepAxis(Chartist.Axis.units.x,data.normalized.series,chartRect,{ticks:labelAxisTicks});}else {labelAxis=axisX=options.axisX.type.call(Chartist,Chartist.Axis.units.x,data.normalized.series,chartRect,options.axisX);}if(options.axisY.type===undefined){valueAxis=axisY=new Chartist.AutoScaleAxis(Chartist.Axis.units.y,data.normalized.series,chartRect,Chartist.extend({},options.axisY,{highLow:highLow,referenceValue:0}));}else {valueAxis=axisY=options.axisY.type.call(Chartist,Chartist.Axis.units.y,data.normalized.series,chartRect,Chartist.extend({},options.axisY,{highLow:highLow,referenceValue:0}));}}// Projected 0 point\nvar zeroPoint=options.horizontalBars?chartRect.x1+valueAxis.projectValue(0):chartRect.y1-valueAxis.projectValue(0);// Used to track the screen coordinates of stacked bars\nvar stackedBarValues=[];labelAxis.createGridAndLabels(gridGroup,labelGroup,this.supportsForeignObject,options,this.eventEmitter);valueAxis.createGridAndLabels(gridGroup,labelGroup,this.supportsForeignObject,options,this.eventEmitter);if(options.showGridBackground){Chartist.createGridBackground(gridGroup,chartRect,options.classNames.gridBackground,this.eventEmitter);}// Draw the series\ndata.raw.series.forEach(function(series,seriesIndex){// Calculating bi-polar value of index for seriesOffset. For i = 0..4 biPol will be -1.5, -0.5, 0.5, 1.5 etc.\nvar biPol=seriesIndex-(data.raw.series.length-1)/2;// Half of the period width between vertical grid lines used to position bars\nvar periodHalfLength;// Current series SVG element\nvar seriesElement;// We need to set periodHalfLength based on some options combinations\nif(options.distributeSeries&&!options.stackBars){// If distributed series are enabled but stacked bars aren't, we need to use the length of the normaizedData array\n// which is the series count and divide by 2\nperiodHalfLength=labelAxis.axisLength/data.normalized.series.length/2;}else if(options.distributeSeries&&options.stackBars){// If distributed series and stacked bars are enabled we'll only get one bar so we should just divide the axis\n// length by 2\nperiodHalfLength=labelAxis.axisLength/2;}else {// On regular bar charts we should just use the series length\nperiodHalfLength=labelAxis.axisLength/data.normalized.series[seriesIndex].length/2;}// Adding the series group to the series element\nseriesElement=seriesGroup.elem('g');// Write attributes to series group element. If series name or meta is undefined the attributes will not be written\nseriesElement.attr({'ct:series-name':series.name,'ct:meta':Chartist.serialize(series.meta)});// Use series class from series data or if not set generate one\nseriesElement.addClass([options.classNames.series,series.className||options.classNames.series+'-'+Chartist.alphaNumerate(seriesIndex)].join(' '));data.normalized.series[seriesIndex].forEach(function(value,valueIndex){var projected,bar,previousStack,labelAxisValueIndex;// We need to set labelAxisValueIndex based on some options combinations\nif(options.distributeSeries&&!options.stackBars){// If distributed series are enabled but stacked bars aren't, we can use the seriesIndex for later projection\n// on the step axis for label positioning\nlabelAxisValueIndex=seriesIndex;}else if(options.distributeSeries&&options.stackBars){// If distributed series and stacked bars are enabled, we will only get one bar and therefore always use\n// 0 for projection on the label step axis\nlabelAxisValueIndex=0;}else {// On regular bar charts we just use the value index to project on the label step axis\nlabelAxisValueIndex=valueIndex;}// We need to transform coordinates differently based on the chart layout\nif(options.horizontalBars){projected={x:chartRect.x1+valueAxis.projectValue(value&&value.x?value.x:0,valueIndex,data.normalized.series[seriesIndex]),y:chartRect.y1-labelAxis.projectValue(value&&value.y?value.y:0,labelAxisValueIndex,data.normalized.series[seriesIndex])};}else {projected={x:chartRect.x1+labelAxis.projectValue(value&&value.x?value.x:0,labelAxisValueIndex,data.normalized.series[seriesIndex]),y:chartRect.y1-valueAxis.projectValue(value&&value.y?value.y:0,valueIndex,data.normalized.series[seriesIndex])};}// If the label axis is a step based axis we will offset the bar into the middle of between two steps using\n// the periodHalfLength value. Also we do arrange the different series so that they align up to each other using\n// the seriesBarDistance. If we don't have a step axis, the bar positions can be chosen freely so we should not\n// add any automated positioning.\nif(labelAxis instanceof Chartist.StepAxis){// Offset to center bar between grid lines, but only if the step axis is not stretched\nif(!labelAxis.options.stretch){projected[labelAxis.units.pos]+=periodHalfLength*(options.horizontalBars?-1:1);}// Using bi-polar offset for multiple series if no stacked bars or series distribution is used\nprojected[labelAxis.units.pos]+=options.stackBars||options.distributeSeries?0:biPol*options.seriesBarDistance*(options.horizontalBars?-1:1);}// Enter value in stacked bar values used to remember previous screen value for stacking up bars\npreviousStack=stackedBarValues[valueIndex]||zeroPoint;stackedBarValues[valueIndex]=previousStack-(zeroPoint-projected[labelAxis.counterUnits.pos]);// Skip if value is undefined\nif(value===undefined){return;}var positions={};positions[labelAxis.units.pos+'1']=projected[labelAxis.units.pos];positions[labelAxis.units.pos+'2']=projected[labelAxis.units.pos];if(options.stackBars&&(options.stackMode==='accumulate'||!options.stackMode)){// Stack mode: accumulate (default)\n// If bars are stacked we use the stackedBarValues reference and otherwise base all bars off the zero line\n// We want backwards compatibility, so the expected fallback without the 'stackMode' option\n// to be the original behaviour (accumulate)\npositions[labelAxis.counterUnits.pos+'1']=previousStack;positions[labelAxis.counterUnits.pos+'2']=stackedBarValues[valueIndex];}else {// Draw from the zero line normally\n// This is also the same code for Stack mode: overlap\npositions[labelAxis.counterUnits.pos+'1']=zeroPoint;positions[labelAxis.counterUnits.pos+'2']=projected[labelAxis.counterUnits.pos];}// Limit x and y so that they are within the chart rect\npositions.x1=Math.min(Math.max(positions.x1,chartRect.x1),chartRect.x2);positions.x2=Math.min(Math.max(positions.x2,chartRect.x1),chartRect.x2);positions.y1=Math.min(Math.max(positions.y1,chartRect.y2),chartRect.y1);positions.y2=Math.min(Math.max(positions.y2,chartRect.y2),chartRect.y1);var metaData=Chartist.getMetaData(series,valueIndex);// Create bar element\nbar=seriesElement.elem('line',positions,options.classNames.bar).attr({'ct:value':[value.x,value.y].filter(Chartist.isNumeric).join(','),'ct:meta':Chartist.serialize(metaData)});this.eventEmitter.emit('draw',Chartist.extend({type:'bar',value:value,index:valueIndex,meta:metaData,series:series,seriesIndex:seriesIndex,axisX:axisX,axisY:axisY,chartRect:chartRect,group:seriesElement,element:bar},positions));}.bind(this));}.bind(this));this.eventEmitter.emit('created',{bounds:valueAxis.bounds,chartRect:chartRect,axisX:axisX,axisY:axisY,svg:this.svg,options:options});}", "function renderRatioChart(){\n let ctx = document.getElementById('ratio-chart').getContext('2d');\n new Chart(ctx, {\n type: 'polarArea',\n data: {\n labels: getItemNames(),\n datasets: [{\n label: 'Clicks : Views Ratio',\n data: getViewToClickRatio(),\n backgroundColor: [\n 'rgba(255, 99, 132, 0.2)',\n 'rgba(54, 162, 235, 0.2)',\n 'rgba(255, 206, 86, 0.2)',\n 'rgba(75, 192, 192, 0.2)',\n 'rgba(153, 102, 255, 0.2)',\n 'rgba(255, 159, 64, 0.2)'\n ],\n borderColor: [\n 'rgba(255, 99, 132, 1)',\n 'rgba(54, 162, 235, 1)',\n 'rgba(255, 206, 86, 1)',\n 'rgba(75, 192, 192, 1)',\n 'rgba(153, 102, 255, 1)',\n 'rgba(255, 159, 64, 1)'\n ],\n borderWidth: 1\n }]\n },\n options: {\n scales: {\n y: {\n beginAtZero: true\n }\n }\n }\n });\n}", "function ccRadarChart() {\n return {\n restrict: 'E',\n scope: {\n metric: '=',\n members: '=',\n node: '=',\n page: '=',\n widgetId: '=',\n },\n controller: ccRadarChartController,\n controllerAs: 'radarCtrl',\n bindToController: true,\n templateUrl: 'src/app/clusterconsole/views/directives/cc-radar-chart.tpl.html',\n };\n }", "function calRadialBar(barSeries, api) {\n // Columns info on each category axis. Key is polar name\n var columnsMap = {};\n zrUtil.each(barSeries, function (seriesModel, idx) {\n var data = seriesModel.getData();\n var polar = seriesModel.coordinateSystem;\n var baseAxis = polar.getBaseAxis();\n var axisKey = getAxisKey(polar, baseAxis);\n var axisExtent = baseAxis.getExtent();\n var bandWidth = baseAxis.type === 'category' ? baseAxis.getBandWidth() : Math.abs(axisExtent[1] - axisExtent[0]) / data.count();\n var columnsOnAxis = columnsMap[axisKey] || {\n bandWidth: bandWidth,\n remainedWidth: bandWidth,\n autoWidthCount: 0,\n categoryGap: '20%',\n gap: '30%',\n stacks: {}\n };\n var stacks = columnsOnAxis.stacks;\n columnsMap[axisKey] = columnsOnAxis;\n var stackId = getSeriesStackId(seriesModel);\n\n if (!stacks[stackId]) {\n columnsOnAxis.autoWidthCount++;\n }\n\n stacks[stackId] = stacks[stackId] || {\n width: 0,\n maxWidth: 0\n };\n var barWidth = parsePercent(seriesModel.get('barWidth'), bandWidth);\n var barMaxWidth = parsePercent(seriesModel.get('barMaxWidth'), bandWidth);\n var barGap = seriesModel.get('barGap');\n var barCategoryGap = seriesModel.get('barCategoryGap');\n\n if (barWidth && !stacks[stackId].width) {\n barWidth = Math.min(columnsOnAxis.remainedWidth, barWidth);\n stacks[stackId].width = barWidth;\n columnsOnAxis.remainedWidth -= barWidth;\n }\n\n barMaxWidth && (stacks[stackId].maxWidth = barMaxWidth);\n barGap != null && (columnsOnAxis.gap = barGap);\n barCategoryGap != null && (columnsOnAxis.categoryGap = barCategoryGap);\n });\n var result = {};\n zrUtil.each(columnsMap, function (columnsOnAxis, coordSysName) {\n result[coordSysName] = {};\n var stacks = columnsOnAxis.stacks;\n var bandWidth = columnsOnAxis.bandWidth;\n var categoryGap = parsePercent(columnsOnAxis.categoryGap, bandWidth);\n var barGapPercent = parsePercent(columnsOnAxis.gap, 1);\n var remainedWidth = columnsOnAxis.remainedWidth;\n var autoWidthCount = columnsOnAxis.autoWidthCount;\n var autoWidth = (remainedWidth - categoryGap) / (autoWidthCount + (autoWidthCount - 1) * barGapPercent);\n autoWidth = Math.max(autoWidth, 0); // Find if any auto calculated bar exceeded maxBarWidth\n\n zrUtil.each(stacks, function (column, stack) {\n var maxWidth = column.maxWidth;\n\n if (maxWidth && maxWidth < autoWidth) {\n maxWidth = Math.min(maxWidth, remainedWidth);\n\n if (column.width) {\n maxWidth = Math.min(maxWidth, column.width);\n }\n\n remainedWidth -= maxWidth;\n column.width = maxWidth;\n autoWidthCount--;\n }\n }); // Recalculate width again\n\n autoWidth = (remainedWidth - categoryGap) / (autoWidthCount + (autoWidthCount - 1) * barGapPercent);\n autoWidth = Math.max(autoWidth, 0);\n var widthSum = 0;\n var lastColumn;\n zrUtil.each(stacks, function (column, idx) {\n if (!column.width) {\n column.width = autoWidth;\n }\n\n lastColumn = column;\n widthSum += column.width * (1 + barGapPercent);\n });\n\n if (lastColumn) {\n widthSum -= lastColumn.width * barGapPercent;\n }\n\n var offset = -widthSum / 2;\n zrUtil.each(stacks, function (column, stackId) {\n result[coordSysName][stackId] = result[coordSysName][stackId] || {\n offset: offset,\n width: column.width\n };\n offset += column.width * (1 + barGapPercent);\n });\n });\n return result;\n}", "function calRadialBar(barSeries, api) {\n // Columns info on each category axis. Key is polar name\n var columnsMap = {};\n zrUtil.each(barSeries, function (seriesModel, idx) {\n var data = seriesModel.getData();\n var polar = seriesModel.coordinateSystem;\n var baseAxis = polar.getBaseAxis();\n var axisKey = getAxisKey(polar, baseAxis);\n var axisExtent = baseAxis.getExtent();\n var bandWidth = baseAxis.type === 'category' ? baseAxis.getBandWidth() : Math.abs(axisExtent[1] - axisExtent[0]) / data.count();\n var columnsOnAxis = columnsMap[axisKey] || {\n bandWidth: bandWidth,\n remainedWidth: bandWidth,\n autoWidthCount: 0,\n categoryGap: '20%',\n gap: '30%',\n stacks: {}\n };\n var stacks = columnsOnAxis.stacks;\n columnsMap[axisKey] = columnsOnAxis;\n var stackId = getSeriesStackId(seriesModel);\n\n if (!stacks[stackId]) {\n columnsOnAxis.autoWidthCount++;\n }\n\n stacks[stackId] = stacks[stackId] || {\n width: 0,\n maxWidth: 0\n };\n var barWidth = parsePercent(seriesModel.get('barWidth'), bandWidth);\n var barMaxWidth = parsePercent(seriesModel.get('barMaxWidth'), bandWidth);\n var barGap = seriesModel.get('barGap');\n var barCategoryGap = seriesModel.get('barCategoryGap');\n\n if (barWidth && !stacks[stackId].width) {\n barWidth = Math.min(columnsOnAxis.remainedWidth, barWidth);\n stacks[stackId].width = barWidth;\n columnsOnAxis.remainedWidth -= barWidth;\n }\n\n barMaxWidth && (stacks[stackId].maxWidth = barMaxWidth);\n barGap != null && (columnsOnAxis.gap = barGap);\n barCategoryGap != null && (columnsOnAxis.categoryGap = barCategoryGap);\n });\n var result = {};\n zrUtil.each(columnsMap, function (columnsOnAxis, coordSysName) {\n result[coordSysName] = {};\n var stacks = columnsOnAxis.stacks;\n var bandWidth = columnsOnAxis.bandWidth;\n var categoryGap = parsePercent(columnsOnAxis.categoryGap, bandWidth);\n var barGapPercent = parsePercent(columnsOnAxis.gap, 1);\n var remainedWidth = columnsOnAxis.remainedWidth;\n var autoWidthCount = columnsOnAxis.autoWidthCount;\n var autoWidth = (remainedWidth - categoryGap) / (autoWidthCount + (autoWidthCount - 1) * barGapPercent);\n autoWidth = Math.max(autoWidth, 0); // Find if any auto calculated bar exceeded maxBarWidth\n\n zrUtil.each(stacks, function (column, stack) {\n var maxWidth = column.maxWidth;\n\n if (maxWidth && maxWidth < autoWidth) {\n maxWidth = Math.min(maxWidth, remainedWidth);\n\n if (column.width) {\n maxWidth = Math.min(maxWidth, column.width);\n }\n\n remainedWidth -= maxWidth;\n column.width = maxWidth;\n autoWidthCount--;\n }\n }); // Recalculate width again\n\n autoWidth = (remainedWidth - categoryGap) / (autoWidthCount + (autoWidthCount - 1) * barGapPercent);\n autoWidth = Math.max(autoWidth, 0);\n var widthSum = 0;\n var lastColumn;\n zrUtil.each(stacks, function (column, idx) {\n if (!column.width) {\n column.width = autoWidth;\n }\n\n lastColumn = column;\n widthSum += column.width * (1 + barGapPercent);\n });\n\n if (lastColumn) {\n widthSum -= lastColumn.width * barGapPercent;\n }\n\n var offset = -widthSum / 2;\n zrUtil.each(stacks, function (column, stackId) {\n result[coordSysName][stackId] = result[coordSysName][stackId] || {\n offset: offset,\n width: column.width\n };\n offset += column.width * (1 + barGapPercent);\n });\n });\n return result;\n}", "function BasicLinechartComponent(renderer) {\n this.renderer = renderer;\n /**\n * Input width of the component\n * Default value : 900\n */\n this.width = 900;\n /**\n * Input height of the compenent\n * Default value : 200\n */\n this.height = 200;\n /**\n * Input data array that the component display\n * Default value : []\n */\n this.data = [];\n /**\n * Input domain of the Axis Y\n * Works only for continuous values\n * Default value : [0,0]\n */\n this.domain = [0, 0];\n /**\n * Input speed of zoom between 0 and 1\n * Default value : 0.2\n */\n this.speedZoom = 0.2;\n /**\n * Input range of timestamp\n * Default value : [0,0]\n */\n this.range = [0, 0];\n /**\n * Output rangeChange that emit range\n */\n this.rangeChange = new i0.EventEmitter();\n /**\n * Input currentTime\n * Default value : 0\n */\n this.currentTime = 0;\n /**\n * Output currentTimeChange that emit currentTime\n */\n this.currentTimeChange = new i0.EventEmitter();\n /**\n * Title of the component\n */\n this.title = 'Timeline : ';\n /**\n * Margin of the component\n */\n this.margin = { top: 20, right: 20, bottom: 20, left: 50 }; //marge interne au svg \n /**\n * dataZoom is a copy of data with the range specify\n */\n this.dataZoom = [];\n /**\n * idZoom is the number of wheel notch\n */\n this.idZoom = 0;\n /**\n * It's the smallest timestamp of data\n */\n this.minTime = 0;\n /**\n * It's the biggest timestamp of data\n */\n this.maxTime = 0;\n /**\n * It's the difference between the smallest and the biggest\n */\n this.lengthTime = 0;\n /**\n * Width of the svg\n */\n this.svgWidth = 0;\n /**\n * Height of the svg\n */\n this.svgHeight = 0;\n /**\n * Scale of the X axis\n */\n this.scaleX = d3__namespace.scaleTime();\n /**\n * Scale of the Y axis\n */\n this.scaleY = d3__namespace.scaleLinear();\n /**\n * Array of area definition\n */\n this.area = [];\n /**\n * Array of line definition\n */\n this.line = [];\n /**\n * data length before the new change\n */\n this.lastDatalength = 0;\n /**\n * Mode of the tooltip\n */\n this.modeToolTips = \"normal\";\n /**\n * true if the currentTimeline is selected\n */\n this.currentTimeSelected = false;\n /**\n * true if the scrollbar is selected\n */\n this.scrollbarSelected = false;\n /**\n * Last position of the mouse\n */\n this.lastPos = 0;\n /**\n * true if the CTRL Key of keyBoard is push\n */\n this.zoomSelected = false;\n }", "function rsiGraph(result, summ){\n\n if (result[0].RSI !== undefined) {\n // .at(-1)\n firstDay = result[0].Date\n lastDay = result[result.length-1].Date\n // lastDay = result[Object.keys(result)[result.length-1]].Date\n // RSIOB = summ[Object.keys(\"RSIOB\")]\n RSIOB = summ.RSIOB\n RSIOS = summ.RSIOS\n RSI_BASE = summ.RSI_BASE\n\n var valueAxis2 = chart.yAxes.push(new am4charts.ValueAxis());\n valueAxis2.tooltip.disabled = true;\n // height of axis\n valueAxis2.height = am4core.percent(35);\n valueAxis2.zIndex = 3\n // this makes gap between panels\n valueAxis2.marginTop = 30;\n valueAxis2.renderer.baseGrid.disabled = true;\n valueAxis2.renderer.inside = true;\n valueAxis2.renderer.labels.template.verticalCenter = \"bottom\";\n valueAxis2.renderer.labels.template.padding(2, 2, 2, 2);\n //valueAxis.renderer.maxLabelPosition = 0.95;\n valueAxis2.renderer.fontSize = \"0.8em\"\n \n valueAxis2.renderer.gridContainer.background.fill = am4core.color(\"#000000\");\n valueAxis2.renderer.gridContainer.background.fillOpacity = 0.05;\n\n var series2 = chart.series.push(new am4charts.LineSeries());\n series2.dataFields.dateX = \"Date\";\n series2.clustered = false;\n series2.dataFields.valueY = \"RSI\";\n series2.yAxis = valueAxis2;\n series2.tooltipText = \"RSI: {valueY.value}\";\n series2.name = \"Series 2\";\n series2.stroke = am4core.color(\"purple\");\n series2.tooltip.getFillFromObject = false;\n series2.tooltip.background.fill = am4core.color(\"purple\");\n series2.defaultState.transitionDuration = 0;\n\n // Overbought\n var OBSeries = chart.series.push(new am4charts.LineSeries());\n OBSeries.dataFields.dateX = \"Date\";\n OBSeries.clustered = false;\n OBSeries.dataFields.valueY = \"RSIOB\";\n OBSeries.yAxis = valueAxis2;\n OBSeries.tooltipText = \"RSI OB: {valueY.value}\";\n OBSeries.name = \"OBSeries\";\n OBSeries.defaultState.transitionDuration = 0;\n OBSeries.strokeDasharray = 4;\n OBSeries.strokeWidth = 2\n OBSeries.stroke = am4core.color(\"red\");\n OBSeries.tooltip.getFillFromObject = false;\n OBSeries.tooltip.background.fill = am4core.color(\"red\");\n OBSeries.strokeOpacity = 0.7;\n OBSeries.data = [{\"Date\": firstDay, \"RSIOB\": RSIOB }, {\"Date\": lastDay, \"RSIOB\": RSIOB }];\n \n // Base\n var RSIBASESeries = chart.series.push(new am4charts.LineSeries());\n RSIBASESeries.dataFields.dateX = \"Date\";\n RSIBASESeries.clustered = false;\n RSIBASESeries.dataFields.valueY = \"RSI_BASE\";\n RSIBASESeries.yAxis = valueAxis2;\n RSIBASESeries.tooltipText = \"RSI OS: {valueY.value}\";\n RSIBASESeries.name = \"RSIBASESeries\";\n RSIBASESeries.defaultState.transitionDuration = 0;\n RSIBASESeries.strokeDasharray = 4;\n RSIBASESeries.strokeWidth = 2\n RSIBASESeries.stroke = am4core.color(\"black\");\n RSIBASESeries.tooltip.getFillFromObject = false;\n RSIBASESeries.tooltip.background.fill = am4core.color(\"black\");\n RSIBASESeries.strokeOpacity = 0.7;\n RSIBASESeries.data = [{\"Date\": firstDay, \"RSI_BASE\": RSI_BASE }, {\"Date\": lastDay, \"RSI_BASE\": RSI_BASE }];\n\n // Oversold\n var OSSeries = chart.series.push(new am4charts.LineSeries());\n OSSeries.dataFields.dateX = \"Date\";\n OSSeries.clustered = false;\n OSSeries.dataFields.valueY = \"RSIOS\";\n OSSeries.yAxis = valueAxis2;\n OSSeries.tooltipText = \"RSI OS: {valueY.value}\";\n OSSeries.name = \"OSSeries\";\n OSSeries.defaultState.transitionDuration = 0;\n OSSeries.strokeDasharray = 4;\n OSSeries.strokeWidth = 2\n OSSeries.stroke = am4core.color(\"green\");\n OSSeries.tooltip.getFillFromObject = false;\n OSSeries.tooltip.background.fill = am4core.color(\"green\");\n OSSeries.strokeOpacity = 0.7;\n OSSeries.data = [{\"Date\": firstDay, \"RSIOS\": RSIOS }, {\"Date\": lastDay, \"RSIOS\": RSIOS }];\n }\n\n // Third chart: Volume\n var valueAxis3 = chart.yAxes.push(new am4charts.ValueAxis());\n valueAxis3.tooltip.disabled = true;\n // height of axis\n valueAxis3.height = am4core.percent(35);\n valueAxis3.zIndex = 3\n // this makes gap between panels\n valueAxis3.marginTop = 30;\n valueAxis3.renderer.baseGrid.disabled = true;\n valueAxis3.renderer.inside = true;\n valueAxis3.renderer.labels.template.verticalCenter = \"bottom\";\n valueAxis3.renderer.labels.template.padding(2, 2, 2, 2);\n //valueAxis.renderer.maxLabelPosition = 0.95;\n valueAxis3.renderer.fontSize = \"0.8em\"\n \n valueAxis3.renderer.gridContainer.background.fill = am4core.color(\"#000000\");\n valueAxis3.renderer.gridContainer.background.fillOpacity = 0.05;\n\n var series3 = chart.series.push(new am4charts.ColumnSeries());\n series3.dataFields.dateX = \"Date\";\n series3.clustered = false;\n series3.dataFields.valueY = \"Volume\";\n series3.yAxis = valueAxis3;\n series3.tooltipText = \"Volume: {valueY.value}\";\n series3.name = \"Series 3\";\n // volume should be summed\n series3.groupFields.valueY = \"sum\";\n series3.defaultState.transitionDuration = 0;\n\n series3.fill = am4core.color(\"rgb(65, 112, 216)\");\n series3.stroke = am4core.color(\"rgb(65, 112, 216)\");\n series3.tooltip.getFillFromObject = false;\n series3.tooltip.background.fill = am4core.color(\"rgb(65, 112, 216)\");\n }", "function createChart(options){var data=Chartist.normalizeData(this.data,options.reverseData,true);// Create new svg object\nthis.svg=Chartist.createSvg(this.container,options.width,options.height,options.classNames.chart);// Create groups for labels, grid and series\nvar gridGroup=this.svg.elem('g').addClass(options.classNames.gridGroup);var seriesGroup=this.svg.elem('g');var labelGroup=this.svg.elem('g').addClass(options.classNames.labelGroup);var chartRect=Chartist.createChartRect(this.svg,options,defaultOptions.padding);var axisX,axisY;if(options.axisX.type===undefined){axisX=new Chartist.StepAxis(Chartist.Axis.units.x,data.normalized.series,chartRect,Chartist.extend({},options.axisX,{ticks:data.normalized.labels,stretch:options.fullWidth}));}else {axisX=options.axisX.type.call(Chartist,Chartist.Axis.units.x,data.normalized.series,chartRect,options.axisX);}if(options.axisY.type===undefined){axisY=new Chartist.AutoScaleAxis(Chartist.Axis.units.y,data.normalized.series,chartRect,Chartist.extend({},options.axisY,{high:Chartist.isNumeric(options.high)?options.high:options.axisY.high,low:Chartist.isNumeric(options.low)?options.low:options.axisY.low}));}else {axisY=options.axisY.type.call(Chartist,Chartist.Axis.units.y,data.normalized.series,chartRect,options.axisY);}axisX.createGridAndLabels(gridGroup,labelGroup,this.supportsForeignObject,options,this.eventEmitter);axisY.createGridAndLabels(gridGroup,labelGroup,this.supportsForeignObject,options,this.eventEmitter);if(options.showGridBackground){Chartist.createGridBackground(gridGroup,chartRect,options.classNames.gridBackground,this.eventEmitter);}// Draw the series\ndata.raw.series.forEach(function(series,seriesIndex){var seriesElement=seriesGroup.elem('g');// Write attributes to series group element. If series name or meta is undefined the attributes will not be written\nseriesElement.attr({'ct:series-name':series.name,'ct:meta':Chartist.serialize(series.meta)});// Use series class from series data or if not set generate one\nseriesElement.addClass([options.classNames.series,series.className||options.classNames.series+'-'+Chartist.alphaNumerate(seriesIndex)].join(' '));var pathCoordinates=[],pathData=[];data.normalized.series[seriesIndex].forEach(function(value,valueIndex){var p={x:chartRect.x1+axisX.projectValue(value,valueIndex,data.normalized.series[seriesIndex]),y:chartRect.y1-axisY.projectValue(value,valueIndex,data.normalized.series[seriesIndex])};pathCoordinates.push(p.x,p.y);pathData.push({value:value,valueIndex:valueIndex,meta:Chartist.getMetaData(series,valueIndex)});}.bind(this));var seriesOptions={lineSmooth:Chartist.getSeriesOption(series,options,'lineSmooth'),showPoint:Chartist.getSeriesOption(series,options,'showPoint'),showLine:Chartist.getSeriesOption(series,options,'showLine'),showArea:Chartist.getSeriesOption(series,options,'showArea'),areaBase:Chartist.getSeriesOption(series,options,'areaBase')};var smoothing=typeof seriesOptions.lineSmooth==='function'?seriesOptions.lineSmooth:seriesOptions.lineSmooth?Chartist.Interpolation.monotoneCubic():Chartist.Interpolation.none();// Interpolating path where pathData will be used to annotate each path element so we can trace back the original\n// index, value and meta data\nvar path=smoothing(pathCoordinates,pathData);// If we should show points we need to create them now to avoid secondary loop\n// Points are drawn from the pathElements returned by the interpolation function\n// Small offset for Firefox to render squares correctly\nif(seriesOptions.showPoint){path.pathElements.forEach(function(pathElement){var point=seriesElement.elem('line',{x1:pathElement.x,y1:pathElement.y,x2:pathElement.x+0.01,y2:pathElement.y},options.classNames.point).attr({'ct:value':[pathElement.data.value.x,pathElement.data.value.y].filter(Chartist.isNumeric).join(','),'ct:meta':Chartist.serialize(pathElement.data.meta)});this.eventEmitter.emit('draw',{type:'point',value:pathElement.data.value,index:pathElement.data.valueIndex,meta:pathElement.data.meta,series:series,seriesIndex:seriesIndex,axisX:axisX,axisY:axisY,group:seriesElement,element:point,x:pathElement.x,y:pathElement.y});}.bind(this));}if(seriesOptions.showLine){var line=seriesElement.elem('path',{d:path.stringify()},options.classNames.line,true);this.eventEmitter.emit('draw',{type:'line',values:data.normalized.series[seriesIndex],path:path.clone(),chartRect:chartRect,index:seriesIndex,series:series,seriesIndex:seriesIndex,seriesMeta:series.meta,axisX:axisX,axisY:axisY,group:seriesElement,element:line});}// Area currently only works with axes that support a range!\nif(seriesOptions.showArea&&axisY.range){// If areaBase is outside the chart area (< min or > max) we need to set it respectively so that\n// the area is not drawn outside the chart area.\nvar areaBase=Math.max(Math.min(seriesOptions.areaBase,axisY.range.max),axisY.range.min);// We project the areaBase value into screen coordinates\nvar areaBaseProjected=chartRect.y1-axisY.projectValue(areaBase);// In order to form the area we'll first split the path by move commands so we can chunk it up into segments\npath.splitByCommand('M').filter(function onlySolidSegments(pathSegment){// We filter only \"solid\" segments that contain more than one point. Otherwise there's no need for an area\nreturn pathSegment.pathElements.length>1;}).map(function convertToArea(solidPathSegments){// Receiving the filtered solid path segments we can now convert those segments into fill areas\nvar firstElement=solidPathSegments.pathElements[0];var lastElement=solidPathSegments.pathElements[solidPathSegments.pathElements.length-1];// Cloning the solid path segment with closing option and removing the first move command from the clone\n// We then insert a new move that should start at the area base and draw a straight line up or down\n// at the end of the path we add an additional straight line to the projected area base value\n// As the closing option is set our path will be automatically closed\nreturn solidPathSegments.clone(true).position(0).remove(1).move(firstElement.x,areaBaseProjected).line(firstElement.x,firstElement.y).position(solidPathSegments.pathElements.length+1).line(lastElement.x,areaBaseProjected);}).forEach(function createArea(areaPath){// For each of our newly created area paths, we'll now create path elements by stringifying our path objects\n// and adding the created DOM elements to the correct series group\nvar area=seriesElement.elem('path',{d:areaPath.stringify()},options.classNames.area,true);// Emit an event for each area that was drawn\nthis.eventEmitter.emit('draw',{type:'area',values:data.normalized.series[seriesIndex],path:areaPath.clone(),series:series,seriesIndex:seriesIndex,axisX:axisX,axisY:axisY,chartRect:chartRect,index:seriesIndex,group:seriesElement,element:area});}.bind(this));}}.bind(this));this.eventEmitter.emit('created',{bounds:axisY.bounds,chartRect:chartRect,axisX:axisX,axisY:axisY,svg:this.svg,options:options});}", "function componentPolarArea () {\n\n /* Default Properties */\n var width = 300;\n var height = 300;\n var radius = 150;\n var startAngle = 0;\n var endAngle = 360;\n var transition = { ease: d3.easeBounce, duration: 500 };\n var colors = palette.categorical(3);\n var colorScale = void 0;\n var xScale = void 0;\n var yScale = void 0;\n var dispatch = d3.dispatch(\"customValueMouseOver\", \"customValueMouseOut\", \"customValueClick\", \"customSeriesMouseOver\", \"customSeriesMouseOut\", \"customSeriesClick\");\n var classed = \"polarArea\";\n\n /**\n * Initialise Data and Scales\n *\n * @private\n * @param {Array} data - Chart data.\n */\n function init(data) {\n var _dataTransform$summar = dataTransform(data).summary(),\n columnKeys = _dataTransform$summar.columnKeys,\n valueMax = _dataTransform$summar.valueMax;\n\n var valueExtent = [0, valueMax];\n\n if (typeof radius === \"undefined\") {\n radius = Math.min(width, height) / 2;\n }\n\n if (typeof colorScale === \"undefined\") {\n colorScale = d3.scaleOrdinal().domain(columnKeys).range(colors);\n }\n\n if (typeof xScale === \"undefined\") {\n xScale = d3.scaleBand().domain(columnKeys).rangeRound([startAngle, endAngle]).padding(0.15);\n }\n\n if (typeof yScale === \"undefined\") {\n yScale = d3.scaleLinear().domain(valueExtent).range([0, radius]).nice();\n }\n }\n\n /**\n * Constructor\n *\n * @constructor\n * @alias polarArea\n * @param {d3.selection} selection - The chart holder D3 selection.\n */\n function my(selection) {\n init(selection.data());\n selection.each(function () {\n\n // Pie Generator\n startAngle = d3.min(xScale.range());\n endAngle = d3.max(xScale.range());\n var pie = d3.pie().value(1).sort(null).startAngle(startAngle * (Math.PI / 180)).endAngle(endAngle * (Math.PI / 180)).padAngle(0);\n\n // Arc Generator\n var arc = d3.arc().outerRadius(function (d) {\n return yScale(d.data.value);\n }).innerRadius(0).cornerRadius(2);\n\n // Update series group\n var seriesGroup = d3.select(this);\n seriesGroup.classed(classed, true).attr(\"id\", function (d) {\n return d.key;\n }).on(\"mouseover\", function (d) {\n dispatch.call(\"customSeriesMouseOver\", this, d);\n }).on(\"click\", function (d) {\n dispatch.call(\"customSeriesClick\", this, d);\n });\n\n // Add segments to series\n var segments = seriesGroup.selectAll(\".segment\").data(function (d) {\n return pie(d.values);\n });\n\n segments.enter().append(\"path\").classed(\"segment\", true).style(\"fill\", function (d) {\n return colorScale(d.data.key);\n }).on(\"mouseover\", function (d) {\n dispatch.call(\"customValueMouseOver\", this, d.data);\n }).on(\"click\", function (d) {\n dispatch.call(\"customValueClick\", this, d.data);\n }).merge(segments).transition().ease(transition.ease).duration(transition.duration).attr(\"d\", arc);\n\n segments.exit().transition().style(\"opacity\", 0).remove();\n });\n }\n\n /**\n * Width Getter / Setter\n *\n * @param {number} _v - Width in px.\n * @returns {*}\n */\n my.width = function (_v) {\n if (!arguments.length) return width;\n width = _v;\n return this;\n };\n\n /**\n * Height Getter / Setter\n *\n * @param {number} _v - Height in px.\n * @returns {*}\n */\n my.height = function (_v) {\n if (!arguments.length) return height;\n height = _v;\n return this;\n };\n\n /**\n * Radius Getter / Setter\n *\n * @param {number} _v - Radius in px.\n * @returns {*}\n */\n my.radius = function (_v) {\n if (!arguments.length) return radius;\n radius = _v;\n return this;\n };\n\n /**\n * Color Scale Getter / Setter\n *\n * @param {d3.scale} _v - D3 color scale.\n * @returns {*}\n */\n my.colorScale = function (_v) {\n if (!arguments.length) return colorScale;\n colorScale = _v;\n return my;\n };\n\n /**\n * Colors Getter / Setter\n *\n * @param {Array} _v - Array of colours used by color scale.\n * @returns {*}\n */\n my.colors = function (_v) {\n if (!arguments.length) return colors;\n colors = _v;\n return my;\n };\n\n /**\n * X Scale Getter / Setter\n *\n * @param {d3.scale} _v - D3 scale.\n * @returns {*}\n */\n my.xScale = function (_v) {\n if (!arguments.length) return xScale;\n xScale = _v;\n return my;\n };\n\n /**\n * Y Scale Getter / Setter\n *\n * @param {d3.scale} _v - D3 scale.\n * @returns {*}\n */\n my.yScale = function (_v) {\n if (!arguments.length) return yScale;\n yScale = _v;\n return my;\n };\n\n /**\n * Dispatch Getter / Setter\n *\n * @param {d3.dispatch} _v - Dispatch event handler.\n * @returns {*}\n */\n my.dispatch = function (_v) {\n if (!arguments.length) return dispatch();\n dispatch = _v;\n return this;\n };\n\n /**\n * Dispatch On Getter\n *\n * @returns {*}\n */\n my.on = function () {\n var value = dispatch.on.apply(dispatch, arguments);\n return value === dispatch ? my : value;\n };\n\n return my;\n }", "_calculateTickAndLabelDistance() {\n const that = this,\n measurements = that._measurements;\n\n if (that.scalePosition === 'none') {\n that._plotLabels = false;\n that._plotTicks = false;\n\n measurements.innerRadius = measurements.radius;\n\n return { majorTickDistance: 0, minorTickDistance: 0, labelDistance: 0, needleDistance: 0, trackDistance: 0 };\n }\n\n const labelsSize = that._tickIntervalHandler.labelsSize,\n labelSizeCoefficient = that._largestLabelSize || Math.max(labelsSize.minLabelSize, labelsSize.minLabelOtherSize, labelsSize.maxLabelSize, labelsSize.maxLabelOtherSize);\n let majorTickDistance = 1,\n minorTickDistance,\n labelDistance,\n needleDistance,\n trackDistance = 0;\n\n that._largestLabelSize = labelSizeCoefficient;\n\n if (that.scalePosition === 'outside') {\n majorTickDistance = labelSizeCoefficient;\n minorTickDistance = majorTickDistance + measurements.majorTickSize - measurements.minorTickSize;\n labelDistance = 0;\n }\n\n if (that.analogDisplayType === 'needle') {\n if (that.scalePosition === 'outside') {\n needleDistance = majorTickDistance + measurements.majorTickSize;\n }\n else {\n needleDistance = majorTickDistance + measurements.majorTickSize + labelSizeCoefficient;\n }\n\n if (that.ticksVisibility === 'none') {\n labelDistance = 0;\n needleDistance -= measurements.majorTickSize;\n }\n if (that.labelsVisibility === 'none') {\n needleDistance -= labelSizeCoefficient;\n if (that.scalePosition === 'outside') {\n majorTickDistance -= labelSizeCoefficient;\n minorTickDistance -= labelSizeCoefficient;\n }\n }\n }\n else {\n if (that.labelsVisibility === 'none' && that.ticksVisibility === 'none') {\n trackDistance = 0;\n }\n else {\n if (that.scalePosition === 'outside') {\n if (that.ticksPosition === 'scale') {\n if (that.labelsVisibility === 'none') {\n majorTickDistance = 1;\n minorTickDistance = 1 + measurements.majorTickSize - measurements.minorTickSize;\n }\n if (that.ticksVisibility !== 'none') {\n trackDistance = majorTickDistance + measurements.majorTickSize + 2;\n }\n else {\n trackDistance = labelSizeCoefficient;\n }\n }\n else {\n if (that.labelsVisibility !== 'none') {\n minorTickDistance = minorTickDistance - (measurements.trackWidth + measurements.trackBorderWidth) / 4;\n trackDistance = majorTickDistance - 1;\n }\n else {\n majorTickDistance = 1;\n minorTickDistance = (measurements.trackWidth + measurements.trackBorderWidth) / 4 + 1;\n trackDistance = 0;\n }\n }\n }\n else {\n if (that.ticksPosition === 'scale') {\n majorTickDistance = measurements.trackWidth + 1.5 * measurements.trackBorderWidth + 2;\n if (that.ticksVisibility === 'none') {\n labelDistance = majorTickDistance;\n }\n }\n else {\n minorTickDistance = (measurements.trackWidth + measurements.trackBorderWidth) / 4 + 1;\n }\n }\n }\n }\n\n if (minorTickDistance === undefined) {\n minorTickDistance = majorTickDistance;\n }\n\n if (labelDistance === undefined) {\n labelDistance = majorTickDistance + measurements.majorTickSize;\n }\n\n measurements.innerRadius = measurements.radius - labelDistance;\n\n delete that._plotLabels;\n delete that._plotTicks;\n delete that._equalToHalfRadius;\n if (that.scalePosition === 'inside') {\n if (measurements.innerRadius < labelSizeCoefficient) {\n that._plotLabels = false;\n\n if (that.ticksPosition === 'scale') {\n if (that.analogDisplayType !== 'needle' && measurements.innerRadius < measurements.majorTickSize) {\n that._plotTicks = false;\n }\n }\n else {\n that._equalToHalfRadius = true;\n measurements.innerRadius = measurements.radius / 2;\n }\n }\n }\n else if (measurements.radius - trackDistance - measurements.trackBorderWidth < measurements.trackWidth) {\n measurements.trackWidth = measurements.radius - trackDistance - measurements.trackBorderWidth;\n measurements.lineSize = measurements.trackWidth + measurements.trackBorderWidth;\n if (that.ticksPosition === 'track') {\n measurements.majorTickSize = measurements.lineSize;\n measurements.minorTickSize = measurements.majorTickSize / 2;\n minorTickDistance = majorTickDistance + (measurements.majorTickSize - measurements.minorTickSize) / 2;\n }\n }\n\n return { majorTickDistance: majorTickDistance, minorTickDistance: minorTickDistance, labelDistance: labelDistance, needleDistance: needleDistance, trackDistance: trackDistance };\n }", "constructor(container, isUseYForName = false) {\n const chart = am4core.create(container, am4charts.XYChart);\n this.chart = chart;\n this.configureChart(isUseYForName);\n // https://www.amcharts.com/docs/v4/tutorials/auto-adjusting-chart-height-based-on-a-number-of-data-items/\n // noinspection SpellCheckingInspection\n // chart.events.on(\"datavalidated\", (event: any) => {\n // const chart = event.target\n // const categoryAxis = chart.yAxes.getIndex(0)\n // const adjustHeight = chart.data.length * (isUseYForName ? 20 : 10) - categoryAxis.pixelHeight\n //\n // // get current chart height\n // let targetHeight = chart.pixelHeight + adjustHeight\n //\n // // Set it on chart's container\n // chart.svgContainer.htmlElement.style.height = targetHeight + \"px\"\n // })\n chart.scrollbarX = new am4core.Scrollbar();\n }", "function radarBarPNBP(canvas,label,hasil,maks){\n\tvar ctx = $(canvas);\n\tvar radarBarPNBP = new Chart(ctx,{\n\ttype : 'radar',\n\tdata : {\n\t\tlabels : label,\n\t\tdatasets : hasil\n\t},\n\toptions : {\n\t\tscale : {\n\t\t\tdisplay : true,\n\t\t\tticks : {\n\t\t\t\tmax : maks\n\t\t\t},\n\t\t\tpointLabels: {\n\t fontSize: 12,\n\t fontStyle: '300',\n\t fontColor: 'rgba(0, 0, 0, 1)',\n\t fontFamily: \"'Lato', sans-serif\"\n\t }\n\t\t},\n\t\tanimation: {\n\t\t\tduration: 1,\n\t\t\tonComplete: function () {\n\t\t\t // render the value of the chart above the bar\n\t\t\t var ctx = this.chart.ctx;\n\t\t\t ctx.font = Chart.helpers.fontString(Chart.defaults.global.defaultFontSize, 'normal', Chart.defaults.global.defaultFontFamily);\n\t\t\t ctx.fillStyle = this.chart.config.options.defaultFontColor;\n\t\t\t ctx.textAlign = 'center';\n\t\t\t ctx.textBaseline = 'bottom';\n\t\t\t this.data.datasets.forEach(function (dataset) {\n\t\t\t for (var i = 0; i < dataset.data.length; i++) {\n\t\t\t var model = dataset._meta[Object.keys(dataset._meta)[0]].data[i]._model;\n\t\t\t ctx.fillText(dataset.data[i], model.x, model.y - 5);\n\t\t\t }\n\t\t\t });\n\t\t\t}\n\t\t}\n\t}\n})\n}", "function SVGLineChart() {\r\n }", "function chartBarChartCircular () {\n\n /* Default Properties */\n var svg = void 0;\n var chart = void 0;\n var classed = \"barChartCircular\";\n var width = 400;\n var height = 300;\n var margin = { top: 20, right: 20, bottom: 20, left: 20 };\n var transition = { ease: d3.easeBounce, duration: 500 };\n var colors = palette.categorical(3);\n var dispatch = d3.dispatch(\"customValueMouseOver\", \"customValueMouseOut\", \"customValueClick\", \"customSeriesMouseOver\", \"customSeriesMouseOut\", \"customSeriesClick\");\n\n /* Chart Dimensions */\n var chartW = void 0;\n var chartH = void 0;\n var radius = void 0;\n var innerRadius = void 0;\n\n /* Scales */\n var xScale = void 0;\n var yScale = void 0;\n var colorScale = void 0;\n\n /* Other Customisation Options */\n var startAngle = 0;\n var endAngle = 270;\n\n /**\n * Initialise Data and Scales\n *\n * @private\n * @param {Array} data - Chart data.\n */\n function init(data) {\n chartW = width - (margin.left + margin.right);\n chartH = height - (margin.top + margin.bottom);\n\n var _dataTransform$summar = dataTransform(data).summary(),\n columnKeys = _dataTransform$summar.columnKeys,\n valueMax = _dataTransform$summar.valueMax;\n\n var valueExtent = [valueMax, 0];\n\n if (typeof radius === \"undefined\") {\n radius = Math.min(chartW, chartH) / 2;\n }\n\n if (typeof innerRadius === \"undefined\") {\n innerRadius = radius / 4;\n }\n\n if (typeof colorScale === \"undefined\") {\n colorScale = d3.scaleOrdinal().domain(columnKeys).range(colors);\n }\n\n xScale = d3.scaleBand().domain(columnKeys).rangeRound([innerRadius, radius]).padding(0.15);\n\n yScale = d3.scaleLinear().domain(valueExtent).range([startAngle, endAngle]);\n }\n\n /**\n * Constructor\n *\n * @constructor\n * @alias barChartCircular\n * @param {d3.selection} selection - The chart holder D3 selection.\n */\n function my(selection) {\n // Create SVG element (if it does not exist already)\n if (!svg) {\n svg = function (selection) {\n var el = selection._groups[0][0];\n if (!!el.ownerSVGElement || el.tagName === \"svg\") {\n return selection;\n } else {\n return selection.append(\"svg\");\n }\n }(selection);\n\n svg.classed(\"d3ez\", true).attr(\"width\", width).attr(\"height\", height);\n\n chart = svg.append(\"g\").classed(\"chart\", true);\n } else {\n chart = selection.select(\".chart\");\n }\n\n // Update the chart dimensions and add layer groups\n var layers = [\"circularAxis\", \"barsCircular\", \"circularSectorLabels\", \"circularRingLabels\"];\n chart.classed(classed, true).attr(\"transform\", \"translate(\" + width / 2 + \",\" + height / 2 + \")\").attr(\"width\", chartW).attr(\"height\", chartH).selectAll(\"g\").data(layers).enter().append(\"g\").attr(\"class\", function (d) {\n return d;\n });\n\n selection.each(function (data) {\n // Initialise Data\n init(data);\n\n // Circular Axis\n var circularAxis = component.circularAxis().radius(radius).radialScale(yScale).ringScale(xScale);\n\n chart.select(\".circularAxis\").call(circularAxis);\n\n // Radial Bars\n var barsCircular = component.barsCircular().radius(radius).innerRadius(innerRadius).colorScale(colorScale).xScale(xScale).dispatch(dispatch);\n\n chart.select(\".barsCircular\").datum(data).call(barsCircular);\n\n // Outer Labels\n var circularSectorLabels = component.circularSectorLabels().radius(radius * 1.04).radialScale(yScale).textAnchor(\"middle\");\n\n chart.select(\".circularSectorLabels\").call(circularSectorLabels);\n\n // Ring Labels\n var circularRingLabels = component.circularRingLabels().radialScale(xScale).textAnchor(\"middle\");\n\n chart.select(\".circularRingLabels\").call(circularRingLabels);\n });\n }\n\n /**\n * Width Getter / Setter\n *\n * @param {number} _v - Width in px.\n * @returns {*}\n */\n my.width = function (_v) {\n if (!arguments.length) return width;\n width = _v;\n return this;\n };\n\n /**\n * Height Getter / Setter\n *\n * @param {number} _v - Height in px.\n * @returns {*}\n */\n my.height = function (_v) {\n if (!arguments.length) return height;\n height = _v;\n return this;\n };\n\n /**\n * Margin Getter / Setter\n *\n * @param {number} _v - Margin in px.\n * @returns {*}\n */\n my.margin = function (_v) {\n if (!arguments.length) return margin;\n margin = _v;\n return this;\n };\n\n /**\n * Radius Getter / Setter\n *\n * @param {number} _v - Radius in px.\n * @returns {*}\n */\n my.radius = function (_v) {\n if (!arguments.length) return radius;\n radius = _v;\n return this;\n };\n\n /**\n * Inner Radius Getter / Setter\n *\n * @param {number} _v - Inner radius in px.\n * @returns {*}\n */\n my.innerRadius = function (_v) {\n if (!arguments.length) return innerRadius;\n innerRadius = _v;\n return this;\n };\n\n /**\n * Colors Getter / Setter\n *\n * @param {Array} _v - Array of colours used by color scale.\n * @returns {*}\n */\n my.colors = function (_v) {\n if (!arguments.length) return colors;\n colors = _v;\n return this;\n };\n\n /**\n * Color Scale Getter / Setter\n *\n * @param {d3.scale} _v - D3 color scale.\n * @returns {*}\n */\n my.colorScale = function (_v) {\n if (!arguments.length) return colorScale;\n colorScale = _v;\n return this;\n };\n\n /**\n * Transition Getter / Setter\n *\n * @param {d3.transition} _v - D3 transition style.\n * @returns {*}\n */\n my.transition = function (_v) {\n if (!arguments.length) return transition;\n transition = _v;\n return this;\n };\n\n /**\n * Dispatch Getter / Setter\n *\n * @param {d3.dispatch} _v - Dispatch event handler.\n * @returns {*}\n */\n my.dispatch = function (_v) {\n if (!arguments.length) return dispatch();\n dispatch = _v;\n return this;\n };\n\n /**\n * Dispatch On Getter\n *\n * @returns {*}\n */\n my.on = function () {\n var value = dispatch.on.apply(dispatch, arguments);\n return value === dispatch ? my : value;\n };\n\n return my;\n }", "function SVGStackedRowChart() {\r\n }", "function calRadialBar(barSeries) {\n\t // Columns info on each category axis. Key is polar name\n\t var columnsMap = {};\n\t each(barSeries, function (seriesModel, idx) {\n\t var data = seriesModel.getData();\n\t var polar = seriesModel.coordinateSystem;\n\t var baseAxis = polar.getBaseAxis();\n\t var axisKey = getAxisKey$1(polar, baseAxis);\n\t var axisExtent = baseAxis.getExtent();\n\t var bandWidth = baseAxis.type === 'category' ? baseAxis.getBandWidth() : Math.abs(axisExtent[1] - axisExtent[0]) / data.count();\n\t var columnsOnAxis = columnsMap[axisKey] || {\n\t bandWidth: bandWidth,\n\t remainedWidth: bandWidth,\n\t autoWidthCount: 0,\n\t categoryGap: '20%',\n\t gap: '30%',\n\t stacks: {}\n\t };\n\t var stacks = columnsOnAxis.stacks;\n\t columnsMap[axisKey] = columnsOnAxis;\n\t var stackId = getSeriesStackId$1(seriesModel);\n\t\n\t if (!stacks[stackId]) {\n\t columnsOnAxis.autoWidthCount++;\n\t }\n\t\n\t stacks[stackId] = stacks[stackId] || {\n\t width: 0,\n\t maxWidth: 0\n\t };\n\t var barWidth = parsePercent$1(seriesModel.get('barWidth'), bandWidth);\n\t var barMaxWidth = parsePercent$1(seriesModel.get('barMaxWidth'), bandWidth);\n\t var barGap = seriesModel.get('barGap');\n\t var barCategoryGap = seriesModel.get('barCategoryGap');\n\t\n\t if (barWidth && !stacks[stackId].width) {\n\t barWidth = Math.min(columnsOnAxis.remainedWidth, barWidth);\n\t stacks[stackId].width = barWidth;\n\t columnsOnAxis.remainedWidth -= barWidth;\n\t }\n\t\n\t barMaxWidth && (stacks[stackId].maxWidth = barMaxWidth);\n\t barGap != null && (columnsOnAxis.gap = barGap);\n\t barCategoryGap != null && (columnsOnAxis.categoryGap = barCategoryGap);\n\t });\n\t var result = {};\n\t each(columnsMap, function (columnsOnAxis, coordSysName) {\n\t result[coordSysName] = {};\n\t var stacks = columnsOnAxis.stacks;\n\t var bandWidth = columnsOnAxis.bandWidth;\n\t var categoryGap = parsePercent$1(columnsOnAxis.categoryGap, bandWidth);\n\t var barGapPercent = parsePercent$1(columnsOnAxis.gap, 1);\n\t var remainedWidth = columnsOnAxis.remainedWidth;\n\t var autoWidthCount = columnsOnAxis.autoWidthCount;\n\t var autoWidth = (remainedWidth - categoryGap) / (autoWidthCount + (autoWidthCount - 1) * barGapPercent);\n\t autoWidth = Math.max(autoWidth, 0); // Find if any auto calculated bar exceeded maxBarWidth\n\t\n\t each(stacks, function (column, stack) {\n\t var maxWidth = column.maxWidth;\n\t\n\t if (maxWidth && maxWidth < autoWidth) {\n\t maxWidth = Math.min(maxWidth, remainedWidth);\n\t\n\t if (column.width) {\n\t maxWidth = Math.min(maxWidth, column.width);\n\t }\n\t\n\t remainedWidth -= maxWidth;\n\t column.width = maxWidth;\n\t autoWidthCount--;\n\t }\n\t }); // Recalculate width again\n\t\n\t autoWidth = (remainedWidth - categoryGap) / (autoWidthCount + (autoWidthCount - 1) * barGapPercent);\n\t autoWidth = Math.max(autoWidth, 0);\n\t var widthSum = 0;\n\t var lastColumn;\n\t each(stacks, function (column, idx) {\n\t if (!column.width) {\n\t column.width = autoWidth;\n\t }\n\t\n\t lastColumn = column;\n\t widthSum += column.width * (1 + barGapPercent);\n\t });\n\t\n\t if (lastColumn) {\n\t widthSum -= lastColumn.width * barGapPercent;\n\t }\n\t\n\t var offset = -widthSum / 2;\n\t each(stacks, function (column, stackId) {\n\t result[coordSysName][stackId] = result[coordSysName][stackId] || {\n\t offset: offset,\n\t width: column.width\n\t };\n\t offset += column.width * (1 + barGapPercent);\n\t });\n\t });\n\t return result;\n\t }", "function loadSelfData() {\n console.log(\"to load self swipe DATA\");\n var chartData = generateChartData();\n // console.log(\"amschart data\");\n // console.log(chartData);\n var chart = AmCharts.makeChart(\"chartdiv\", {\n \"type\": \"serial\",\n \"panEventsEnabled\": false,\n \"pan\": true,\n \"theme\": \"light\",\n \"marginRight\": 80,\n \"autoMarginOffset\": 20,\n \"marginTop\": 7,\n \"dataProvider\": chartData,\n \"valueAxes\": [{\n \"axisAlpha\": 0.2,\n \"dashLength\": 1,\n \"position\": \"left\"\n }],\n \"mouseWheelZoomEnabled\": true,\n \"graphs\": [{\n \"id\": \"g1\",\n \"balloonText\": \"[[category]]<br/><b><span style='font-size:14px;'>value: [[value]]</span></b>\",\n \"bullet\": \"round\",\n \"bulletBorderAlpha\": 1,\n \"bulletColor\": \"#FFFFFF\",\n \"hideBulletsCount\": 50,\n \"title\": \"red line\",\n \"valueField\": \"visits\",\n \"useLineColorForBulletBorder\": true\n }],\n \"chartScrollbar\": {\n \"autoGridCount\": true,\n \"graph\": \"g1\",\n \"scrollbarHeight\": 40\n },\n \"chartCursor\": {},\n \"categoryField\": \"date\",\n \"categoryAxis\": {\n \"parseDates\": true,\n \"axisColor\": \"#DADADA\",\n \"dashLength\": 1,\n \"minorGridEnabled\": true\n },\n \"export\": {\n \"enabled\": true\n }\n });\n chart.addListener(\"rendered\", zoomChart);\n zoomChart();\n // this method is called when chart is first inited as we listen for \"dataUpdated\" event\n function zoomChart() {\n // different zoom methods can be used - zoomToIndexes, zoomToDates, zoomToCategoryValues\n chart.zoomToIndexes(chartData.length - 40, chartData.length - 1);\n }\n // generate some random data, quite different range\n\n function generateChartData() {\n var chartData = [];\n var firstDate = new Date();\n firstDate.setDate(firstDate.getDate() - 5);\n for (var i = 0; i < 1000; i++) {\n // we create date objects here. In your data, you can have date strings\n // and then set format of your dates using chart.dataDateFormat property,\n // however when possible, use date objects, as this will speed up chart rendering.\n var newDate = new Date(firstDate);\n newDate.setDate(newDate.getDate() + i);\n var visits = Math.round(Math.random() * (40 + i / 5)) + 20 +\n i;\n chartData.push({\n date: newDate,\n visits: visits\n });\n }\n return chartData;\n }\n}", "function drawRingPieCharts (resObj)\n{\n require.config({paths:{echarts:'js/echarts'}});\n require(\n ['echarts'],\n function (ec) {\n var myChart = ec.init(document.getElementById('dataDisplay'));\n var option = {\n title : {\n text: resObj.title,\n subtext: resObj.subtext,\n x:'center'\n },\n tooltip : {\n trigger: 'item',\n formatter: \"{a} <br/>{b} : {c} ({d}%)\"\n },\n legend: {\n orient : 'vertical',\n x : 'left',\n data:resObj.data\n },\n toolbox: {\n show : true,\n feature : {\n mark : true,\n dataView : {readOnly: false},\n restore : true,\n saveAsImage : true\n }\n },\n calculable : false,\n series : [\n {\n name:'团队顾客数量',\n type:'pie',\n selectedMode: 'single',\n radius : [0, 100],\n itemStyle : {\n normal : {\n label : {\n position : 'inner'\n },\n labelLine : {\n show : false\n }\n }\n },\n data:resObj.role\n },\n {\n name:'个人顾客数量',\n type:'pie',\n radius : [120, 160],\n data:resObj.admin\n }\n ]\n };\n\n myChart.setOption(option);\n }\n );\n}", "draw(surface, chartProps) {\n let overlaySVG = surface.getOverlaySVG();\n const {\n accessor,\n plotData: data\n } = this.properties;\n const {\n xDisplayFormat,\n displayFormat,\n origin,\n labelTexts\n } = this.properties;\n const { origin: chartOrigin } = chartProps;\n\n let realOrigin = [chartOrigin[0] + origin[0], chartOrigin[1] + origin[1]];\n let [x, y] = realOrigin;\n\n let date, open, high, low, close, volume;\n let currentItem = chartProps.currentItem;\n if(currentItem == undefined || accessor(currentItem) == undefined) {\n //use latest data as backup\n currentItem = data[data.length - 1];\n }\n if(currentItem != undefined && accessor(currentItem) != undefined) {\n let currentData = accessor(currentItem);\n //format these values\n date = xDisplayFormat(currentData.date);\n open = currentData.open;\n high = currentData.high;\n low = currentData.low;\n close = currentData.close;\n volume = currentData.volume;\n }\n\n let ohlcTarget = d3Select(overlaySVG).append(\"g\");\n ohlcTarget.attr(\"class\", \"label-ohlc\")\n .attr(\"id\", \"label-ohlc\")\n .attr(\"transform\", `translate(${x}, ${y})`);\n\n let labelText = ohlcTarget.append(\"text\")\n .attr(\"text-anchor\", \"start\")\n .attr(\"font-size\", 15)\n .attr(\"dy\", \"0.35em\");\n\n let spanLabel = labelText.append(\"tspan\")\n .attr(\"class\", \"label-text\");\n spanLabel.append(\"tspan\")\n .attr(\"key\", \"date\")\n .attr(\"fill\", \"#9400D3\")\n .text(labelTexts.date);\n spanLabel.append(\"tspan\")\n .attr(\"key\", \"value_date\")\n .text(date);\n\n spanLabel.append(\"tspan\")\n .attr(\"key\", \"open\")\n .attr(\"fill\", \"#9400D3\")\n .text(labelTexts.open);\n spanLabel.append(\"tspan\")\n .attr(\"key\", \"value_open\")\n .text(open);\n\n spanLabel.append(\"tspan\")\n .attr(\"key\", \"high\")\n .attr(\"fill\", \"#9400D3\")\n .text(labelTexts.high);\n spanLabel.append(\"tspan\")\n .attr(\"key\", \"value_high\")\n .text(high);\n\n spanLabel.append(\"tspan\")\n .attr(\"key\", \"low\")\n .attr(\"fill\", \"#9400D3\")\n .text(labelTexts.low);\n spanLabel.append(\"tspan\")\n .attr(\"key\", \"value_low\")\n .text(low);\n\n spanLabel.append(\"tspan\")\n .attr(\"key\", \"close\")\n .attr(\"fill\", \"#9400D3\")\n .text(labelTexts.close);\n spanLabel.append(\"tspan\")\n .attr(\"key\", \"value_close\")\n .text(close);\n }", "function createLevel2Chart() {\n\n $(\"#divlevel2chart\").kendoChart({\n dataSource: Level2dataSource,\n dataBound: onDB,\n data: {\n Accept: \"application/json\"\n },\n title: {\n text: \"Click graph for more details\",\n color: \"#C61835\"\n },\n legend: {\n position: \"bottom\"\n },\n seriesDefaults: {\n type: \"bar\",\n stack: {\n type: \"100%\"\n },\n labels: {\n visible: true,\n font: \"bold 14px Arial,Helvetica,sans-serif\",\n background: \"transparent\",\n position: \"center\",\n template: function (e) {\n\n var percentage = 0;\n var numerator = 0;\n var totalCount = e.dataItem.EPCount;\n var seriesFieldName = e.series.field;\n\n switch (seriesFieldName) {\n case ScoreCompletePercentage:\n percentage = e.dataItem.ScoreCompletePercentage;\n numerator = e.dataItem.ScoreCompleteCount;\n break;\n\n case ScorePastDueDatePercentage:\n percentage = e.dataItem.ScorePastDueDatePercentage;\n numerator = e.dataItem.ScorePastDueDateCount;\n break;\n\n case ScoreNotCompletePercentage:\n percentage = e.dataItem.ScoreNotCompletePercentage;\n numerator = e.dataItem.ScoreNotCompleteCount;\n break;\n\n }\n\n if (percentage <= 15) {\n return percentage.toFixed(2) + \"%\";\n }\n else { return percentage.toFixed(2) + \"% (\" + numerator + \"/\" + totalCount + \")\"; }\n\n }\n }\n },\n series:\n [{\n field: ScoreCompletePercentage,\n name: \"Score Complete\",\n color: \"#5da5da\",\n labels: {\n color: \"black\"\n\n }\n }, {\n field: ScorePastDueDatePercentage,\n name: \"Score Past Due Date\",\n color: \"#faa43a\",\n labels: {\n color: \"black\",\n }\n }\n , {\n field: ScoreNotCompletePercentage,\n name: \"Score Not Complete\",\n color: \"#b7b7b7\",\n labels: {\n color: \"black\"\n }\n }\n\n ],\n categoryAxis: {\n field: \"ChapterCode\",\n value: \"ChapterID\",\n majorGridLines: {\n visible: false\n }\n },\n valueAxis: {\n min: 0,\n line: {\n visible: false\n },\n minorGridLines: {\n visible: false\n }\n },\n tooltip: {\n visible: true,\n //template: \"#= series.name #: #= kendo.format('{0:n2}%',value) #\"\n template: function (e) {\n\n var percentage = 0;\n var numerator = 0;\n var totalCount = e.dataItem.EPCount;\n var seriesFieldName = e.series.field;\n var seriesName = e.series.name;\n\n switch (seriesFieldName) {\n case ScoreCompletePercentage:\n percentage = e.dataItem.ScoreCompletePercentage;\n numerator = e.dataItem.ScoreCompleteCount;\n break;\n\n case ScorePastDueDatePercentage:\n percentage = e.dataItem.ScorePastDueDatePercentage;\n numerator = e.dataItem.ScorePastDueDateCount;\n break;\n\n case ScoreNotCompletePercentage:\n percentage = e.dataItem.ScoreNotCompletePercentage;\n numerator = e.dataItem.ScoreNotCompleteCount;\n break;\n\n }\n\n return seriesName + \": \" + percentage.toFixed(2) + \"% (\" + numerator + \"/\" + totalCount + \")\";\n\n }\n\n },\n seriesClick: onLevel2SeriesClick\n });\n\n}", "function createLevel4Chart() {\n $(\"#divlevel4chart\").kendoChart({\n\n dataSource: Level4dataSource,\n dataBound: onDB,\n title: {\n text: \"Click graph for more details\",\n color: \"#C61835\"\n },\n overlay: {\n gradient: null\n },\n legend: {\n position: \"bottom\"\n },\n seriesDefaults: {\n type: \"bar\",\n stack: {\n type: \"100%\"\n }\n },\n series:\n [{\n field: \"CompliancePercent\",\n name: \"Compliance\",\n color: \"#5bb346\",\n labels: {\n visible: true,\n position: \"center\",\n background: \"transparent\",\n format: \"{0:n1}%\"\n\n }\n }, {\n field: \"NonCompliancePercent\",\n name: \"Non Compliance\",\n color: \"#C61835\",\n labels: {\n visible: true,\n position: \"center\",\n background: \"transparent\",\n format: \"{0:n1}%\"\n\n }\n }\n , {\n field: \"NACompliancePercent\",\n name: \"Not Applicable\",\n color: \"#939393\",\n labels: {\n visible: true,\n position: \"center\",\n background: \"transparent\",\n format: \"Not Applicable: {0:n1}%\"\n\n }\n }\n\n ],\n categoryAxis: {\n field: \"StandardLabel\",\n\n majorGridLines: {\n visible: true\n }\n },\n valueAxis: {\n min: 0,\n line: {\n visible: false\n },\n minorGridLines: {\n visible: false\n }\n },\n tooltip: {\n visible: true,\n template: \"#= series.name #: #= kendo.format('{0:n1}%',value) #\"\n },\n seriesClick: onLevel4SeriesClick\n });\n}", "renderGlobalScale() {\n\n // Initialising local variables\n var barHeight = this.parent.opt.barHeight;\n var labelWidth = this.parent.opt.labelWidth;\n var plotContainerId = this.parent.plotContainer;\n var offset = this.parent.opt.headerOffset;\n var data = this.parent.data;\n var self = this; // Saving this object in self for property method calling withing functions \n var optionsHeight = $(`#bar_expression_viewer_options`).height();\n\n opt.width = $(document).width() - labelWidth;\n opt.height = window.innerHeight;\n opt.side = opt.width;\n\n\n // Remove footer\n $(`#${this.parent.chartSVGidFoot}`).css('display', 'none');\n\n // Fix the position of the div conatainer of the ternary plot\n plotContainer = d3.select('#' + this.selector);\n\n // Set the svg height and width\t\n svg = plotContainer.append('g')\n .attr('id', 'ternaryPlotSVG')\n .attr(\"width\", $(document).width())\n .attr(\"height\", $('#' + this.selector).height())\n .attr(`transform`, `translate(${labelWidth},${-20})`)\n .style('font-family', this.parent.opt.fontFamily);\n\n\n if (typeof data.expression_bias !== 'undefined') {\n this._drawBlockDivisions();\n }\n\n // Adding a group for the ternary plot structure\n ternaryPlotGroup = svg.append('g')\n .attr('id', 'ternaryPlotGroup');\n\n // Add a sub group for the axes\n axes = ternaryPlotGroup.append('g');\n\n\n // Deciding the sizing of the ternary plot \n this._calculateplotSize();\n\n\n // Setting the position of the corners\n corners = [\n [opt.margin.left, h + opt.margin.top],\n [w + opt.margin.left, h + opt.margin.top],\n [(w / 2) + opt.margin.left, opt.margin.top]\n ]; //c\n\n\n // Loading the corner titles\n if (data.tern_order) {\n opt.axis_labels = data.tern_order;\n }\n // Render corner labels\n this._drawCornerLabels();\n\n // Render axis & axis titles \n opt.axis_ticks.forEach(function (v) {\n\n // Getting the 4 coordinates to draw the lines \n var coordsArr = self._getFourCoords(v);\n\n // Draw the axis \n self._drawAxis(coordsArr[0], coordsArr[1], opt.ternColors.left);\n self._drawAxis(coordsArr[1], coordsArr[2], opt.ternColors.right);\n self._drawAxis(coordsArr[2], coordsArr[3], opt.ternColors.bottom);\n\n // Tick labels\n self._drawTicks(coordsArr[0], 60, 'end', -opt.tickLabelMargin, v, opt.ternColors.left);\n self._drawTicks(coordsArr[1], -60, 'end', -opt.tickLabelMargin, 100 - v, opt.ternColors.right);\n self._drawTicks(coordsArr[2], 0, 'start', opt.tickLabelMargin, v, opt.ternColors.bottom);\n\n });\n\n // Render Arrows\n var rightArrowDistance = w / 2 + opt.margin.right / 2;\n var leftArrowDistance = w / 2 + opt.margin.left / 2;\n var bottomArrowDistance = h / 2 + opt.margin.bottom;\n this._drawLeftArrows(30, 30, opt.ternColors.left, leftArrowDistance);\n this._drawRightArrows(30, 30, opt.ternColors.bottom, rightArrowDistance);\n this._drawBottomArrows(90, 30, opt.ternColors.right, bottomArrowDistance);\n\n // Adjust Height \n this._adustTernaryHeight();\n\n this._responseToScroll();\n\n }", "createAxes () {\n }", "function createChart(options) {\n\t this.data = Chartist.normalizeData(this.data);\n\t var data = {\n\t raw: this.data,\n\t normalized: options.distributeSeries ? Chartist.getDataArray(this.data, options.reverseData, options.horizontalBars ? 'x' : 'y').map(function(value) {\n\t return [value];\n\t }) : Chartist.getDataArray(this.data, options.reverseData, options.horizontalBars ? 'x' : 'y')\n\t };\n\t\n\t var highLow;\n\t\n\t // Create new svg element\n\t this.svg = Chartist.createSvg(\n\t this.container,\n\t options.width,\n\t options.height,\n\t options.classNames.chart + (options.horizontalBars ? ' ' + options.classNames.horizontalBars : '')\n\t );\n\t\n\t // Drawing groups in correct order\n\t var gridGroup = this.svg.elem('g').addClass(options.classNames.gridGroup);\n\t var seriesGroup = this.svg.elem('g');\n\t var labelGroup = this.svg.elem('g').addClass(options.classNames.labelGroup);\n\t\n\t if(options.stackBars && data.normalized.length !== 0) {\n\t // If stacked bars we need to calculate the high low from stacked values from each series\n\t var serialSums = Chartist.serialMap(data.normalized, function serialSums() {\n\t return Array.prototype.slice.call(arguments).map(function(value) {\n\t return value;\n\t }).reduce(function(prev, curr) {\n\t return {\n\t x: prev.x + (curr && curr.x) || 0,\n\t y: prev.y + (curr && curr.y) || 0\n\t };\n\t }, {x: 0, y: 0});\n\t });\n\t\n\t highLow = Chartist.getHighLow([serialSums], Chartist.extend({}, options, {\n\t referenceValue: 0\n\t }), options.horizontalBars ? 'x' : 'y');\n\t } else {\n\t highLow = Chartist.getHighLow(data.normalized, Chartist.extend({}, options, {\n\t referenceValue: 0\n\t }), options.horizontalBars ? 'x' : 'y');\n\t }\n\t // Overrides of high / low from settings\n\t highLow.high = +options.high || (options.high === 0 ? 0 : highLow.high);\n\t highLow.low = +options.low || (options.low === 0 ? 0 : highLow.low);\n\t\n\t var chartRect = Chartist.createChartRect(this.svg, options, defaultOptions.padding);\n\t\n\t var valueAxis,\n\t labelAxisTicks,\n\t labelAxis,\n\t axisX,\n\t axisY;\n\t\n\t // We need to set step count based on some options combinations\n\t if(options.distributeSeries && options.stackBars) {\n\t // If distributed series are enabled and bars need to be stacked, we'll only have one bar and therefore should\n\t // use only the first label for the step axis\n\t labelAxisTicks = data.raw.labels.slice(0, 1);\n\t } else {\n\t // If distributed series are enabled but stacked bars aren't, we should use the series labels\n\t // If we are drawing a regular bar chart with two dimensional series data, we just use the labels array\n\t // as the bars are normalized\n\t labelAxisTicks = data.raw.labels;\n\t }\n\t\n\t // Set labelAxis and valueAxis based on the horizontalBars setting. This setting will flip the axes if necessary.\n\t if(options.horizontalBars) {\n\t if(options.axisX.type === undefined) {\n\t valueAxis = axisX = new Chartist.AutoScaleAxis(Chartist.Axis.units.x, data, chartRect, Chartist.extend({}, options.axisX, {\n\t highLow: highLow,\n\t referenceValue: 0\n\t }));\n\t } else {\n\t valueAxis = axisX = options.axisX.type.call(Chartist, Chartist.Axis.units.x, data, chartRect, Chartist.extend({}, options.axisX, {\n\t highLow: highLow,\n\t referenceValue: 0\n\t }));\n\t }\n\t\n\t if(options.axisY.type === undefined) {\n\t labelAxis = axisY = new Chartist.StepAxis(Chartist.Axis.units.y, data, chartRect, {\n\t ticks: labelAxisTicks\n\t });\n\t } else {\n\t labelAxis = axisY = options.axisY.type.call(Chartist, Chartist.Axis.units.y, data, chartRect, options.axisY);\n\t }\n\t } else {\n\t if(options.axisX.type === undefined) {\n\t labelAxis = axisX = new Chartist.StepAxis(Chartist.Axis.units.x, data, chartRect, {\n\t ticks: labelAxisTicks\n\t });\n\t } else {\n\t labelAxis = axisX = options.axisX.type.call(Chartist, Chartist.Axis.units.x, data, chartRect, options.axisX);\n\t }\n\t\n\t if(options.axisY.type === undefined) {\n\t valueAxis = axisY = new Chartist.AutoScaleAxis(Chartist.Axis.units.y, data, chartRect, Chartist.extend({}, options.axisY, {\n\t highLow: highLow,\n\t referenceValue: 0\n\t }));\n\t } else {\n\t valueAxis = axisY = options.axisY.type.call(Chartist, Chartist.Axis.units.y, data, chartRect, Chartist.extend({}, options.axisY, {\n\t highLow: highLow,\n\t referenceValue: 0\n\t }));\n\t }\n\t }\n\t\n\t // Projected 0 point\n\t var zeroPoint = options.horizontalBars ? (chartRect.x1 + valueAxis.projectValue(0)) : (chartRect.y1 - valueAxis.projectValue(0));\n\t // Used to track the screen coordinates of stacked bars\n\t var stackedBarValues = [];\n\t\n\t labelAxis.createGridAndLabels(gridGroup, labelGroup, this.supportsForeignObject, options, this.eventEmitter);\n\t valueAxis.createGridAndLabels(gridGroup, labelGroup, this.supportsForeignObject, options, this.eventEmitter);\n\t\n\t // Draw the series\n\t data.raw.series.forEach(function(series, seriesIndex) {\n\t // Calculating bi-polar value of index for seriesOffset. For i = 0..4 biPol will be -1.5, -0.5, 0.5, 1.5 etc.\n\t var biPol = seriesIndex - (data.raw.series.length - 1) / 2;\n\t // Half of the period width between vertical grid lines used to position bars\n\t var periodHalfLength;\n\t // Current series SVG element\n\t var seriesElement;\n\t\n\t // We need to set periodHalfLength based on some options combinations\n\t if(options.distributeSeries && !options.stackBars) {\n\t // If distributed series are enabled but stacked bars aren't, we need to use the length of the normaizedData array\n\t // which is the series count and divide by 2\n\t periodHalfLength = labelAxis.axisLength / data.normalized.length / 2;\n\t } else if(options.distributeSeries && options.stackBars) {\n\t // If distributed series and stacked bars are enabled we'll only get one bar so we should just divide the axis\n\t // length by 2\n\t periodHalfLength = labelAxis.axisLength / 2;\n\t } else {\n\t // On regular bar charts we should just use the series length\n\t periodHalfLength = labelAxis.axisLength / data.normalized[seriesIndex].length / 2;\n\t }\n\t\n\t // Adding the series group to the series element\n\t seriesElement = seriesGroup.elem('g');\n\t\n\t // Write attributes to series group element. If series name or meta is undefined the attributes will not be written\n\t seriesElement.attr({\n\t 'ct:series-name': series.name,\n\t 'ct:meta': Chartist.serialize(series.meta)\n\t });\n\t\n\t // Use series class from series data or if not set generate one\n\t seriesElement.addClass([\n\t options.classNames.series,\n\t (series.className || options.classNames.series + '-' + Chartist.alphaNumerate(seriesIndex))\n\t ].join(' '));\n\t\n\t data.normalized[seriesIndex].forEach(function(value, valueIndex) {\n\t var projected,\n\t bar,\n\t previousStack,\n\t labelAxisValueIndex;\n\t\n\t // We need to set labelAxisValueIndex based on some options combinations\n\t if(options.distributeSeries && !options.stackBars) {\n\t // If distributed series are enabled but stacked bars aren't, we can use the seriesIndex for later projection\n\t // on the step axis for label positioning\n\t labelAxisValueIndex = seriesIndex;\n\t } else if(options.distributeSeries && options.stackBars) {\n\t // If distributed series and stacked bars are enabled, we will only get one bar and therefore always use\n\t // 0 for projection on the label step axis\n\t labelAxisValueIndex = 0;\n\t } else {\n\t // On regular bar charts we just use the value index to project on the label step axis\n\t labelAxisValueIndex = valueIndex;\n\t }\n\t\n\t // We need to transform coordinates differently based on the chart layout\n\t if(options.horizontalBars) {\n\t projected = {\n\t x: chartRect.x1 + valueAxis.projectValue(value && value.x ? value.x : 0, valueIndex, data.normalized[seriesIndex]),\n\t y: chartRect.y1 - labelAxis.projectValue(value && value.y ? value.y : 0, labelAxisValueIndex, data.normalized[seriesIndex])\n\t };\n\t } else {\n\t projected = {\n\t x: chartRect.x1 + labelAxis.projectValue(value && value.x ? value.x : 0, labelAxisValueIndex, data.normalized[seriesIndex]),\n\t y: chartRect.y1 - valueAxis.projectValue(value && value.y ? value.y : 0, valueIndex, data.normalized[seriesIndex])\n\t }\n\t }\n\t\n\t // If the label axis is a step based axis we will offset the bar into the middle of between two steps using\n\t // the periodHalfLength value. Also we do arrange the different series so that they align up to each other using\n\t // the seriesBarDistance. If we don't have a step axis, the bar positions can be chosen freely so we should not\n\t // add any automated positioning.\n\t if(labelAxis instanceof Chartist.StepAxis) {\n\t // Offset to center bar between grid lines, but only if the step axis is not stretched\n\t if(!labelAxis.options.stretch) {\n\t projected[labelAxis.units.pos] += periodHalfLength * (options.horizontalBars ? -1 : 1);\n\t }\n\t // Using bi-polar offset for multiple series if no stacked bars or series distribution is used\n\t projected[labelAxis.units.pos] += (options.stackBars || options.distributeSeries) ? 0 : biPol * options.seriesBarDistance * (options.horizontalBars ? -1 : 1);\n\t }\n\t\n\t // Enter value in stacked bar values used to remember previous screen value for stacking up bars\n\t previousStack = stackedBarValues[valueIndex] || zeroPoint;\n\t stackedBarValues[valueIndex] = previousStack - (zeroPoint - projected[labelAxis.counterUnits.pos]);\n\t\n\t // Skip if value is undefined\n\t if(value === undefined) {\n\t return;\n\t }\n\t\n\t var positions = {};\n\t positions[labelAxis.units.pos + '1'] = projected[labelAxis.units.pos];\n\t positions[labelAxis.units.pos + '2'] = projected[labelAxis.units.pos];\n\t\n\t if(options.stackBars && (options.stackMode === 'accumulate' || !options.stackMode)) {\n\t // Stack mode: accumulate (default)\n\t // If bars are stacked we use the stackedBarValues reference and otherwise base all bars off the zero line\n\t // We want backwards compatibility, so the expected fallback without the 'stackMode' option\n\t // to be the original behaviour (accumulate)\n\t positions[labelAxis.counterUnits.pos + '1'] = previousStack;\n\t positions[labelAxis.counterUnits.pos + '2'] = stackedBarValues[valueIndex];\n\t } else {\n\t // Draw from the zero line normally\n\t // This is also the same code for Stack mode: overlap\n\t positions[labelAxis.counterUnits.pos + '1'] = zeroPoint;\n\t positions[labelAxis.counterUnits.pos + '2'] = projected[labelAxis.counterUnits.pos];\n\t }\n\t\n\t // Limit x and y so that they are within the chart rect\n\t positions.x1 = Math.min(Math.max(positions.x1, chartRect.x1), chartRect.x2);\n\t positions.x2 = Math.min(Math.max(positions.x2, chartRect.x1), chartRect.x2);\n\t positions.y1 = Math.min(Math.max(positions.y1, chartRect.y2), chartRect.y1);\n\t positions.y2 = Math.min(Math.max(positions.y2, chartRect.y2), chartRect.y1);\n\t\n\t // Create bar element\n\t bar = seriesElement.elem('line', positions, options.classNames.bar).attr({\n\t 'ct:value': [value.x, value.y].filter(Chartist.isNum).join(','),\n\t 'ct:meta': Chartist.getMetaData(series, valueIndex)\n\t });\n\t\n\t this.eventEmitter.emit('draw', Chartist.extend({\n\t type: 'bar',\n\t value: value,\n\t index: valueIndex,\n\t meta: Chartist.getMetaData(series, valueIndex),\n\t series: series,\n\t seriesIndex: seriesIndex,\n\t axisX: axisX,\n\t axisY: axisY,\n\t chartRect: chartRect,\n\t group: seriesElement,\n\t element: bar\n\t }, positions));\n\t }.bind(this));\n\t }.bind(this));\n\t\n\t this.eventEmitter.emit('created', {\n\t bounds: valueAxis.bounds,\n\t chartRect: chartRect,\n\t axisX: axisX,\n\t axisY: axisY,\n\t svg: this.svg,\n\t options: options\n\t });\n\t }", "createChartData() {\n /**\n * entities : all entities data and options\n * entityOptions : global entities options\n */\n if (!this.entity_items.isValid()) return null\n // const _data = this.entity_items.getData()\n\n const _data = this.entity_items.getChartLabelAndData()\n\n if (_data.length === 0) {\n console.error(\"Create Chart Data, no Data present !\")\n return null\n }\n\n let _defaultDatasetConfig = {\n mode: \"current\",\n unit: \"\"\n }\n\n let _graphData = this.getDefaultGraphData()\n _graphData.config.mode = \"simple\"\n\n /**\n * merge entity options\n */\n if (this.entity_options) {\n _defaultDatasetConfig = {\n ..._defaultDatasetConfig,\n ...this.entity_options\n }\n }\n\n /**\n * merge dataset_config\n * all entity labels\n * add dataset entities\n */\n _graphData.data.labels = _data.labels //this.entity_items.getNames()\n _graphData.data.datasets[0] = _defaultDatasetConfig\n _graphData.data.datasets[0].label = this.card_config.title || \"\"\n /**\n * add the unit\n */\n if (this.entity_options && this.entity_options.unit) {\n _graphData.data.datasets[0].unit = this.entity_options.unit || \"\"\n } else {\n _graphData.data.datasets[0].units = this.entity_items.getEntitieslist().map((item) => item.unit)\n }\n\n /**\n * case horizontal bar\n */\n\n if (this.card_config.chart.isChartType(\"horizontalbar\")) {\n _graphData.data.datasets[0].indexAxis = \"y\"\n }\n\n /**\n * custom colors from the entities\n */\n let entityColors = _data.colors //this.entity_items.getColors()\n\n if (this.entity_options && this.entity_options.gradient != undefined) {\n _graphData.config.gradient = true\n }\n\n if (entityColors.length === _graphData.data.labels.length) {\n _graphData.data.datasets[0].backgroundColor = entityColors\n _graphData.data.datasets[0].showLine = false\n } else {\n if (this.card_config.chart.isChartType(\"radar\")) {\n _graphData.data.datasets[0].backgroundColor = COLOR_RADARCHART\n _graphData.data.datasets[0].borderColor = COLOR_RADARCHART\n _graphData.data.datasets[0].borderWidth = 1\n _graphData.data.datasets[0].pointBorderColor = COLOR_RADARCHART\n _graphData.data.datasets[0].pointBackgroundColor = COLOR_RADARCHART\n _graphData.data.datasets[0].tooltip = true\n _graphData.config.gradient = false\n } else {\n /**\n * get backgroundcolor from DEFAULT_COLORS\n */\n entityColors = DEFAULT_COLORS.slice(1, _data.data.length + 1)\n _graphData.data.datasets[0].backgroundColor = entityColors\n _graphData.data.datasets[0].borderWidth = 0\n _graphData.data.datasets[0].showLine = false\n }\n }\n _graphData.data.datasets[0].data = _data.data\n _graphData.config.segmentbar = false\n\n /**\n * add the data series and return the new graph data\n */\n if (this.card_config.chart.isChartType(\"bar\") && this.card_config.chartOptions && this.card_config.chartOptions.segmented) {\n const newData = this.createSimpleBarSegmentedData(_graphData.data.datasets[0])\n if (newData) {\n _graphData.data.datasets[1] = {}\n _graphData.data.datasets[1].data = newData.data\n _graphData.data.datasets[1].tooltip = false\n _graphData.data.datasets[1].backgroundColor = newData.backgroundColors\n _graphData.data.datasets[1].borderWidth = 0\n _graphData.data.datasets[1].showLine = false\n _graphData.config.segmentbar = newData.data.length !== 0\n }\n }\n return _graphData\n }", "function updateRadarChart(rec) {\n radarStore.loadData([\n { 'Name': 'Price', 'Data': rec.get('price') },\n { 'Name': 'Revenue %', 'Data': rec.get('revenue') },\n { 'Name': 'Growth %', 'Data': rec.get('growth') },\n { 'Name': 'Product %', 'Data': rec.get('product') },\n { 'Name': 'Market %', 'Data': rec.get('market') }\n ]);\n }", "function createLevel1Chart() {\n changeLegendNames();\n $(\"#divlevel1chart\").kendoChart({\n dataSource: Level1dataSource,\n dataBound: onDB,\n title: {\n text: \"Click graph for more details\",\n color: \"#C61835\"\n },\n legend: {\n position: \"bottom\"\n },\n seriesDefaults: {\n type: \"bar\",\n stack: {\n type: \"100%\"\n }\n },\n series:\n [{\n field: \"AssignedPercent\",\n name: legendAssigned,\n color: \"#5da5da\",\n labels: {\n visible: true,\n position: \"center\",\n background: \"transparent\",\n template: function (e) {\n if (e.dataItem.AssignedPercent <= \"15\") {\n return e.dataItem.AssignedPercent.toFixed(1) + \"%\";\n }\n else { return e.dataItem.AssignedPercent.toFixed(1) + \"% (\" + e.dataItem.AssignedCount + \"/\" + e.dataItem.EPCount + \")\"; }\n\n }\n\n }\n }, {\n field: \"NotAssignedPercent\",\n name: legendNotAssigned,\n color: \"#b7b7b7\",\n labels: {\n visible: true,\n position: \"center\",\n background: \"transparent\",\n template: function (e) {\n if (e.dataItem.NotAssignedPercent <= \"15\") {\n return e.dataItem.NotAssignedPercent.toFixed(1) + \"%\";\n }\n else {\n return e.dataItem.NotAssignedPercent.toFixed(1) + \"% (\" + e.dataItem.NotAssignedCount + \"/\" + e.dataItem.EPCount + \")\";\n }\n }\n }\n }\n\n\n ],\n categoryAxis: {\n field: \"SiteFullName\",\n value: \"SiteID\",\n labels: {\n visual: function (e) {\n var layout = new kendo.drawing.Layout(e.rect, {\n justifyContent: \"center\"\n });\n var addLabel = new kendo.drawing.Text(e.dataItem.SiteFullName);\n addLabel.options.set(\"font\", \"bold 12px sans-serif\");\n layout.append(addLabel, new kendo.drawing.Text('(EP Count : ' + e.dataItem.EPCount + ')'));\n layout.reflow();\n return layout;\n }\n },\n majorGridLines: {\n visible: false\n }\n\n },\n valueAxis: {\n min: 0,\n line: {\n visible: false\n },\n minorGridLines: {\n visible: false\n }\n },\n tooltip: {\n visible: true,\n template: function (e) {\n var sn = e.series.name;\n\n if (sn.indexOf(\"Not Assigned\") == -1)\n return sn + \" : \" + e.dataItem.AssignedPercent.toFixed(1) + \"% (\" + e.dataItem.AssignedCount + \"/\" + e.dataItem.EPCount + \")\";\n\n else\n return sn + \" : \" + e.dataItem.NotAssignedPercent.toFixed(1) + \"% (\" + e.dataItem.NotAssignedCount + \"/\" + e.dataItem.EPCount + \")\";\n\n\n }\n\n },\n seriesClick: onLevel1SeriesClick\n });\n\n\n}", "function calRadialBar(barSeries) {\n // Columns info on each category axis. Key is polar name\n var columnsMap = {};\n util[\"k\" /* each */](barSeries, function (seriesModel, idx) {\n var data = seriesModel.getData();\n var polar = seriesModel.coordinateSystem;\n var baseAxis = polar.getBaseAxis();\n var axisKey = barPolar_getAxisKey(polar, baseAxis);\n var axisExtent = baseAxis.getExtent();\n var bandWidth = baseAxis.type === 'category' ? baseAxis.getBandWidth() : Math.abs(axisExtent[1] - axisExtent[0]) / data.count();\n var columnsOnAxis = columnsMap[axisKey] || {\n bandWidth: bandWidth,\n remainedWidth: bandWidth,\n autoWidthCount: 0,\n categoryGap: '20%',\n gap: '30%',\n stacks: {}\n };\n var stacks = columnsOnAxis.stacks;\n columnsMap[axisKey] = columnsOnAxis;\n var stackId = barPolar_getSeriesStackId(seriesModel);\n\n if (!stacks[stackId]) {\n columnsOnAxis.autoWidthCount++;\n }\n\n stacks[stackId] = stacks[stackId] || {\n width: 0,\n maxWidth: 0\n };\n var barWidth = Object(number[\"o\" /* parsePercent */])(seriesModel.get('barWidth'), bandWidth);\n var barMaxWidth = Object(number[\"o\" /* parsePercent */])(seriesModel.get('barMaxWidth'), bandWidth);\n var barGap = seriesModel.get('barGap');\n var barCategoryGap = seriesModel.get('barCategoryGap');\n\n if (barWidth && !stacks[stackId].width) {\n barWidth = Math.min(columnsOnAxis.remainedWidth, barWidth);\n stacks[stackId].width = barWidth;\n columnsOnAxis.remainedWidth -= barWidth;\n }\n\n barMaxWidth && (stacks[stackId].maxWidth = barMaxWidth);\n barGap != null && (columnsOnAxis.gap = barGap);\n barCategoryGap != null && (columnsOnAxis.categoryGap = barCategoryGap);\n });\n var result = {};\n util[\"k\" /* each */](columnsMap, function (columnsOnAxis, coordSysName) {\n result[coordSysName] = {};\n var stacks = columnsOnAxis.stacks;\n var bandWidth = columnsOnAxis.bandWidth;\n var categoryGap = Object(number[\"o\" /* parsePercent */])(columnsOnAxis.categoryGap, bandWidth);\n var barGapPercent = Object(number[\"o\" /* parsePercent */])(columnsOnAxis.gap, 1);\n var remainedWidth = columnsOnAxis.remainedWidth;\n var autoWidthCount = columnsOnAxis.autoWidthCount;\n var autoWidth = (remainedWidth - categoryGap) / (autoWidthCount + (autoWidthCount - 1) * barGapPercent);\n autoWidth = Math.max(autoWidth, 0); // Find if any auto calculated bar exceeded maxBarWidth\n\n util[\"k\" /* each */](stacks, function (column, stack) {\n var maxWidth = column.maxWidth;\n\n if (maxWidth && maxWidth < autoWidth) {\n maxWidth = Math.min(maxWidth, remainedWidth);\n\n if (column.width) {\n maxWidth = Math.min(maxWidth, column.width);\n }\n\n remainedWidth -= maxWidth;\n column.width = maxWidth;\n autoWidthCount--;\n }\n }); // Recalculate width again\n\n autoWidth = (remainedWidth - categoryGap) / (autoWidthCount + (autoWidthCount - 1) * barGapPercent);\n autoWidth = Math.max(autoWidth, 0);\n var widthSum = 0;\n var lastColumn;\n util[\"k\" /* each */](stacks, function (column, idx) {\n if (!column.width) {\n column.width = autoWidth;\n }\n\n lastColumn = column;\n widthSum += column.width * (1 + barGapPercent);\n });\n\n if (lastColumn) {\n widthSum -= lastColumn.width * barGapPercent;\n }\n\n var offset = -widthSum / 2;\n util[\"k\" /* each */](stacks, function (column, stackId) {\n result[coordSysName][stackId] = result[coordSysName][stackId] || {\n offset: offset,\n width: column.width\n };\n offset += column.width * (1 + barGapPercent);\n });\n });\n return result;\n}", "function createLineNewChart(title, data, color, chartDiv) {\n let container = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_13__[/* create */ \"h\"](chartDiv, _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_13__[/* Container */ \"b\"]);\n container.layout = \"horizontal\";\n container.fixedWidthGrid = true;\n container.width = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_13__[/* percent */ \"k\"](100);\n container.height = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_13__[/* percent */ \"k\"](100);\n let chart = container.createChild(_amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_14__[/* XYChart */ \"j\"]);\n chart.width = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_13__[/* percent */ \"k\"](45);\n chart.height = 70;\n chart.data = data;\n chart.padding(20, 5, 2, 5);\n let categoryAxis = chart.xAxes.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_14__[/* CategoryAxis */ \"a\"]());\n categoryAxis.renderer.grid.template.location = 0;\n categoryAxis.renderer.grid.template.disabled = true;\n categoryAxis.renderer.baseGrid.disabled = true;\n categoryAxis.renderer.labels.template.disabled = true;\n categoryAxis.cursorTooltipEnabled = false;\n categoryAxis.dataFields.category = \"Period\";\n let valueAxis = chart.yAxes.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_14__[/* ValueAxis */ \"i\"]());\n valueAxis.min = 0;\n valueAxis.renderer.grid.template.disabled = true;\n valueAxis.renderer.baseGrid.disabled = true;\n valueAxis.renderer.labels.template.disabled = true;\n valueAxis.cursorTooltipEnabled = false;\n chart.cursor = new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_14__[/* XYCursor */ \"k\"]();\n chart.cursor.lineY.disabled = true;\n chart.cursor.behavior = \"none\";\n let series = chart.series.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_14__[/* LineSeries */ \"e\"]());\n series.tooltipText = \"{Period}: [bold]{value}\";\n series.dataFields.categoryX = \"Period\";\n series.dataFields.valueY = \"value\";\n series.tensionX = 0.8;\n series.strokeWidth = 1;\n series.stroke = '#fff'; // render data points as bullets\n\n let bullet = series.bullets.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_14__[/* CircleBullet */ \"b\"]());\n bullet.circle.opacity = 1;\n bullet.circle.fill = color;\n bullet.circle.propertyFields.opacity = \"opacity\";\n bullet.circle.radius = 3;\n return chart;\n }", "function genereteSingleChart(lineLabel, labels, data, trendlineData, thresholdTrendlinePercentage, thresholdRangePercentage) {\n\n /**\n * Method to generate the radial chart of threshold\n * @param numTotal\n * @param numthresholdIn\n * @param numthresholdOut\n */\n function generateRadialChart(numTotal, numthresholdIn, numthresholdOut) {\n\n if (window.radialChart != undefined) {\n window.radialChart.destroy();\n }\n\n var percIn = ((numthresholdIn / numTotal) * 100).toFixed(2);\n var percOut = ((numthresholdOut / numTotal) * 100).toFixed(2);\n\n var options = {\n series: [percIn, percOut],\n chart: {\n type: 'radialBar',\n },\n colors: ['#0acf97', '#fa5c7c', ],\n labels: ['Threshold in', 'Threshold out'],\n legend: {\n show: true,\n floating: true,\n position: 'bottom',\n labels: {\n useSeriesColors: true,\n },\n markers: {\n size: 0\n },\n formatter: function(seriesName) {\n if (seriesName === 'Threshold in') {\n return seriesName + \": \" + numthresholdIn\n } else if (seriesName === 'Threshold out') {\n return seriesName + \": \" + numthresholdOut\n }\n },\n },\n plotOptions: {\n radialBar: {\n dataLabels: {\n value: {\n show: true,\n },\n total: {\n show: true,\n label: 'Total',\n formatter: function() {\n return numTotal;\n }\n }\n }\n }\n }\n };\n\n\n window.radialChart = new ApexCharts($(\"#custom-chart-radial\")[0], options);\n radialChart.render();\n }\n\n /**\n * Method to generate the line chart of the threshold\n * @param lineLabel\n * @param labels\n * @param data\n * @param dataOutThreshold\n */\n function genereteSingleChartColored(lineLabel, labels, data, dataOutThreshold) {\n\n if (window.chartColored != undefined) {\n window.chartColored.destroy();\n }\n\n var options = {\n chart: {\n type: 'line',\n animations: {\n enabled: false\n },\n zoom: {\n enabled: false,\n }\n },\n fill: {\n type: 'solid'\n },\n colors: ['#0acf97', '#fa5c7c'],\n markers: {\n size: 0,\n strokeWidth: 0,\n strokeColors: '#0acf97',\n hover: {\n size: 0,\n }\n },\n stroke: {\n width: [2, 2],\n dashArray: [0, 0]\n },\n series: [{\n name: lineLabel + \" - Threshold in \",\n data: data,\n },\n {\n name: lineLabel + \" - Threshold out\",\n data: dataOutThreshold,\n }\n ],\n xaxis: {\n type: 'category',\n categories: labels,\n labels: {\n show: false,\n }\n },\n yaxis: {\n labels: {\n // Tronco i valori dell'asse Y\n // Informazione importante per la trendline\n formatter: function(value) {\n return Math.trunc(value);\n }\n }\n }\n }\n\n window.chartColored = new ApexCharts($(\"#custom-chart-line-2\")[0], options);\n chartColored.render();\n }\n\n if (window.chartZoom != undefined) {\n window.chartZoom.destroy();\n }\n\n // Converto gli indici dei timestamp in numeri in modo tale da poterci fare inferenza e rendere più veloce il rendering del grafico\n var labelsCounted = convertIndexInCount(labels);\n\n // Se è selezionato % lo trasformo in percentuale, altrimenti tengo il valore assoluto\n var thresholdTrendline = Number(thresholdTrendlinePercentage);\n if($(\"#btn-threshold-type\").val() === 'percentage') {\n // Mi basta un solo valore per ottenere la soglia di threshold dato che la trendline è lineare\n // Fatto ciò mi prendo l'intero\n thresholdTrendline = parseInt((thresholdTrendlinePercentage / 100) * trendlineData[0]);\n }\n\n var thresholdRange = parseInt((thresholdRangePercentage / 100) * data.length);\n\n var dataOutThresholdTrendline = [];\n for(var i = 0; i < trendlineData.length; i++) {\n var scarto = trendlineData[i] - data[i];\n var value = Math.abs(scarto);\n if(value <= thresholdTrendline) {\n dataOutThresholdTrendline.push(null);\n } else {\n dataOutThresholdTrendline.push(Number(data[i]));\n }\n }\n\n var dataTrendilineUpperLimit = getTrendlineUpperLimit(trendlineData, thresholdTrendline);\n var dataTrendilineLowerLimit = getTrendlineLowerLimit(trendlineData, thresholdTrendline);\n\n var thresholdTrenlineValues = getInOutThresholdNumber(data, trendlineData, thresholdTrendline);\n\n generateRadialChart(data.length, thresholdTrenlineValues.inThreshold, thresholdTrenlineValues.outThreshold);\n genereteSingleChartColored(lineLabel, labels, data, dataOutThresholdTrendline);\n\n var options = {\n chart: {\n type: 'line',\n animations: {\n enabled: false\n },\n },\n fill: {\n type: 'solid'\n },\n colors: ['#727cf5', '#fa5c7c', '#ffbc00', '#ffbc00'],\n markers: {\n size: 0\n },\n stroke: {\n width: [2, 2, 1, 1],\n dashArray: [0, 5, 5, 5]\n },\n series: [{\n name: lineLabel,\n data: data,\n },\n {\n name: \"Trendline\",\n data: trendlineData,\n },\n {\n name: \"Upper bound\",\n data: dataTrendilineUpperLimit,\n },\n {\n name: \"Lower bound\",\n data: dataTrendilineLowerLimit,\n }\n ],\n xaxis: {\n type: 'numeric',\n categories: labelsCounted,\n labels: {\n show: false\n }\n },\n tooltip: {\n x: {\n formatter: function (val) {\n return labels[val];\n }\n }\n },\n yaxis: {\n labels: {\n // Tronco i valori dell'asse Y\n // Informazione importante per la trendline\n formatter: function(value) {\n return Math.trunc(value);\n }\n },\n axisTicks: {\n //show: true,\n },\n tooltip: {\n //enabled: true\n }\n }\n }\n\n window.chartZoom = new ApexCharts($(\"#custom-chart-line-1\")[0], options);\n chartZoom.render();\n\n /*\n Adding unusual highlights\n */\n var dataOutUpperThresholdTrendline = getUpperBoundData(data, dataTrendilineUpperLimit);\n var dataOutLowerThresholdTrendline = getLowerBoundData(data, dataTrendilineLowerLimit);\n\n //Defining areas (intervals x1-x2) to highlight\n var upperRangeValues = getRangeThreshold(dataOutUpperThresholdTrendline, thresholdRange);\n var lowerRangeValues = getRangeThreshold(dataOutLowerThresholdTrendline, thresholdRange);\n\n if (window.dangerValues != undefined) {\n window.dangerValues = [];\n }\n window.dangerValues = [];\n dangerValues.push(upperRangeValues)\n dangerValues.push(lowerRangeValues)\n\n //Aggiungo dinamicamente le annotazioni per l'asse delle x sopra il limite della threshold\n for(var i=0; i < upperRangeValues.length; i++) {\n var firstX = upperRangeValues[i][0];\n var lastX = upperRangeValues[i][1];\n chartZoom.addXaxisAnnotation({\n x: Number(firstX),\n x2: Number(lastX),\n borderColor: '#0acf97',\n fillColor: '#0acf97',\n label: {\n borderColor: '#0acf97',\n style: {\n color: '#fff',\n background: '#0acf97'\n },\n text: 'Unusual upper bound behavior'\n }\n });\n }\n\n //Aggiungo dinamicamente le annotazioni per l'asse delle x sotto il limite della threshold\n for(var i=0; i < lowerRangeValues.length; i++) {\n var firstX = lowerRangeValues[i][0];\n var lastX = lowerRangeValues[i][1];\n chartZoom.addXaxisAnnotation({\n x: Number(firstX),\n x2: Number(lastX),\n borderColor: '#fa5c7c',\n fillColor: '#fa5c7c',\n label: {\n borderColor: '#fa5c7c',\n style: {\n color: '#fff',\n background: '#fa5c7c'\n },\n text: 'Unusual lower bound behavior'\n }\n });\n }\n}", "set Charting(value) {}", "function drawRadarMap(data,rankArray){\n d3.select(\".radar-container\").select(\"svg\").remove();\n var a = 0,\n b = 0,\n c = 0;\n for(var i = 0;i<rankArray.length;i++){\n var flag= rankArray[i].split('_');\n if(flag[0]==\"综合指标(校友会网)\"){\n a++;\n }else if(flag[0]==\"综合指标(武书连)\"){\n b++;\n }else if(flag[0]==\"学科排名(武书连)\"){\n c++;\n }else{\n console.log(\"raderData error\");\n }\n }\n\n var radarData = [\n {\n className: 'paramUsed', // optional can be used for styling\n axes: [\n {axis: \"xiaoyouhui\", value: a, yOffset: 10},\n {axis: \"wushulianC\", value: b,},\n {axis: \"wushulianS\", value: c,}\n ]\n }\n ];\n\n var chart = RadarChart.chart();\n var svg = d3.select(\"#layout\").select(\".selectParam\").select('.radar-container').append('svg')\n .attr('width', 120)\n .attr('height', 110);\n // draw one\n svg.append('g').classed('focus', 1).datum(radarData)\n .attr('transform', function(d, i) { return 'translate(10,10)'; })\n .call(chart);\n }", "function createLineNewChart(title, data, color, chartDiv) {\n let container = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_15__[/* create */ \"h\"](chartDiv, _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_15__[/* Container */ \"b\"]);\n container.layout = \"horizontal\";\n container.fixedWidthGrid = true;\n container.width = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_15__[/* percent */ \"k\"](100);\n container.height = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_15__[/* percent */ \"k\"](100);\n let chart = container.createChild(_amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_16__[/* XYChart */ \"j\"]);\n chart.width = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_15__[/* percent */ \"k\"](45);\n chart.height = 70;\n chart.data = data;\n chart.padding(20, 5, 2, 5);\n let categoryAxis = chart.xAxes.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_16__[/* CategoryAxis */ \"a\"]());\n categoryAxis.renderer.grid.template.location = 0;\n categoryAxis.renderer.grid.template.disabled = true;\n categoryAxis.renderer.baseGrid.disabled = true;\n categoryAxis.renderer.labels.template.disabled = true;\n categoryAxis.cursorTooltipEnabled = false;\n categoryAxis.dataFields.category = \"Period\";\n let valueAxis = chart.yAxes.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_16__[/* ValueAxis */ \"i\"]());\n valueAxis.min = 0;\n valueAxis.renderer.grid.template.disabled = true;\n valueAxis.renderer.baseGrid.disabled = true;\n valueAxis.renderer.labels.template.disabled = true;\n valueAxis.cursorTooltipEnabled = false;\n chart.cursor = new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_16__[/* XYCursor */ \"k\"]();\n chart.cursor.lineY.disabled = true;\n chart.cursor.behavior = \"none\";\n let series = chart.series.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_16__[/* LineSeries */ \"e\"]());\n series.tooltipText = \"{Period}: [bold]{value}\";\n series.dataFields.categoryX = \"Period\";\n series.dataFields.valueY = \"value\";\n series.tensionX = 0.8;\n series.strokeWidth = 1;\n series.stroke = '#fff'; // render data points as bullets\n\n let bullet = series.bullets.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_16__[/* CircleBullet */ \"b\"]());\n bullet.circle.opacity = 1;\n bullet.circle.fill = color;\n bullet.circle.propertyFields.opacity = \"opacity\";\n bullet.circle.radius = 3;\n return chart;\n }", "function createLineNewChart(title, data, color, chartDiv) {\n let container = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_15__[/* create */ \"h\"](chartDiv, _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_15__[/* Container */ \"b\"]);\n container.layout = \"horizontal\";\n container.fixedWidthGrid = true;\n container.width = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_15__[/* percent */ \"k\"](100);\n container.height = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_15__[/* percent */ \"k\"](100);\n let chart = container.createChild(_amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_16__[/* XYChart */ \"j\"]);\n chart.width = _amcharts_amcharts4_core__WEBPACK_IMPORTED_MODULE_15__[/* percent */ \"k\"](45);\n chart.height = 70;\n chart.data = data;\n chart.padding(20, 5, 2, 5);\n let categoryAxis = chart.xAxes.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_16__[/* CategoryAxis */ \"a\"]());\n categoryAxis.renderer.grid.template.location = 0;\n categoryAxis.renderer.grid.template.disabled = true;\n categoryAxis.renderer.baseGrid.disabled = true;\n categoryAxis.renderer.labels.template.disabled = true;\n categoryAxis.cursorTooltipEnabled = false;\n categoryAxis.dataFields.category = \"Period\";\n let valueAxis = chart.yAxes.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_16__[/* ValueAxis */ \"i\"]());\n valueAxis.min = 0;\n valueAxis.renderer.grid.template.disabled = true;\n valueAxis.renderer.baseGrid.disabled = true;\n valueAxis.renderer.labels.template.disabled = true;\n valueAxis.cursorTooltipEnabled = false;\n chart.cursor = new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_16__[/* XYCursor */ \"k\"]();\n chart.cursor.lineY.disabled = true;\n chart.cursor.behavior = \"none\";\n let series = chart.series.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_16__[/* LineSeries */ \"e\"]());\n series.tooltipText = \"{Period}: [bold]{value}\";\n series.dataFields.categoryX = \"Period\";\n series.dataFields.valueY = \"value\";\n series.tensionX = 0.8;\n series.strokeWidth = 1;\n series.stroke = '#fff'; // render data points as bullets\n\n let bullet = series.bullets.push(new _amcharts_amcharts4_charts__WEBPACK_IMPORTED_MODULE_16__[/* CircleBullet */ \"b\"]());\n bullet.circle.opacity = 1;\n bullet.circle.fill = color;\n bullet.circle.propertyFields.opacity = \"opacity\";\n bullet.circle.radius = 3;\n return chart;\n }", "function drawChart(graphdata,itemId) {\n\n \n console.log(graphdata);\n var graphdata_parsed = [];\n var type;\n graphdata_parsed[0] = [{label: \"Time\", type: \"date\"},\"Value1\"];\n \n \n \n var data = new google.visualization.DataTable();\n \n data.addColumn('datetime', 'Time');\n data.addColumn('number', 'Value');\n \n\n \n var j = 0;\n type = graphdata[0]['Type'];\n for(var i = 0;i<graphdata.length;i++){\n \n if(JSON.parse(graphdata[i]['Event']).Item_Id == itemId){\n \n data.addRow([new Date(graphdata[i]['Time']), parseFloat(JSON.parse(graphdata[i]['Event']).Value)]);\n // graphdata_parsed[j+1] = [new Date(graphdata[i]['Time']),parseFloat(JSON.parse(graphdata[i]['Event']).Value)];\n //console.log(graphdata_parsed[j+1]);\n j++;\n }\n \n }\n \n \n \n console.log(data);\n \n // var data = google.visualization.arrayToDataTable(graphdata_parsed);\n\n var options = {\n title: type,\n curveType: 'function',\n legend: { position: 'bottom' }\n };\n // Create a dashboard.\n var dashboard = new google.visualization.Dashboard(document.getElementById('dashboard_div'));\n\n \n \n \n var is_mobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent);\n // ChartRangeFilter doesn't work on mobile. Use a dateRangeSlider to manipulate it\n if ( is_mobile )\n {\n var RangeSlider = new google.visualization.ControlWrapper({\n 'controlType': 'DateRangeFilter',\n 'containerId': 'filter_div',\n 'options': {\n 'filterColumnLabel': 'Time'\n }\n });\t\n }else{\n \n // Create a range slider, passing some options\n \n var RangeSlider = new google.visualization.ControlWrapper({\n 'controlType': 'ChartRangeFilter',\n 'containerId': 'filter_div',\n 'options': {\n 'filterColumnLabel': 'Time'\n }\n });\n }\n \n \n\n \n\n // var chart = new google.visualization.LineChart(document.getElementById('curve_chart'));\n \n var chart = new google.visualization.ChartWrapper({\n 'chartType': 'LineChart',\n \n 'containerId': 'curve_chart',\n 'options': {\n 'curveType': 'function'\n \n }\n });\n // dashboard.bind(timeRangeSlider, chart);\n dashboard.bind(RangeSlider, chart);\n \n dashboard.draw(data);\n //chart.draw(data, options);\n }", "function functionName(data){\n\tvar maxRange = 1000 * 3600 * 24 * 14;\n\tvar chartOptions = {\n\t\tchart: { renderTo: 'container' },\n\t\tloading: {\n\t\t\tstyle: { opacity: 0.8 },\n\t\t\tlabelStyle: { fontSize: '300%' }\n\t\t},\n\t\txAxis: {\n\t\t\ttype: 'datetime',\n\t\t\tordinal: false,\n\t\t\tlabels : {\n\t\t\t\tformat: '{value:%m-%d %H:%M}',\n\t\t\t\trotation: 20\n\t\t\t}\n\t\t},\n\t yAxis: {\n\t \tlabels: { format: \"\" },\n\t \ttitle: {text: \"\" }\n\t },\n\t rangeSelector: {\n\t buttons: [{ type : 'hour', count : 6, text : '6h'\n\t }, { type : 'hour', count : 12, text : '12h'\n\t }, { type: 'day', count: 1, text: '1d'\n\t }, { type: 'day', count: 3, text: '3d'\n\t }, { type: 'week', count: 1, text: '1w'\n\t //}, { type: 'month', count: 1, text: '1m'\n\t // }, { type: 'month', count: 6, text: '6m'\n\t // }, { type: 'year', count: 1, text: '1y'\n\t // }, { type: 'all', text: 'All'\n\t }],\n\t selected: 4,\n\t inputEnabled: false\n\t },\n// navigator: { enabled: false },\n\t scrollbar: { enabled: false\n // , liveRedraw:false\n },\n\t // title : { text : 'Title' },\n\t plotOptions: {\n line: {\n pointInterval: 60 * 1000,\n gapSize: 30\n },\n\t\t\tseries: {\n\n lineWidth: 1,\n marker: {\n enabled: true,\n radius: 2\n },\n\n\t\t\t\t// dataGrouping: false, //Not needed here? Only in (root) series?\n\t\t\t\ttooltip: {\n // xDateFormat: '%A %m-%d-%Y %H:%M'\n headerFormat: ''\n\t\t\t\t\t// pointFormatter: tooltipFlags\n\t\t\t\t},\n\t\t\t \tturboThreshold: 0 //CRUCIAL for more than 1000 points!!!!\n\t\t\t}\n\t },\n\t series : [{\n\t \tdataGrouping: {enabled: false} //NEEDED or dataGrouping doesn't pass custom attributes/properties\n//\t\t, lineWidth: 0\n\t \t// , events : {\n\t \t\t// afterAnimate : function () {\n\t \t\t\t// console.log('HIDE loading');\n\t \t\t// }\n\t \t// }\n\t \t// , point: {\n\t \t\t// events: {\n\t \t\t\t// mouseOver: function () {\n\t \t\t\t\t// console.log(this);\n\t \t\t\t// }\n\t \t\t// }\n\t \t// }\n\t }]\n\t};\n\t// console.log(data.table.rows.length); //same as data[\"table\"][\"rows\"].length\n dataDict = [];\n min = data[\"table\"][\"rows\"][0][2];\n max = data[\"table\"][\"rows\"][0][2];\n $.each(data[\"table\"][\"rows\"], function (i, item) { //preference if bringing multiple columns\n \t// item[0] = new Date(item[0]).getTime();\n \t/// get min and max from data to be used to set yAxis range\n \tif (item[2] < min) { min = item[2] }\n \tif (item[2] > max) { max = item[2] }\n \trow = {\n \t\tx: new Date(item[1]).getTime(),\n \t\ty: item[2],\n unit: data[\"table\"]['columnUnits'][2]\n \t\t// flag1: item[3],\n \t\t// flag2: item[4]\n \t\t};\n ///\"store\" flag data to be used for the tooltip\n \tif ((!$(\"#onlyQC\").prop('checked')) && (flagsArr.indexOf(attr) > -1)) {\n \t\trow.flag1 = item[3]\n \t\trow.flag2 = item[4]\n \t\tif (row.flag1 != 1) { row.color = '#FF0000'}\n \t}\n \tdataDict.push(row);\n });\n // console.log(data[\"table\"][\"rows\"][0]);\n // console.log(dataDict.length, min, max);\n if (chart) chart.destroy();\n chartOptions.series[0].data = dataDict;\n chartOptions.series[0].name = attr; // data[\"table\"][\"columnNames\"][2];\n chartOptions.yAxis.title.text = attr+' ('+data[\"table\"][\"columnUnits\"][2]+')'; //data[\"table\"][\"columnNames\"][2];\n //chartOptions.yAxis.labels.format = '{value} '+data[\"table\"][\"columnUnits\"][2];\n chartOptions.yAxis.labels.format = '{value}';\n\n if ((!$(\"#onlyQC\").prop('checked')) && (flagsArr.indexOf(attr) > -1)) {\n \tchartOptions.plotOptions.series.tooltip.pointFormatter = tooltipFlags;\n } else {\n \tchartOptions.plotOptions.series.tooltip.pointFormatter = tooltipNoFlags;\n }\n // $('#container').highcharts('StockChart', chartOptions);\n chart = new Highcharts.StockChart(chartOptions);\n chart.yAxis[0].setExtremes(min, max);\n // chart.series[0].dataGrouping.enabled = false;\n}", "function renderPatientsJourneyChart(medicine) {\n $(\"#pharma_patientsjourney\").empty();\n\n let dataPJ = [];\n let maxWeeks = [];\n let minWeeks = [];\n\n\n dataPJ = analyticsPatientsJourney;\n maxWeeks = _.max(dataPJ, function(dataPJT) {\n return parseInt(dataPJT.Weeks);\n });\n minWeeks = _.min(dataPJ, function(dataPJT) {\n return parseInt(dataPJT.Weeks);\n });\n\n let groupedData = _.groupBy(dataPJ, 'MEDICATION');\n // console.log(dataPJ);\n let categoriesx = [];\n let seriesy = [];\n let maxvalue = maxWeeks.Weeks;\n let minvalue = minWeeks.Weeks;\n let plotBands = [];\n\n if (!($(\"#divWeekResponse input[type=radio]:checked\").val() == 'all' || $(\"#divWeekResponse input[type=radio]:checked\").val() == undefined)) {\n plotBands.push({\n from: 0,\n to: 8,\n color: '#EFFFFF',\n label: {\n text: 'Baseline',\n style: {\n color: '#999999'\n },\n y: 20\n }\n });\n\n let range = 0;\n range = $(\"#divWeekResponse input[type=radio]:checked\").val() == undefined ? 0 : $(\"#divWeekResponse input[type=radio]:checked\").val();\n if (range != 0) {\n var rangefrom = range.split('-')[0];\n var rangeto = range.split('-')[1];\n var from = 0,\n to = 0;\n dataPJ = dataPJ.filter(function(a) {\n return (parseInt(a.TREATMENT_PERIOD) >= parseInt(rangefrom) && parseInt(a.TREATMENT_PERIOD) <= parseInt(rangeto));\n });\n\n console.log(dataPJ);\n from = 8;\n to = parseInt(rangeto) + 8;\n plotBands.push({\n from: from,\n to: to,\n color: '#FFFFEF',\n label: {\n text: 'Treatment Period',\n style: {\n color: '#999999'\n },\n y: 20\n }\n });\n\n from = parseInt(rangeto) + 8;\n to = parseInt(maxvalue) + 8;\n\n plotBands.push({\n from: from,\n to: to,\n color: '#FFEFFF',\n label: {\n text: 'Follow-Up',\n style: {\n color: '#999999'\n },\n y: 20\n }\n });\n\n } else {\n\n from = 8;\n to = 16;\n\n plotBands.push({\n from: from,\n to: to,\n color: '#FFFFEF',\n label: {\n text: 'Treatment Period',\n style: {\n color: '#999999'\n },\n y: 20\n }\n });\n\n from = 16;\n to = parseInt(maxvalue) + 8;\n\n plotBands.push({\n from: from,\n to: to,\n color: '#FFEFFF',\n label: {\n text: 'Follow-Up',\n style: {\n color: '#999999'\n },\n y: 20\n }\n });\n }\n } // end of if condition for 'all' check\n\n // By Default if No radio button is selected, Select ALL\n if (!plotBands.length) {\n $(\"#divWeekResponse input[type=radio][value='all']\").prop('checked', true);\n }\n\n let ymaxvalue = 0;\n let xMaxValueCurr = 0;\n let xMaxValue = 0;\n let totalPatientsPerDrug = 0;\n if (chartMedication.length > 0) {\n for (let i = 0; i < chartMedication.length; i++) {\n let drugToBeFiltered = chartMedication[i];\n let jsonObj = {},\n filteredcount = [],\n dataweekcount = [];\n for (let week = parseInt(minvalue); week <= parseInt(maxvalue); week++) {\n let total = 0;\n\n filteredcount = dataPJ.filter(function(a) {\n // return (a.MEDICATION.toLowerCase().indexOf(drugToBeFiltered.toLowerCase()) > -1 && a.Weeks == week);\n return (a.MEDICATION.toLowerCase() == drugToBeFiltered.toLowerCase() && a.Weeks == week);\n });\n\n // Yurvaj (20th Feb 17): Switching back to PATIENT_ID_SYNTH\n let patientcount = _.pluck(filteredcount, 'PATIENT_ID_SYNTH');\n // let patientcount = _.pluck(filteredcount, 'IDW_PATIENT_ID_SYNTH');\n patientcount = _.uniq(patientcount).length;\n\n\n for (let j = 0; j < filteredcount.length; j++) {\n total = total + parseFloat(filteredcount[j].ViralLoad);\n }\n\n let valt = 0.0;\n\n if (filteredcount.length > 0 && total > 0)\n valt = Math.log(parseFloat(total / filteredcount.length)); // Math.log(parseFloat(total / filteredcount.length));\n\n if (valt < 0)\n valt = 0.0;\n\n // console.log(\"************* Week \" + week);\n // console.log(\"************* Total Viral Load \" + total);\n // console.log(\"************* Total Patient \" + filteredcount.length);\n // console.log(\"************* Total Unique Patient \" + patientcount);\n // console.log(\"************* Total Patient Increasing \" + totalPatientsPerDrug);\n\n\n // valt = parseFloat(valt).toFixed(2);\n\n // show only those points where data is available.\n //if(patientcount){\n xMaxValueCurr = week;\n dataweekcount.push({\n y: valt,\n patientcount: patientcount\n });\n // }\n\n totalPatientsPerDrug += patientcount;\n\n if (ymaxvalue < valt)\n ymaxvalue = valt;\n }\n\n if (xMaxValue < xMaxValueCurr) {\n xMaxValue = xMaxValueCurr;\n }\n\n var color = '';\n color = ['#D98880', '#D7BDE2', '#A9CCE3', '#A3E4D7', '#F7DC6F', '#B9770E', '#884EA0', '#D6EAF8', '#EDBB99', '#D98880', '#D7BDE2', '#A9CCE3', '#A3E4D7', '#F7DC6F', '#B9770E', '#884EA0', '#D6EAF8', '#EDBB99'];\n\n jsonObj['name'] = chartMedication[i];\n jsonObj['data'] = dataweekcount;\n jsonObj['color'] = color[i];\n seriesy.push(jsonObj);\n\n }\n\n // update Patatient Count\n $('.totalTreatmentEfficacyPatietnsPerDrug').html(commaSeperatedNumber(totalPatientsPerDrug));\n\n\n // console.log(seriesy);\n for (let week = parseInt(minvalue); week <= parseInt(maxvalue); week++) {\n categoriesx.push(week);\n }\n\n //console.log(seriesy);\n\n // Check if data is not available for selected Medications.\n let NoDataFlag = true;\n for (let i = 0; i < seriesy.length; i++) {\n if (seriesy[i].data.length != 0) {\n NoDataFlag = false;\n }\n }\n\n\n if (NoDataFlag) {\n $('#pharma_patientsjourney').html('<div class=\"providerNoDataFound\">No Data Available</div>');\n } else {\n Highcharts.chart('pharma_patientsjourney', {\n chart: {\n zoomType: 'xy'\n },\n title: {\n text: ' '\n\n },\n credits: {\n enabled: false\n },\n xAxis: {\n categories: categoriesx,\n title: {\n text: 'Weeks'\n },\n // min: 0,\n // max: (parseInt(xMaxValue) + 5),\n plotBands: plotBands\n },\n plotOptions: {\n series: {\n events: {\n legendItemClick: function() {\n var visibility = this.visible ? 'visible' : 'hidden';\n }\n }\n },\n line: {\n dataLabels: {\n enabled: true,\n formatter: function() {\n return Highcharts.numberFormat(this.y, 2) > 0 ? Highcharts.numberFormat(this.y, 2) : '';\n }\n }\n }\n },\n yAxis: {\n min: 0,\n max: (ymaxvalue + 5),\n // tickInterval: 1000,\n title: {\n text: 'Viral Load (in log)'\n },\n // labels: {\n // enabled: false,\n // format: yAxisData == '{value}'\n // },\n plotLines: [{\n value: 0,\n width: 1,\n color: '#808080'\n }]\n },\n // tooltip: {\n // valueSuffix: '°C'\n // },\n legend: {\n layout: 'vertical',\n align: 'right',\n verticalAlign: 'top',\n borderWidth: 0\n },\n\n series: seriesy,\n tooltip: {\n formatter: function() {\n var s = '<b> Week: </b>' + this.x;\n\n $.each(this.points, function() {\n s += '<br/><b>' + this.series.name + ': </b>' +\n this.y.toFixed(2);\n s += '<br/><b>Patient Count: </b>' +\n this.point.patientcount;\n });\n\n return s;\n },\n shared: true\n }\n });\n }\n\n\n }\n}", "createHistoryChartData() {\n let _graphData = this.getDefaultGraphData()\n\n _graphData.config.options.fill = false\n _graphData.config.mode = \"history\"\n\n const entities = this.entity_items.getEntityIds()\n entities.forEach((id) => {\n /**\n * current selected entity\n */\n const _entity = this.entity_items.items[id]\n let _entityOptions = { ...this.entity_items.getOptions(id) }\n\n /**\n * default Dataset Properties\n */\n let _options = {\n label: _entity.name || \"unkonwn\",\n unit: _entity.unit || \"\",\n pointRadius: 0,\n current: _entity.state || 0.0,\n last_changed: _entity.last_changed || new Date(),\n mode: \"history\"\n }\n if (this.card_config.chart.isChartType(\"horizontalbar\")) {\n _options.indexAxis = \"y\"\n }\n\n if (this.card_config.chart.isChartType(\"radar\")) {\n _options.pointRadius = 12\n _options.hoverRadius = 18\n _options.hitRadius = 22\n }\n\n if (this.entity_options) {\n _options = { ..._options, ...this.entity_options }\n _graphData.config.options = { ..._graphData.config.options, ...this.entity_options }\n }\n\n /**\n * add all options from style settings\n */\n _options = { ..._options, ..._entityOptions }\n _graphData.config.options.fill = _entityOptions.fill || CT_BARCHARTS.includes(this.card_config.chart)\n\n if (_entityOptions.fill && _entityOptions.gradient && _entityOptions.gradient.colors) {\n const _axis = _options.indexAxis === \"y\" ? \"x\" : \"y\"\n _options.gradient = {\n backgroundColor: {\n axis: _axis,\n colors: _entityOptions.gradient.colors\n }\n }\n _options.labelcolor = _entityOptions.gradient.colors[0]\n _options.borderColor = _entityOptions.gradient.colors[0] || DEFAULT_COLORS[_graphData.config.series]\n _graphData.config.gradient = true\n } else {\n if (_entityOptions.backgroundColor === undefined) {\n _options.backgroundColor = DEFAULT_COLORS[_graphData.config.series]\n _options.borderColor = DEFAULT_COLORS[_graphData.config.series]\n } else {\n _options.backgroundColor = _options.backgroundColor || _options.backgroundColor || _options.color\n _options.borderColor = _options.borderColor || _options.backgroundColor || _options.color\n }\n }\n /**\n * check used trendline\n */\n if (_entityOptions.trendlineLinear) {\n _graphData.config.trendline = true\n } \n /**\n * check used thresholds\n */\n if (this.card_config.chartOptions.thresholds) {\n _graphData.config.thresholds = true\n }\n /**\n * check secondary axis\n */\n if (!_graphData.config.secondaryAxis) {\n _graphData.config.secondaryAxis = _entityOptions.yAxisID != undefined || _entityOptions.xAxisID != undefined\n }\n\n /**\n * add the options, labels and data series\n */\n if (_graphData.config.options.mode.timeaxis == false) {\n /**\n * category based datasets\n */\n const _seriesdata = this.entity_items.getDataset(id)\n _graphData.config.multiseries = false\n if (_seriesdata && _seriesdata.data) {\n _graphData.data.labels = _seriesdata.labels\n if (this.card_config.chart.isChartType(\"pie\") || this.card_config.chart.isChartType(\"doughnut\")) {\n _graphData.data.labels = this.entity_items.getNames()\n _graphData.config.multiseries = true\n }\n _options.data = _seriesdata.data\n _graphData.config.useTimeSeries = _graphData.config.options.mode.timescale\n }\n } else {\n /**\n * time axis based datasets\n */\n if (_entity.seriesdata && _entity.seriesdata.data) {\n _options.data = _entity.seriesdata.data\n _graphData.config.datascales = _entity.datascales\n _graphData.config.timescale = _graphData.config.options.mode.timescale\n }\n }\n\n _graphData.data.datasets.push(_options)\n _graphData.config.series++\n })\n return _graphData\n }", "function NbpChartModule() {\n }", "function createChart(options) {\n this.data = Chartist.normalizeData(this.data);\n var data = {\n raw: this.data,\n normalized: options.distributeSeries ? Chartist.getDataArray(this.data, options.reverseData, options.horizontalBars ? 'x' : 'y').map(function (value) {\n return [value];\n }) : Chartist.getDataArray(this.data, options.reverseData, options.horizontalBars ? 'x' : 'y')\n };\n\n var highLow;\n\n // Create new svg element\n this.svg = Chartist.createSvg(\n this.container,\n options.width,\n options.height,\n options.classNames.chart + (options.horizontalBars ? ' ' + options.classNames.horizontalBars : '')\n );\n\n // Drawing groups in correct order\n var gridGroup = this.svg.elem('g').addClass(options.classNames.gridGroup);\n var seriesGroup = this.svg.elem('g');\n var labelGroup = this.svg.elem('g').addClass(options.classNames.labelGroup);\n\n if (options.stackBars && data.normalized.length !== 0) {\n // If stacked bars we need to calculate the high low from stacked values from each series\n var serialSums = Chartist.serialMap(data.normalized, function serialSums() {\n return Array.prototype.slice.call(arguments).map(function (value) {\n return value;\n }).reduce(function (prev, curr) {\n return {\n x: prev.x + (curr && curr.x) || 0,\n y: prev.y + (curr && curr.y) || 0\n };\n }, { x: 0, y: 0 });\n });\n\n highLow = Chartist.getHighLow([serialSums], Chartist.extend({}, options, {\n referenceValue: 0\n }), options.horizontalBars ? 'x' : 'y');\n } else {\n highLow = Chartist.getHighLow(data.normalized, Chartist.extend({}, options, {\n referenceValue: 0\n }), options.horizontalBars ? 'x' : 'y');\n }\n // Overrides of high / low from settings\n highLow.high = +options.high || (options.high === 0 ? 0 : highLow.high);\n highLow.low = +options.low || (options.low === 0 ? 0 : highLow.low);\n\n var chartRect = Chartist.createChartRect(this.svg, options, defaultOptions.padding);\n\n var valueAxis,\n labelAxisTicks,\n labelAxis,\n axisX,\n axisY;\n\n // We need to set step count based on some options combinations\n if (options.distributeSeries && options.stackBars) {\n // If distributed series are enabled and bars need to be stacked, we'll only have one bar and therefore should\n // use only the first label for the step axis\n labelAxisTicks = data.raw.labels.slice(0, 1);\n } else {\n // If distributed series are enabled but stacked bars aren't, we should use the series labels\n // If we are drawing a regular bar chart with two dimensional series data, we just use the labels array\n // as the bars are normalized\n labelAxisTicks = data.raw.labels;\n }\n\n // Set labelAxis and valueAxis based on the horizontalBars setting. This setting will flip the axes if necessary.\n if (options.horizontalBars) {\n if (options.axisX.type === undefined) {\n valueAxis = axisX = new Chartist.AutoScaleAxis(Chartist.Axis.units.x, data, chartRect, Chartist.extend({}, options.axisX, {\n highLow: highLow,\n referenceValue: 0\n }));\n } else {\n valueAxis = axisX = options.axisX.type.call(Chartist, Chartist.Axis.units.x, data, chartRect, Chartist.extend({}, options.axisX, {\n highLow: highLow,\n referenceValue: 0\n }));\n }\n\n if (options.axisY.type === undefined) {\n labelAxis = axisY = new Chartist.StepAxis(Chartist.Axis.units.y, data, chartRect, {\n ticks: labelAxisTicks\n });\n } else {\n labelAxis = axisY = options.axisY.type.call(Chartist, Chartist.Axis.units.y, data, chartRect, options.axisY);\n }\n } else {\n if (options.axisX.type === undefined) {\n labelAxis = axisX = new Chartist.StepAxis(Chartist.Axis.units.x, data, chartRect, {\n ticks: labelAxisTicks\n });\n } else {\n labelAxis = axisX = options.axisX.type.call(Chartist, Chartist.Axis.units.x, data, chartRect, options.axisX);\n }\n\n if (options.axisY.type === undefined) {\n valueAxis = axisY = new Chartist.AutoScaleAxis(Chartist.Axis.units.y, data, chartRect, Chartist.extend({}, options.axisY, {\n highLow: highLow,\n referenceValue: 0\n }));\n } else {\n valueAxis = axisY = options.axisY.type.call(Chartist, Chartist.Axis.units.y, data, chartRect, Chartist.extend({}, options.axisY, {\n highLow: highLow,\n referenceValue: 0\n }));\n }\n }\n\n // Projected 0 point\n var zeroPoint = options.horizontalBars ? (chartRect.x1 + valueAxis.projectValue(0)) : (chartRect.y1 - valueAxis.projectValue(0));\n // Used to track the screen coordinates of stacked bars\n var stackedBarValues = [];\n\n labelAxis.createGridAndLabels(gridGroup, labelGroup, this.supportsForeignObject, options, this.eventEmitter);\n valueAxis.createGridAndLabels(gridGroup, labelGroup, this.supportsForeignObject, options, this.eventEmitter);\n\n // Draw the series\n data.raw.series.forEach(function (series, seriesIndex) {\n // Calculating bi-polar value of index for seriesOffset. For i = 0..4 biPol will be -1.5, -0.5, 0.5, 1.5 etc.\n var biPol = seriesIndex - (data.raw.series.length - 1) / 2;\n // Half of the period width between vertical grid lines used to position bars\n var periodHalfLength;\n // Current series SVG element\n var seriesElement;\n\n // We need to set periodHalfLength based on some options combinations\n if (options.distributeSeries && !options.stackBars) {\n // If distributed series are enabled but stacked bars aren't, we need to use the length of the normaizedData array\n // which is the series count and divide by 2\n periodHalfLength = labelAxis.axisLength / data.normalized.length / 2;\n } else if (options.distributeSeries && options.stackBars) {\n // If distributed series and stacked bars are enabled we'll only get one bar so we should just divide the axis\n // length by 2\n periodHalfLength = labelAxis.axisLength / 2;\n } else {\n // On regular bar charts we should just use the series length\n periodHalfLength = labelAxis.axisLength / data.normalized[seriesIndex].length / 2;\n }\n\n // Adding the series group to the series element\n seriesElement = seriesGroup.elem('g');\n\n // Write attributes to series group element. If series name or meta is undefined the attributes will not be written\n seriesElement.attr({\n 'ct:series-name': series.name,\n 'ct:meta': Chartist.serialize(series.meta)\n });\n\n // Use series class from series data or if not set generate one\n seriesElement.addClass([\n options.classNames.series,\n (series.className || options.classNames.series + '-' + Chartist.alphaNumerate(seriesIndex))\n ].join(' '));\n\n data.normalized[seriesIndex].forEach(function (value, valueIndex) {\n var projected,\n bar,\n previousStack,\n labelAxisValueIndex;\n\n // We need to set labelAxisValueIndex based on some options combinations\n if (options.distributeSeries && !options.stackBars) {\n // If distributed series are enabled but stacked bars aren't, we can use the seriesIndex for later projection\n // on the step axis for label positioning\n labelAxisValueIndex = seriesIndex;\n } else if (options.distributeSeries && options.stackBars) {\n // If distributed series and stacked bars are enabled, we will only get one bar and therefore always use\n // 0 for projection on the label step axis\n labelAxisValueIndex = 0;\n } else {\n // On regular bar charts we just use the value index to project on the label step axis\n labelAxisValueIndex = valueIndex;\n }\n\n // We need to transform coordinates differently based on the chart layout\n if (options.horizontalBars) {\n projected = {\n x: chartRect.x1 + valueAxis.projectValue(value && value.x ? value.x : 0, valueIndex, data.normalized[seriesIndex]),\n y: chartRect.y1 - labelAxis.projectValue(value && value.y ? value.y : 0, labelAxisValueIndex, data.normalized[seriesIndex])\n };\n } else {\n projected = {\n x: chartRect.x1 + labelAxis.projectValue(value && value.x ? value.x : 0, labelAxisValueIndex, data.normalized[seriesIndex]),\n y: chartRect.y1 - valueAxis.projectValue(value && value.y ? value.y : 0, valueIndex, data.normalized[seriesIndex])\n }\n }\n\n // If the label axis is a step based axis we will offset the bar into the middle of between two steps using\n // the periodHalfLength value. Also we do arrange the different series so that they align up to each other using\n // the seriesBarDistance. If we don't have a step axis, the bar positions can be chosen freely so we should not\n // add any automated positioning.\n if (labelAxis instanceof Chartist.StepAxis) {\n // Offset to center bar between grid lines, but only if the step axis is not stretched\n if (!labelAxis.options.stretch) {\n projected[labelAxis.units.pos] += periodHalfLength * (options.horizontalBars ? -1 : 1);\n }\n // Using bi-polar offset for multiple series if no stacked bars or series distribution is used\n projected[labelAxis.units.pos] += (options.stackBars || options.distributeSeries) ? 0 : biPol * options.seriesBarDistance * (options.horizontalBars ? -1 : 1);\n }\n\n // Enter value in stacked bar values used to remember previous screen value for stacking up bars\n previousStack = stackedBarValues[valueIndex] || zeroPoint;\n stackedBarValues[valueIndex] = previousStack - (zeroPoint - projected[labelAxis.counterUnits.pos]);\n\n // Skip if value is undefined\n if (value === undefined) {\n return;\n }\n\n var positions = {};\n positions[labelAxis.units.pos + '1'] = projected[labelAxis.units.pos];\n positions[labelAxis.units.pos + '2'] = projected[labelAxis.units.pos];\n\n if (options.stackBars && (options.stackMode === 'accumulate' || !options.stackMode)) {\n // Stack mode: accumulate (default)\n // If bars are stacked we use the stackedBarValues reference and otherwise base all bars off the zero line\n // We want backwards compatibility, so the expected fallback without the 'stackMode' option\n // to be the original behaviour (accumulate)\n positions[labelAxis.counterUnits.pos + '1'] = previousStack;\n positions[labelAxis.counterUnits.pos + '2'] = stackedBarValues[valueIndex];\n } else {\n // Draw from the zero line normally\n // This is also the same code for Stack mode: overlap\n positions[labelAxis.counterUnits.pos + '1'] = zeroPoint;\n positions[labelAxis.counterUnits.pos + '2'] = projected[labelAxis.counterUnits.pos];\n }\n\n // Limit x and y so that they are within the chart rect\n positions.x1 = Math.min(Math.max(positions.x1, chartRect.x1), chartRect.x2);\n positions.x2 = Math.min(Math.max(positions.x2, chartRect.x1), chartRect.x2);\n positions.y1 = Math.min(Math.max(positions.y1, chartRect.y2), chartRect.y1);\n positions.y2 = Math.min(Math.max(positions.y2, chartRect.y2), chartRect.y1);\n\n // Create bar element\n bar = seriesElement.elem('line', positions, options.classNames.bar).attr({\n 'ct:value': [value.x, value.y].filter(Chartist.isNum).join(','),\n 'ct:meta': Chartist.getMetaData(series, valueIndex)\n });\n\n this.eventEmitter.emit('draw', Chartist.extend({\n type: 'bar',\n value: value,\n index: valueIndex,\n meta: Chartist.getMetaData(series, valueIndex),\n series: series,\n seriesIndex: seriesIndex,\n axisX: axisX,\n axisY: axisY,\n chartRect: chartRect,\n group: seriesElement,\n element: bar\n }, positions));\n }.bind(this));\n }.bind(this));\n\n this.eventEmitter.emit('created', {\n bounds: valueAxis.bounds,\n chartRect: chartRect,\n axisX: axisX,\n axisY: axisY,\n svg: this.svg,\n options: options\n });\n }", "function genChart(){\n var colors=[\"#3366cc\",\"#dc3912\",\"#ff9900\",\"#109618\",\"#990099\",\"#0099c6\",\"#dd4477\",\"#66aa00\",\"#b82e2e\",\"#316395\",\"#994499\",\"#22aa99\",\"#aaaa11\",\"#6633cc\",\"#e67300\",\"#8b0707\",\"#651067\",\"#329262\",\"#5574a6\",\"#3b3eac\",\"#b77322\",\"#16d620\",\"#b91383\",\"#f4359e\",\"#9c5935\",\"#a9c413\",\"#2a778d\",\"#668d1c\",\"#bea413\",\"#0c5922\",\"#743411\"];\n var states=_.map($scope.data.states,function(runs,state){return state;});\n\n var session=_.map($scope.data.queries,\n function(v,key){return {\n \"name\":key,\n \"runs\":_.sortBy(v,state)\n }\n ;});\n var c=[];\n if(session.length){\n c=_.map(session[0].runs,function(run,index){\n var state=run.mode + run.factor;\n var pos=states.indexOf(state);\n // console.log(\"��\",state,pos);\n return colors[pos];\n });\n c=_.flatten(c);\n };\n var options={\n title:'BenchX: ' + $scope.benchmark.suite + \" \" + $scope.benchmark.meta.description,\n vAxis: {title: 'Time (sec)'}\n ,hAxis: {title: 'Query'}\n // ,legend: 'none'\n ,colors: c\n };\n return utils.gchart(session,options);\n\n }", "function createChart(options) {\n var data;\n var highLow;\n\n if (options.distributeSeries) {\n data = Chartist.normalizeData(this.data, options.reverseData, options.horizontalBars ? 'x' : 'y');\n data.normalized.series = data.normalized.series.map(function (value) {\n return [value];\n });\n } else {\n data = Chartist.normalizeData(this.data, options.reverseData, options.horizontalBars ? 'x' : 'y');\n } // Create new svg element\n\n\n this.svg = Chartist.createSvg(this.container, options.width, options.height, options.classNames.chart + (options.horizontalBars ? ' ' + options.classNames.horizontalBars : '')); // Drawing groups in correct order\n\n var gridGroup = this.svg.elem('g').addClass(options.classNames.gridGroup);\n var seriesGroup = this.svg.elem('g');\n var labelGroup = this.svg.elem('g').addClass(options.classNames.labelGroup);\n\n if (options.stackBars && data.normalized.series.length !== 0) {\n // If stacked bars we need to calculate the high low from stacked values from each series\n var serialSums = Chartist.serialMap(data.normalized.series, function serialSums() {\n return Array.prototype.slice.call(arguments).map(function (value) {\n return value;\n }).reduce(function (prev, curr) {\n return {\n x: prev.x + (curr && curr.x) || 0,\n y: prev.y + (curr && curr.y) || 0\n };\n }, {\n x: 0,\n y: 0\n });\n });\n highLow = Chartist.getHighLow([serialSums], options, options.horizontalBars ? 'x' : 'y');\n } else {\n highLow = Chartist.getHighLow(data.normalized.series, options, options.horizontalBars ? 'x' : 'y');\n } // Overrides of high / low from settings\n\n\n highLow.high = +options.high || (options.high === 0 ? 0 : highLow.high);\n highLow.low = +options.low || (options.low === 0 ? 0 : highLow.low);\n var chartRect = Chartist.createChartRect(this.svg, options, defaultOptions.padding);\n var valueAxis, labelAxisTicks, labelAxis, axisX, axisY; // We need to set step count based on some options combinations\n\n if (options.distributeSeries && options.stackBars) {\n // If distributed series are enabled and bars need to be stacked, we'll only have one bar and therefore should\n // use only the first label for the step axis\n labelAxisTicks = data.normalized.labels.slice(0, 1);\n } else {\n // If distributed series are enabled but stacked bars aren't, we should use the series labels\n // If we are drawing a regular bar chart with two dimensional series data, we just use the labels array\n // as the bars are normalized\n labelAxisTicks = data.normalized.labels;\n } // Set labelAxis and valueAxis based on the horizontalBars setting. This setting will flip the axes if necessary.\n\n\n if (options.horizontalBars) {\n if (options.axisX.type === undefined) {\n valueAxis = axisX = new Chartist.AutoScaleAxis(Chartist.Axis.units.x, data.normalized.series, chartRect, Chartist.extend({}, options.axisX, {\n highLow: highLow,\n referenceValue: 0\n }));\n } else {\n valueAxis = axisX = options.axisX.type.call(Chartist, Chartist.Axis.units.x, data.normalized.series, chartRect, Chartist.extend({}, options.axisX, {\n highLow: highLow,\n referenceValue: 0\n }));\n }\n\n if (options.axisY.type === undefined) {\n labelAxis = axisY = new Chartist.StepAxis(Chartist.Axis.units.y, data.normalized.series, chartRect, {\n ticks: labelAxisTicks\n });\n } else {\n labelAxis = axisY = options.axisY.type.call(Chartist, Chartist.Axis.units.y, data.normalized.series, chartRect, options.axisY);\n }\n } else {\n if (options.axisX.type === undefined) {\n labelAxis = axisX = new Chartist.StepAxis(Chartist.Axis.units.x, data.normalized.series, chartRect, {\n ticks: labelAxisTicks\n });\n } else {\n labelAxis = axisX = options.axisX.type.call(Chartist, Chartist.Axis.units.x, data.normalized.series, chartRect, options.axisX);\n }\n\n if (options.axisY.type === undefined) {\n valueAxis = axisY = new Chartist.AutoScaleAxis(Chartist.Axis.units.y, data.normalized.series, chartRect, Chartist.extend({}, options.axisY, {\n highLow: highLow,\n referenceValue: 0\n }));\n } else {\n valueAxis = axisY = options.axisY.type.call(Chartist, Chartist.Axis.units.y, data.normalized.series, chartRect, Chartist.extend({}, options.axisY, {\n highLow: highLow,\n referenceValue: 0\n }));\n }\n } // Projected 0 point\n\n\n var zeroPoint = options.horizontalBars ? chartRect.x1 + valueAxis.projectValue(0) : chartRect.y1 - valueAxis.projectValue(0); // Used to track the screen coordinates of stacked bars\n\n var stackedBarValues = [];\n labelAxis.createGridAndLabels(gridGroup, labelGroup, this.supportsForeignObject, options, this.eventEmitter);\n valueAxis.createGridAndLabels(gridGroup, labelGroup, this.supportsForeignObject, options, this.eventEmitter);\n\n if (options.showGridBackground) {\n Chartist.createGridBackground(gridGroup, chartRect, options.classNames.gridBackground, this.eventEmitter);\n } // Draw the series\n\n\n data.raw.series.forEach(function (series, seriesIndex) {\n // Calculating bi-polar value of index for seriesOffset. For i = 0..4 biPol will be -1.5, -0.5, 0.5, 1.5 etc.\n var biPol = seriesIndex - (data.raw.series.length - 1) / 2; // Half of the period width between vertical grid lines used to position bars\n\n var periodHalfLength; // Current series SVG element\n\n var seriesElement; // We need to set periodHalfLength based on some options combinations\n\n if (options.distributeSeries && !options.stackBars) {\n // If distributed series are enabled but stacked bars aren't, we need to use the length of the normaizedData array\n // which is the series count and divide by 2\n periodHalfLength = labelAxis.axisLength / data.normalized.series.length / 2;\n } else if (options.distributeSeries && options.stackBars) {\n // If distributed series and stacked bars are enabled we'll only get one bar so we should just divide the axis\n // length by 2\n periodHalfLength = labelAxis.axisLength / 2;\n } else {\n // On regular bar charts we should just use the series length\n periodHalfLength = labelAxis.axisLength / data.normalized.series[seriesIndex].length / 2;\n } // Adding the series group to the series element\n\n\n seriesElement = seriesGroup.elem('g'); // Write attributes to series group element. If series name or meta is undefined the attributes will not be written\n\n seriesElement.attr({\n 'ct:series-name': series.name,\n 'ct:meta': Chartist.serialize(series.meta)\n }); // Use series class from series data or if not set generate one\n\n seriesElement.addClass([options.classNames.series, series.className || options.classNames.series + '-' + Chartist.alphaNumerate(seriesIndex)].join(' '));\n data.normalized.series[seriesIndex].forEach(function (value, valueIndex) {\n var projected, bar, previousStack, labelAxisValueIndex; // We need to set labelAxisValueIndex based on some options combinations\n\n if (options.distributeSeries && !options.stackBars) {\n // If distributed series are enabled but stacked bars aren't, we can use the seriesIndex for later projection\n // on the step axis for label positioning\n labelAxisValueIndex = seriesIndex;\n } else if (options.distributeSeries && options.stackBars) {\n // If distributed series and stacked bars are enabled, we will only get one bar and therefore always use\n // 0 for projection on the label step axis\n labelAxisValueIndex = 0;\n } else {\n // On regular bar charts we just use the value index to project on the label step axis\n labelAxisValueIndex = valueIndex;\n } // We need to transform coordinates differently based on the chart layout\n\n\n if (options.horizontalBars) {\n projected = {\n x: chartRect.x1 + valueAxis.projectValue(value && value.x ? value.x : 0, valueIndex, data.normalized.series[seriesIndex]),\n y: chartRect.y1 - labelAxis.projectValue(value && value.y ? value.y : 0, labelAxisValueIndex, data.normalized.series[seriesIndex])\n };\n } else {\n projected = {\n x: chartRect.x1 + labelAxis.projectValue(value && value.x ? value.x : 0, labelAxisValueIndex, data.normalized.series[seriesIndex]),\n y: chartRect.y1 - valueAxis.projectValue(value && value.y ? value.y : 0, valueIndex, data.normalized.series[seriesIndex])\n };\n } // If the label axis is a step based axis we will offset the bar into the middle of between two steps using\n // the periodHalfLength value. Also we do arrange the different series so that they align up to each other using\n // the seriesBarDistance. If we don't have a step axis, the bar positions can be chosen freely so we should not\n // add any automated positioning.\n\n\n if (labelAxis instanceof Chartist.StepAxis) {\n // Offset to center bar between grid lines, but only if the step axis is not stretched\n if (!labelAxis.options.stretch) {\n projected[labelAxis.units.pos] += periodHalfLength * (options.horizontalBars ? -1 : 1);\n } // Using bi-polar offset for multiple series if no stacked bars or series distribution is used\n\n\n projected[labelAxis.units.pos] += options.stackBars || options.distributeSeries ? 0 : biPol * options.seriesBarDistance * (options.horizontalBars ? -1 : 1);\n } // Enter value in stacked bar values used to remember previous screen value for stacking up bars\n\n\n previousStack = stackedBarValues[valueIndex] || zeroPoint;\n stackedBarValues[valueIndex] = previousStack - (zeroPoint - projected[labelAxis.counterUnits.pos]); // Skip if value is undefined\n\n if (value === undefined) {\n return;\n }\n\n var positions = {};\n positions[labelAxis.units.pos + '1'] = projected[labelAxis.units.pos];\n positions[labelAxis.units.pos + '2'] = projected[labelAxis.units.pos];\n\n if (options.stackBars && (options.stackMode === 'accumulate' || !options.stackMode)) {\n // Stack mode: accumulate (default)\n // If bars are stacked we use the stackedBarValues reference and otherwise base all bars off the zero line\n // We want backwards compatibility, so the expected fallback without the 'stackMode' option\n // to be the original behaviour (accumulate)\n positions[labelAxis.counterUnits.pos + '1'] = previousStack;\n positions[labelAxis.counterUnits.pos + '2'] = stackedBarValues[valueIndex];\n } else {\n // Draw from the zero line normally\n // This is also the same code for Stack mode: overlap\n positions[labelAxis.counterUnits.pos + '1'] = zeroPoint;\n positions[labelAxis.counterUnits.pos + '2'] = projected[labelAxis.counterUnits.pos];\n } // Limit x and y so that they are within the chart rect\n\n\n positions.x1 = Math.min(Math.max(positions.x1, chartRect.x1), chartRect.x2);\n positions.x2 = Math.min(Math.max(positions.x2, chartRect.x1), chartRect.x2);\n positions.y1 = Math.min(Math.max(positions.y1, chartRect.y2), chartRect.y1);\n positions.y2 = Math.min(Math.max(positions.y2, chartRect.y2), chartRect.y1);\n var metaData = Chartist.getMetaData(series, valueIndex); // Create bar element\n\n bar = seriesElement.elem('line', positions, options.classNames.bar).attr({\n 'ct:value': [value.x, value.y].filter(Chartist.isNumeric).join(','),\n 'ct:meta': Chartist.serialize(metaData)\n });\n this.eventEmitter.emit('draw', Chartist.extend({\n type: 'bar',\n value: value,\n index: valueIndex,\n meta: metaData,\n series: series,\n seriesIndex: seriesIndex,\n axisX: axisX,\n axisY: axisY,\n chartRect: chartRect,\n group: seriesElement,\n element: bar\n }, positions));\n }.bind(this));\n }.bind(this));\n this.eventEmitter.emit('created', {\n bounds: valueAxis.bounds,\n chartRect: chartRect,\n axisX: axisX,\n axisY: axisY,\n svg: this.svg,\n options: options\n });\n }", "function createChart(options) {\n this.data = Chartist.normalizeData(this.data);\n var seriesGroups = [],\n labelsGroup,\n chartRect,\n radius,\n labelRadius,\n totalDataSum,\n startAngle = options.startAngle,\n dataArray = Chartist.getDataArray(this.data, options.reverseData);\n\n // Create SVG.js draw\n this.svg = Chartist.createSvg(this.container, options.width, options.height, options.donut ? options.classNames.chartDonut : options.classNames.chartPie);\n // Calculate charting rect\n chartRect = Chartist.createChartRect(this.svg, options, defaultOptions.padding);\n // Get biggest circle radius possible within chartRect\n radius = Math.min(chartRect.width() / 2, chartRect.height() / 2);\n // Calculate total of all series to get reference value or use total reference from optional options\n totalDataSum = options.total || dataArray.reduce(function (previousValue, currentValue) {\n return previousValue + currentValue;\n }, 0);\n\n var donutWidth = Chartist.quantity(options.donutWidth);\n if (donutWidth.unit === '%') {\n donutWidth.value *= radius / 100;\n }\n\n // If this is a donut chart we need to adjust our radius to enable strokes to be drawn inside\n // Unfortunately this is not possible with the current SVG Spec\n // See this proposal for more details: http://lists.w3.org/Archives/Public/www-svg/2003Oct/0000.html\n radius -= options.donut ? donutWidth.value / 2 : 0;\n\n // If labelPosition is set to `outside` or a donut chart is drawn then the label position is at the radius,\n // if regular pie chart it's half of the radius\n if (options.labelPosition === 'outside' || options.donut) {\n labelRadius = radius;\n } else if (options.labelPosition === 'center') {\n // If labelPosition is center we start with 0 and will later wait for the labelOffset\n labelRadius = 0;\n } else {\n // Default option is 'inside' where we use half the radius so the label will be placed in the center of the pie\n // slice\n labelRadius = radius / 2;\n }\n // Add the offset to the labelRadius where a negative offset means closed to the center of the chart\n labelRadius += options.labelOffset;\n\n // Calculate end angle based on total sum and current data value and offset with padding\n var center = {\n x: chartRect.x1 + chartRect.width() / 2,\n y: chartRect.y2 + chartRect.height() / 2\n };\n\n // Check if there is only one non-zero value in the series array.\n var hasSingleValInSeries = this.data.series.filter(function (val) {\n return val.hasOwnProperty('value') ? val.value !== 0 : val !== 0;\n }).length === 1;\n\n //if we need to show labels we create the label group now\n if (options.showLabel) {\n labelsGroup = this.svg.elem('g', null, null, true);\n }\n\n // Draw the series\n // initialize series groups\n for (var i = 0; i < this.data.series.length; i++) {\n // If current value is zero and we are ignoring empty values then skip to next value\n if (dataArray[i] === 0 && options.ignoreEmptyValues) continue;\n\n var series = this.data.series[i];\n seriesGroups[i] = this.svg.elem('g', null, null, true);\n\n // If the series is an object and contains a name or meta data we add a custom attribute\n seriesGroups[i].attr({\n 'ct:series-name': series.name\n });\n\n // Use series class from series data or if not set generate one\n seriesGroups[i].addClass([\n options.classNames.series,\n (series.className || options.classNames.series + '-' + Chartist.alphaNumerate(i))\n ].join(' '));\n\n var endAngle = startAngle + dataArray[i] / totalDataSum * 360;\n\n // Use slight offset so there are no transparent hairline issues\n var overlappigStartAngle = Math.max(0, startAngle - (i === 0 || hasSingleValInSeries ? 0 : 0.2));\n\n // If we need to draw the arc for all 360 degrees we need to add a hack where we close the circle\n // with Z and use 359.99 degrees\n if (endAngle - overlappigStartAngle >= 359.99) {\n endAngle = overlappigStartAngle + 359.99;\n }\n\n var start = Chartist.polarToCartesian(center.x, center.y, radius, overlappigStartAngle),\n end = Chartist.polarToCartesian(center.x, center.y, radius, endAngle);\n\n // Create a new path element for the pie chart. If this isn't a donut chart we should close the path for a correct stroke\n var path = new Chartist.Svg.Path(!options.donut)\n .move(end.x, end.y)\n .arc(radius, radius, 0, endAngle - startAngle > 180, 0, start.x, start.y);\n\n // If regular pie chart (no donut) we add a line to the center of the circle for completing the pie\n if (!options.donut) {\n path.line(center.x, center.y);\n }\n\n // Create the SVG path\n // If this is a donut chart we add the donut class, otherwise just a regular slice\n var pathElement = seriesGroups[i].elem('path', {\n d: path.stringify()\n }, options.donut ? options.classNames.sliceDonut : options.classNames.slicePie);\n\n // Adding the pie series value to the path\n pathElement.attr({\n 'ct:value': dataArray[i],\n 'ct:meta': Chartist.serialize(series.meta)\n });\n\n // If this is a donut, we add the stroke-width as style attribute\n if (options.donut) {\n pathElement.attr({\n 'style': 'stroke-width: ' + donutWidth.value + 'px'\n });\n }\n\n // Fire off draw event\n this.eventEmitter.emit('draw', {\n type: 'slice',\n value: dataArray[i],\n totalDataSum: totalDataSum,\n index: i,\n meta: series.meta,\n series: series,\n group: seriesGroups[i],\n element: pathElement,\n path: path.clone(),\n center: center,\n radius: radius,\n startAngle: startAngle,\n endAngle: endAngle\n });\n\n // If we need to show labels we need to add the label for this slice now\n if (options.showLabel) {\n // Position at the labelRadius distance from center and between start and end angle\n var labelPosition = Chartist.polarToCartesian(center.x, center.y, labelRadius, startAngle + (endAngle - startAngle) / 2),\n interpolatedValue = options.labelInterpolationFnc(this.data.labels && !Chartist.isFalseyButZero(this.data.labels[i]) ? this.data.labels[i] : dataArray[i], i);\n\n if (interpolatedValue || interpolatedValue === 0) {\n var labelElement = labelsGroup.elem('text', {\n dx: labelPosition.x,\n dy: labelPosition.y,\n 'text-anchor': determineAnchorPosition(center, labelPosition, options.labelDirection)\n }, options.classNames.label).text('' + interpolatedValue);\n\n // Fire off draw event\n this.eventEmitter.emit('draw', {\n type: 'label',\n index: i,\n group: labelsGroup,\n element: labelElement,\n text: '' + interpolatedValue,\n x: labelPosition.x,\n y: labelPosition.y\n });\n }\n }\n\n // Set next startAngle to current endAngle.\n // (except for last slice)\n startAngle = endAngle;\n }\n\n this.eventEmitter.emit('created', {\n chartRect: chartRect,\n svg: this.svg,\n options: options\n });\n }", "static updateChart() {\n\t\tif(ChartManager.chartType === 'verticalbattle' ||\n\t\t\tChartManager.chartType === 'horizontalbattle') {\n\t\t\tupdateBattleChart();\n\t\t\treturn;\n\t\t} else if(ChartManager.chartType === 'horizontalBar') {\n\t\t\tChartManager.updateBarChart();\n\t\t} else {\n\t\t\tChartManager.updateNonRadarChart();\t\n\t\t}\n\n\t\tChartManager.chart.config.data = ChartManager.chartData;\n\t\tChartManager.chart.update();\n\t}", "static updateChart() {\n\t\tif(ChartManager.chartType === 'verticalbattle' ||\n\t\t\tChartManager.chartType === 'horizontalbattle') {\n\t\t\tupdateBattleChart();\n\t\t\treturn;\n\t\t} else if(ChartManager.chartType === 'horizontalBar') {\n\t\t\tChartManager.updateBarChart();\n\t\t} else {\n\t\t\tChartManager.updateNonRadarChart();\t\n\t\t}\n\n\t\tChartManager.chart.config.data = ChartManager.chartData;\n\t\tChartManager.chart.update();\n\t}", "function plotWindRose(dataOne, dataTwo, container) {\n\n var binSize = 5;\n\t\n function prepData(newDatArray) {\n\t\n // This algorithm sorts declinations in the newDatArray to bins of binSize degrees\n // Notice: 360 % binSize must be 0 \n var sortedArr = new Object();\n sortedArr['dump'] = 0;\n for(var i = 0; i < newDatArray.length; i++) {\n if(Math.round(newDatArray[i])%360 === 0) {\n sortedArr['dump'] += 1;\n } else {\n // Round to the nearest bin degrees\n // If the bin already exists, increment by one, otherwise create the bin starting at 1\n var declination = Math.abs(Math.round(newDatArray[i] / binSize) * binSize)%360;\n sortedArr[declination] ? sortedArr[declination] += 1 : sortedArr[declination] = 1;\n }\n }\n\t\t\n // Define bucket for data to be used in the chart, and define a max variable to find the maximum declinations in any bin\n var dataList = new Array();\n var max = 0;\n\n // Go over all 36 bins in the 0 - 350 range\n for(var i = 0; i <= 360; i+= binSize) {\n\t\t\n // If we have declinations in the particular bin, put the y value to the sqrt of this number\n // (to prevent linear stretching if one bin becomes very large)\n // Otherwise, push a y value of 0, which will be added to the series but is invisible to the user\n // We need to do this, otherwise the rose chart does not always take bins of size 10 degrees\n if(sortedArr[i] !== undefined) {\n dataList.push({'x': i, y: Math.sqrt(sortedArr[i])});\n } else {\n dataList.push({'x': i, 'y': 0});\t\t\n }\n\t\t\t\n // Get the maximum value of declinations, this will be the maximum y-value for the chart as wells\n if(sortedArr[i] > max) {\n max = sortedArr[i];\n }\n }\n\n return {'data': dataList, 'max': max}\n\n }\n\n var data1 = prepData(dataOne);\n var data2 = prepData(dataTwo);\n\t\n var max = data1.max;\n\t\n // Data series for the rose chart\n var dataSeries = [{\n 'borderWidth': 1, \n 'borderColor': 'grey',\n 'color': 'rgb(119, 152, 191)',\n 'zIndex': 100, \n 'name': 'Solution 1 - Original Dyke Poles', \n 'data': data1.data\n }, {\n 'borderWidth': 1, \n 'borderColor': 'grey', \n 'color': 'rgb(191, 152, 119)',\n 'zIndex': 100, \n 'name': 'Solution 2 - Original Dyke Poles', \n 'data': data2.data\n }];\n\n // Parse the data from an inline table using the Highcharts Data plugin\n var chartOptions = {\n 'chart': {\n 'polar': true,\n 'type': 'column',\n 'renderTo': container,\n },\n 'legend': {\n 'enabled': true,\n 'floating': true,\n },\n 'title': {\n 'text': 'Original Dyke Pole Density',\n 'style': { \n 'fontSize': '32px'\n }\n },\n 'subtitle': {\n 'text': 'Intersections of Beta with the horizontal (single solutions not shown)',\n },\n 'xAxis': {\n 'minorTickPosition': 'outside',\n 'type': 'linear',\n 'min': 0,\n 'max': 360,\n 'minorGridLineWidth': 0,\n 'tickPositions': [0, 90, 180, 270, 360],\n 'minorTickInterval': 10,\n 'minorTickLength': 2,\n 'minorTickWidth': 1,\n 'labels': {\n 'formatter': function () {\n return this.value + '\\u00B0'; //Add degree symbol to x-axis labels.\n }\n }\n },\n 'pane': {\n 'startAngle': 0,\n 'endAngle': 360\n },\n 'yAxis': {\n 'min': 0,\n 'tickPositions': [0, this.max],\n 'endOnTick': false,\n 'labels': {\n 'enabled': false\n },\n },\n 'tooltip': {\n 'formatter': function () {\n return '<b> Cumulative Declination </b> <br><b>Declination Bin: </b>' + this.x + '<br><b>Number of Declinations: </b>' + Math.pow(this.y, 2).toFixed(1);\n }\n },\n 'credits': {\n 'enabled': true,\n 'text': \"Paleomagnetism.org (NTR Analysis) - <i> after Allerton and Vine, 1987, Morris et al., 1998 </i>\",\n 'href': ''\n },\n 'plotOptions': {\n 'series': {\n 'stacking': 'normal',\n 'animation': false,\n 'shadow': false,\n 'groupPadding': 0,\n 'pointPadding': 0,\n 'pointPlacement': 'on',\n },\n 'column': {\n 'colorByPoint': false\n }\n },\n 'series': dataSeries,\n }\n\n new Highcharts.Chart(chartOptions);\n $(\"#windrosePlot\").show().css('display', 'inline-block');\n\n}", "function ChartsBarchart() {\n}", "constructor( props ) {\n super( props );\n this.chartColors = {\n New: '#f90008',\n Closed: '#cfef00',\n InProgress: 'green'\n }\n\n\n this.state = {\n isLoading: false,\n chartTitle: '',\n chartData: [],\n chartOptions: {\n cutoutPercentage: 80,\n rotation: 1 * Math.PI,/** This is where you need to work out where 89% is */\n circumference: 1 * Math.PI,\n responsive: true,\n legend: {\n display: false,\n },\n plugins: {\n datalabels: {\n color: '#FFF',\n font: {\n weight: 500,\n }\n }\n }\n }\n };\n }" ]
[ "0.67635065", "0.6491068", "0.6484326", "0.63109314", "0.6296422", "0.6146683", "0.6115306", "0.60754436", "0.59910053", "0.59729016", "0.59246576", "0.59206533", "0.58787036", "0.5819908", "0.5781996", "0.5695503", "0.5685129", "0.56794894", "0.565698", "0.56429756", "0.5634035", "0.56144553", "0.5608069", "0.56051314", "0.5603638", "0.56016076", "0.55917984", "0.55873144", "0.5580625", "0.55801445", "0.55702597", "0.55702597", "0.55446607", "0.55335355", "0.5509847", "0.5502543", "0.55023503", "0.5492328", "0.5481506", "0.5471753", "0.54589236", "0.54560155", "0.5440216", "0.5437027", "0.5435409", "0.5432631", "0.543124", "0.542696", "0.5422452", "0.54208994", "0.54208994", "0.54208994", "0.54208994", "0.5417573", "0.54126126", "0.540587", "0.5404617", "0.5404617", "0.5399423", "0.5398221", "0.53963923", "0.53806174", "0.53751934", "0.53662694", "0.53557134", "0.5355224", "0.5347908", "0.53477246", "0.53423524", "0.5335157", "0.5327515", "0.5326524", "0.53184", "0.5310505", "0.53002554", "0.52957904", "0.5278281", "0.52752423", "0.5269558", "0.5267499", "0.52627724", "0.52568287", "0.5256108", "0.5255592", "0.5249493", "0.52464026", "0.52464026", "0.524542", "0.5233877", "0.5227881", "0.5215961", "0.5214486", "0.5209139", "0.519856", "0.5198193", "0.5197411", "0.5186128", "0.5186128", "0.51860845", "0.5185957", "0.5183479" ]
0.0
-1
Do not update cache until api called.
function updateCache(dataIndexInside) { dataIndexInside == null && (dataIndexInside = currDataIndexInside); if (currDirty) { currItemModel = data.getItemModel(dataIndexInside); currLabelNormalModel = currItemModel.getModel(LABEL_NORMAL); currLabelEmphasisModel = currItemModel.getModel(LABEL_EMPHASIS); currVisualColor = data.getItemVisual(dataIndexInside, 'color'); currDirty = false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async updateCache() {\n this._cache = await this.model.query();\n }", "function updateCache() {\n if (currentCache > caches.length) {\n currentCache = 0;\n }\n currentCache++;\n showCache();\n}", "emptyCache() {\n this.cache = {};\n }", "emptyCache() {\n this.cache = {};\n }", "get _cache() {\n return cache;\n }", "cacheEnable() {\n this.cache = new Map();\n }", "function Cache() {}", "function resetCache() {\n console.log('resetCache');\n cache = {};\n }", "function cacheToMemory(){\n // need to implement\n}", "function cacheRquest() {\n pendingActions.push({ data:data, done:done });\n }", "function MapCache() {\n }", "_get(callback, data, id) {\n let err = null; //placeholder for real calls\n //call API - for this example fake an async call with setTimeout\n setTimeout( () => {\n //set the response in the cache - cache exists across\n //multiple calls and this solves a problem with having\n //to make a state existence check in componentWillMount\n let dataToCache = data;\n if (err) {\n dataToCache = err;\n }\n cache.add(id, dataToCache);\n return callback(err, {result: dataToCache, id: id});\n }, 200);\n }", "updateCache() {\n this.imageCache.src = this.config.src;\n }", "async loadCache() {\n const { latest, refreshCache, isOutdated, lastUpdate } = this\n\n if (!lastUpdate || isOutdated()) {\n await refreshCache()\n }\n\n return latest\n }", "async initCache() {\n return await reusePromiseForever(this, this._initCache);\n }", "async function fillAndSet() {\n const resp = await fetchFn();\n if (resp.status > 200) {\n /*\n * When the fetchFn returns an error, no caching.\n */\n return resp\n }\n const body = await resp.text()\n const entry = {\n body: body,\n contentType: resp.headers.get('content-type'),\n time: Date.now()\n }\n fly.cache.set(key, JSON.stringify(entry), 86400)\n return resp\n }", "function updateUserCache() {\n console.log('attempting to update appache');\n window.applicationCache.update(); \n}", "function clearCache() {\n cache = undefined;\n}", "function clearCache() {\n _cache = {};\n }", "function cache() {\n // TODO: Cache to Redis if on server\n if (!client) {\n return;\n }clearTimeout(pending);\n var count = resources.length;\n pending = setTimeout(function () {\n if (count == resources.length) {\n log(\"cached\");\n var cachable = values(resources).filter(not(header(\"cache-control\", \"no-store\")));\n localStorage.ripple = freeze(objectify(cachable));\n }\n }, 2000);\n }", "handleChangeEvent() {\n this.cacheHasChanged = true;\n }", "clear() {\n this.cache.clear();\n }", "clear() {\n this.cache.clear();\n }", "function cache() {\n document.documentElement.dataset.cached = true;\n var data = document.documentElement.outerHTML;\n fetch('./render-store/', { method: 'PUT', body: data }).then(function() {\n console.log('Page cached');\n });\n}", "async function prepareCache() {\n const c = await caches.open(CACHE);\n await c.addAll(CACHEABLE);\n console.log('Cache prepared.');\n}", "function setCache(data) {\n // Cache Weather data.\n cache = {\n data: data,\n timestamp: new Date()\n };\n // Clear cache in 10 minute.\n $timeout(function() {\n cache.data = undefined;\n }, 600000);\n $rootScope.$broadcast(broadcastUpdateEventName);\n }", "RevokeCache() {\n\n }", "reset() {\n this.cache = {};\n }", "clearCache() {\n debug('clear cache');\n this[internal].clearCache();\n }", "clearCache() {\n\t /*\n\t * Tracks specific objects such as accounts that can trigger additional\n\t * fetching that should only happen if we're actually interested in the account\n\t */\n\t this.subbed_accounts = new Set();\n\t this.subbed_witnesses = new Set();\n\t this.subbed_committee = new Set();\n\n\t this.objects_by_id = new Map();\n\t this.accounts_by_name = new Map();\n\t this.assets_by_symbol = new Map();\n\t this.account_ids_by_key = __WEBPACK_IMPORTED_MODULE_0_immutable___default.a.Map();\n\t this.account_ids_by_account = __WEBPACK_IMPORTED_MODULE_0_immutable___default.a.Map();\n\n\t this.balance_objects_by_address = new Map();\n\t this.get_account_refs_of_keys_calls = new Set();\n\t this.get_account_refs_of_accounts_calls = new Set();\n\t this.account_history_requests = new Map(); ///< tracks pending history requests\n\t this.witness_by_account_id = new Map();\n\t this.committee_by_account_id = new Map();\n\t this.objects_by_vote_id = new Map();\n\t this.fetching_get_full_accounts = new Map();\n\t this.get_full_accounts_subscriptions = new Map();\n\t clearTimeout(this.timeout);\n\t this.dispatched = false;\n\t }", "function EntryCache() {}", "function clear() {\n cache = {};\n}", "function clear() {\n cache = {};\n}", "function clear() {\n cache = {};\n}", "function clear() {\n cache = {};\n}", "function update_cache(){\n\n $.ajax({\n url: url_path+\"get_cache_data\", type: \"GET\", dataType: \"json\", success: function (msg) {\n generate_cache_sentence(msg.sentence)\n }\n });\n}", "constructor() {\n /**\n * @private\n */\n this._cacheMap = new Map();\n }", "function setCache(data) {\n // Cache account data.\n cache = {\n data: {\n user: data[0].data,\n account: data[1].data\n },\n timestamp: new Date()\n };\n // Clear cache in 60 minutes.\n $timeout(function() {\n cache.data = undefined;\n }, 3600000);\n $rootScope.$broadcast(broadcastUpdateEventName);\n }", "function MapCache(){this.__data__={};}", "function MapCache(){this.__data__={};}", "function setCache(data) {\n // Cache data.\n cache = {\n data: data\n };\n\n // Clear cache in 60 seconds.\n clearCache = $timeout(function () {\n cache = {};\n }, 60000);\n\n // Broadcast a change event.\n $rootScope.$broadcast('restfulChanged');\n }", "clearCache() {\n if (!this.dataProvider) {\n return;\n }\n\n this._pendingRequests = {};\n const filteredItems = [];\n\n for (let i = 0; i < (this.size || 0); i++) {\n filteredItems.push(this.__placeHolder);\n }\n\n this.filteredItems = filteredItems;\n\n if (this.opened) {\n this._loadPage(0);\n } else {\n this._forceNextRequest = true;\n }\n }", "hasChanged() {\n return this.cacheHasChanged;\n }", "updateCache() {\r\n const that = this;\r\n return new Promise((resolve, reject) => {\r\n let loopCount = 0;\r\n\r\n async function updateBounds(counter) {\r\n try {\r\n if (counter !== undefined) {\r\n loopCount = counter;\r\n }\r\n\r\n if (loopCount > 5) {\r\n throw new Error(\"COULD NOT UPDATE CACHE\");\r\n }\r\n\r\n if (that.bounds === null) {\r\n updateBounds(loopCount + 1);\r\n await that.pause(200);\r\n } else {\r\n that.container.updateCache();\r\n that.activity.refreshCanvas();\r\n resolve();\r\n }\r\n } catch (e) {\r\n reject(e);\r\n }\r\n }\r\n updateBounds();\r\n });\r\n }", "function getFromCache(request){\n if(cacheObj.hasOwnProperty([request])){\n cacheObj[request][1] = new Date(); //update date\n cacheObj[request][2] += 1; //update times used\n return cacheObj[request][0]; //obj result\n }else\n return null;\n}", "function cacheget(url, callback) {\n backlog.push({ url: url, callback: callback});\n }", "@bind\n setUseCache(value) {\n this.cache = value\n }", "async function preCache() {\n const cache = await caches.open(PRECACHE);\n await cache.addAll(urlsToCache);\n await self.skipWaiting();\n}", "async function cacheData() {\n try { \n const cache = await caches.open(CACHE_NAME);\n fetch(URL_API)\n .then(response => {\n if (!response) {\n throw Error('Could not retrieve data...');\n }\n return cache.put(URL_API, response);\n })\n } catch (error) {\n console.log('Failed to install cache', error);\n }\n}", "function regenerateNewCache(){\n //special ordering for new so it is always the same, selecting\n //offset regions breaks otherwise\n database.sequelize.query(\"SELECT imdb_id, title, type FROM movies WHERE type = 'movie' ORDER BY NULLIF(regexp_replace(year, E'\\\\D', '', 'g'), '')::int DESC, \\\"createdAt\\\" DESC LIMIT 16 OFFSET \" + pageNumber * 16,\n {model: database.Movie}\n ).then(function(movies){\n cache.set(\"new_0\", JSON.stringify(movies), global.FontPageTTL, function(err, success){\n if(err){\n logger.error(\"CACHE_SET_FAILURE: new_0\");\n }else{\n logger.debug(\"CACHE_SET_SUCCESS: new_0\");\n }\n });\n });\n }", "static async testCacheRetrieve(id) {\n const testReview = {\"restaurant_id\": \"2\", \"name\": \"McToad\", \"rating\": \"2\", \"comments\": \"this place sucks\"}\n const key = 'http://localhost:1337/reviews/?restaurant_id=' + id;\n //const cache = await caches.open('restaurantReviewCache');\n //const cachedResponse = await cache.match(key);\n caches.open('restaurantReviewCache')\n .then(cache => {\n return cache.match(key)\n })\n .then(response => {\n return response.json();\n })\n .then(data => {\n data.push(testReview);\n let testResponse = new Response(JSON.stringify(data));\n caches.open('restaurantReviewCache').then(cache => {cache.put(key, testResponse)});\n });\n //fetch(key).then(result => {console.log(result)});\n //console.log(cachedResponse.body);\n //console.log('wacka wacka');\n }", "function uuajaxexpire() {\r\n _uuajax._cache = {}; // expire If-Modified-Since cache\r\n}", "function clear () {\n\tcache = {};\n}", "async cacheWhoami(){\n if(!this._whoamiCache){\n this._whoamiCache = (await this.keychain.whoami())[0]\n }\n }", "function CacheEl() {\n \n }", "async function networkFirst(req){\n const cache = await caches.open(staticCacheName)\n try{\n //storing new data from internet to local cache\n const fresh = await fetch(req)\n cache.put(req,fresh.clone())\n //clone = store\n return fresh\n }catch(e){\n const cached = await cache.match(req)\n return cached\n }\n}", "clear () {\n this._cache = {};\n }", "function MapCache() { GFactualGeocodeCache.apply(this); }", "get cache() {\n return this.base.cache;\n }", "constructor() {\n this.cachedDictionary = {};\n }", "async function fillAndSet() {\n const body = await fillFn();\n if (!body) {\n /*\n * When the fillFn returns nothing, no caching.\n */\n return\n }\n const entry = {\n body: body,\n time: Date.now()\n }\n fly.cache.set(key, JSON.stringify(entry), 3600)\n return entry\n }", "wipeCache() {\n\t\tthis.cached = null;\n\t}", "function startCaching () {\n cachingInterval = setInterval(getBogPrice, CACHING_TIME)\n}", "function loadCacheData() {\n var data = storage ? storage.cachedData : null;\n cachedData = data ? angular.fromJson(data) : {};\n }", "function getCache(){\n \n /** need to complete\n $.ajax({\n type: 'GET',\n url: rrotURL,\n dataType: \"json\",\n success: cacheToMap\n });\n */\n}", "initCacheData(cacheData) {\n if (cacheData) {\n this.cacheData = cacheData;\n } else {\n this.cacheData = this.manageGlobalCacheData('get');\n }\n }", "async function updateCacheAndRender () {\n await getTwitchStreams()\n await updateDisplay()\n}", "getCached(key) {\n const k = (typeof key === 'object') ? this.endpoint(key) : key\n return this.isCached(k) ? this.cache.get(k) : false\n }", "async list() {\n this.setState({loading: true});\n\n try {\n let data = await this.api.cache();\n\n this.setState({\n loading: false,\n error: null,\n data,\n });\n } catch(e) {\n this.setState({\n loading: false,\n error: `failed to request cache: ${e}`,\n data: null,\n });\n }\n }", "async function tryToFetchCachedData(key, getter) {\n let val = jackPotCache.get(key);\n\n if (!val || (new Date() - val.lastUpdate > CACHE_UPDATE_PERIOD)) {\n val = await getter();\n jackPotCache.set(key, val);\n }\n\n return val;\n}", "function getInfo(){\t\t\n\treturn cachedInfo;\n}", "setCache(url, data) {\n this.cache[this.hashValue(url)] = data;\n return this.getCache(url);\n }", "updateCache() {\n const cacheP = new Promise((resolve, reject) =>\n storage.get(this.CACHE_NAME, (error, data) => (error ? reject(error) : resolve(data)))\n )\n\n return cacheP\n .catch(() => Promise.resolve())\n .then((store) => storage.set(this.CACHE_NAME, Object.assign(store || {}, this.packages), () => {}));\n }", "flush() {\n this.cache.flushAll();\n }", "_cleanUpCache() {\n this.tweetsCache = [];\n }", "clear() {\n if (!this._cache) {\n return;\n }\n this._cache.clear();\n }", "async warmCache(updatedUrl) {\n\n try {\n return axios.get(updatedUrl)\n .then(response => {\n if (response.status === 200) {\n return true;\n }\n })\n } catch (error) {\n this.logger.save(`${'(prod)'.padEnd(15)}stdErr: ${error}`);\n throw error;\n }\n }", "checkCacheTimer() {\n var oldCacheTime = this.cacheTime;\n super.checkCacheTimer(); // First call service level cache clearning\n // Then do implementation specific cache clean-up\n if (this.now - oldCacheTime > this.CACHE_TIMEOUT) {\n // Clear the cache\n this.cache.bar = {};\n }\n }", "function SimpleCache() {\n this.cache = {};\n}", "_cacheAdverts() {\n Meteor.call('AdManager.cacheAdverts');\n }", "function _cacheData(key, value) {\n\t cache[key] = { timeStamp: _getTimeStamp(), value: value };\n\t return value;\n\t}", "function clearcache() {\n dbgmsg( 'retrieveData: Internal cache contain attribute values for: ' + Object.keys( cache ).sort().join( '; ' ) );\n cache = {};\n logmsg( 'retrieveData: cache cleared.' );\n }", "async prepareCache() {\n if(this.options.file.linkCache) {\n this.cacheFile = await this.addService('file', new this.CacheFileTransport(this.options.file.linkCache));\n }\n }", "function forceUpdate(){\n forceUp = true;\n getJson()\n}", "function cached(entry, url) {\n return () => {\n if (cache[entry]) {\n return cache[entry]\n }\n cache[entry] = axios.get(url, {withCredentials: true}).then(r => r.data)\n return cache[entry]\n }\n}", "function cache(key, value)\n\t\t{\n\t\t\tvar bg = chrome.extension.getBackgroundPage();\n\n\t\t\tif (typeof(value) !== \"undefined\")\n\t\t\t{\n\t\t\t\tbg.keypunkState.cache(key, value);\n\t\t\t}\n\n\t\t\treturn bg.keypunkState.cache(key);\n\t\t}", "function precache() {\n return caches.open(restaurantsCache).then(function (cache) {\n return cache.addAll(cacheFiles);\n });\n}", "hit(k) {\n this._update(k, this.cache[k].value);\n }", "getCache(url) {\n return Promise.resolve(this.cache[this.hashValue(url)]);\n }", "function reset() {\n cache.reset();\n AJS.debug('server-users-supplier: Cache reset');\n }", "function reset() {\n cache.reset();\n AJS.debug('server-users-supplier: Cache reset');\n }", "recacheOppPages() {\n this.getOppPages();\n }", "clear() {\n this._cache = [];\n this._updated = false;\n }", "function cacheAndGet(key, api, body, getter, callback) {\n client.exists(key, function(err, reply) {\n if (reply === 1) {\n client.get(key, function(err, reply) {\n callback(reply);\n });\n } else {\n // Fetch remote data and set k,v in callback\n getter(api, body, function(json) {\n callback(json);\n client.set(key, json);\n // Expire after half hours\n client.expire(key, 3600);\n });\n }\n });\n}", "function getDateDataCache() {\n return dateDataCache;\n}", "function listCacheClear(){this.__data__=[];}", "function listCacheClear(){this.__data__=[];}", "function listCacheClear(){this.__data__=[];}", "function listCacheClear(){this.__data__=[];}", "function proactiveStalenessCleaner() {\n console.log(\"Sweeping the cache for old entries\");\n cache.prune();\n}", "function clearCache() {\n cache_1.clearCache();\n}" ]
[ "0.7163637", "0.702836", "0.6947235", "0.6947235", "0.6869056", "0.68560874", "0.6764157", "0.6759199", "0.67481846", "0.6736378", "0.67232144", "0.6719998", "0.67077357", "0.6699206", "0.6687188", "0.66650504", "0.6604259", "0.6598937", "0.65983945", "0.6566894", "0.65402424", "0.6511719", "0.6511719", "0.6491915", "0.6488816", "0.64856595", "0.648498", "0.6461266", "0.64100987", "0.64074385", "0.64044046", "0.6404382", "0.64041394", "0.64041394", "0.64041394", "0.6381781", "0.637971", "0.6377181", "0.63642824", "0.63642824", "0.63614184", "0.63554215", "0.6343579", "0.6323627", "0.63104993", "0.62934387", "0.6280181", "0.62704784", "0.6260323", "0.62358356", "0.6216352", "0.6213541", "0.62085885", "0.62067014", "0.6203818", "0.6196853", "0.61931396", "0.6189624", "0.61793303", "0.61692834", "0.6168713", "0.6162068", "0.6156749", "0.6156436", "0.6152927", "0.6145944", "0.61420375", "0.61341953", "0.61302894", "0.61284924", "0.6127972", "0.6115772", "0.6112397", "0.6110779", "0.6109869", "0.6102748", "0.6101102", "0.60963047", "0.609176", "0.6089797", "0.6086778", "0.6079602", "0.60770315", "0.6063247", "0.60617834", "0.60586464", "0.6053289", "0.6043088", "0.60412294", "0.6040248", "0.6040248", "0.60391045", "0.60385287", "0.6037916", "0.603074", "0.6028629", "0.6028629", "0.6028629", "0.6028629", "0.6026791", "0.60253567" ]
0.0
-1
textFill, textStroke, textStrokeWidth. We have to do this trick.
function applyExtraBefore(extra, model) { var dummyModel = new Model({}, model); zrUtil.each(CACHED_LABEL_STYLE_PROPERTIES, function (stylePropName, modelPropName) { if (extra.hasOwnProperty(stylePropName)) { dummyModel.option[modelPropName] = extra[stylePropName]; } }); return dummyModel; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function textStyle(text) {\n text.attr(\"aria-hidden\", d.aH).attr(\"dir\", rtl ? \"rtl\" : \"ltr\").attr(\"fill\", d.fC).attr(\"stroke\", d.fStroke).attr(\"stroke-width\", d.fSW).attr(\"text-anchor\", d.tA).attr(\"font-family\", d.fF).style(\"font-family\", d.fF).attr(\"font-size\", \"\".concat(d.fS, \"px\")).style(\"font-size\", \"\".concat(d.fS, \"px\")).attr(\"font-weight\", d.fW).style(\"font-weight\", d.fW).attr(\"x\", \"\".concat(d.tA === \"middle\" ? d.w / 2 : rtl ? d.tA === \"start\" ? d.w : 0 : d.tA === \"end\" ? d.w : 2 * Math.sin(Math.PI * d.r / 180), \"px\")).attr(\"y\", function (t, i) {\n return d.r === 0 || d.vA === \"top\" ? \"\".concat((i + 1) * d.lH - (d.lH - d.fS), \"px\") : d.vA === \"middle\" ? \"\".concat((d.h + d.fS) / 2 - (d.lH - d.fS) + (i - d.lines.length / 2 + 0.5) * d.lH, \"px\") : \"\".concat(d.h - 2 * (d.lH - d.fS) - (d.lines.length - (i + 1)) * d.lH + 2 * Math.cos(Math.PI * d.r / 180), \"px\");\n });\n }", "function formatText() {\n stroke(255);\n fill(255);\n textSize(20);\n textFont('Inconsolata');\n}", "function styleText(txtColour, txtFont, txtAlign, txtBaseline) {\n canvasContext.fillStyle = txtColour;\n canvasContext.font = txtFont;\n canvasContext.textAlign = txtAlign;\n canvasContext.textBaseline = txtBaseline;\n}", "function text_fill(ctx, info, i, color, flag = 0, text='')\r\n{\r\n ctx.strokeStyle=color;\r\n ctx.font=\"bold 14px Arial\";\r\n ctx.textAlign=\"center\";\r\n ctx.textBaseline=\"middle\";\r\n ctx.fillStyle=\"black\";\r\n if (flag == 0) ctx.fillText( info[i].id,info[i].position[0]/100, info[i].position[1]/100);\r\n\telse if (flag == 1) ctx.fillText( text, info[i].position[0]/100, info[i].position[1]/100);\r\n\telse ctx.fillText( info.id, info.position[0]/100, info.position[1]/100);\r\n}", "function textStyle() {\n return { font: \"9pt Segoe UI,sans-serif\", stroke: \"white\" };\n }", "function textStyle() {\n return { font: \"9pt Segoe UI,sans-serif\", stroke: \"white\" };\n }", "function text(txt, fnt, x, y, color) {\n ctx.fillStyle = color;\n ctx.font = fnt;\n ctx.textAlign = \"start\";\n ctx.textBaseline = \"middle\";\n ctx.fillText(txt, x, y);\n}", "function text(x, y, text, color, font){\n ctx.fillStyle = color;\n ctx.font = font;\n ctx.fillText(text, x, y);\n}", "function strokeText(ctx, text, x, y) {\n\t\tif (browser != -1)\n\t\t\tctx.strokeText(text, Math.round(x), Math.round(y));\n\t\telse\n\t\t\tctx.strokeText(text, Math.round(x + ctx.measureText(text).width), Math.round(y));\n\t}", "setTextStroke(color, weight) {\n this.textStroke = color;\n this.strokeWeight = weight;\n }", "function add_text_data( data ){\n\tcanvas_context.font = \"bold 15px Comic Sans MS\";//font style, font size, font family\n\tcanvas_context.fillStyle = data.color;\n\tcanvas_context.fillText( data.text, data.x, data.y);\n}", "draw_txt(txt, x, y) {\n return () => {\n fill(255);\n textAlign(CENTER);\n text(txt, x, y);\n };\n }", "function Text(x, y, text, fillStyle, strokeStyle) {\n if (x === void 0) { x = 0; }\n if (y === void 0) { y = 0; }\n if (text === void 0) { text = ''; }\n if (fillStyle === void 0) { fillStyle = color_9.default.black; }\n if (strokeStyle === void 0) { strokeStyle = color_9.default.white; }\n var _this = _super.call(this, x, y, fillStyle, strokeStyle) || this;\n /**\n * The actual string value that is rendered.\n */\n _this.text = '';\n /**\n * The font used to render the text.\n */\n _this.font = '16px Monospace';\n /**\n * Text align.\n */\n _this.textAlign = exports.TextAlign.Start;\n /**\n * Text base line.\n */\n _this.textBaseLine = exports.TextBaseLine.Alphabetic;\n /**\n * Text direction.\n */\n _this.textDirection = exports.TextDirection.Inherit;\n _this.text = text;\n return _this;\n }", "function textStyle(text) {\n return new ol.style.Text({\n 'font': '12px Calibri,sans-serif',\n 'text': text,\n 'fill': new ol.style.Fill({\n 'color': '#000'\n }),\n 'stroke': new ol.style.Stroke({\n 'color': '#fff',\n 'width': 3\n })\n });\n }", "function drawText(label, xPos, yPos, txtSize, txtWeight) {\n textAlign(CENTER);\n textFont(\"Arial\");\n textSize(txtSize);\n textStyle(txtWeight);\n fill(textColor);\n strokeWeight(0);\n text(label, xPos, yPos);\n //The stroke weight needed for the lines is making the text too thick.\n //I should probably fix this via CSS instead\n strokeWeight(1);\n}", "function drawText(text) {\n let font = text\n let str = font.line;\n checkShadow(font.shadowColor, font)\n gCanvas.lineWidth = 1\n gCanvas.strokeStyle = font.stroke;\n gCanvas.textAlign = font.align;\n gCanvas.font = `${font.size}px ${font.name}`\n gCanvas.fillStyle = font.color\n gCanvas.fillText(str, font.x, font.y);\n if (font.isStroked) {\n gCanvas.strokeText(str, font.x, font.y);\n }\n font.xwidth = gCanvas.measureText(font.line).width\n font.yheight = font.size;\n}", "fillText(text, x, y, width, height) {\n //this.ctx.fillText(text, x, y);\n return this.ctx.drawImage(\n this.cache.getFontTile(text, width, height, this.ctx.font),\n x, y, width, height,\n );\n }", "function fill(){\nctx.font = \"20px Arial\";\nctx.fillText(\"Use either Mouse or Keyboard Controls\", 160,500);\n\n}", "function drawText (x, y, size, align, color, text){\n\treturn svg.append(\"text\")\n .text(text)\n .attr(\"x\", x) \n .attr(\"y\", y)\n .attr(\"font-family\", \"Verdana\")\n .attr(\"font-size\", size+\"px\")\n .attr(\"fill\", color)\n .attr(\"text-anchor\", align);\n}", "function niceText(text, horizontal, vertical)\n\t{\n\t\tctx.font = \"16px Arial\";\n\t\tctx.fillStyle = \"#ffffff\";\n\t\t//ctx.strokeText(text, horizontal, vertical);\n\t\tctx.fillText(text, horizontal, vertical);\n\t}", "function drawText(fontSize, x, y, message, fill) {\n context.fillStyle = fill;\n\t\tcontext.font = fontSize + ' Arial';\n context.fillText(message, x, y);\n\t}", "text(value, x, y, props = {}) {\n this.context.fillStyle = props.color || 'white';\n const size = props.size || '5vh';\n this.context.font = `${size} ${props.font || this.font}`;\n this.context.textAlign = props.textAlign || 'center';\n this.context.fillText(value, x, y);\n }", "function drawText(x,y,text,color){\r\n ctx.fillStyle = color;\r\n ctx.font=\"50px arial\";\r\n ctx.fillText(text,x,y);\r\n}", "function fillText(numero, color, gx, gy){\n ctx.fillStyle = color;\n ctx.font = 0.5*size+\"px Georgia\";\n ctx.fillText(numero, gx*size + size/3, gy*size + 2*size/3);\n}", "function drawTxt(txtObj) {\n gCtx.font = `bold ${txtObj.size}px Impact`;\n gCtx.fillStyle = txtObj.fillColor\n gCtx.strokeStyle = txtObj.strokeColor\n gCtx.textAlign = txtObj.align;\n gCtx.fillText(txtObj.line, (gCanvas.width / 2), txtObj.yPos);\n gCtx.strokeText(txtObj.line, (gCanvas.width / 2), txtObj.yPos);\n}", "function setTextStroke(elem, text) {\n\treturn elem.text(text).addClass(\"stroke\").attr(\"data-stroke\", text);\n}", "function drawText(size,color,alignment,text,x,y,font=\"Arial\") {\n\tctx.font = size + \"px \" + font;\n\tctx.fillStyle = color;\n\tctx.textAlign=alignment;\n\tctx.fillText(text,x,y);\n\tctx.textAlign=\"start\";\n}", "noTextStroke() {\n this.textStroke = false;\n this.strokeWeight = false;\n }", "strokeText(text, x, y) {\n CanvasManager.strokeText(findNodeHandle(this), text, x, y)\n }", "function TextRenderer() {}", "function TextRenderer() {}", "function TextRenderer() {}", "function TextRenderer() {}", "function TextRenderer() {}", "function TextRenderer() {}", "function TextRenderer() {}", "function TextRenderer() {}", "function TextRenderer() {}", "function TextRenderer() {}", "function TextRenderer() {}", "function TextRenderer() {}", "function TextRenderer() {}", "function TextRenderer() {}", "function TextRenderer() {}", "function TextRenderer() {}", "function supports_text(ctx) {\n if (!ctx.fillText) return false;\n if (!ctx.measureText) return false;\n return true;\n}", "function drawText(color, font, align, base, text, x, y) {\n ctx.fillStyle = color;\n ctx.font = font;\n ctx.textAlign = align;\n ctx.textBaseline = base;\n ctx.fillText(text, x, y);\n}", "function fillText(ctx, string, x, y, size, color) {\n\tctx.save();\n\t\tctx.textAlign = \"center\";\n\t\tctx.textBaseline = \"middle\";\n\t\tctx.font = size + 'pt Oswald';\n\t\tctx.fillStyle = color;\n\t\tctx.fillText(string, x, y);\n\tctx.restore();\n}", "fillText(text, x, y) {\n CanvasManager.fillText(findNodeHandle(this), text, x, y)\n }", "function drawText(text, x, y, color, fontSize, align = \"left\"){\n\tg_canvas.fillStyle = color;\n\tlet size = getFontPixelsFromPercentage(fontSize) + \"px\";\n\tg_canvas.font = size + \" Righteous\";\n\tg_canvas.textAlign = align;\n\tg_canvas.fillText(text, x, y);\n}", "function dibujoInicial(){\r\n\tctx.fillStyle = \"#fff\";\r\n\tctx.fillRect(0, 0, 600, 250);\t\r\n\tctx.fillStyle =\"#8A0808\";\r\n\tctx.font=\"25pt Rockwell Condensed\";\r\n\tctx.fillText(\"\",180,50);\r\n\tctx.strokeStyle = \"black\";\r\n\tctx.strokeText(\"\",180,50);\r\n}", "function TextCircle (x, y, r, dx, dy, text, fill) {\r\n return {\r\n x: x,\r\n y: y,\r\n r: r,\r\n text: text,\r\n fill: fill,\r\n\t\ttranslate: function(dx, dy) {\r\n\t\t\twith (this) {\r\n\t\t\t\tx += dx;\r\n\t\t\t\ty += dy;\r\n\t\t\t}\r\n\t\t},\r\n draw: function(ctx) {\r\n Circle(x,y,r, \"white\", fill).draw(ctx);\r\n Text(x+dx, y+dy, text, \"18pt Comic sans MS\").draw(ctx);\r\n }\r\n }\r\n}", "function messageText(text) {\n ctx.font = \"48px Impact\";\n ctx.fillStyle = '#7f8c8d';\n var textWidth = ctx.measureText(text).width;\n var x = (WIDTH - textWidth) / 2, y = HEIGHT / 2 - 24;\n ctx.fillText(text, x, y);\n }", "render() {\n\t\tif (!this.visible || !this.ctx) return;\n\t\tthis.ctx.font = this.textStyle.font;\n\t\tthis.ctx.fillStyle = this.textStyle.fillStyle;\n\t\tthis.ctx.textAlign = this.textStyle.textAlign;\n\t\tthis.ctx.fillText(this.text, this.x, this.y);\n\t}", "draw(context) {\n\t\t\tcontext.textAlign = 'center';\n\t\t\tcontext.fillStyle = 'rgba(57, 228, 57,' + this.opacity + ')';\n\t\t\tcontext.fillText(this.name, this.x, this.y);\n\t\t}", "function Text(x,y,w,h,col,str,font) {\r\n this.xbuf = 5; //5 pixel buffer from edge of region\r\n this.ybuf = 2;\r\n this.x_pos = x + this.xbuf;\r\n this.y_pos = y + this.ybuf;\r\n this.w = w - this.xbuf*2; \r\n this.h = h - this.ybuf*2;\r\n this.c = col;\r\n this.str = str;\r\n this.font = font;\r\n\r\n //Reach largest possible font size\r\n var txt_h = 0;\r\n var txt_w = 0;\r\n var size = 0;\r\n while(txt_w < this.w && txt_h < this.h) {\r\n size++;\r\n textSize(size);\r\n txt_w = textWidth(this.str);\r\n txt_h = textDescent() + textAscent();\r\n }\r\n this.Size = size;\r\n\r\n this.draw = function() {\r\n fill(this.c);\r\n textSize(this.Size);\r\n textFont(this.font);\r\n textAlign(CENTER,CENTER);\r\n text(this.str,this.x_pos+.5*this.w,this.y_pos+.5*this.h);\r\n }\r\n\r\n}", "function Text(text, x, y, fontSize, color, context) {\n this.text = text;\n this.x = x;\n this.y = y;\n this.fontSize = fontSize;\n this.color = color;\n this.update = () => {\n ctx = context;\n ctx.fillStyle = this.color;\n ctx.font = `${this.fontSize}px Roboto`;\n ctx.textAlign = 'center';\n ctx.fillText(this.text, this.x, this.y);\n };\n}", "function drawText(font, text, x, y) {\n cxt.font = font;\n cxt.fillStyle = \"white\";\n cxt.fillText(text, x, y);\n}", "function drawText(ctx, arc) {\r\n var arcTextArr = arc.arcText;\r\n ctx.font = \"14px 'Trebuchet MS'\";\r\n ctx.fillStyle = \"black\";\r\n for (var i = 0; i < arcTextArr.length ; i++) {\r\n ctx.save();\r\n var tmArcText = arcTextArr[i];\r\n ctx.translate(tmArcText.x, tmArcText.y);\r\n ctx.rotate(-tmArcText.angle * Math.PI / 180);\r\n \r\n ctx.fillText(tmArcText.value, 0, 3);\r\n ctx.restore();\r\n }\r\n }", "text(str, x, y, alignment) {\n if (y === undefined) {\n y = x.y;\n x = x.x;\n }\n const ctx = this.ctx;\n ctx.save();\n if (alignment) {\n ctx.textAlign = alignment;\n }\n if (this.textStroke) {\n this.ctx.lineWidth = this.strokeWeight;\n this.setStroke(this.textStroke);\n this.ctx.strokeText(str, x, y);\n }\n this.ctx.fillText(str, x, y);\n ctx.restore();\n }", "render(ctx) {\n ctx.font = this.font;\n ctx.strokeStyle = this.strokeStyle;\n ctx.lineWidth = this.lineWidth;\n ctx.fillStyle = this.fillStyle;\n\n //Measure the width and height of the text\n if (this.width === 0) this.width = ctx.measureText(this.content).width;\n if (this.height === 0) this.height = ctx.measureText(\"M\").width;\n ctx.translate(\n -this.width * this.pivotX, \n -this.height * this.pivotY\n );\n ctx.textBaseline = this.textBaseline;\n ctx.fillText(\n this.content,\n 0,\n 0\n );\n if (this.strokeText !== \"none\") ctx.strokeText(); \n }", "function renderText(g, x, y, text, color, cursor) {\n color = color || \"black\";\n cursor = cursor || \"default\";\n return g.append(\"text\")\n .attr(\"x\", x)\n .attr(\"y\", y)\n .attr(\"dy\", \"1em\")\n .attr(\"fill\", color)\n .style(\"font\", '10px Arial, sans-serif')\n .style(\"cursor\", cursor)\n .text(text);\n}", "createSvgText(x, y, color, fontSize, text) {\n const t = document.createElementNS(this.svgNS, \"text\");\n t.setAttributeNS(null, \"x\", x);\n t.setAttributeNS(null, \"y\", y);\n t.setAttributeNS(null, \"fill\", color);\n t.setAttributeNS(null, \"font-size\", fontSize);\n t.textContent = text;\n return t;\n }", "function textFormat(color, size, align) {\r\n fill(color);\r\n noStroke();\r\n textSize(size);\r\n textFont(\"Arial\");\r\n textAlign(align, align);\r\n}", "function text() {\n context.fillStyle = \"white\"; \n if(mediaQuery.matches){\n context.font = \"40px Cousine\";\n } else {\n context.font = \"70px Cousine\";\n }\n context.textAlign = \"center\";\n context.fillText(\"Hello I'm Meekit Patel\", (canvas.width/2), (canvas.height/2)); \n}", "function setText(t, x, y ){\n push();\n textSize(30);\n fill(200, 220, 60);\n stroke(100,110,213);\n strokeWeight(5);\n text(t, x, y);\n pop();\n}", "render() {\n const {x, y, stroke, payload} = this.props;\n \n return <text x={x} y={y} dy={-4} fill={stroke} fontSize={10} textAnchor=\"middle\">{payload.value}</text>\n }", "get textColor() {\n return brushToString(this.i.a5);\n }", "function legendText(x, y, text, color) {\n legText = svg.paper.text(x, y, text).attr({\n fill: color,\n 'font-size': 13,\n 'font-family': 'arial'\n })\n\n return legText\n}", "function text_bold(text,x,y) {\n canvas_context.font = \"bold 15px Arial\";\n canvas_context.fillText(text,x,y);\n canvas_context.font = \"15px Arial\";\n}", "function drawText(txt, x, y) {\n ctx.textBaseline = 'top';\n ctx.textAlign = 'left';\n ctx.font = font;\n ctx.fillText(txt, x - 4, y - 4);\n}", "doDraw() {\n draw_context.strokeStyle = \"#000\";\n draw_context.fillStyle = \"#eee\";\n draw_context.font = \"40px Times\";\n draw_context.lineWidth = 10;\n draw_context.strokeText(this.text, canvas_element.width/2, this.vertical);\n draw_context.fillText(this.text, canvas_element.width/2, this.vertical);\n }", "function drawBox(text)\n{\n ctx.beginPath();\n ctx.rect(150, 100, 300, 275);\n ctx.fillStyle = '#222';\n ctx.fill();\n\n ctx.beginPath();\n ctx.strokeStyle = 'white';\n ctx.rect(150, 100, 300, 275);\n ctx.stroke();\n\n ctx.fillStyle = 'white';\n ctx.fillText(text, MID_CANVAS, 150);\n}", "function applyDefaultTextStyle(textStyle) {\n var textPosition = textStyle.textPosition;\n var opt = textStyle.insideRollbackOpt;\n var insideRollback;\n\n if (opt && textStyle.textFill == null) {\n var autoColor = opt.autoColor;\n var isRectText = opt.isRectText;\n var useInsideStyle = opt.useInsideStyle;\n var useInsideStyleCache = useInsideStyle !== false && (useInsideStyle === true || isRectText && textPosition // textPosition can be [10, 30]\n && typeof textPosition === 'string' && textPosition.indexOf('inside') >= 0);\n var useAutoColorCache = !useInsideStyleCache && autoColor != null; // All of the props declared in `CACHED_LABEL_STYLE_PROPERTIES` are to be cached.\n\n if (useInsideStyleCache || useAutoColorCache) {\n insideRollback = {\n textFill: textStyle.textFill,\n textStroke: textStyle.textStroke,\n textStrokeWidth: textStyle.textStrokeWidth\n };\n }\n\n if (useInsideStyleCache) {\n textStyle.textFill = '#fff'; // Consider text with #fff overflow its container.\n\n if (textStyle.textStroke == null) {\n textStyle.textStroke = autoColor;\n textStyle.textStrokeWidth == null && (textStyle.textStrokeWidth = 2);\n }\n }\n\n if (useAutoColorCache) {\n textStyle.textFill = autoColor;\n }\n } // Always set `insideRollback`, so that the previous one can be cleared.\n\n\n textStyle.insideRollback = insideRollback;\n}", "function applyDefaultTextStyle(textStyle) {\n var textPosition = textStyle.textPosition;\n var opt = textStyle.insideRollbackOpt;\n var insideRollback;\n\n if (opt && textStyle.textFill == null) {\n var autoColor = opt.autoColor;\n var isRectText = opt.isRectText;\n var useInsideStyle = opt.useInsideStyle;\n var useInsideStyleCache = useInsideStyle !== false && (useInsideStyle === true || isRectText && textPosition // textPosition can be [10, 30]\n && typeof textPosition === 'string' && textPosition.indexOf('inside') >= 0);\n var useAutoColorCache = !useInsideStyleCache && autoColor != null; // All of the props declared in `CACHED_LABEL_STYLE_PROPERTIES` are to be cached.\n\n if (useInsideStyleCache || useAutoColorCache) {\n insideRollback = {\n textFill: textStyle.textFill,\n textStroke: textStyle.textStroke,\n textStrokeWidth: textStyle.textStrokeWidth\n };\n }\n\n if (useInsideStyleCache) {\n textStyle.textFill = '#fff'; // Consider text with #fff overflow its container.\n\n if (textStyle.textStroke == null) {\n textStyle.textStroke = autoColor;\n textStyle.textStrokeWidth == null && (textStyle.textStrokeWidth = 2);\n }\n }\n\n if (useAutoColorCache) {\n textStyle.textFill = autoColor;\n }\n } // Always set `insideRollback`, so that the previous one can be cleared.\n\n\n textStyle.insideRollback = insideRollback;\n}", "setFont ({ font_css, fill, stroke, stroke_width, px_size, supersample }) {\n this.px_size = px_size;\n let ctx = this.context;\n let dpr = Utils.device_pixel_ratio * supersample;\n\n if (stroke && stroke_width > 0) {\n ctx.strokeStyle = stroke;\n ctx.lineWidth = stroke_width * dpr;\n }\n ctx.fillStyle = fill;\n\n ctx.font = font_css;\n ctx.miterLimit = 2;\n }", "function setup() {\r\n fill(245, 123, 158);\r\n textSize(10);\r\n}", "function pointsText(){\n fill(255);\n textSize(12);\n textFont('Helvetica');\n\n //red\n if(num < 20) fill(241, 136, 113);\n text('100 100', 300, 530);\n\n //orange\n if(num < 60) fill(237, 162, 85);\n text('200 200', 300, 485);\n\n //yellow\n if(num < 110) fill(243, 230, 77);\n text('300 300', 300, 440);\n\n //light green\n if(num < 158) fill(54, 234, 75);\n text('400 400', 300, 395);\n\n //turquoise\n if(num < 200) fill(54, 234, 201);\n text('500 500', 300, 350);\n\n //turquoise\n if(num < 242) fill(77, 243, 207);\n text('600 600', 300, 305);\n\n //light blue\n if(num < 285) fill(77, 210, 243);\n text('700 700', 300, 260);\n\n //blue\n if(num < 330) fill(171, 162, 247);\n text('800 800', 300, 215);\n\n //purple\n if(num < 375) fill(221, 162, 247);\n text('900 900', 300, 170);\n\n //pink\n if(num < 420) fill(238, 162, 247);\n text('1000 1000', 300, 125);\n}", "function buttonText() {\n textAlign(CENTER);\n fill(200, 241, 247);\n textSize(110);\n textStyle(BOLD);\n textFont(\"Cambria\");\n text(\"Start\", width / 2, height / 2 + 175);\n\n textAlign(CENTER);\n fill(150, 241, 247);\n textSize(150);\n textStyle(BOLD);\n textFont(\"Cambria\");\n text(\"ALPHA PAINT\", width / 2, height / 2 - 100);\n}", "function drawText(text,x,y){ //Function used to draw text to the canvas using a specified text string and a starting x and y coordinate.\r\n\tctx.font = '35px pokefont';\r\n\tctx.fillText(text,x,y);\r\n\tctx.fillStyle = \"#ffffff\";\r\n}", "function smalltext(text) {\n\t\t\ttext.attr(\"x\", function(d) { return x(d.x) + 5; })\n\t\t\t.attr(\"y\", function(d) { return y(d.y) -20; })\n\t\t\t.attr(\"width\",40)\n\t\t\t.attr(\"height\",20);\n\t\t\t\n\t\t}", "_drawSourceText(text) {\n let context = this.getContext();\n context.font = COMPARE_TEXT_FONT;\n\n let yPos = this.cellSize - 25;\n let xPos;\n let textSize;\n for (let i = 0; i < text.length; i++) {\n textSize = context.measureText(text.charAt(i));\n xPos = (this.cellSize * (i + 2)) - Math.round(textSize.width / 2);\n context.fillText(text.charAt(i), xPos, yPos);\n }\n }", "function drawText(x, y, text, color, font)\r\n{\r\n\tx = parseInt(x);\r\n\ty = parseInt(y);\r\n\t\r\n\tif(pointOnScreen(x, y))\r\n\t{\r\n\t\tcontext.fillStyle = color;\r\n\t\tcontext.font = typeof font == 'undefined' ? default_font : font;\r\n\t\tcontext.textBaseline = 'top';\r\n\t\tcontext.fillText(text, x, y);\r\n\t}\r\n}", "function textC(vm, text) {\n let tc = document.createElementNS(SVG_NS, 'text');\n tc.setAttribute('x', vm.x);\n tc.setAttribute('y', vm.y);\n tc.setAttribute('class', `tc f${vm.stroke}`);\n tc.textContent = text;\n vm.svg.appendChild(tc);\n vm.traceInfo('textC:\"', tc);\n}", "_drawText(copy, x, y) {\n\t\tlet CT = this\n\t\tvar _outer = CT.strokePosition === 'outer'\n\t\tvar _strokeDepth = CT.strokeWidth > 0\n\t\tif (CT.strokeDashSize > 0 && CT.strokeDashGap > 0)\n\t\t\tCT.stage.ctx.setLineDash([\n\t\t\t\tCT.strokeDashSize * CT.stage.qualityScale,\n\t\t\t\tCT.strokeDashGap * CT.stage.qualityScale\n\t\t\t])\n\t\tCT.stage.ctx.lineDashOffset = CT.strokeDashOffset\n\t\tCT.stage.ctx.lineCap = CT.strokeCap\n\t\tCT.stage.ctx.lineJoin = CT.strokeJoin\n\t\tCT.stage.ctx.font = CT.fontSize * CT.stage.qualityScale + 'px ' + CT.fontFamily\n\t\tCT.stage.ctx.fillStyle = CT.fill\n\t\tCT.stage.ctx.strokeStyle = CT.strokeFill\n\t\tCT.stage.ctx.textAlign = CT.alignText\n\t\tCT.stage.ctx.textBaseline = 'top'\n\t\tCT.stage.ctx.lineWidth = CT.strokeWidth * CT.stage.qualityScale * (_outer ? 2 : 1)\n\n\t\tif (_outer && _strokeDepth) CT.stage.ctx.strokeText(copy, x * CT.stage.qualityScale, y * CT.stage.qualityScale)\n\t\tCT.stage.ctx.fillText(copy, x * CT.stage.qualityScale, y * CT.stage.qualityScale)\n\t\tif (!_outer && _strokeDepth) {\n\t\t\t// this commented out area was originally used to prevent errors of shadow displays when strokePosition === 'center'\n\n\t\t\t// CT.stage.ctx.shadowColor = 'rgba(0, 0, 0, 0)';\n\t\t\t// CT.stage.ctx.shadowOffsetX = 0;\n\t\t\t// CT.stage.ctx.shadowOffsetY = 0;\n\t\t\t// CT.stage.ctx.shadowBlur = 0;\n\t\t\tCT.stage.ctx.strokeText(copy, x * CT.stage.qualityScale, y * CT.stage.qualityScale)\n\t\t}\n\t}", "function messageTextSmall(text) {\n ctx.font = \"24px Impact\";\n ctx.fillStyle = '#95a5a6';\n var textWidth = ctx.measureText(text).width;\n var x = (WIDTH - textWidth) / 2, y = HEIGHT / 2 + 6;\n ctx.fillText(text, x, y);\n }", "function texting() {\n push();\n fill(21, 200, 0);\n textFont(\"IMPACT\");\n textStyle(ITALIC);\n stroke(182, 56, 204);\n strokeWeight(35);\n textSize(70);\n text(openingText, 25, 180);\n pop();\n\n fill(182, 56, 204);\n stroke(random(80), random(80), random(80));\n strokeWeight(10);\n rect(240, 430, 200, 80);\n\n push();\n fill(21, 200, 0);\n textFont(\"IMPACT\");\n textStyle(ITALIC);\n stroke(182, 56, 204);\n textSize(35);\n strokeWeight(5);\n text(start, 248, 485);\n pop();\n \n\n\n\n\n\n}", "function showText(ctx, text, x, y) {\n\t\tif (browser != -1)\n\t\t\tctx.fillText(text, Math.round(x), Math.round(y));\n\t\telse\n\t\t\tctx.fillText(text, Math.round(x + ctx.measureText(text).width), Math.round(y));\n\t}", "function drawText(TextMgr) {\n TextMgr.getTextPath(function(path){\n canvas_model.drawPoints(svg_tools.svgToPoints(path.commands));\n });\n}", "function text(){\n var att=['x', 'y', 'text'];\n var object = shape('text', att);\n\n // Override the function copy_shape mantaining the most part of\n // his code\n object.parent_copy_shape = object.copy_shape;\n object.copy_shape = function(target){\n this.parent_copy_shape(target);\n // Retrieve the 'text' and put it into the textarea\n var rows = [];\n var childs = target.childNodes;\n for (var n=0; n<childs.length; n++)\n // Between the child nodes, there are a lot of nodes\n // which are not useful (comments and any kind of\n // oddity), so take only the tspans\n if (childs[n].nodeName=='tspan')\n // Read the data of the textnode which is the first\n // child of the <tspan>\n rows.push(childs[n].childNodes[0].data);\n getById('textinput').value = rows.join('\\n');\n };\n\n object.mousedown = function(x, y){\n this.x = x;\n this.y = y;\n object.show_text_area(x, y);\n };\n\n object.server_create = function(par, id){\n this.create_group(id);\n var fill = par[1];\n var x = parseInt(par[2]);\n var y = parseInt(par[3]);\n if (id === undefined)\n //client call\n var content = unescape(unescape(par[4]));\n else\n //server call\n var content = unescape(par[4]);\n // Create the element (can't use create_element because this case\n // is not standard)\n this.element = document.createElementNS(svgns, 'text');\n sa(this.element, {'fill': fill, 'x':x, 'y':y});\n this.group.appendChild(this.element);\n var rows = content.split('\\n');\n // Process rows to create a <tspan> for each row. The vertical\n // coordinate ('y') will be incremented with rows\n for (var r=0; r < rows.length; r++){\n var tspan = document.createElementNS(svgns, 'tspan');\n // I found that characters like '<' are converted to their\n // corresponding HTML entities. I don't know if it is a\n // feature of the svgweb library or it is normal for\n // createTextNode. Differently, chat text is encoded to\n // HTML entities by the server-side code\n var tnode = document.createTextNode(rows[r], true);\n tspan.appendChild(tnode);\n tspan.setAttribute('x', x);\n tspan.setAttribute('y', y);\n this.element.appendChild(tspan);\n y = y + (g['fontSize']+1);\n }\n // In svgweb, text nodes can't inherit handlers from root like\n // other nodes do, so we have to add the handlers here\n if (svgweb.getHandlerType() == 'flash'){\n this.element.addEventListener('mousedown', handleMouseDown, false);\n this.element.addEventListener('mouseup', handleMouseUp, false);\n this.element.addEventListener('mousemove', handleMouseMove, false);\n }\n };\n return object;\n}", "_drawTextCanvas(x, y, canvas) {\r\n const that = this;\r\n let ctx = canvas.getContext('2d');\r\n ctx.font = `${that.labelFontSize}px ${that.labelFont}`;\r\n ctx.fillStyle = that.labelColor;\r\n ctx.textAlign = 'center';\r\n ctx.fillText(that.value, x, y);\r\n }", "function drawText(text, x, y) {\n context.fillStyle = '#000';\n context.fillText(text, x-1, y-1);\n context.fillText(text, x+1, y+1);\n context.fillText(text, x+1, y-1);\n context.fillText(text, x-1, y+1);\n context.fillStyle = '#fff';\n context.fillText(text, x, y);\n}", "function drawTextboxText(text, line) {\n if (line < 4) {\n context.font = 'bold ' + TEXTBOX_FONT_DEFAULT_SIZE + 'px sans-serif';\n context.textAlign = 'left';\n context.fillStyle = TEXTBOX_FONT_DEFAULT_COLOR;\n context.fillText(text, lines[line].x, lines[line].y);\n }\n if (line === 4) {\n context.font = 'bold ' + TEXTBOX_FONT_BIG_SIZE + 'px sans-serif';\n context.textAlign = 'center';\n context.fillStyle = TEXTBOX_FONT_BIG_COLOR;\n context.fillText(text, lines[line].x, lines[line].y);\n }\n}", "function setUpText() {\n textImg = createGraphics(width, height);\n textImg.pixelDensity(1);\n textImg.background(255);\n textImg.textStyle(fontStyle);\n textImg.textFont('Roboto');\n textImg.textSize(fontSize);\n textImg.textAlign(CENTER, CENTER);\n textImg.text(type, width / 2, height / 4 + fontSize / 6);\n textImg.loadPixels();\n}", "function makeTextStyleLayer(ref) {\n var style = ref.style;\n var styleIndex = ref.styleIndex;\n var draw = ref.draw;\n var xyz = ref.xyz;\n var xyzLayerIndex = ref.xyzLayerIndex;\n var tgOptions = ref.tgOptions;\n\n var tgTextDrawGroupName = (style.type) + \"_\" + styleIndex + \"_text\";\n draw[tgTextDrawGroupName] = {\n interactive: true,\n collide: true, // always collide text labels (no real downside)\n priority: getLabelPriority(xyz.layers, xyzLayerIndex, tgOptions),\n style: 'XYZ_text',\n text_source: (\"function() { var properties = feature; return \" + (style.textRef) + \"; }\"),\n font: {\n fill: style.fill,\n stroke: {\n color: style.stroke,\n width: ((style.strokeWidth) + \"px\")\n }\n },\n offset: getOffset(style),\n anchor: 'center',\n // repeat_distance: '1000px',\n blend_order: getBlendOrder(style, xyz.layers, xyzLayerIndex)\n };\n\n // parse XYZ font field\n var font = parser(style.font);\n if (font['font-family'].length > 0) {\n draw[tgTextDrawGroupName].font.family = font['font-family'][0]; // use first family in list\n }\n\n draw[tgTextDrawGroupName].font.size = font['font-size'] || '12px';\n\n if (font['font-style']) {\n draw[tgTextDrawGroupName].font.style = font['font-style'];\n }\n\n if (font['font-weight']) {\n draw[tgTextDrawGroupName].font.weight = font['font-weight'];\n }\n }", "function drawString(ctx, txt, col, fh, tx, ty) {\n\tvar fw = fh*0.666666; \n\tvar lw = fh*0.125; \n\tvar ls = lw/2; \n\tvar xp = 0; \n\tvar cr = lw; \n\tctx.lineCap = \"round\"; \n\tctx.lineJoin = \"round\"\n\tctx.lineWidth = lw; \n\tctx.strokeStyle = col;\n\tfor (var i = 0; i < txt.length; i++) {\n\t\tdrawSymbol(ctx, txt[i], ls, tx+xp, ty, fw, fh);\n\t\txp += (txt[i]!=\".\"?fw+cr:(fw/2)+cr);\n\t}\n}", "function create_Text(text,font, fillStyle, xCord, yCord){\n\t \n\t\t /** Future Development Ideas\n\t\t\t // Create gradient\n\t\t\t var gradient = postCardCanvasContext.createLinearGradient(0, 0, postCardCanvas.width, 0);\n\t\t\t gradient.addColorStop(\"0\", \"Blue\");\n\t\t\t gradient.addColorStop(\"0.5\", \"#850085\");\n\t\t\t gradient.addColorStop(\"1\", \"Red\");\n\t\t\t // Fill with gradient\n\t\t\t create_Text(\"Mwahahahaha!!\",\"30px Verdana\", gradient, postCardCanvas.width*0.2, postCardCanvas.height*0.65);\n\t\t **/\n\t \n\t\t // Add Text to Canvas\n\t\t postCardCanvasContext.fillStyle = fillStyle;\n\t\t postCardCanvasContext.font = font;\t \n\t\t postCardCanvasContext.fillText(text, xCord, yCord);\t\t \n\t\t postCardCanvasContext.save();\n\t\t \n\t\t // Just in case Splice the canvasHistory to make sure we are creating a new history\n\t\t canvasHistory.splice(canvasHistoryPointer+1);\n\t\t // Reset the Buttons\n\t\t buttons[0].material.color.setHex(0xffffff);\n\t\t buttons[1].material.color.setHex(0x575757);\t\n\t\t \n\t\t // Add data into History\n\t\t var history = {\n\t\t\t type: \"Text\",\n\t\t\t text: text,\n\t\t\t font: font,\n\t\t\t fillStyle: fillStyle,\n\t\t\t xCord: xCord,\n\t\t\t yCord: yCord,\n\t\t\t image: postCardCanvasContext.getImageData(0, 0, postCardCanvas.width, postCardCanvas.height)\n\t\t }\t\t \t\t \n\t\t \n\t\t canvasHistory.push(history);\n\t\t canvasHistoryPointer++;\t\t\n\t }", "_transformText () {\n // Collect all text elements into a list.\n const textElements = [];\n const collectText = domElement => {\n if (domElement.localName === 'text') {\n textElements.push(domElement);\n }\n for (let i = 0; i < domElement.childNodes.length; i++) {\n collectText(domElement.childNodes[i]);\n }\n };\n collectText(this._svgTag);\n convertFonts(this._svgTag);\n // For each text element, apply quirks.\n for (const textElement of textElements) {\n // Remove x and y attributes - they are not used in Scratch.\n textElement.removeAttribute('x');\n textElement.removeAttribute('y');\n // Set text-before-edge alignment:\n // Scratch renders all text like this.\n textElement.setAttribute('alignment-baseline', 'text-before-edge');\n textElement.setAttribute('xml:space', 'preserve');\n // If there's no font size provided, provide one.\n if (!textElement.getAttribute('font-size')) {\n textElement.setAttribute('font-size', '18');\n }\n let text = textElement.textContent;\n\n // Fix line breaks in text, which are not natively supported by SVG.\n // Only fix if text does not have child tspans.\n // @todo this will not work for font sizes with units such as em, percent\n // However, text made in scratch 2 should only ever export size 22 font.\n const fontSize = parseFloat(textElement.getAttribute('font-size'));\n const tx = 2;\n let ty = 0;\n let spacing = 1.2;\n // Try to match the position and spacing of Scratch 2.0's fonts.\n // Different fonts seem to use different line spacing.\n // Scratch 2 always uses alignment-baseline=text-before-edge\n // However, most SVG readers don't support this attribute\n // or don't support it alongside use of tspan, so the translations\n // here are to make up for that.\n if (textElement.getAttribute('font-family') === 'Handwriting') {\n spacing = 2;\n ty = -11 * fontSize / 22;\n } else if (textElement.getAttribute('font-family') === 'Scratch') {\n spacing = 0.89;\n ty = -3 * fontSize / 22;\n } else if (textElement.getAttribute('font-family') === 'Curly') {\n spacing = 1.38;\n ty = -6 * fontSize / 22;\n } else if (textElement.getAttribute('font-family') === 'Marker') {\n spacing = 1.45;\n ty = -6 * fontSize / 22;\n } else if (textElement.getAttribute('font-family') === 'Sans Serif') {\n spacing = 1.13;\n ty = -3 * fontSize / 22;\n } else if (textElement.getAttribute('font-family') === 'Serif') {\n spacing = 1.25;\n ty = -4 * fontSize / 22;\n }\n\n if (textElement.transform.baseVal.numberOfItems === 0) {\n const transform = this._svgTag.createSVGTransform();\n textElement.transform.baseVal.appendItem(transform);\n }\n\n // Right multiply matrix by a translation of (tx, ty)\n const mtx = textElement.transform.baseVal.getItem(0).matrix;\n mtx.e += (mtx.a * tx) + (mtx.c * ty);\n mtx.f += (mtx.b * tx) + (mtx.d * ty);\n\n if (text && textElement.childElementCount === 0) {\n textElement.textContent = '';\n const lines = text.split('\\n');\n text = '';\n for (const line of lines) {\n const tspanNode = SvgElement.create('tspan');\n tspanNode.setAttribute('x', '0');\n tspanNode.setAttribute('style', 'white-space: pre');\n tspanNode.setAttribute('dy', `${spacing}em`);\n tspanNode.textContent = line ? line : ' ';\n textElement.appendChild(tspanNode);\n }\n }\n }\n }", "function setTxtStroke(txtId, stroke) {\n var text = getTextById(txtId);\n text.stroke = stroke;\n}", "function applyDefaultTextStyle(textStyle) {\n var opt = textStyle.insideRollbackOpt; // Only `insideRollbackOpt` created (in `setTextStyleCommon`),\n // applyDefaultTextStyle works.\n\n if (!opt || textStyle.textFill != null) {\n return;\n }\n\n var useInsideStyle = opt.useInsideStyle;\n var textPosition = textStyle.insideRawTextPosition;\n var insideRollback;\n var autoColor = opt.autoColor;\n\n if (useInsideStyle !== false && (useInsideStyle === true || opt.isRectText && textPosition // textPosition can be [10, 30]\n && typeof textPosition === 'string' && textPosition.indexOf('inside') >= 0)) {\n insideRollback = {\n textFill: null,\n textStroke: textStyle.textStroke,\n textStrokeWidth: textStyle.textStrokeWidth\n };\n textStyle.textFill = '#fff'; // Consider text with #fff overflow its container.\n\n if (textStyle.textStroke == null) {\n textStyle.textStroke = autoColor;\n textStyle.textStrokeWidth == null && (textStyle.textStrokeWidth = 2);\n }\n } else if (autoColor != null) {\n insideRollback = {\n textFill: null\n };\n textStyle.textFill = autoColor;\n } // Always set `insideRollback`, for clearing previous.\n\n\n if (insideRollback) {\n textStyle.insideRollback = insideRollback;\n }\n}", "function applyDefaultTextStyle(textStyle) {\n var opt = textStyle.insideRollbackOpt; // Only `insideRollbackOpt` created (in `setTextStyleCommon`),\n // applyDefaultTextStyle works.\n\n if (!opt || textStyle.textFill != null) {\n return;\n }\n\n var useInsideStyle = opt.useInsideStyle;\n var textPosition = textStyle.insideRawTextPosition;\n var insideRollback;\n var autoColor = opt.autoColor;\n\n if (useInsideStyle !== false && (useInsideStyle === true || opt.isRectText && textPosition // textPosition can be [10, 30]\n && typeof textPosition === 'string' && textPosition.indexOf('inside') >= 0)) {\n insideRollback = {\n textFill: null,\n textStroke: textStyle.textStroke,\n textStrokeWidth: textStyle.textStrokeWidth\n };\n textStyle.textFill = '#fff'; // Consider text with #fff overflow its container.\n\n if (textStyle.textStroke == null) {\n textStyle.textStroke = autoColor;\n textStyle.textStrokeWidth == null && (textStyle.textStrokeWidth = 2);\n }\n } else if (autoColor != null) {\n insideRollback = {\n textFill: null\n };\n textStyle.textFill = autoColor;\n } // Always set `insideRollback`, for clearing previous.\n\n\n if (insideRollback) {\n textStyle.insideRollback = insideRollback;\n }\n}" ]
[ "0.73749673", "0.727321", "0.7220982", "0.7189339", "0.7148709", "0.71306485", "0.7088056", "0.6901516", "0.68652356", "0.68598384", "0.6843889", "0.6818007", "0.6803056", "0.6785004", "0.67705524", "0.67448467", "0.6724612", "0.6709601", "0.66966206", "0.66880953", "0.6675546", "0.6669055", "0.6658996", "0.6644244", "0.6597766", "0.6581326", "0.65530515", "0.6536783", "0.6519276", "0.65109104", "0.65109104", "0.65109104", "0.65109104", "0.65109104", "0.65109104", "0.65109104", "0.65109104", "0.65109104", "0.65109104", "0.65109104", "0.65109104", "0.65109104", "0.65109104", "0.65109104", "0.65109104", "0.651054", "0.65069366", "0.6460861", "0.64516705", "0.6432079", "0.6429373", "0.64167213", "0.6367532", "0.6345569", "0.6335353", "0.6333891", "0.63100475", "0.63015276", "0.6300334", "0.62929857", "0.6291378", "0.62829864", "0.62799317", "0.62753624", "0.62458545", "0.62450314", "0.62389374", "0.6236693", "0.6232506", "0.62213093", "0.6209707", "0.6183629", "0.6182571", "0.6149858", "0.6149858", "0.6148016", "0.61106926", "0.61082125", "0.6101064", "0.6098608", "0.6064173", "0.6050196", "0.60491353", "0.60457516", "0.6036865", "0.6036797", "0.6025489", "0.60239595", "0.60209525", "0.6013699", "0.59941614", "0.5991537", "0.5986129", "0.5985033", "0.5980976", "0.5974938", "0.59741616", "0.5964001", "0.5950141", "0.59500045", "0.59500045" ]
0.0
-1
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. id may be function name of Object, add a prefix to avoid this problem.
function generateNodeKey(id) { return '_EC_' + id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getId(obj) {\n return obj.id;\n}", "function createObjectId(id) {\n\t\treturn 'object_' + id;\n\t}", "getID() {}", "static id(arg) {\nreturn arg;\n}", "id() {\n return this.constructor.name;\n }", "get _idPrefix() { return \"Transform\" }", "function _function(obj) {\n return exports.PREFIX.function + ':' + obj.name + '=>' + obj.toString();\n}", "function getId(obj) {\n return obj.id;\n }", "function id(a){ return a }", "constructor () {\n this.id = this.constructor.name\n }", "static get ID() {\n return \"OTZSILJ\";\n }", "function id(x){ return x; }", "function Function$id() {\n return identity;\n }", "function Function$id() {\n return identity;\n }", "get id() {\n return this.constructor.id;\n }", "function RRDFltOpIdentId(rrd_data,id) {\r\n this.ds_name=rrd_data.getDS(id).getName();\r\n this.getName = function() {return this.ds_name;}\r\n this.getDSNames = function() {return [this.ds_name];}\r\n this.computeResult = function(val_list) {return val_list[0];}\r\n}", "function id(x) { return x; }", "getId(){\r\n return this.#id;\r\n }", "function setID (identifier) {\n if (identifier.longname) {\n identifier.id = identifier.longname\n }\n if (identifier.kind === 'constructor') {\n identifier.id = identifier.longname + '()'\n }\n if (identifier.isExported) {\n identifier.id = identifier.longname + '--' + identifier.codeName\n }\n return identifier\n}", "constructor(id) {\r\n this.id = id;\r\n }", "constructor( id ) {\n this.#id = id;\n }", "function getId(prefix) {\n var index = _global[CURRENT_ID_PROPERTY]++;\n return (prefix || '') + index;\n}", "function getId(prefix) {\n var index = _global[CURRENT_ID_PROPERTY]++;\n return (prefix || '') + index;\n}", "constructor(id) {\n if(id) this.id = id;\n }", "static initialize(obj, id, name) { \n obj['id'] = id;\n obj['name'] = name;\n }", "static initialize(obj, id, name) { \n obj['id'] = id;\n obj['name'] = name;\n }", "get id() {\n\t\treturn this.__id;\n\t}", "function getKeyFromID(id) {\n\t return '.' + id;\n\t}", "function getKeyFromID(id) {\n\t return '.' + id;\n\t}", "function getKeyFromID(id) {\n\t return '.' + id;\n\t}", "function getKeyFromID(id) {\n\t return '.' + id;\n\t}", "function getKeyFromID(id) {\n\t return '.' + id;\n\t}", "function getKeyFromID(id) {\n\t return '.' + id;\n\t}", "function getKeyFromID(id) {\n\t return '.' + id;\n\t}", "function getKeyFromID(id) {\n\t return '.' + id;\n\t}", "constructor(id, name) {\n\t\tthis.id = id;\n\t\tthis.name = name;\n\t}", "function ID(x) {\n return x;\n}", "function nameString(obj) {\n}", "get _id() {\n return this.__id;\n }", "function $V(obj){\r\n\treturn $F(\"flid_\"+obj);\r\n}", "function id(x) {\n return x;\n}", "function findId(object) {\n return object.id\n }", "findReflectionById(id) {\n return this.idMap[id];\n }", "function id(a){return void 0===a?jf:\"function\"==typeof a&&(jf=a,!0)}", "function o(){return null!=this._id?String(this._id):null}", "function parseNodeId(id)\n{\n var r = null;\n var match = /([0-9]+)(.*)/.exec(id);\n if (match)\n {\n r = new Object();\n r.id = match[1];\n r.wtPrefix = match[2];\n }\n return r;\n}", "getId() {\n return MxI.$Null;\n }", "function i(e){return Object.defineProperty(e.data(),\"id\",{value:e.id})}", "constructor(id, name) {\n this.id = id;\n this.name = name;\n }", "function newId(_id)\n{\n if(_id == \"watchHeader\")\n {\n return \"tutHeader\";\n }\n else\n {\n return \"watchHeader\";\n }\n}", "get ID(){return ID}", "function _I_(id, name) {\n\t oids[id] = name;\n\t}", "get id () {\n return this.constructor.name.replace(/(\\w+)Controller/, '$1').toLowerCase()\n }", "function getKeyFromID(id) {\n return '.' + id;\n}", "function getKeyFromID(id) {\n return '.' + id;\n}", "function getKeyFromID(id) {\n return '.' + id;\n}", "function getKeyFromID(id) {\n return '.' + id;\n}", "function getKeyFromID(id) {\n return '.' + id;\n}", "function getKeyFromID(id) {\n return '.' + id;\n}", "function getKeyFromID(id) {\n return '.' + id;\n}", "function getKeyFromID(id) {\n return '.' + id;\n}", "get id() { return this._id; }", "get id() { return this._id; }", "get id() { return this._id; }", "function poliyaId(id){\n fanTuriService.getById(id,malumotQuy,console.log(\"xato\")); \n}", "function poliyaId(id){\n oqituvchiService.getById(id,malumotQuy,console.log(\"xato\")); \n}", "static delete(id) {\n //FIXME\n }", "function StripPrefix(id)\r\n{\r\n var i = id.lastIndexOf(\"_\");\r\n if (i == -1) return id;\r\n return id.substr(i+1);\r\n}", "function metaKey(id) {\n return id+'_meta';\n}", "function getId(prefix) {\r\n var index = _global[CURRENT_ID_PROPERTY]++;\r\n return (prefix || DEFAULT_ID_STRING) + index;\r\n}", "function getId(prefix) {\r\n var index = _global[CURRENT_ID_PROPERTY]++;\r\n return (prefix || DEFAULT_ID_STRING) + index;\r\n}", "function useId(idProp, prefix) {\n var _React$useState = React.useState(function () {\n return genId();\n }),\n uuid = _React$useState[0];\n\n var id = (idProp != null ? idProp : uuid).toString();\n return prefix ? prefix + \"-\" + id : id;\n}", "getElementId(){\n return `${this.constructor.elementIdPrefix}${this.identity}`;\n }", "setId(id){\n this.id=id;\n }", "set _id(value) {\n this.__id = value;\n }", "function _I_(id, name) {\n oids[id] = name;\n}", "function _I_(id, name) {\n oids[id] = name;\n}", "function _I_(id, name) {\n oids[id] = name;\n}", "function _I_(id, name) {\n oids[id] = name;\n}", "function _I_(id, name) {\n oids[id] = name;\n}", "function _I_(id, name) {\n oids[id] = name;\n}", "function _I_(id, name) {\n oids[id] = name;\n}", "get id () {\n return 3\n }", "function getId({ id }) {\n return id;\n}", "getID(){\n return this.id;\n }", "function getId(prefix) {\n var index = _global[CURRENT_ID_PROPERTY]++;\n return (prefix || DEFAULT_ID_STRING) + index;\n}", "function getId(prefix) {\n var index = _global[CURRENT_ID_PROPERTY]++;\n return (prefix || DEFAULT_ID_STRING) + index;\n}", "encode(id, name) {\n return `${id}:${name}`;\n }", "get id() {\n console.log('in id getter');\n return this._id + 'TEMPORARY';\n }", "function slaughId(id, name) {\n return id + '!' + name;\n}", "constructor(args) {\n super();\n args = args || {}\n this.CONSTRUCTOR_ID = 0xf5235d55;\n this.SUBCLASS_OF_ID = 0x1523d462;\n\n this.id = args.id;\n this.accessHash = args.accessHash;\n }", "function get_class_name(current_obj) {\n\t\t\tvar id = current_obj.attr('id');\n\t\t\tvar name = id.substring(6,id.length);\n\t\t\treturn name;\n\t\t}", "constructor(args) {\n super();\n args = args || {}\n this.CONSTRUCTOR_ID = 0xcbc7ee28;\n this.SUBCLASS_OF_ID = 0x1523d462;\n\n this.id = args.id;\n this.accessHash = args.accessHash;\n }", "function addUniqueId(obj) {\n const uniqueId = Symbol('id');\n return {\n ...obj,\n id: uniqueId\n }\n}", "function Entity$toIdString(obj) {\n return obj.meta.type.fullName + \"|\" + obj.meta.id;\n}", "getId (){\r\n return this.id;\r\n }", "constructor(args) {\n super();\n args = args || {}\n this.CONSTRUCTOR_ID = 0xbad88395;\n this.SUBCLASS_OF_ID = 0x54b6bcc5;\n\n this.id = args.id;\n }", "function id(a){return void 0===a?jf:\"function\"==typeof a?(jf=a,!0):!1}", "function id(a){return void 0===a?jf:\"function\"==typeof a?(jf=a,!0):!1}", "function id(a){return void 0===a?jf:\"function\"==typeof a?(jf=a,!0):!1}", "function id(a){return void 0===a?jf:\"function\"==typeof a?(jf=a,!0):!1}" ]
[ "0.6176846", "0.6016615", "0.59826607", "0.596679", "0.5914373", "0.5858058", "0.5828314", "0.58131456", "0.57972085", "0.57884496", "0.5764588", "0.57548237", "0.56828815", "0.56828815", "0.5680611", "0.5668598", "0.5661318", "0.5648847", "0.56421435", "0.5626241", "0.56234354", "0.56092244", "0.56092244", "0.560732", "0.5585912", "0.5585912", "0.55849653", "0.55830204", "0.55830204", "0.55830204", "0.55830204", "0.55830204", "0.55830204", "0.55830204", "0.55830204", "0.55815417", "0.557747", "0.5577217", "0.55692106", "0.55607384", "0.5543566", "0.5525747", "0.5519523", "0.55154157", "0.5508695", "0.55057454", "0.54989785", "0.5498739", "0.5495862", "0.5491521", "0.54886055", "0.5481071", "0.54774135", "0.5463836", "0.5463836", "0.5463836", "0.5463836", "0.5463836", "0.5463836", "0.5463836", "0.5463836", "0.54630554", "0.54630554", "0.54630554", "0.54600334", "0.5456617", "0.5456527", "0.5440564", "0.54257965", "0.5419384", "0.5419384", "0.5415622", "0.5402556", "0.5397362", "0.537326", "0.53722334", "0.53722334", "0.53722334", "0.53722334", "0.53722334", "0.53722334", "0.53722334", "0.53720355", "0.5358033", "0.5347789", "0.53456134", "0.53456134", "0.533434", "0.5333625", "0.5317415", "0.5311292", "0.5296003", "0.52959657", "0.5290184", "0.5285125", "0.5283056", "0.52829623", "0.52769756", "0.52769756", "0.52769756", "0.52769756" ]
0.0
-1
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. / global Float32Array
function _default(seriesType) { return { seriesType: seriesType, plan: createRenderPlanner(), reset: function (seriesModel) { var data = seriesModel.getData(); var coordSys = seriesModel.coordinateSystem; var pipelineContext = seriesModel.pipelineContext; var isLargeRender = pipelineContext.large; if (!coordSys) { return; } var dims = map(coordSys.dimensions, function (dim) { return data.mapDimension(dim); }).slice(0, 2); var dimLen = dims.length; var stackResultDim = data.getCalculationInfo('stackResultDimension'); if (isDimensionStacked(data, dims[0] /*, dims[1]*/ )) { dims[0] = stackResultDim; } if (isDimensionStacked(data, dims[1] /*, dims[0]*/ )) { dims[1] = stackResultDim; } function progress(params, data) { var segCount = params.end - params.start; var points = isLargeRender && new Float32Array(segCount * dimLen); for (var i = params.start, offset = 0, tmpIn = [], tmpOut = []; i < params.end; i++) { var point; if (dimLen === 1) { var x = data.get(dims[0], i); point = !isNaN(x) && coordSys.dataToPoint(x, null, tmpOut); } else { var x = tmpIn[0] = data.get(dims[0], i); var y = tmpIn[1] = data.get(dims[1], i); // Also {Array.<number>}, not undefined to avoid if...else... statement point = !isNaN(x) && !isNaN(y) && coordSys.dataToPoint(tmpIn, null, tmpOut); } if (isLargeRender) { points[offset++] = point ? point[0] : NaN; points[offset++] = point ? point[1] : NaN; } else { data.setItemLayout(i, point && point.slice() || [NaN, NaN]); } } isLargeRender && data.setLayout('symbolPoints', points); } return dimLen && { progress: progress }; } }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function n$1(){return new Float32Array(4)}", "function r(){const r=new Float32Array(4);return r[3]=1,r}", "constructor()\n {\n this.m = new Float32Array(16);\n\n this.m[0] = this.m[5] = this.m[10] = this.m[15] = 1;\n }", "setFloat32Buffers() {\n let tempArr = []\n for(let i = 0; i < this.vertices.length; i++) {\n let vertex = this.vertices[i];\n tempArr[3*i] = vertex.points[0];\n tempArr[3*i + 1] = vertex.points[1];\n tempArr[3*i + 2] = vertex.points[2];\n }\n this.vertexPosArray = new Float32Array(tempArr);\n this.colorArray = new Float32Array(this.colors);\n this.normalArray = new Float32Array(this.normals);\n }", "function r() {\n var r = new Float32Array(9);\n return r[0] = 1, r[4] = 1, r[8] = 1, r;\n }", "constructor() {\nthis.xyzw = new Float32Array(4);\nthis.xyzw[3] = 1;\n}", "static makeV3(x, y, z) {\nreturn new Float32Array([x, y, z]);\n}", "OBB3(values) {\n return new Float32Array(values || 32);\n }", "function testFloat32Array(L) {\n var f = new Float32Array(8);\n assertEq(f[0], 0);\n assertEq(f[L], 0);\n assertEq(f[L+8], undefined);\n assertEq(f[8], undefined);\n f[0] = 12;\n f[L+1] = 13.5;\n f[2] = f[1];\n f[L+3] = 4294967295;\n f[L+4] = true;\n f[L+5] = L;\n assertEq(f[0], 12);\n assertEq(f[1], 13.5);\n assertEq(f[2], 13.5);\n assertEq(f[3], 4294967296);\n assertEq(f[4], 1);\n assertEq(f[5], 0);\n}", "static makeIdTRMat() {\nvar m;\n//---------\nm = new Float32Array(16);\nm[0] = m[5] = m[10] = m[15] = 1;\nreturn m;\n}", "function mergeFloat(recBuffers, recLength) {\n\tvar result = new Float32Array(recLength);\n\tresult.set(recBuffers, 0);\n\treturn result;\n}", "static make3Vec() {\nreturn new Float32Array(3);\n}", "function n() {\n return new Float32Array(2);\n }", "readFloat32Array(ar, label)\n\t{\n\t\treturn this.readArray(ar, label);\n\t}", "function makeFloat32Buffer(data, size, elems) {\n let buff = new Float32Array(size * size * elems);\n if (data) {\n data.forEach((d, i) => buff[i] = d);\n } \n return buff;\n}", "function n$1(){const n=new Float32Array(4);return n[3]=1,n}", "static makeQV(x, y, z, w) {\nreturn new Float32Array([x, y, z, w]);\n}", "toFloat32(begin, end) {\n if (typeof end !== \"undefined\") {\n return this.bufferF32.subarray(begin, end);\n } else {\n return this.bufferF32;\n }\n }", "function f() {\n var bytes = new Uint32Array([0x7F800001]);\n var floats = new Float32Array(bytes.buffer);\n assertTrue(isNaN(floats[0]));\n assertTrue(isNaN(floats[0]*2.0));\n assertTrue(isNaN(floats[0] + 0.5));\n }", "function f() {\n var bytes = new Uint32Array([0x7FC00000]);\n var floats = new Float32Array(bytes.buffer);\n assertTrue(isNaN(floats[0]));\n assertTrue(isNaN(floats[0]*2.0));\n assertTrue(isNaN(floats[0] + 0.5));\n }", "static copyOfV3(xyz) {\nreturn new Float32Array(xyz);\n}", "static copyOfQV(qv) {\nreturn new Float32Array(qv);\n}", "function n() {\n var n = new Float32Array(6);\n return n[0] = 1, n[3] = 1, n;\n }", "static make4Vec() {\nreturn new Float32Array(4);\n}", "function DynamicFloatArray(stride,initialElementCount){this.compareValueOffset=null;this.sortingAscending=true;this._stride=stride;this.buffer=new Float32Array(stride*initialElementCount);this._lastUsed=0;this._firstFree=0;this._allEntries=new Array(initialElementCount);this._freeEntries=new Array(initialElementCount);for(var i=0;i<initialElementCount;i++){var element=new DynamicFloatArrayElementInfo();element.offset=i*stride;this._allEntries[i]=element;this._freeEntries[initialElementCount-i-1]=element;}}", "f32() {\n this._convo.u8.set(this.buffer.subarray(this.at, this.at += 4));\n return this._convo.f32[0];\n }", "function getInitArr(length) {\n var arr = new Float32Array(length);\n for (var i = 0; i < length; i++) {\n arr[i] = 0;\n }\n return arr;\n }", "static makeMat4() {\nreturn new Float32Array(16);\n}", "supportsFloatArrayValues() {\n return true;\n }", "function makeNativeFloatArray(size) {\n var arr = [];\n if (!size)\n return arr;\n arr[0] = 0.1;\n for (var i = 0; i < size; i++)\n arr[i] = 0;\n return arr;\n }", "function testSetTypedFloat32Array(k) {\n var ar = new Float32Array(8);\n ar[k+5] = { };\n ar[k+6] = ar;\n ar[k+4] = (k + 800) * 897 * 800 * 800 * 810 * 1923437;\n var t = k + 555;\n var L = ar[k+7] = t & 5;\n ar[0] = 12.3;\n ar[8] = 500;\n ar[k+8] = 1200;\n ar[k+1] = 500;\n ar[k+2] = \"3\" + k;\n ar[k+3] = true;\n assertEq(ar[0] - 12.3 >= 0 &&\n ar[0] - 12.3 <= 0.0001, true);\n assertEq(ar[1], 500);\n assertEq(ar[2], 30);\n assertEq(ar[3], 1);\n assertEq(ar[4], 715525927453369300000);\n assertEq(ar[5], NaN);\n assertEq(ar[6], NaN);\n assertEq(ar[7], 1);\n assertEq(ar[8], undefined);\n assertEq(ar[k+8], undefined);\n}", "static makeIdMat4() {\nvar m;\n//----------\nm = new Float32Array(16);\nm[0] = m[5] = m[10] = m[15] = 1;\nreturn m;\n}", "static create() {\n const matrix = new Float32Array(9);\n Matrix.identity(matrix);\n return matrix;\n }", "OBB2(values) {\n return new Float32Array(values || 16);\n }", "constructor(data){\r\n this.type = EEE.MATH_MATRIX4;\r\n this.data = data || new Float32Array(16);\r\n }", "function to_float(rows) {\n return rows.map(function(row) {\n return new Float32Array(row);\n });\n }", "static identity()\n\t{\n\t\treturn new Float32Array([\n\t\t\t1, 0, 0, 0,\n\t\t\t0, 1, 0, 0,\n\t\t\t0, 0, 1, 0,\n\t\t\t0, 0, 0, 1\n\t\t]);\n\t}", "function identity() {\n return Float32Array.of(1, 0, 0, 0, 1, 0, 0, 0, 1);\n} // TODO: optimize", "function createBuffer(data)\n{\n var buffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, buffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(data), gl.STATIC_DRAW);\n gl.bindBuffer(gl.ARRAY_BUFFER, null);\n return buffer;\n}", "function floatToInt(floatArray) {\n\tvar intArray = new Uint32Array(new Float64Array([floatArray]).buffer)\n\treturn [intArray[0],intArray[1]]\n}", "function convertFloat32ToInt16(buffer) {\n\tlet l = buffer.length;\n\tlet buf = new Int16Array(l / 3);\n\n\twhile (l--) {\n\t\tif (l % 3 == 0) {\n\t\t\tbuf[l / 3] = buffer[l] * 0xFFFF;\n\t\t}\n\t}\n\treturn buf.buffer\n}", "function v11(v12,v13) {\n const v15 = new Float32Array(Float32Array);\n // v15 = .object(ofGroup: Float32Array, withProperties: [\"__proto__\", \"constructor\", \"buffer\", \"byteLength\", \"length\", \"byteOffset\"], withMethods: [\"sort\", \"fill\", \"lastIndexOf\", \"findIndex\", \"entries\", \"copyWithin\", \"reverse\", \"forEach\", \"filter\", \"includes\", \"map\", \"set\", \"keys\", \"every\", \"subarray\", \"reduceRight\", \"join\", \"some\", \"values\", \"find\", \"reduce\", \"indexOf\", \"slice\"])\n const v16 = v10.set(v15,gc);\n // v16 = .undefined\n}", "function float32String(v) {\n return Math.abs(v) > 1e-37 ? v : 0;\n } // Create matrix array for looping", "function mat(r, c){\n var arr = [];\n for(var i = 0; i < r; i++) arr[i] = new Float32Array(c);\n return arr;\n}", "function rgba32( R, G, B, A )\r\n{\r\n if( R > 255 ) R = 255;\r\n if( R < 0 ) R = 0;\r\n if( G > 255 ) G = 255;\r\n if( G < 0 ) G = 0;\r\n if( B > 255 ) B = 255;\r\n if( B < 0 ) B = 0;\r\n if( A > 1.0 ) A = 255;\r\n if( A < 0 ) A = 0;\r\n\r\n return new Float32Array\r\n ([ R/255, G/255, B/255, A/255 ]);\r\n}", "function float32String(v) {\n return Math.abs(v) > 1e-37 ? v : 0;\n } // Create matrix array for looping", "makeMat4x4() {\nvar m;\nm = new Float32Array(16);\nreturn this.convertToMat4x4(m);\n}", "function MVbuffer(size) {\n var b = {};\n b.buf = new Float32Array(size);\n b.index = 0;\n b.push = function(x) {\n for(var i=0; i<x.length; i++) {\n b.buf[b.index+i] = x[i];\n }\n b.index += x.length;\n b.type = '';\n }\n return b;\n}", "create_vertex_arrays() {\r\n\r\n this.glTF.bufferViews.forEach(bufferView => {\r\n // console.log(bufferView);\r\n\r\n // Create the buffer.\r\n const [buffer, arrayBuffer] = this.gpuDevice.createBufferMapped({\r\n size: bufferView.byteLength,\r\n usage: GPUBufferUsage.VERTEX | GPUBufferUsage.COPY_DST\r\n });\r\n\r\n // Fill it.\r\n new Float32Array(arrayBuffer).set(bufferView.data);\r\n\r\n // Prepare buffer for GPU operations.\r\n buffer.unmap();\r\n\r\n bufferView.buffer = buffer;\r\n });\r\n\r\n console.log(`Created ${this.glTF.bufferViews.length} vertex array(s).`);\r\n }", "function GEN_BASELINE(buffer, start) {\r\n var IntHeap32 = new Int32Array(buffer);\r\n var FloatHeap32 = new Float32Array(buffer);\r\n var f4;\r\n var dim1 = IntHeap32[start];\r\n var dim2 = IntHeap32[start + 1];\r\n WScript.Echo(\"[\");\r\n for (var i = 0; i < Math.imul(dim1, dim2) ; i += 4) {\r\n f4 = SIMD.Float32x4.load(FloatHeap32, i + start + 2);\r\n WScript.Echo(f4.toString()+\",\");\r\n }\r\n WScript.Echo(\"]\");\r\n}", "constructor(){\n // 1D array, because it can be passed\n // to WebGL shader as is.\n this.data = new Float32Array(16);\n return this;\n }", "function float32String(v){return Math.abs(v)>1e-37?v:0;}// Create matrix array for looping", "function float32String(v){return Math.abs(v)>1e-37?v:0;}// Create matrix array for looping", "function abfunc3() {\n new Uint32Array(ab,4,3);\n}", "function getFloat(reg){\r\n\t//same stuff as in getLong()\r\n\tlet buffer = new ArrayBuffer(4);\r\n\tlet view = new DataView(buffer);\r\n\tview.setUint16(0, modbusValues[reg], true);\r\n\tview.setUint16(2, modbusValues[reg+1], true);\r\n\t//read the buffer as float and round to 5 digits\r\n\treturn view.getFloat32(0, true).toPrecision(5);\r\n}", "_createFloatTexture(data) {\n let gl = this.context.context;\n\n let texture = gl.createTexture();\n gl.bindTexture(gl.TEXTURE_2D, texture);\n\n // No Need to pad\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, this.width / COMPONENT_PER_TEXEL, this.height, 0, gl.RGBA, gl.FLOAT, data || null);\n\n // TODO: PAdding\n\n // clamp to edge to support non-power of two textures\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n\n // don't interpolate when getting data from texture\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST);\n\n // we're done with setup, so unbind current texture\n gl.bindTexture(gl.TEXTURE_2D, null);\n\n return texture;\n }", "function EBMLFloat32(value) {\n this.value = value;\n }", "upload(){\n this._compile();\n\n let buffer = new Float32Array(this._bufferData);\n\n exports.gl.bindBuffer(exports.gl.ARRAY_BUFFER, this._vbo);\n exports.gl.bufferData(exports.gl.ARRAY_BUFFER, buffer, exports.gl.STATIC_DRAW);\n exports.gl.bindBuffer(exports.gl.ARRAY_BUFFER, null);\n \n this._bufferData = null;\n }", "constructor(){\n this.isLoaded = false;\n this.minXYZ=[0,0,0];\n this.maxXYZ=[0,0,0];\n \n this.numFaces=0;\n this.numVertices=0;\n \n // Allocate vertex array\n this.vBuffer = [];\n // Allocate triangle array\n this.fBuffer = [];\n // Allocate normal array\n this.nBuffer = [];\n // Allocate array for edges so we can draw wireframe\n this.eBuffer = [];\n // Allocate array for texture coordinates\n this.texcoordBuffer = [];\n \n console.log(\"TriMesh: Allocated buffers\");\n \n // Get extension for 4 byte integer indices for drawElements\n var ext = gl.getExtension('OES_element_index_uint');\n if (ext ==null){\n alert(\"OES_element_index_uint is unsupported by your browser and terrain generation cannot proceed.\");\n }\n else{\n console.log(\"OES_element_index_uint is supported!\");\n }\n }", "function flatten( v )\n{\n\n if(isVector(v)) {\n var floats = new Float32Array(v.length)\n for(var i =0; i<v.length; i++) floats[i] = v[i];\n return floats;\n }\n if(isMatrix(v)) {\n\n var floats = new Float32Array(v.length*v.length);\n for(var i =0; i<v.length; i++) for(j=0;j<v.length; j++) {\n floats[i*v.length+j] = v[j][i];\n }\n return floats;\n }\n\n var floats = new Float32Array( v.length*v[0].length );\n\n for(var i = 0; i<v.length; i++) for(var j=0; j<v[0].length; j++) {\n floats[i*v[0].length+j] = v[i][j];\n }\n return floats;\n}", "constructor(options, options2){\n super(options); //Passing options to native class constructor. (REQUIRED)\n this.count = options2.count; //A self declared variable to limit the data which is to be read.\n this.factor = options2.theta;\n this.chunk = options2.chunk;\n\n this.debug_count = 0;\n this.phase = 0;\n\n\n // dv.setFloat64(0, number, false);\n\n // 8 is for bytes per float, 2 is for real/imag\n this.thebuffer = new ArrayBuffer(this.chunk*8*2); // in bytes\n this.uint8_view = new Uint8Array(this.thebuffer);\n this.uint32_view = new Uint32Array(this.thebuffer);\n this.float64_view = new Float64Array(this.thebuffer);\n // this.dv = new DataView(this.thebuffer);\n\n for(let i = 0; i < this.chunk; i++) {\n this.uint32_view[i] = i;\n }\n\n\n }", "function f() {\n if(isLittleEndian()) {\n var bytes = new Uint32Array([0, 0x7FF80000]);\n } else {\n var bytes = new Uint32Array([0x7FF80000, 0]);\n }\n var doubles = new Float64Array(bytes.buffer);\n assertTrue(isNaN(doubles[0]));\n assertTrue(isNaN(doubles[0]*2.0));\n assertTrue(isNaN(doubles[0] + 0.5));\n }", "identityMat3(mat = new Float32Array(9)) {\n mat[0] = 1.0;\n mat[1] = 0.0;\n mat[2] = 0.0;\n\n mat[3] = 0.0;\n mat[4] = 1.0;\n mat[5] = 0.0;\n\n mat[6] = 0.0;\n mat[7] = 0.0;\n mat[8] = 1.0;\n\n return mat;\n }", "constructor() {\n\n\t\t/**\n\t\t * The matrix elements.\n\t\t *\n\t\t * @type {Float32Array}\n\t\t */\n\n\t\tthis.elements = new Float32Array([\n\n\t\t\t1, 0, 0,\n\t\t\t0, 1, 0,\n\t\t\t0, 0, 1\n\n\t\t]);\n\n\t}", "Sphere3(x, y, z, r) {\n return new Float32Array([x, y, z, r]);\n }", "function asUint32Array(arr) {\n return new Uint32Array(arr);\n }", "function getFloat16Decoder() {\n // Algorithm is based off of\n // http://www.fox-toolkit.org/ftp/fasthalffloatconversion.pdf\n // Cache lookup tables\n const mantisaTable = computeFloat16MantisaTable();\n const exponentTable = computeFloat16ExponentTable();\n const offsetTable = computeFloat16OffsetTable();\n return (quantizedArray) => {\n const buffer = new ArrayBuffer(4 * quantizedArray.length);\n const bufferUint32View = new Uint32Array(buffer);\n for (let index = 0; index < quantizedArray.length; index++) {\n const float16Bits = quantizedArray[index];\n const float32Bits = mantisaTable[offsetTable[float16Bits >> 10] + (float16Bits & 0x3ff)] +\n exponentTable[float16Bits >> 10];\n bufferUint32View[index] = float32Bits;\n }\n return new Float32Array(buffer);\n };\n}", "function inputReals(size) {\n var result = new Float32Array(size);\n for (var i = 0; i < result.length; i++)\n\tresult[i] = (i % 2) / 4.0;\n return result;\n}", "constructor(sharedArrayBuffer) {\n this.sharedArrayBuffer = sharedArrayBuffer;\n this.int32 = new Int32Array(sharedArrayBuffer);\n }", "function toArray1D(array) {\n array = Array.isArray(array) ? new Float32Array(array) : array;\n return Object(_tensorflow_tfjs_core__WEBPACK_IMPORTED_MODULE_0__[\"tensor1d\"])(array);\n}", "function f() {\n if(isLittleEndian()) {\n var bytes = new Uint32Array([1, 0x7FF00000]);\n } else {\n var bytes = new Uint32Array([0x7FF00000, 1]);\n }\n var doubles = new Float64Array(bytes.buffer);\n assertTrue(isNaN(doubles[0]));\n assertTrue(isNaN(doubles[0]*2.0));\n assertTrue(isNaN(doubles[0] + 0.5));\n }", "allocate() {\n if (!this.data) {\n let elements = this.width * this.height * this.channels;\n if (this.isFloat) {\n this.data = new Float32Array(elements);\n } else {\n this.data = new Uint8Array(elements);\n }\n }\n return this;\n }", "AABB3(values) {\n return new Float32Array(values || 6);\n }", "function asUint32Array(arr) {\n return new Uint32Array(arr);\n}", "function rgbeToFloat(buffer) {\n var intensity = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n var texels = buffer.length / 4;\n var floatBuffer = new Float32Array(texels * 3);\n var expTable = [];\n\n for (var i = 0; i < 255; i++) {\n expTable[i] = intensity * Math.pow(2, i - 128) / 255;\n }\n\n for (var _i = 0; _i < texels; _i++) {\n var r = buffer[4 * _i];\n var g = buffer[4 * _i + 1];\n var b = buffer[4 * _i + 2];\n var a = buffer[4 * _i + 3];\n var e = expTable[a];\n floatBuffer[3 * _i] = r * e;\n floatBuffer[3 * _i + 1] = g * e;\n floatBuffer[3 * _i + 2] = b * e;\n }\n\n return floatBuffer;\n }", "function toArray1D(array) {\n array = Array.isArray(array) ? new Float32Array(array) : array;\n return tfjs_core_1.tensor1d(array);\n}", "function toArray1D(array) {\n array = Array.isArray(array) ? new Float32Array(array) : array;\n return tfjs_core_1.tensor1d(array);\n}", "function l(e,i,n,r){function o(e,t){return 1-3*t+3*e}function a(e,t){return 3*t-6*e}function s(e){return 3*e}function l(e,t,i){return((o(t,i)*e+a(t,i))*e+s(t))*e}function c(e,t,i){return 3*o(t,i)*e*e+2*a(t,i)*e+s(t)}function u(t,i){for(var r=0;f>r;++r){var o=c(i,e,n);if(0===o)return i;var a=l(i,e,n)-t;i-=a/o}return i}function d(){for(var t=0;C>t;++t)A[t]=l(t*w,e,n)}function h(t,i,r){var o,a,s=0;do a=i+(r-i)/2,o=l(a,e,n)-t,o>0?r=a:i=a;while(Math.abs(o)>v&&++s<b);return a}function g(t){for(var i=0,r=1,o=C-1;r!=o&&A[r]<=t;++r)i+=w;--r;var a=(t-A[r])/(A[r+1]-A[r]),s=i+a*w,l=c(s,e,n);return l>=m?u(t,s):0==l?s:h(t,i,i+w)}function p(){S=!0,(e!=i||n!=r)&&d()}var f=4,m=.001,v=1e-7,b=10,C=11,w=1/(C-1),y=\"Float32Array\"in t;if(4!==arguments.length)return!1;for(var x=0;4>x;++x)if(\"number\"!=typeof arguments[x]||isNaN(arguments[x])||!isFinite(arguments[x]))return!1;e=Math.min(e,1),n=Math.min(n,1),e=Math.max(e,0),n=Math.max(n,0);var A=y?new Float32Array(C):new Array(C),S=!1,E=function(t){return S||p(),e===i&&n===r?t:0===t?0:1===t?1:l(g(t),i,r)};E.getControlPoints=function(){return[{x:e,y:i},{x:n,y:r}]};var _=\"generateBezier(\"+[e,i,n,r]+\")\";return E.toString=function(){return _},E}", "function gen_op_neon_add_f32()\n{\n gen_opc_ptr.push({func:op_neon_add_f32});\n}", "allocate() {\n if (!this.data) {\n let elements = this.width * this.height * this.depth * this.channels;\n\t\t\t\tthis.elements = elements;\n if (this.isFloat) {\n this.data = new Float32Array(elements);\n } else {\n this.data = new Uint8Array(elements);\n }\n }\n return this;\n }", "static flatten_2D_to_1D(M) // Turn any 2D Array into a row-major 1D array of raw floats.\r\n {\r\n var index = 0,\r\n floats = new Float32Array(M.length && M.length * M[0].length);\r\n for (let i = 0; i < M.length; i++)\r\n for (let j = 0; j < M[i].length; j++) floats[index++] = M[i][j];\r\n return floats;\r\n }", "function computeFloat16OffsetTable() {\n const offsetTable = new Uint32Array(64);\n for (let i = 0; i < 64; i++) {\n offsetTable[i] = 1024;\n }\n offsetTable[0] = offsetTable[32] = 0;\n return offsetTable;\n}", "f32(num) {\n this._convo.f32[0] = num;\n this.buffer.set(this._convo.u8.slice(0, 4), this.length);\n this.length += 4;\n return this;\n }", "function mockFloat32Data(now,coefficient){\n let timeStamps = [] // timeStamps\n let values = [] // values\n for (let i = 0; i < counts; i++) {\n const t = now.add(1, 'second')\n const ts = t.unix() + 8 * 3600 // timeStamp\n timeStamps.push(ts)\n if (t.second() >= 20 && t.second() <= 30){\n values.push(coefficient) // write constant value\n }else{\n values.push(Math.random() * coefficient)\n }\n }\n return [timeStamps, values]\n}", "function getView(alignLog2, signed, float) {\n const buffer = memory.buffer;\n if (float) {\n switch (alignLog2) {\n case 2: return new Float32Array(buffer);\n case 3: return new Float64Array(buffer);\n }\n } else {\n switch (alignLog2) {\n case 0: return new (signed ? Int8Array : Uint8Array)(buffer);\n case 1: return new (signed ? Int16Array : Uint16Array)(buffer);\n case 2: return new (signed ? Int32Array : Uint32Array)(buffer);\n case 3: return new (signed ? BigInt64Array : BigUint64Array)(buffer);\n }\n }\n throw Error(`unsupported align: ${alignLog2}`);\n }", "function gw(t,e,r,n){var a=4,i=.001,s=1e-7,o=10,u=11,l=1/(u-1),f=typeof Float32Array<\"u\";if(arguments.length!==4)return!1;for(var c=0;c<4;++c)if(typeof arguments[c]!=\"number\"||isNaN(arguments[c])||!isFinite(arguments[c]))return!1;t=Math.min(t,1),r=Math.min(r,1),t=Math.max(t,0),r=Math.max(r,0);var v=f?new Float32Array(u):new Array(u);function h(S,L){return 1-3*L+3*S}function d(S,L){return 3*L-6*S}function g(S){return 3*S}function b(S,L,A){return((h(L,A)*S+d(L,A))*S+g(L))*S}function p(S,L,A){return 3*h(L,A)*S*S+2*d(L,A)*S+g(L)}function m(S,L){for(var A=0;A<a;++A){var O=p(L,t,r);if(O===0)return L;var N=b(L,t,r)-S;L-=N/O}return L}function y(){for(var S=0;S<u;++S)v[S]=b(S*l,t,r)}function E(S,L,A){var O,N,R=0;do N=L+(A-L)/2,O=b(N,t,r)-S,O>0?A=N:L=N;while(Math.abs(O)>s&&++R<o);return N}function C(S){for(var L=0,A=1,O=u-1;A!==O&&v[A]<=S;++A)L+=l;--A;var N=(S-v[A])/(v[A+1]-v[A]),R=L+N*l,I=p(R,t,r);return I>=i?m(S,R):I===0?R:E(S,L,L+l)}var D=!1;function w(){D=!0,(t!==e||r!==n)&&y()}var T=function(L){return D||w(),t===e&&r===n?L:L===0?0:L===1?1:b(C(L),e,n)};T.getControlPoints=function(){return[{x:t,y:e},{x:r,y:n}]};var x=\"generateBezier(\"+[t,e,r,n]+\")\";return T.toString=function(){return x},T}", "function initBuffers() {\n // 3 stk 3D vertekser:\n let trianglePositions = new Float32Array([ //NB! ClockWise!!\n -10, -10, 0, //0\n 0, -5, 0,\n 10, -8, 0,\n -1, -8, 0,\n 3, 4, 0,\n 7, -6, 0,\n -15, -10, 0,\n 0, 5, 0,\n 10, -7, -5,\n 2, 5, 0,\n 5, -7, -5, //10\n\n -25, 9, 0, //11 triangle\n -25, -15, 0,\n -10, 8, -2,\n\n -26, 11, 0, //14 line\n -29, -16, 0,\n\n -30, -25, 0, //16 line\n 6, -20, 0,\n\n -15, -25, 0, //18 LINE_STRIP\n 6, -10, 0,\n 8, -15, 0,\n -15, -25, 0,\n\n -8, -25, 0, //22 TRIANGLE_STRIP\n -6, -10, 0,\n -9, -15, 0,\n\n -15, -20, 0,\n -12, -22, 0,\n\n -9, -30, 0,\n -15, -29, 0,\n\n -12, -18, 0,\n -12, -17, 0, //30\n\n\n ]);\n\n // Verteksbuffer:\n positionBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, positionBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, trianglePositions, gl.STATIC_DRAW);\n\n positionBuffer.itemSize = 3; // NB!!\n positionBuffer.numberOfItems = 3; // NB!!\n\n gl.bindBuffer(gl.ARRAY_BUFFER, null);\n}", "createArrayBuffer(floatAry,isStatic,isUnbind){\n\t\tif(isStatic === undefined) isStatic = true; //So we can call this function without setting isStatic\n\n\t\tvar buf = this.ctx.createBuffer();\n\t\tthis.ctx.bindBuffer(this.ctx.ARRAY_BUFFER, buf);\n\t\tthis.ctx.bufferData(this.ctx.ARRAY_BUFFER, floatAry, (isStatic)? this.ctx.STATIC_DRAW : this.ctx.DYNAMIC_DRAW);\n\n\t\tif(isUnbind != false) this.ctx.bindBuffer(this.ctx.ARRAY_BUFFER,null);\n\t\treturn buf;\n\t}", "function rgbeToFloat(buffer, intensity = 1) {\n const texels = buffer.length / 4;\n const floatBuffer = new Float32Array(texels * 3);\n\n const expTable = [];\n for (let i = 0; i < 255; i++) {\n expTable[i] = intensity * Math.pow(2, i - 128) / 255;\n }\n\n for (let i = 0; i < texels; i++) {\n\n const r = buffer[4 * i];\n const g = buffer[4 * i + 1];\n const b = buffer[4 * i + 2];\n const a = buffer[4 * i + 3];\n const e = expTable[a];\n\n floatBuffer[3 * i] = r * e;\n floatBuffer[3 * i + 1] = g * e;\n floatBuffer[3 * i + 2] = b * e;\n }\n\n return floatBuffer;\n }", "function initBuffers2d(gl) {\n\n const positionBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, positionBuffer);\n\n var positions = new Float32Array(\n [\n -0.5, -0.5, -0.5,\n -0.5, 0.5, -0.5,\n 0.5, -0.5, -0.5,\n -0.5, 0.5, -0.5,\n 0.5, 0.5, -0.5,\n 0.5, -0.5, -0.5,\n\n -0.5, -0.5, 0.5,\n 0.5, -0.5, 0.5,\n -0.5, 0.5, 0.5,\n -0.5, 0.5, 0.5,\n 0.5, -0.5, 0.5,\n 0.5, 0.5, 0.5,\n\n -0.5, 0.5, -0.5,\n -0.5, 0.5, 0.5,\n 0.5, 0.5, -0.5,\n -0.5, 0.5, 0.5,\n 0.5, 0.5, 0.5,\n 0.5, 0.5, -0.5,\n\n -0.5, -0.5, -0.5,\n 0.5, -0.5, -0.5,\n -0.5, -0.5, 0.5,\n -0.5, -0.5, 0.5,\n 0.5, -0.5, -0.5,\n 0.5, -0.5, 0.5,\n\n -0.5, -0.5, -0.5,\n -0.5, -0.5, 0.5,\n -0.5, 0.5, -0.5,\n -0.5, -0.5, 0.5,\n -0.5, 0.5, 0.5,\n -0.5, 0.5, -0.5,\n\n 0.5, -0.5, -0.5,\n 0.5, 0.5, -0.5,\n 0.5, -0.5, 0.5,\n 0.5, -0.5, 0.5,\n 0.5, 0.5, -0.5,\n 0.5, 0.5, 0.5,\n\n ]);\n gl.bufferData(gl.ARRAY_BUFFER, positions, gl.STATIC_DRAW);\n\n const normalBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, normalBuffer);\n const vertexNormals = [\n // Front\n 0.0, 0.0, 1.0,\n 0.0, 0.0, 1.0,\n 0.0, 0.0, 1.0,\n 0.0, 0.0, 1.0,\n 0.0, 0.0, 1.0,\n 0.0, 0.0, 1.0,\n\n // Back\n 0.0, 0.0, -1.0,\n 0.0, 0.0, -1.0,\n 0.0, 0.0, -1.0,\n 0.0, 0.0, -1.0,\n 0.0, 0.0, -1.0,\n 0.0, 0.0, -1.0,\n\n // Top\n 0.0, 1.0, 0.0,\n 0.0, 1.0, 0.0,\n 0.0, 1.0, 0.0,\n 0.0, 1.0, 0.0,\n 0.0, 1.0, 0.0,\n 0.0, 1.0, 0.0,\n\n // Bottom\n 0.0, -1.0, 0.0,\n 0.0, -1.0, 0.0,\n 0.0, -1.0, 0.0,\n 0.0, -1.0, 0.0,\n 0.0, -1.0, 0.0,\n 0.0, -1.0, 0.0,\n\n // Right\n 1.0, 0.0, 0.0,\n 1.0, 0.0, 0.0,\n 1.0, 0.0, 0.0,\n 1.0, 0.0, 0.0,\n 1.0, 0.0, 0.0,\n 1.0, 0.0, 0.0,\n\n // Left\n -1.0, 0.0, 0.0,\n -1.0, 0.0, 0.0,\n -1.0, 0.0, 0.0,\n -1.0, 0.0, 0.0,\n -1.0, 0.0, 0.0,\n -1.0, 0.0, 0.0,\n ];\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vertexNormals),\n gl.STATIC_DRAW);\n\n\n const textureCoordBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, textureCoordBuffer);\n let texcoords = [\n 0, 0,\n 0, 1,\n 1, 0,\n 0, 1,\n 1, 1,\n 1, 0,\n\n 0, 0,\n 0, 1,\n 1, 0,\n 1, 0,\n 0, 1,\n 1, 1,\n\n 0, 0,\n 0, 1,\n 1, 0,\n 0, 1,\n 1, 1,\n 1, 0,\n\n 0, 0,\n 0, 1,\n 1, 0,\n 1, 0,\n 0, 1,\n 1, 1,\n\n 0, 0,\n 0, 1,\n 1, 0,\n 0, 1,\n 1, 1,\n 1, 0,\n\n 0, 0,\n 0, 1,\n 1, 0,\n 1, 0,\n 0, 1,\n 1, 1,\n ]\n gl.bufferData( gl.ARRAY_BUFFER, new Float32Array(texcoords), gl.STATIC_DRAW);\n\n let offsets = [];\n let colors = [];\n let index = [];\n for (let i = 0; i < SIDE; i++) {\n const x = (-SIDE + 1) * 3 / 2 + i * 3;\n for (let j = 0; j < SIDE; j++) {\n const y = (-SIDE + 1) * 3 / 2 + j * 3;\n offsets.push(x, y, 0.0);\n let color = Math.random() * 0.75 + 0.25\n colors.push(Math.random() * 0.75 + 0.25, Math.random() * 0.75 + 0.25, color, 1.0)\n index.push(i/SIDE,j/SIDE)\n }\n }\n\n const instanceOffsets = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, instanceOffsets);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(offsets), gl.STATIC_DRAW);\n\n const instanceColors = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, instanceColors);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(colors), gl.STATIC_DRAW);\n\n const instanceIndex = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, instanceIndex);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(index), gl.STATIC_DRAW);\n\n //const colors = new Float32Array(SIDE * SIDE * 4).map(\n //() => Math.random() * 0.75 + 0.25\n //);\n\n const animatedImageTexture = initVideoTexture(gl);\n\n return {\n vertexCount: positions.length / 3,\n positions: positionBuffer,\n textureCoord: textureCoordBuffer,\n normals: normalBuffer,\n instanceOffsets,\n instanceColors,\n instanceIndex,\n animatedImageTexture,\n };\n}", "function VertexColorArray (size) {\n return new Float32Array(size * 4)\n}", "function readFloat(){\n checkLen(4);\n var flt = buf.readFloatLE(pos);\n pos += 4;\n return formSinglePrecision(flt);\n }", "function resizeBuffer (oldBuffer, newSize) {\n const newBuffer = new Float32Array(newSize);\n newBuffer.set(oldBuffer);\n return newBuffer;\n}", "function resizeBuffer (oldBuffer, newSize) {\n const newBuffer = new Float32Array(newSize);\n newBuffer.set(oldBuffer);\n return newBuffer;\n}", "function initVertexBuffers(gl) {\r\n // Coordinates(Cube which length of one side is 1 with the origin on the center of the bottom)\r\n var vertices = new Float32Array([\r\n 0.5, 1.0, 0.5, -0.5, 1.0, 0.5, -0.5, 0.0, 0.5, 0.5, 0.0, 0.5, // v0-v1-v2-v3 front\r\n 0.5, 1.0, 0.5, 0.5, 0.0, 0.5, 0.5, 0.0,-0.5, 0.5, 1.0,-0.5, // v0-v3-v4-v5 right\r\n 0.5, 1.0, 0.5, 0.5, 1.0,-0.5, -0.5, 1.0,-0.5, -0.5, 1.0, 0.5, // v0-v5-v6-v1 up\r\n -0.5, 1.0, 0.5, -0.5, 1.0,-0.5, -0.5, 0.0,-0.5, -0.5, 0.0, 0.5, // v1-v6-v7-v2 left\r\n -0.5, 0.0,-0.5, 0.5, 0.0,-0.5, 0.5, 0.0, 0.5, -0.5, 0.0, 0.5, // v7-v4-v3-v2 down\r\n 0.5, 0.0,-0.5, -0.5, 0.0,-0.5, -0.5, 1.0,-0.5, 0.5, 1.0,-0.5 // v4-v7-v6-v5 back\r\n ]);\r\n\r\n // Normal\r\n var normals = new Float32Array([\r\n 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, // v0-v1-v2-v3 front\r\n 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, // v0-v3-v4-v5 right\r\n 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, // v0-v5-v6-v1 up\r\n -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, -1.0, 0.0, 0.0, // v1-v6-v7-v2 left\r\n 0.0,-1.0, 0.0, 0.0,-1.0, 0.0, 0.0,-1.0, 0.0, 0.0,-1.0, 0.0, // v7-v4-v3-v2 down\r\n 0.0, 0.0,-1.0, 0.0, 0.0,-1.0, 0.0, 0.0,-1.0, 0.0, 0.0,-1.0 // v4-v7-v6-v5 back\r\n ]);\r\n\r\n // Indices of the vertices\r\n var indices = new Uint8Array([\r\n 0, 1, 2, 0, 2, 3, // front\r\n 4, 5, 6, 4, 6, 7, // right\r\n 8, 9,10, 8,10,11, // up\r\n 12,13,14, 12,14,15, // left\r\n 16,17,18, 16,18,19, // down\r\n 20,21,22, 20,22,23 // back\r\n ]);\r\n\r\n // Write the vertex property to buffers (coordinates and normals)\r\n if (!initArrayBuffer(gl, 'a_Position', vertices, gl.FLOAT, 3)) return -1;\r\n if (!initArrayBuffer(gl, 'a_Normal', normals, gl.FLOAT, 3)) return -1;\r\n\r\n // Unbind the buffer object\r\n gl.bindBuffer(gl.ARRAY_BUFFER, null);\r\n\r\n // Write the indices to the buffer object\r\n var indexBuffer = gl.createBuffer();\r\n if (!indexBuffer) {\r\n console.log('Failed to create the buffer object');\r\n return -1;\r\n }\r\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indexBuffer);\r\n gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, indices, gl.STATIC_DRAW);\r\n\r\n return indices.length;\r\n}", "initializeArrays()\n {\n this.vertices = [];\n this.colors = [];\n this.indices = [];\n this.normals = [];\n this.verticesBuffer = null;\n this.colorsBuffer = null;\n this.indicesBuffer = null;\n this.normalsBuffer = null;\n }", "function TextureCoordinatesArray (count) {\n let ar = new Float32Array(count * BOX_LENGTH) \n\n for (var i = 0, len = ar.length; i < len; i += BOX_LENGTH) {\n setBox(ar, i, 1, 1, 0, 0)\n } \n return ar\n}", "static mul(mat1, mat2)\n\t{\n\t\tvar result = [];\n\t\tfor (var row=0; row<4; ++row) { //row of result\n\t\t\tfor (var col=0; col<4; ++col) { //col of result\n\t\t\t\tresult.push(Matrix.mul_helper(row, col, mat1, mat2));\n\t\t\t}\n\t\t}\n\t\treturn new Float32Array(result);\n\t}", "function generateFloat32Randoms(w, h, n, max = 1, min = 0) {\n var randoms = new Float32Array(w * h * n);\n var range = max - min;\n var mid = min + range / 2;\n for (var i = 0; i < w * h * n; i++) {\n randoms[i] = Math.random() * range + min;\n }\n return randoms;\n }", "positionInfoArray(){\r\n\r\n var info = new Float32Array(\r\n this.bullets.length > 0 ?\r\n this.bullets.length * 3 :\r\n 3\r\n );\r\n\r\n for ( let i = 0; i < this.bullets.length; i++ ){\r\n info[i*3] = this.bullets[i].x;\r\n info[i*3+1] = this.bullets[i].y;\r\n info[i*3+2] = this.bullets[i].z;\r\n }\r\n\r\n return info;\r\n }", "function Bn(e,t,n){var i=e[0];if(i<=0||i>0)return e;// unoptimized: ! isNaN( firstElem )\n// see http://jacksondunstan.com/articles/983\nvar r=t*n,o=Ln[r];if(void 0===o&&(o=new Float32Array(r),Ln[r]=o),0!==t){i.toArray(o,0);for(var a=1,s=0;a!==t;++a)s+=n,e[a].toArray(o,s)}return o}// Texture unit allocation" ]
[ "0.7301634", "0.7210457", "0.69891053", "0.6970289", "0.6806028", "0.6755337", "0.67421573", "0.6691147", "0.6642018", "0.6596119", "0.65654045", "0.6548043", "0.65388924", "0.6511904", "0.6498788", "0.64865685", "0.64797604", "0.6425649", "0.640718", "0.6349704", "0.6349409", "0.63155997", "0.6269949", "0.62256885", "0.61567175", "0.6112997", "0.6090507", "0.60538065", "0.6043622", "0.6015226", "0.59894586", "0.5961933", "0.59503007", "0.5878799", "0.58393353", "0.5801601", "0.57792634", "0.5771102", "0.570166", "0.57004255", "0.56173337", "0.5616858", "0.55733216", "0.55589175", "0.55392563", "0.5531805", "0.5514932", "0.55045885", "0.550186", "0.54910564", "0.5490026", "0.5485728", "0.5485728", "0.5458959", "0.542743", "0.54061526", "0.5404985", "0.53570247", "0.5353196", "0.5344524", "0.5323468", "0.5318827", "0.5285773", "0.5277859", "0.52723086", "0.52675176", "0.5255492", "0.52551544", "0.5254446", "0.5238487", "0.52136225", "0.5212064", "0.52030367", "0.5192536", "0.5187571", "0.51738685", "0.51738685", "0.51694334", "0.5166228", "0.51615715", "0.51593494", "0.5146587", "0.5139625", "0.5127895", "0.5123398", "0.51212883", "0.5109407", "0.51066196", "0.5094727", "0.5057943", "0.50492287", "0.50364935", "0.50310874", "0.50310874", "0.5027776", "0.5025009", "0.5004004", "0.4994055", "0.49909994", "0.49875885", "0.49722245" ]
0.0
-1
var valueSplitReg = /[\s,]+/;
function createPathProxyFromString(data) { if (!data) { return new PathProxy(); } // var data = data.replace(/-/g, ' -') // .replace(/ /g, ' ') // .replace(/ /g, ',') // .replace(/,,/g, ','); // var n; // create pipes so that we can split the data // for (n = 0; n < cc.length; n++) { // cs = cs.replace(new RegExp(cc[n], 'g'), '|' + cc[n]); // } // data = data.replace(/-/g, ',-'); // create array // var arr = cs.split('|'); // init context point var cpx = 0; var cpy = 0; var subpathX = cpx; var subpathY = cpy; var prevCmd; var path = new PathProxy(); var CMD = PathProxy.CMD; // commandReg.lastIndex = 0; // var cmdResult; // while ((cmdResult = commandReg.exec(data)) != null) { // var cmdStr = cmdResult[1]; // var cmdContent = cmdResult[2]; var cmdList = data.match(commandReg); for (var l = 0; l < cmdList.length; l++) { var cmdText = cmdList[l]; var cmdStr = cmdText.charAt(0); var cmd; // String#split is faster a little bit than String#replace or RegExp#exec. // var p = cmdContent.split(valueSplitReg); // var pLen = 0; // for (var i = 0; i < p.length; i++) { // // '' and other invalid str => NaN // var val = parseFloat(p[i]); // !isNaN(val) && (p[pLen++] = val); // } var p = cmdText.match(numberReg) || []; var pLen = p.length; for (var i = 0; i < pLen; i++) { p[i] = parseFloat(p[i]); } var off = 0; while (off < pLen) { var ctlPtx; var ctlPty; var rx; var ry; var psi; var fa; var fs; var x1 = cpx; var y1 = cpy; // convert l, H, h, V, and v to L switch (cmdStr) { case 'l': cpx += p[off++]; cpy += p[off++]; cmd = CMD.L; path.addData(cmd, cpx, cpy); break; case 'L': cpx = p[off++]; cpy = p[off++]; cmd = CMD.L; path.addData(cmd, cpx, cpy); break; case 'm': cpx += p[off++]; cpy += p[off++]; cmd = CMD.M; path.addData(cmd, cpx, cpy); subpathX = cpx; subpathY = cpy; cmdStr = 'l'; break; case 'M': cpx = p[off++]; cpy = p[off++]; cmd = CMD.M; path.addData(cmd, cpx, cpy); subpathX = cpx; subpathY = cpy; cmdStr = 'L'; break; case 'h': cpx += p[off++]; cmd = CMD.L; path.addData(cmd, cpx, cpy); break; case 'H': cpx = p[off++]; cmd = CMD.L; path.addData(cmd, cpx, cpy); break; case 'v': cpy += p[off++]; cmd = CMD.L; path.addData(cmd, cpx, cpy); break; case 'V': cpy = p[off++]; cmd = CMD.L; path.addData(cmd, cpx, cpy); break; case 'C': cmd = CMD.C; path.addData(cmd, p[off++], p[off++], p[off++], p[off++], p[off++], p[off++]); cpx = p[off - 2]; cpy = p[off - 1]; break; case 'c': cmd = CMD.C; path.addData(cmd, p[off++] + cpx, p[off++] + cpy, p[off++] + cpx, p[off++] + cpy, p[off++] + cpx, p[off++] + cpy); cpx += p[off - 2]; cpy += p[off - 1]; break; case 'S': ctlPtx = cpx; ctlPty = cpy; var len = path.len(); var pathData = path.data; if (prevCmd === CMD.C) { ctlPtx += cpx - pathData[len - 4]; ctlPty += cpy - pathData[len - 3]; } cmd = CMD.C; x1 = p[off++]; y1 = p[off++]; cpx = p[off++]; cpy = p[off++]; path.addData(cmd, ctlPtx, ctlPty, x1, y1, cpx, cpy); break; case 's': ctlPtx = cpx; ctlPty = cpy; var len = path.len(); var pathData = path.data; if (prevCmd === CMD.C) { ctlPtx += cpx - pathData[len - 4]; ctlPty += cpy - pathData[len - 3]; } cmd = CMD.C; x1 = cpx + p[off++]; y1 = cpy + p[off++]; cpx += p[off++]; cpy += p[off++]; path.addData(cmd, ctlPtx, ctlPty, x1, y1, cpx, cpy); break; case 'Q': x1 = p[off++]; y1 = p[off++]; cpx = p[off++]; cpy = p[off++]; cmd = CMD.Q; path.addData(cmd, x1, y1, cpx, cpy); break; case 'q': x1 = p[off++] + cpx; y1 = p[off++] + cpy; cpx += p[off++]; cpy += p[off++]; cmd = CMD.Q; path.addData(cmd, x1, y1, cpx, cpy); break; case 'T': ctlPtx = cpx; ctlPty = cpy; var len = path.len(); var pathData = path.data; if (prevCmd === CMD.Q) { ctlPtx += cpx - pathData[len - 4]; ctlPty += cpy - pathData[len - 3]; } cpx = p[off++]; cpy = p[off++]; cmd = CMD.Q; path.addData(cmd, ctlPtx, ctlPty, cpx, cpy); break; case 't': ctlPtx = cpx; ctlPty = cpy; var len = path.len(); var pathData = path.data; if (prevCmd === CMD.Q) { ctlPtx += cpx - pathData[len - 4]; ctlPty += cpy - pathData[len - 3]; } cpx += p[off++]; cpy += p[off++]; cmd = CMD.Q; path.addData(cmd, ctlPtx, ctlPty, cpx, cpy); break; case 'A': rx = p[off++]; ry = p[off++]; psi = p[off++]; fa = p[off++]; fs = p[off++]; x1 = cpx, y1 = cpy; cpx = p[off++]; cpy = p[off++]; cmd = CMD.A; processArc(x1, y1, cpx, cpy, fa, fs, rx, ry, psi, cmd, path); break; case 'a': rx = p[off++]; ry = p[off++]; psi = p[off++]; fa = p[off++]; fs = p[off++]; x1 = cpx, y1 = cpy; cpx += p[off++]; cpy += p[off++]; cmd = CMD.A; processArc(x1, y1, cpx, cpy, fa, fs, rx, ry, psi, cmd, path); break; } } if (cmdStr === 'z' || cmdStr === 'Z') { cmd = CMD.Z; path.addData(cmd); // z may be in the middle of the path. cpx = subpathX; cpy = subpathY; } prevCmd = cmd; } path.toStatic(); return path; } // TODO Optimize double memory cost problem
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function split( val )\n\t{\n\t\treturn val.split( /,\\s*/ );\n\t}", "function commaSplit(val) {\n return val.split(/,\\s*/);\n}", "function split(value) {\n return typeof value === 'string' ? value.split(/ *, */g) : undefined;\n}", "function splitVal(string, separator) {\n\t var val, i, l;\n\t if (string === null || string.length < 1) return [];\n\t val = string.split(separator);\n\t for (i = 0, l = val.length; i < l; i = i + 1) val[i] = $.trim(val[i]);\n\t return val;\n\t }", "function splitVal(string, separator) {\n var val, i, l;\n if (string === null || string.length < 1) return [];\n val = string.split(separator);\n for (i = 0, l = val.length; i < l; i = i + 1) val[i] = $.trim(val[i]);\n return val;\n }", "function splitVal(string, separator) {\n var val, i, l;\n if (string === null || string.length < 1) return [];\n val = string.split(separator);\n for (i = 0, l = val.length; i < l; i = i + 1) val[i] = $.trim(val[i]);\n return val;\n }", "function splitVal(string, separator) {\n var val, i, l;\n if (string === null || string.length < 1) return [];\n val = string.split(separator);\n for (i = 0, l = val.length; i < l; i = i + 1) val[i] = $.trim(val[i]);\n return val;\n }", "function splitVal(string, separator) {\n var val, i, l;\n if (string === null || string.length < 1) return [];\n val = string.split(separator);\n for (i = 0, l = val.length; i < l; i = i + 1) val[i] = $.trim(val[i]);\n return val;\n }", "function splitVal(string, separator) {\n var val, i, l;\n if (string === null || string.length < 1) return [];\n val = string.split(separator);\n for (i = 0, l = val.length; i < l; i = i + 1) val[i] = $.trim(val[i]);\n return val;\n }", "function splitVal(string, separator) {\n var val, i, l;\n if (string === null || string.length < 1) return [];\n val = string.split(separator);\n for (i = 0, l = val.length; i < l; i = i + 1) val[i] = $.trim(val[i]);\n return val;\n }", "function splitVal(string, separator) {\n var val, i, l;\n if (string === null || string.length < 1) return [];\n val = string.split(separator);\n for (i = 0, l = val.length; i < l; i = i + 1) val[i] = $.trim(val[i]);\n return val;\n }", "function splitVal(string, separator) {\n var val, i, l;\n if (string === null || string.length < 1) return [];\n val = string.split(separator);\n for (i = 0, l = val.length; i < l; i = i + 1) val[i] = $.trim(val[i]);\n return val;\n }", "function splitVal(string, separator) {\n var val, i, l;\n if (string === null || string.length < 1) return [];\n val = string.split(separator);\n for (i = 0, l = val.length; i < l; i = i + 1) val[i] = $.trim(val[i]);\n return val;\n }", "function splitVal(string, separator) {\n var val, i, l;\n if (string === null || string.length < 1) return [];\n val = string.split(separator);\n for (i = 0, l = val.length; i < l; i = i + 1) val[i] = $.trim(val[i]);\n return val;\n }", "function splitVal(string, separator) {\n var val, i, l;\n if (string === null || string.length < 1) return [];\n val = string.split(separator);\n for (i = 0, l = val.length; i < l; i = i + 1) val[i] = $.trim(val[i]);\n return val;\n }", "function splitVal(string, separator) {\n var val, i, l;\n if (string === null || string.length < 1) return [];\n val = string.split(separator);\n for (i = 0, l = val.length; i < l; i = i + 1) val[i] = $.trim(val[i]);\n return val;\n }", "function splitVal(string, separator) {\n var val, i, l;\n if (string === null || string.length < 1) return [];\n val = string.split(separator);\n for (i = 0, l = val.length; i < l; i = i + 1) val[i] = $.trim(val[i]);\n return val;\n }", "function splitVal(string, separator) {\n var val, i, l;\n if (string === null || string.length < 1) return [];\n val = string.split(separator);\n for (i = 0, l = val.length; i < l; i = i + 1) val[i] = $.trim(val[i]);\n return val;\n }", "function list(val) {\n return val.split(',');\n}", "function uusplitcomma(source) { // @param String: \",,, ,,A,,,B,C,, \"\r\n // @return Array: [\"A\", \"B\", \"C\"]\r\n return source.replace(uusplit._MANY_COMMAS, \",\").\r\n replace(uusplit._TRIM_SPACE_AND_COMMAS, \"\").split(\",\");\r\n}", "function parse(value) {\n var values = []\n var input = String(value || empty)\n var index = input.indexOf(comma)\n var lastIndex = 0\n var end = false\n var val\n\n while (!end) {\n if (index === -1) {\n index = input.length\n end = true\n }\n\n val = input.slice(lastIndex, index).trim()\n\n if (val || !end) {\n values.push(val)\n }\n\n lastIndex = index + 1\n index = input.indexOf(comma, lastIndex)\n }\n\n return values\n}", "function parse(value) {\n var values = []\n var input = String(value || empty)\n var index = input.indexOf(comma)\n var lastIndex = 0\n var end = false\n var val\n\n while (!end) {\n if (index === -1) {\n index = input.length\n end = true\n }\n\n val = input.slice(lastIndex, index).trim()\n\n if (val || !end) {\n values.push(val)\n }\n\n lastIndex = index + 1\n index = input.indexOf(comma, lastIndex)\n }\n\n return values\n}", "function parse(value) {\n var values = []\n var input = String(value || empty)\n var index = input.indexOf(comma)\n var lastIndex = 0\n var end = false\n var val\n\n while (!end) {\n if (index === -1) {\n index = input.length\n end = true\n }\n\n val = input.slice(lastIndex, index).trim()\n\n if (val || !end) {\n values.push(val)\n }\n\n lastIndex = index + 1\n index = input.indexOf(comma, lastIndex)\n }\n\n return values\n}", "function parse(value) {\n var values = []\n var input = String(value || empty)\n var index = input.indexOf(comma)\n var lastIndex = 0\n var end = false\n var val\n\n while (!end) {\n if (index === -1) {\n index = input.length\n end = true\n }\n\n val = trim(input.slice(lastIndex, index))\n\n if (val || !end) {\n values.push(val)\n }\n\n lastIndex = index + 1\n index = input.indexOf(comma, lastIndex)\n }\n\n return values\n}", "function splitBySpaces(value) {\n return value.split(/\\s+/).filter(Boolean);\n}", "function parse(value) {\n var values = [];\n var input = String(value || empty);\n var index = input.indexOf(comma);\n var lastIndex = 0;\n var end = false;\n var val;\n while (!end) {\n if (index === -1) {\n index = input.length;\n end = true;\n }\n val = input.slice(lastIndex, index).trim();\n if (val || !end) {\n values.push(val);\n }\n lastIndex = index + 1;\n index = input.indexOf(comma, lastIndex);\n }\n return values;\n}", "function split( val ) {\n\t\t\treturn val.split( /(@|#)\\s*/ );\n\t}", "parseString(term) { \n var results = term.split(\",\")\n return results;\n }", "function parseListIntoVals(value) {\n var list = value.split(',');\n for (var i = 0; i < list.length; i++) {\n list[i] = splitInitialsAndPercent(list[i].trim());\n }\n return list;\n}", "function splitFields(row) {\n return row.replace(/\"(.*)\"/, \"$1\").split('\",\"');\n}", "function parseFunctions(val) {\n\t\tvar res = val.split(',');\n\t\tfor(var i = 0; i < res.length; i++) {\n\t\t\tres[i] = res[i].trim();\n\t\t}\n\t\treturn res;\n\t}", "function bSplit(val) {\n\tvar len = val.length;\n\tvar arr = [];\n\tvar start = 0;\n\tvar i = '';\n\tfor (i = 0; i < len; i++) {\n\t\tif (val[i] == ' ' || val[i] == '\\t' || val[i] == '\\r') {\n\t\t\tif (start == i)\n\t\t\t\tstart++;\n\t\t\telse {\n\t\t\t\tarr.push(val.substring(start, i));\n\t\t\t\tstart = i + 1;\n\t\t\t}\n\t\t}\n\t}\n\tarr.push(val.substring(start, i));\n\t//console.log(this.toString());\n\tif (len > 1)\n\t\treturn arr;\n\treturn val;\n}", "function splitName(name) {\n return name.replace(' ', '').toLowerCase().split(',');\n}", "function splitString(value, separator) {\n\tvalue = value.trim();\n\tif (value.length == 0) {\n\t\treturn [];\n\t}\n\treturn value.split(separator);\n}", "function splitListStrUsingComma(sourceStr) {\n // FILL THIS IN\n var splitSourceArray = [];\n splitSourceArray = sourceStr.split(',');\n return splitSourceArray;\n }", "function parseSpaceSeparated(string) {\n if (string == \"\" || string == null) {\n return []\n } else {\n return String(string).replace(/(^\\s*,)|(,\\s*$)/g, '').trim().split(/[\\s,]+/);\n }\n}", "function split(writer, value, delim, idx) {\n var val = stringify(value).split(delim || ' \\n\\r\\t');\n return typeof idx !== 'undefined' ? val[idx] : val;\n}", "function getArrayValues(value) {\n /** It splits every value */\n return _.map(_.trim(value).split(\",\"), function(singleValue) { return _.trim(singleValue); });\n }", "function getArrayValues(value) {\n /** It splits every value */\n return _.map(_.trim(value).split(\",\"), function(singleValue) { return _.trim(singleValue); });\n }", "function getArrayValues(value) {\n /** It splits every value */\n return _.map(_.trim(value).split(\",\"), function(singleValue) { return _.trim(singleValue); });\n }", "function splitListStrUsingComma(sourceStr) {\n // FILL THIS IN\n if (typeof arguments === 'undefined') {\n sourceStr = [];\n }\n if (typeof arguments !== null) {\n return sourceStr.split(\" \");\n }\n }", "function parseElements(v) {\n if (!v) return [];\n var w = v.split(/,+/);\n var lg = [];\n for (var e in w) {\n var s = w[e].trim();\n if (s.length > 0) lg.push(s);\n }\n return lg;\n}", "function splitString(stringToSplit, separator){\n var newStr = \"\";\n var arrayofStrings = \"\";\n var lastChar = stringToSplit.slice(-1);\n //check if last char is a \",\"\n if(lastChar == ','){\n newStr = stringToSplit.substring(0, stringToSplit.length-1); //remove last character\n newEvaluation = checkEmptyItems(newStr);\n $scope.evaluation = newEvaluation; // update input text\n arrayofStrings = newEvaluation.split(separator);\n }else{\n newStr = stringToSplit;\n newEvaluation = checkEmptyItems(newStr);\n $scope.evaluation = newEvaluation; // update input text\n arrayofStrings = newEvaluation.split(separator);\n }\n return arrayofStrings.length;\n }", "function splitComma(elem) {\n return _.split(elem, \",\");\n }", "function splitOnDelim(delim) {\n\t var re = new RegExp(\"(\" + delim + \")\", \"g\");\n\t return function (str) {\n\t return str.split(re).filter(common_1.identity);\n\t };\n\t}", "function wordBankSplit() {\n\twordList = wordBank.split(\",\");\n}", "function splitListStrUsingComma(sourceStr) {\n if (!sourceStr.length) {\n return [];\n }\n\n return sourceStr.split(',');\n }", "function splitVal(string, separator, transform) {\n var val, i, l;\n if (string === null || string.length < 1) return [];\n val = string.split(separator);\n for (i = 0, l = val.length; i < l; i = i + 1) val[i] = transform(val[i]);\n return val;\n }", "function splitVal(string, separator, transform) {\n var val, i, l;\n if (string === null || string.length < 1) return [];\n val = string.split(separator);\n for (i = 0, l = val.length; i < l; i = i + 1) val[i] = transform(val[i]);\n return val;\n }", "split(mnemonic) {\n return mnemonic.toLowerCase().split(/ +/g);\n }", "split(mnemonic) {\n return mnemonic.toLowerCase().split(/ +/g);\n }", "function getBulkData(){\n //Get value\n var value = $('input[type=\"hidden\"][name=\"bulk_subject\"]').val();\n var needsToBeCleaned = [\"[\",\"]\",\"\\\"\"];\n for (var i = 0; i < needsToBeCleaned.length; i ++){\n needsToBeCleaned = str_replace(needsToBeCleaned[i],'',value);\n }\n console.log(needsToBeCleaned.toString());\n return needsToBeCleaned.split(',');\n}", "function fields(rawStr) {\n\n return rawStr.split(/[ \\t,]+/);\n \n}", "function splitUnderlyingString() {\n\t\t\t\t\tvar underString = this.toString();\n\t\t\t\t\tvar cleanString = underString.replace(/\\s\\s+/g, \"\\u0020\").trim();\n\t\t\t\t\treturn cleanString.split(\"\\u0020\");\n\t\t\t\t}", "function split(input, separator) {}", "function splitOnDelim(delim) {\n var re = new RegExp(\"(\" + delim + \")\", \"g\");\n return function (str) {\n return str.split(re).filter(common_1.identity);\n };\n}", "function splitOnDelim(delim) {\n var re = new RegExp(\"(\" + delim + \")\", \"g\");\n return function (str) {\n return str.split(re).filter(common_1.identity);\n };\n}", "function delComma(theObj) {\n var data = theObj.value;\n //alert(\"***\"+data);\n var len = data.length;\n var temp = \"\";\n\tfor ( i=0;i<len;i++) {\n if( data.substr(i,1) != \",\") {\n temp = temp + data.substr(i,1);\n\t }\n\t}\n\ttheObj.value = temp;\n}", "function splitOnDelim(delim) {\n var re = new RegExp('(' + delim + ')', 'g');\n return function (str) { return str.split(re).filter(identity); };\n }", "function strsplit(str){\r\n var tmp,tmp1;\r\n if (Array.isArray(str)) {tmp = str[0];}else{tmp=str;}\r\n tmp1 = tmp.indexOf(',');\r\n if (tmp1===-1) {return [tmp,''];}\r\n return [tmp.substring(0,tmp1),tmp.substring(tmp1)];\r\n }", "function split(list) {\n if (list && list.split) return list.split(\",\").map(item => item.trim());\n if (Array.isArray(list)) return list;\n return [];\n}", "function getDataSpedo(data) {\n\n let spedo = data;\n let regex = spedo.replace(/[^\\d,-]/g, '');\n let hasil = regex.split(\",\");\n\n return hasil;\n}", "function getFieldIds(){\r\n\treturn $('inpFieldIds').value.split(',');\r\n}", "function getTokenArray(value) {\n var result = [];\n if (!isNaN(value))\n return result;\n var numbers=value.split(/[\\s<>,!&|=()*/;{}%+-]+/);\n return numbers;\n}", "function _normalizeParameterList(tokens) {\n var params = $.map(tokens, function (e, i) { return e.string; }).join(\"\");\n var paramsNoParens = params.match(/^\\((.*)\\)/)[1];\n if (paramsNoParens) {\n return paramsNoParens.split(',');\n } else {\n return [];\n }\n }", "function removeComma(fld) {\r\n\tvar val = \"\";\r\n\tfor (i=0; i<fld.length ; i++) {\r\n\t\tif(fld.charAt(i) == \",\"){\r\n\t\t\tcontinue\r\n \t}\r\n\t\telse{\r\n\t\t\tval = val + fld.charAt(i)\r\n\t\t}\r\n\t}\r\n\treturn val;\r\n}", "function list(val) {\n\t if (!val) {\n\t return [];\n\t } else if (Array.isArray(val)) {\n\t return val;\n\t } else if (typeof val === \"string\") {\n\t return val.split(\",\");\n\t } else {\n\t return [val];\n\t }\n\t}", "function list(val) {\n\t if (!val) {\n\t return [];\n\t } else if (Array.isArray(val)) {\n\t return val;\n\t } else if (typeof val === \"string\") {\n\t return val.split(\",\");\n\t } else {\n\t return [val];\n\t }\n\t}", "function list(val) {\n\t if (!val) {\n\t return [];\n\t } else if (Array.isArray(val)) {\n\t return val;\n\t } else if (typeof val === \"string\") {\n\t return val.split(\",\");\n\t } else {\n\t return [val];\n\t }\n\t}", "function splitOnDelim(delim) {\n var re = new RegExp(\"(\" + delim + \")\", \"g\");\n return function (str) {\n return str.split(re).filter(identity);\n };\n}", "function splitOnDelim(delim) {\n var re = new RegExp(\"(\" + delim + \")\", \"g\");\n return function (str) {\n return str.split(re).filter(identity);\n };\n}", "function splitParameters(str){var parameters=str.split(';');for(var i=1,j=0;i<parameters.length;i++){if(quoteCount(parameters[j])%2==0){parameters[++j]=parameters[i];}else{parameters[j]+=';'+parameters[i];}}// trim parameters\nparameters.length=j+1;for(var i=0;i<parameters.length;i++){parameters[i]=parameters[i].trim();}return parameters;}", "function Split(Expression, Delimiter){\r\n\tvar temp = Expression;\r\n\tvar a, b = 0;\r\n\tvar array = new Array();\r\n\r\n\tif (Delimiter.length == 0){\r\n\t\tarray[0] = Expression;\r\n\t\treturn (array);\r\n\t}\r\n\r\n\tif (Expression.length == ''){\r\n\t\tarray[0] = Expression;\r\n\t\treturn (array);\r\n\t}\r\n\r\n\tDelimiter = Delimiter.charAt(0);\r\n\r\n\tfor (var i = 0; i < Expression.length; i++){\r\n\t\ta = temp.indexOf(Delimiter);\r\n\t\tif (a == -1){\r\n\t\t\tarray[i] = temp;\r\n\t\t\tbreak;\r\n\t\t}else{\r\n\t\t\tb = (b + a) + 1;\r\n\t\t\tvar temp2 = temp.substring(0, a);\r\n\t\t\tarray[i] = temp2;\r\n\t\t\ttemp = Expression.substr(b, Expression.length - temp2.length);\r\n\t\t}\r\n\t}\r\n\r\n\treturn (array);\r\n}", "parts(key) {\n var raw = this.param(key);\n var parts = raw.split('|');\n for (var i = 0; i < parts.length; ++i) {\n parts[i] = parts[i].trim();\n }\n return parts;\n }", "function getCsvValuesFromLine(line) {\n var values = line.split(',');\n values.map(function(value){\n return value.replace(/\\\"/g, '');\n });\n return values;\n}", "getKeywordsArr() {\n return this.state.keywords.split(',').map(k => k.trim()).filter(k => k);\n }", "function smart_split(s) {\n // regular expression from django/utils/text.py in Django project.\n var re = /([^\\s\"]*\"(?:[^\"\\\\]*(?:\\\\.[^\"\\\\]*)*)\"\\S*|[^\\s']*'(?:[^'\\\\]*(?:\\\\.[^'\\\\]*)*)'\\S*|\\S+)/g,\n out = [],\n m = false;\n\n while (m = re.exec(s)) {\n out.push(m[0]);\n }\n return out;\n}", "function getOutputVals(txt,indexed)\r\n{\r\n\t// strip outer brackets\r\n\ttxt = txt.substring(2,txt.length-2);\r\n\tvar elts = txt.split(/\\]\\[/);\r\n\tif (indexed) {\r\n\t\tfor (var i in elts) {\r\n\t\t\tvar commapos = elts[i].indexOf(',');\r\n\t\t\tif (commapos > -1) elts[i] = elts[i].substring(commapos+1);\r\n\t\t}\r\n\t}\r\n\treturn elts;\r\n}", "function getinput() {\r\n input = document.getElementById(\"input\").value;\r\n input=input.toLowerCase().split(\",\");\r\n}", "function splitNames(names) {\n return names ? names.trim().split(rspace) : [];\n}", "function sc_stringSplit(s, sep) {\n if (sep.length === 1)\n\treturn sc_vector2list(s.split(sep));\n return sc_vector2list(s.split(sc_pregexpCreateCharsetMatcher(sep)));\n}", "split(name) {\n let value = this.splitCache.get(name);\n if (!value) {\n let splitValue = name.split(',');\n let length = splitValue.length;\n let method;\n switch (length) {\n case 1:\n case 2:\n value = splitValue;\n break;\n case 3:\n if (splitValue[1] === 'prototype') {\n value = splitValue;\n }\n else {\n value = [ splitValue[0] + ',' + splitValue[1], splitValue[2] ];\n }\n break;\n default:\n if (splitValue[length - 2] === 'prototype') {\n method = splitValue.pop();\n splitValue.pop(); // 'prototype'\n value = [ splitValue.join(','), 'prototype', method ];\n }\n else {\n method = splitValue.pop();\n value = [ splitValue.join(','), method ];\n }\n break;\n }\n this.splitCache.set(name, value);\n }\n return value;\n }", "function list(val) {\n if (!val) {\n return [];\n } else if (Array.isArray(val)) {\n return val;\n } else if (typeof val === \"string\") {\n return val.split(\",\");\n } else {\n return [val];\n }\n}", "function splitString(stringToSplit, separator){\r\n dataKey = stringToSplit.split(separator);\r\n console.log(dataKey);\r\n for(var i = 0; i < dataKey.length; i++){\r\n m1[i]= dataKey[i];\r\n }\r\n}", "function removeErrorComma(obj)\n{\n\tvar value = obj.value.trim();\n\twhile ((value.length>0) && (value.indexOf(\",,\")>=0))\n\t{\n\t\tvar p = value.indexOf(\",,\");\n\t\tvalue= value.substring(0,p) + value.substring(p+1,value.length);\n\t}\n\tif (value.length>0 && value.substring(0,1)==\",\")\n\t{\n\t\tvalue= value.substring(1,value.length);\n\t}\n\tif (value.length>0 && value.substring(value.length-1,value.length)==\",\")\n\t{\n\t\tvalue= value.substring(0,value.length-1);\n\t}\n\tobj.value = value;\n}", "function isValid(data) {\n var pattern = /^([A-Z])+,\\s([A-Z ])+$/i\n\n if(pattern.test(data) === true)\n return true;\n\n return false;\n}", "function clearComma(value) {\n while (value.indexOf(\",\") > 0){\n value = value.replace(\",\", \"\");\n }\n return value;\n }", "function splitArr(arr){\n\tvar newArr = arr.split(' ')\n\treturn newArr;\n}", "function parseAttr(elem, attr) {\n var val = elem.getAttribute(attr);\n\n return val ? val.replace(/, +/g, \",\").split(/ +/g) : null;\n }", "function list(val /*:: ?: string*/) /*: Array<string>*/ {\n\t if (!val) {\n\t return [];\n\t } else if (Array.isArray(val)) {\n\t return val;\n\t } else if (typeof val === \"string\") {\n\t return val.split(\",\");\n\t } else {\n\t return [val];\n\t }\n\t}", "function splitPropertyTag(tag) {\n var propertySplitIdx = tag.indexOf(\" \");\n if( propertySplitIdx != null ) {\n var property = tag.substr(0, propertySplitIdx).trim();\n var val = tag.substr(propertySplitIdx+1).trim();\n return {\n property: property,\n val: val\n };\n }\n\n return null;\n }", "function splitNames(names) {\n return names ? names.trim().split(rspace) : [];\n}", "function toSplit(phrase){\n\tvar cut = phrase.split(\" \");\n\treturn cut;\n}", "function regSplit(str, reg){\n\tvar _splitArr = [], _matchArr = str.match(reg), _len = _matchArr ? _matchArr.length : 0;\n\tfor(var i = 0;i < _len;i++){\n\t\tvar _arr = _matchArr[i], _idx = str.indexOf(_arr);\n\t\tif(_idx === -1)\n\t\t\tcontinue;\n\t\t_splitArr.push(str.substring(0,_idx));\n\t\tstr = str.substring(_idx + _arr.length);\n\t}\n\t_splitArr.push(str);\n\treturn {separate : _splitArr, arr : _matchArr};\n}", "function regSplit(str, reg){\n\tvar _splitArr = [], _matchArr = str.match(reg), _len = _matchArr ? _matchArr.length : 0;\n\tfor(var i = 0;i < _len;i++){\n\t\tvar _arr = _matchArr[i], _idx = str.indexOf(_arr);\n\t\tif(_idx === -1)\n\t\t\tcontinue;\n\t\t_splitArr.push(str.substring(0,_idx));\n\t\tstr = str.substring(_idx + _arr.length);\n\t}\n\t_splitArr.push(str);\n\treturn {separate : _splitArr, arr : _matchArr};\n}", "function regSplit(str, reg){\n\tvar _splitArr = [], _matchArr = str.match(reg), _len = _matchArr ? _matchArr.length : 0;\n\tfor(var i = 0;i < _len;i++){\n\t\tvar _arr = _matchArr[i], _idx = str.indexOf(_arr);\n\t\tif(_idx === -1)\n\t\t\tcontinue;\n\t\t_splitArr.push(str.substring(0,_idx));\n\t\tstr = str.substring(_idx + _arr.length);\n\t}\n\t_splitArr.push(str);\n\treturn {separate : _splitArr, arr : _matchArr};\n}", "function splitWithEscape(value, splitChar, escapeChar) {\r\n var results = [];\r\n var escapeMode = false;\r\n var currentResult = \"\";\r\n for (var pos = 0; pos < value.length; pos++) {\r\n if (!escapeMode) {\r\n if (value[pos] === splitChar) {\r\n results.push(currentResult);\r\n currentResult = \"\";\r\n } else if (value[pos] === escapeChar) {\r\n escapeMode = true;\r\n } else {\r\n currentResult += value[pos];\r\n }\r\n } else {\r\n currentResult += value[pos];\r\n escapeMode = false;\r\n }\r\n }\r\n if (currentResult !== \"\") {\r\n results.push(currentResult);\r\n }\r\n return results;\r\n }", "function comma(val) {\n // while (/(\\d+)(\\d{3})/.test(val.toString())){\n while (/(\\d+)(\\d{3})/.test(val)) {\n val = val.toString().replace(/(\\d+)(\\d{3})/, '$1' + ',' + '$2');\n }\n return val;\n}", "function split(events) {\n return events.match(/[^ ]+/g);\n }", "function split(events) {\n return events.match(/[^ ]+/g);\n }", "function split(events) {\n return events.match(/[^ ]+/g);\n }" ]
[ "0.7849616", "0.7697576", "0.6921383", "0.68012774", "0.6656858", "0.6586139", "0.6586139", "0.6586139", "0.6586139", "0.6586139", "0.6586139", "0.6586139", "0.6586139", "0.6586139", "0.6586139", "0.6586139", "0.6586139", "0.6586139", "0.65116346", "0.6413131", "0.6411457", "0.6411457", "0.6411457", "0.63826424", "0.63232815", "0.6316353", "0.6268587", "0.6264128", "0.6210349", "0.61644715", "0.6162055", "0.61607087", "0.61435324", "0.6078857", "0.59516704", "0.5910894", "0.5904509", "0.5879582", "0.5879582", "0.5879582", "0.5873139", "0.587294", "0.58371115", "0.58247596", "0.5823987", "0.58036774", "0.577889", "0.57535475", "0.57535475", "0.57362705", "0.57362705", "0.57140076", "0.5674118", "0.5660354", "0.5643967", "0.56223935", "0.56223935", "0.5588405", "0.5584811", "0.55779046", "0.55651206", "0.55633813", "0.55446094", "0.5542987", "0.5535984", "0.55331707", "0.5520126", "0.5520126", "0.5520126", "0.5496273", "0.5496273", "0.5490883", "0.54834473", "0.54718494", "0.5461907", "0.54473317", "0.54384726", "0.5436551", "0.5429821", "0.5423489", "0.54216605", "0.54178023", "0.5409144", "0.5400666", "0.5399792", "0.53983283", "0.5397183", "0.5383048", "0.53755635", "0.5369288", "0.53620493", "0.53581256", "0.5356444", "0.5346407", "0.5346407", "0.5346407", "0.5336919", "0.533628", "0.5328253", "0.5328253", "0.5328253" ]
0.0
-1
Merge multiple paths TODO Apply transform TODO stroke dash TODO Optimize double memory cost problem
function mergePath(pathEls, opts) { var pathList = []; var len = pathEls.length; for (var i = 0; i < len; i++) { var pathEl = pathEls[i]; if (!pathEl.path) { pathEl.createPathProxy(); } if (pathEl.__dirtyPath) { pathEl.buildPath(pathEl.path, pathEl.shape, true); } pathList.push(pathEl.path); } var pathBundle = new Path(opts); // Need path proxy. pathBundle.createPathProxy(); pathBundle.buildPath = function (path) { path.appendPath(pathList); // Svg and vml renderer don't have context var ctx = path.getContext(); if (ctx) { path.rebuildPath(ctx); } }; return pathBundle; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "dedupePathParts(path) {\n let startPathIdxs = [];\n let curPathIdx = -1;\n let startPartPos = 0;\n let intersections = [];\n let pathParts = [];\n for (let i = 1; i < path.length; i++) {\n let lastKey = path[i - 1].x + \"__\" + path[i - 1].y;\n let key = path[i].x + \"__\" + path[i].y;\n if (this.pathsMatrix[lastKey] && this.pathsMatrix[key] && !this.pathsMatrix[key][curPathIdx]) {\n let commonIdxs = _.intersection(_.keys(this.pathsMatrix[lastKey]), _.keys(this.pathsMatrix[key]));\n if (commonIdxs.length > 0) {\n if (curPathIdx === -1 && i !== 1) {\n pathParts.push({\n path: path.slice(startPartPos, i),\n startPathIdxs: startPathIdxs,\n endPathIdxs: getPathIdxs(this.pathsMatrix, lastKey),\n intersections: intersections\n });\n }\n curPathIdx = commonIdxs[0];\n }\n else {\n startPathIdxs = getPathIdxs(this.pathsMatrix, lastKey);\n startPartPos = i - 1;\n intersections = [];\n curPathIdx = -1;\n }\n }\n else if (this.pathsMatrix[lastKey] && !this.pathsMatrix[key]) {\n if (curPathIdx === -1) {\n intersections.push(..._.map(_.keys(this.pathsMatrix[lastKey]), (idx) => {\n return {\n idx: idx,\n from: i - startPartPos,\n pos: this.pathsMatrix[lastKey][idx]\n };\n }));\n }\n else {\n startPathIdxs = getPathIdxs(this.pathsMatrix, lastKey);\n startPartPos = i - 1;\n intersections = [];\n }\n curPathIdx = -1;\n }\n }\n if (curPathIdx === -1) {\n pathParts.push({\n path: path.slice(startPartPos),\n startPathIdxs: startPathIdxs,\n endPathIdxs: [],\n intersections: intersections\n });\n }\n // console.log(\"---\");\n // pathParts.forEach((pathPart) => {\n // console.log(pathPart);\n // });\n return pathParts;\n }", "function combine() {\r\n var paths = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n paths[_i] = arguments[_i];\r\n }\r\n return paths\r\n .filter(function (path) { return !stringIsNullOrEmpty(path); })\r\n .map(function (path) { return path.replace(/^[\\\\|\\/]/, \"\").replace(/[\\\\|\\/]$/, \"\"); })\r\n .join(\"/\")\r\n .replace(/\\\\/g, \"/\");\r\n}", "function combine() {\n var paths = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n paths[_i] = arguments[_i];\n }\n return paths\n .filter(function (path) { return !stringIsNullOrEmpty(path); })\n .map(function (path) { return path.replace(/^[\\\\|/]/, \"\").replace(/[\\\\|/]$/, \"\"); })\n .join(\"/\")\n .replace(/\\\\/g, \"/\");\n}", "function build_full_paths(FI, FP, Paths) {\n var i = 0,\n L = 0,\n R = 0,\n C = 0,\n j = 0,\n pl = Paths.length;\n var dad = [],\n q = [];\n\n for (; i < pl; ++i) {\n dad[i] = q[i] = i;\n FP[i] = Paths[i];\n }\n\n for (; j < q.length; ++j) {\n i = q[j];\n L = FI[i].L;\n R = FI[i].R;\n C = FI[i].C;\n\n if (dad[i] === i) {\n if (L !== -1\n /*NOSTREAM*/\n && dad[L] !== L) dad[i] = dad[L];\n if (R !== -1 && dad[R] !== R) dad[i] = dad[R];\n }\n\n if (C !== -1\n /*NOSTREAM*/\n ) dad[C] = i;\n\n if (L !== -1 && i != dad[i]) {\n dad[L] = dad[i];\n if (q.lastIndexOf(L) < j) q.push(L);\n }\n\n if (R !== -1 && i != dad[i]) {\n dad[R] = dad[i];\n if (q.lastIndexOf(R) < j) q.push(R);\n }\n }\n\n for (i = 1; i < pl; ++i) if (dad[i] === i) {\n if (R !== -1\n /*NOSTREAM*/\n && dad[R] !== R) dad[i] = dad[R];else if (L !== -1 && dad[L] !== L) dad[i] = dad[L];\n }\n\n for (i = 1; i < pl; ++i) {\n if (FI[i].type === 0\n /* unknown */\n ) continue;\n j = i;\n if (j != dad[j]) do {\n j = dad[j];\n FP[i] = FP[j] + \"/\" + FP[i];\n } while (j !== 0 && -1 !== dad[j] && j != dad[j]);\n dad[i] = -1;\n }\n\n FP[0] += \"/\";\n\n for (i = 1; i < pl; ++i) {\n if (FI[i].type !== 2\n /* stream */\n ) FP[i] += \"/\";\n }\n }", "genComputedPaths() {\n const allPaths = this.get('allPaths')\n const objectMap = this.get('objectMap')\n let computedPaths = []\n\n for(const path of allPaths){\n let computedPath = []\n let firstPath = objectMap.get(path[0] + '-' + path[1]) || objectMap.get(path[1] + '-' + path[0])\n let sum = 0\n for(let i = 0; i< firstPath.length; i++){\n sum += firstPath.data\n }\n computedPath.push({\n 'label': path[0], \n 'data': firstPath.data,\n 'sum': sum\n })\n\n for(let i = 1; i < path.length; i++){\n let nextPath = objectMap.get(path[i-1] + '-' + path[i]) || objectMap.get(path[i] + '-' + path[i-1])\n \n computedPath.push({\n 'label': path[i], \n 'data': nextPath\n })\n }\n \n computedPaths.push(computedPath)\n \n }\n this.set('computedPaths', computedPaths) \n }", "function build_full_paths(FI, FPD, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = [], q = [];\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1) { dad[L] = dad[i]; q.push(L); }\n\t\tif(R !== -1) { dad[R] = dad[i]; q.push(R); }\n\t}\n\tfor(i=1; i !== pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = dad[i];\n\t\tif(j === 0) FP[i] = FP[0] + \"/\" + FP[i];\n\t\telse while(j !== 0 && j !== dad[j]) {\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t\tj = dad[j];\n\t\t}\n\t\tdad[i] = 0;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t\tFPD[FP[i]] = FI[i];\n\t}\n}", "function paths(data, ctx) {\n\t ctx.clearRect(-1, -1, w() + 2, h() + 2);\n\t ctx.beginPath();\n\t data.forEach(function (d) {\n\t if (__.bundleDimension !== null && __.bundlingStrength > 0 || __.smoothness > 0) {\n\t single_curve(d, ctx);\n\t } else {\n\t single_path(d, ctx);\n\t }\n\t });\n\t ctx.stroke();\n\t }", "function build_full_paths(FI, FPD, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = [], q = [];\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1) { dad[L] = dad[i]; q.push(L); }\n\t\tif(R !== -1) { dad[R] = dad[i]; q.push(R); }\n\t}\n\tfor(i=1; i !== pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = dad[i];\n\t\tif(j === 0) FP[i] = FP[0] + \"/\" + FP[i];\n\t\telse while(j !== 0) {\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t\tj = dad[j];\n\t\t}\n\t\tdad[i] = 0;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t\tFPD[FP[i]] = FI[i];\n\t}\n}", "function build_full_paths(FI, FPD, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = [], q = [];\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1) { dad[L] = dad[i]; q.push(L); }\n\t\tif(R !== -1) { dad[R] = dad[i]; q.push(R); }\n\t}\n\tfor(i=1; i !== pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = dad[i];\n\t\tif(j === 0) FP[i] = FP[0] + \"/\" + FP[i];\n\t\telse while(j !== 0) {\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t\tj = dad[j];\n\t\t}\n\t\tdad[i] = 0;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t\tFPD[FP[i]] = FI[i];\n\t}\n}", "function build_full_paths(FI, FPD, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = new Array(pl), q = new Array(pl);\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1) { dad[L] = dad[i]; q.push(L); }\n\t\tif(R !== -1) { dad[R] = dad[i]; q.push(R); }\n\t}\n\tfor(i=1; i !== pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = dad[i];\n\t\tif(j === 0) FP[i] = FP[0] + \"/\" + FP[i];\n\t\telse while(j !== 0) {\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t\tj = dad[j];\n\t\t}\n\t\tdad[i] = 0;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t\tFPD[FP[i]] = FI[i];\n\t}\n}", "function build_full_paths(FI, FPD, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = new Array(pl), q = new Array(pl);\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1) { dad[L] = dad[i]; q.push(L); }\n\t\tif(R !== -1) { dad[R] = dad[i]; q.push(R); }\n\t}\n\tfor(i=1; i !== pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = dad[i];\n\t\tif(j === 0) FP[i] = FP[0] + \"/\" + FP[i];\n\t\telse while(j !== 0) {\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t\tj = dad[j];\n\t\t}\n\t\tdad[i] = 0;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t\tFPD[FP[i]] = FI[i];\n\t}\n}", "function build_full_paths(FI, FPD, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = new Array(pl), q = new Array(pl);\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1) { dad[L] = dad[i]; q.push(L); }\n\t\tif(R !== -1) { dad[R] = dad[i]; q.push(R); }\n\t}\n\tfor(i=1; i !== pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = dad[i];\n\t\tif(j === 0) FP[i] = FP[0] + \"/\" + FP[i];\n\t\telse while(j !== 0) {\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t\tj = dad[j];\n\t\t}\n\t\tdad[i] = 0;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t\tFPD[FP[i]] = FI[i];\n\t}\n}", "function build_full_paths(FI, FPD, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = new Array(pl), q = new Array(pl);\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1) { dad[L] = dad[i]; q.push(L); }\n\t\tif(R !== -1) { dad[R] = dad[i]; q.push(R); }\n\t}\n\tfor(i=1; i !== pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = dad[i];\n\t\tif(j === 0) FP[i] = FP[0] + \"/\" + FP[i];\n\t\telse while(j !== 0) {\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t\tj = dad[j];\n\t\t}\n\t\tdad[i] = 0;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t\tFPD[FP[i]] = FI[i];\n\t}\n}", "set transformPaths(value) {}", "genAllPaths() {\n const startTime = moment.now()\n let iterations = 0\n \n const edges = this.get('edges')\n const root = this.get('root')\n const startNode = root.source\n const endNode = root.target\n\n let open = []\n let paths = []\n let pathObjects = []\n let curr = [startNode] //Not sure if needed\n\n while(curr != null){\n for(let j = 0; j < edges.length; j++){\n if(edges[j].source == curr[curr.length-1] && edges[j].target != startNode && !curr.includes(edges[j].target)){\n let newPath = curr.concat(edges[j].target)\n if(edges[j].target == endNode && edges[j].target != startNode && paths.toString().indexOf(curr.toString()) < 0){\n paths[paths.length] = newPath.copy()\n pathObjects.push({path: newPath.copy(), degredationVariance: Math.abs(this.calcDegredation(newPath) - root.data)})\n }else{\n open[open.length] = newPath.copy()\n }\n }else if(edges[j].target == curr[curr.length-1] && edges[j].source != startNode && !curr.includes(edges[j].source)){\n let newPath = curr.concat(edges[j].source)\n if(edges[j].source == endNode && paths.toString().indexOf(curr.toString()) < 0){\n paths[paths.length] = newPath.copy()\n pathObjects.push({path: newPath.copy(), degredationVariance: Math.abs(this.calcDegredation(newPath) - root.data)})\n }else{\n open[open.length] = newPath.copy()\n }\n }\n iterations++\n }\n if(open.length > 0){\n curr = open.pop()\n }else{\n curr = null\n }\n }\n\n this.setStats({'time': (moment.now() - startTime) /1000, 'iterations': iterations})\n this.set('allPaths', pathObjects.sort(function(a, b) { return a.degredationVariance - b.degredationVariance}))\n }", "computeDrawPathBuffers() {\n const buffer = this._pathBuffer;\n let preview,current,next;\n const cList = $objs.cases_s;\n for (let i=0, l=buffer.length; i<l; i++) {\n const preview = buffer[i-1];\n const current = buffer[i ];\n const next = buffer[i+1];\n const preview_id = preview && cList.indexOf(preview);\n const current_id = current && cList.indexOf(current);\n const next_id = next && cList.indexOf(next);\n //TODO: FIXME: compute distance via global position for Math.hypot\n if(preview){\n current.pathConnexion[String(preview_id)] = Math.hypot(preview.x-current.x, preview.y-current.y);\n };\n if(next){\n current.pathConnexion[String(next_id)] = Math.hypot(next.x-current.x, next.y-current.y);\n };\n };\n console.log0('PathsBuffers: ', buffer);\n this._pathBuffer = [];\n this.refreshPath();\n }", "function drawAllPaths() {\n var\n //strokeStyle = '#000',\n startCursor = { x: 0, y: 0 },\n lastCursor = { x: 0, y: 0 },\n cursor = { x: 0, y: 0 },\n path,\n i;\n\n for ( i = 0; i < paths.length; i++) {\n path = paths[ i ];\n\n if ( path.attrs.hasOwnProperty( 'd' ) && path.attrs.d ) {\n path.style.pathIdx = i;\n\n // used for debugging style parser\n //path.style.pathId = path.attrs.hasOwnProperty( 'id' ) ? path.attrs.id : 'noid';\n\n processTokens( splitTokens ( path.attrs.d ), path.style );\n //ctx.stroke();\n }\n }\n\n // Tidy whitespace in path.d attribute\n\n function splitTokens( pathStr ) {\n var\n specialChars = [ 'm', 'M', 'z', 'Z', 'h', 'H', 'v', 'V', 'l', 'L' ],\n tokens,\n j;\n\n // replace tabs and newlines with spaces\n pathStr = pathStr.replace( new RegExp( \"\\t\", 'g' ), ' ' ); // eslint-disable-line no-control-regex\n pathStr = pathStr.replace( new RegExp( \"\\n\", 'g' ), ' ' ); // eslint-disable-line no-control-regex\n pathStr = pathStr.replace( new RegExp( \"\\r\", 'g' ), ' ' ); // eslint-disable-line no-control-regex\n\n for ( j = 0; j < specialChars.length; j++ ) {\n // add space before special chars\n pathStr = pathStr.replace( new RegExp( specialChars[j], 'g' ), specialChars[j] + ' ' );\n // remove double space after special chars\n pathStr = pathStr.replace( new RegExp( specialChars[j] + ' ', 'g' ), specialChars[j] + ' ' );\n pathStr = pathStr.replace( new RegExp( specialChars[j] + ' ', 'g' ), specialChars[j] + ' ' );\n }\n\n tokens = pathStr.split( ' ' );\n\n tokens = tokens.filter( function tokenNotEmpty( token ) {\n return ( '' !== token );\n } );\n\n return tokens;\n }\n\n // Follow sequence of drawing operations defined in path.d attribute\n // see: https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths\n\n function processTokens( tokens, style ) {\n var\n drawOps = [],\n pathOpts = getPathOptions( style || {} ),\n absMode = true,\n currToken, nextToken,\n cnvSpace,\n temp,\n j;\n\n for ( j = 0; j < tokens.length; j++ ) {\n\n // get the current and next token, if any\n currToken = tokens[ j ];\n nextToken = ( j < ( tokens.length - 1 ) ) ? tokens[ j + 1 ] : '';\n\n // store cursor start position (of next line segment)\n lastCursor.x = cursor.x;\n lastCursor.y = cursor.y;\n\n switch( currToken ) {\n case 'm':\n absMode = false;\n temp = strToPoint( nextToken );\n\n cursor.x = 0;\n cursor.y = 0;\n\n cursor.x = cursor.x + temp.x;\n cursor.y = cursor.y + temp.y;\n startCursor.x = cursor.x;\n startCursor.y = cursor.y;\n\n cnvSpace = applyTransforms( cursor, path.transformSet, true );\n drawOps.push( { 'op': 'moveTo', 'x': cnvSpace.x, 'y': cnvSpace.y } );\n\n j = j + 1; // has one argument\n break;\n\n case 'M':\n absMode = true;\n cursor = strToPoint( nextToken );\n startCursor.x = cursor.x;\n startCursor.y = cursor.y;\n\n cnvSpace = applyTransforms( cursor, path.transformSet, true );\n drawOps.push( { 'op': 'moveTo', 'x': cnvSpace.x, 'y': cnvSpace.y } );\n\n j = j + 1; // has one argument\n break;\n\n case 'v':\n absMode = false;\n // vertical line on canvas, convert absolute to relative offset\n temp = parseFloat( nextToken ); // dY\n cursor.y = cursor.y + temp;\n\n cnvSpace = applyTransforms( cursor, path.transformSet, true );\n drawOps.push( { 'op': 'lineTo', 'x': cnvSpace.x, 'y': cnvSpace.y } );\n\n j = j + 1; // has one argument\n break;\n\n case 'V':\n absMode = true;\n // vertical line on canvas to absolute Y position\n temp = parseFloat( nextToken ); // abs Y\n\n cursor.y = temp;\n\n cnvSpace = applyTransforms( cursor, path.transformSet, true );\n drawOps.push( { 'op': 'lineTo', 'x': cnvSpace.x, 'y': cnvSpace.y } );\n\n j = j + 1; // has one argument\n break;\n\n case 'h':\n absMode = false;\n // horizontal draw on canvas to relative X position\n temp = parseFloat( nextToken ); // dX\n cursor.x = cursor.x + temp;\n\n cnvSpace = applyTransforms( cursor, path.transformSet, true );\n drawOps.push( { 'op': 'lineTo', 'x': cnvSpace.x, 'y': cnvSpace.y } );\n\n j = j + 1; // has one argument\n break;\n\n case 'H':\n absMode = true;\n // horizontal draw on canvas to absolute X position\n temp = parseFloat( nextToken ); // abs X\n cursor.x = temp;\n\n cnvSpace = applyTransforms( cursor, path.transformSet, true );\n drawOps.push( { 'op': 'lineTo', 'x': cnvSpace.x, 'y': cnvSpace.y } );\n\n j = j + 1; // has one argument\n break;\n\n case 'l':\n absMode = false;\n // lineTo on canvas to relative X,Y position\n temp = strToPoint( nextToken ); // dX,dY\n cursor.x = cursor.x + temp.x;\n cursor.y = cursor.y + temp.y;\n\n cnvSpace = applyTransforms( cursor, path.transformSet, true );\n\n //objPage.lineTo( cnvSpace.x, ( objPage.height() - cnvSpace.y ) );\n //objPage.moveTo( cnvSpace.x, ( objPage.height() - cnvSpace.y ) );\n\n drawOps.push( { 'op': 'lineTo', 'x': cnvSpace.x, 'y': cnvSpace.y } );\n\n j = j + 1; // has one argument\n break;\n\n case 'L':\n absMode = true;\n // lineTo on canvas to absolute X,Y position\n temp = strToPoint( nextToken ); // abs X,Y\n cursor.x = temp.x;\n cursor.y = temp.y;\n cnvSpace = applyTransforms( cursor, path.transformSet, true );\n //objPage.lineTo(cnvSpace.x, (objPage.height() - cnvSpace.y));\n //objPage.moveTo(cnvSpace.x, (objPage.height() - cnvSpace.y));\n\n drawOps.push( { 'op': 'lineTo', 'x': cnvSpace.x, 'y': cnvSpace.y } );\n\n absMode = true;\n j = j + 1; // has one argument\n break;\n\n case 'z':\n case 'Z':\n // close the path\n cnvSpace = applyTransforms( startCursor, path.transformSet, true );\n drawOps.push( { 'op': 'lineTo', 'x': cnvSpace.x, 'y': cnvSpace.y } );\n\n // draw the path\n if ( drawOps.length > 0 ) { traceOnCanvas( pathOpts, drawOps ); }\n drawOps = [];\n break;\n\n default:\n if ( -1 !== currToken.indexOf( ',' ) ) {\n\n // assume continuation of l or L, implicit next point on line\n temp = strToPoint( currToken );\n\n if ( absMode ) {\n cursor.x = temp.x; // follows L or M\n cursor.y = temp.y;\n } else {\n cursor.x = cursor.x + temp.x; // follows l or m\n cursor.y = cursor.y + temp.y;\n }\n\n cnvSpace = applyTransforms( cursor, path.transformSet, true );\n //ctx.lineTo( cnvSpace.x, cnvSpace.y );\n //objPage.lineTo(cnvSpace.x, (objPage.height() - cnvSpace.y));\n //objPage.moveTo(cnvSpace.x, (objPage.height() - cnvSpace.y));\n\n drawOps.push( { 'op': 'lineTo', 'x': cnvSpace.x, 'y': cnvSpace.y } );\n\n } else {\n Y.log( 'Unhandled SVG path token: ' + currToken + ' in ' + JSON.stringify( tokens ), 'warn', NAME );\n }\n\n break;\n\n }\n }\n\n // finalize any outstanding path (may be missing terminator)\n if ( drawOps.length > 0 ) { traceOnCanvas( pathOpts, drawOps ); }\n }\n\n function traceOnCanvas( pathOpts, drawOps ) {\n // SVG clipping path, nothing to draw\n if ( false === pathOpts.useFill && false === pathOpts.useStroke ) { return false; }\n let i;\n\n hpdf.page_SetLineWidth( pageHandle, pathOpts.strokeWidth );\n hpdf.page_SetRGBStroke( pageHandle, pathOpts.strokeColor[0], pathOpts.strokeColor[1], pathOpts.strokeColor[2] );\n hpdf.page_SetRGBFill( pageHandle, pathOpts.fillColor[0], pathOpts.fillColor[1], pathOpts.fillColor[2] );\n\n for ( i = 0; i < drawOps.length; i++ ) {\n switch( drawOps[i].op ) {\n case 'moveTo': hpdf.page_MoveTo( pageHandle, drawOps[i].x, drawOps[i].y ); break;\n case 'lineTo': hpdf.page_LineTo( pageHandle, drawOps[i].x, drawOps[i].y ); break;\n }\n }\n\n if ( pathOpts.useFill && pathOpts.useStroke ) {\n hpdf.page_FillStroke( pageHandle );\n return;\n }\n if ( pathOpts.useFill ) {\n hpdf.page_Fill( pageHandle );\n return;\n }\n if ( pathOpts.useStroke ) {\n hpdf.page_Stroke( pageHandle );\n }\n }\n\n }", "function build_full_paths(FI, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = [], q = [];\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1) { dad[L] = dad[i]; q.push(L); }\n\t\tif(R !== -1) { dad[R] = dad[i]; q.push(R); }\n\t}\n\tfor(i=1; i !== pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = dad[i];\n\t\tif(j === 0) FP[i] = FP[0] + \"/\" + FP[i];\n\t\telse while(j !== 0 && j !== dad[j]) {\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t\tj = dad[j];\n\t\t}\n\t\tdad[i] = 0;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t}\n}", "function build_full_paths(FI, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = [], q = [];\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1) { dad[L] = dad[i]; q.push(L); }\n\t\tif(R !== -1) { dad[R] = dad[i]; q.push(R); }\n\t}\n\tfor(i=1; i !== pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = dad[i];\n\t\tif(j === 0) FP[i] = FP[0] + \"/\" + FP[i];\n\t\telse while(j !== 0 && j !== dad[j]) {\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t\tj = dad[j];\n\t\t}\n\t\tdad[i] = 0;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t}\n}", "function build_full_paths(FI, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = [], q = [];\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1) { dad[L] = dad[i]; if(q.lastIndexOf(L) < j) q.push(L); }\n\t\tif(R !== -1) { dad[R] = dad[i]; if(q.lastIndexOf(R) < j) q.push(R); }\n\t}\n\tfor(i=1; i < pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = dad[i];\n\t\tif(j === 0) FP[i] = FP[0] + \"/\" + FP[i];\n\t\telse while(j !== 0 && j !== dad[j]) {\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t\tj = dad[j];\n\t\t}\n\t\tdad[i] = 0;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t}\n}", "function build_full_paths(FI, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = [], q = [];\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1 && i != dad[i]) { dad[L] = dad[i]; if(q.lastIndexOf(L) < j) q.push(L); }\n\t\tif(R !== -1 && i != dad[i]) { dad[R] = dad[i]; if(q.lastIndexOf(R) < j) q.push(R); }\n\t}\n\tfor(i=1; i < pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = i;\n\t\tif(j != dad[j]) do {\n\t\t\tj = dad[j];\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t} while (j !== 0 && -1 !== dad[j] && j != dad[j]);\n\t\tdad[i] = -1;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t}\n}", "function build_full_paths(FI, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = [], q = [];\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1 && i != dad[i]) { dad[L] = dad[i]; if(q.lastIndexOf(L) < j) q.push(L); }\n\t\tif(R !== -1 && i != dad[i]) { dad[R] = dad[i]; if(q.lastIndexOf(R) < j) q.push(R); }\n\t}\n\tfor(i=1; i < pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = i;\n\t\tif(j != dad[j]) do {\n\t\t\tj = dad[j];\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t} while (j !== 0 && -1 !== dad[j] && j != dad[j]);\n\t\tdad[i] = -1;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t}\n}", "function build_full_paths(FI, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = [], q = [];\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1 && i != dad[i]) { dad[L] = dad[i]; if(q.lastIndexOf(L) < j) q.push(L); }\n\t\tif(R !== -1 && i != dad[i]) { dad[R] = dad[i]; if(q.lastIndexOf(R) < j) q.push(R); }\n\t}\n\tfor(i=1; i < pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = i;\n\t\tif(j != dad[j]) do {\n\t\t\tj = dad[j];\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t} while (j !== 0 && -1 !== dad[j] && j != dad[j]);\n\t\tdad[i] = -1;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t}\n}", "function build_full_paths(FI, FP, Paths) {\n\tvar i = 0, L = 0, R = 0, C = 0, j = 0, pl = Paths.length;\n\tvar dad = [], q = [];\n\n\tfor(; i < pl; ++i) { dad[i]=q[i]=i; FP[i]=Paths[i]; }\n\n\tfor(; j < q.length; ++j) {\n\t\ti = q[j];\n\t\tL = FI[i].L; R = FI[i].R; C = FI[i].C;\n\t\tif(dad[i] === i) {\n\t\t\tif(L !== -1 /*NOSTREAM*/ && dad[L] !== L) dad[i] = dad[L];\n\t\t\tif(R !== -1 && dad[R] !== R) dad[i] = dad[R];\n\t\t}\n\t\tif(C !== -1 /*NOSTREAM*/) dad[C] = i;\n\t\tif(L !== -1 && i != dad[i]) { dad[L] = dad[i]; if(q.lastIndexOf(L) < j) q.push(L); }\n\t\tif(R !== -1 && i != dad[i]) { dad[R] = dad[i]; if(q.lastIndexOf(R) < j) q.push(R); }\n\t}\n\tfor(i=1; i < pl; ++i) if(dad[i] === i) {\n\t\tif(R !== -1 /*NOSTREAM*/ && dad[R] !== R) dad[i] = dad[R];\n\t\telse if(L !== -1 && dad[L] !== L) dad[i] = dad[L];\n\t}\n\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type === 0 /* unknown */) continue;\n\t\tj = i;\n\t\tif(j != dad[j]) do {\n\t\t\tj = dad[j];\n\t\t\tFP[i] = FP[j] + \"/\" + FP[i];\n\t\t} while (j !== 0 && -1 !== dad[j] && j != dad[j]);\n\t\tdad[i] = -1;\n\t}\n\n\tFP[0] += \"/\";\n\tfor(i=1; i < pl; ++i) {\n\t\tif(FI[i].type !== 2 /* stream */) FP[i] += \"/\";\n\t}\n}", "function condensePath(pathArr) {\n let yGroup = [];\n //Dividing path into rows\n for (let i = 0; i < pathHeight; i++) {\n let pathSect = pathArr.filter(path => path.y === i);\n yGroup.push(pathSect);\n }\n let xGroup = [];\n //Dividing path into cols\n yGroup.forEach((group, yValue) => {\n let seperateX = group.map(g => g.x);\n seperateX = removeDuplicates(seperateX);\n seperateX = seperateX.sort((a, b) => a - b); //Sort to ascending order\n\n let splitX = splitArrayMissingVal(seperateX);\n splitX.forEach(split => {\n let newCord = { x: split[0], length: split.length, y: yValue };\n xGroup.push(newCord);\n });\n\n });\n\n return xGroup;\n }", "function pathExtend(paths, width) {\n\t var width = width || 40;\n\t var harfWidth = width / 2;\n\t var quarterWidth = harfWidth / 2;\n\n\t /**\n\t * judeg the new segment is cross the old line\n\t **/\n\t var newPoint = [];\n\t for (var i = 0; i < paths.length; i++) {\n\t if (i >= 3) {\n\t // judeg cross\n\t var headSegment = [paths[i - 1], paths[i]];\n\t for (var j = 1; j <= i - 2; j++) {\n\t var oldSegment = [paths[j - 1], paths[j]];\n\t var iC = isCross(headSegment, oldSegment, true);\n\t if (iC) {\n\t var point = [iC.x, iC.y];\n\t newPoint[i] = newPoint[i] || [];\n\t newPoint[i].push(point);\n\t newPoint[j] = newPoint[j] || [];\n\t newPoint[j].push(point);\n\t }\n\t }\n\t }\n\t }\n\n\t /**\n\t * insert the point to the path\n\t */\n\t for (var i = newPoint.length - 1; i >= 0; i--) {\n\t if (newPoint[i] && newPoint[i].length >= 2) {\n\t var newOrder = sortPoint(paths[i - 1], newPoint[i]);\n\t newPoint[i] = newOrder;\n\t }\n\n\t if (newPoint[i]) {\n\t for (var j in newPoint[i]) {\n\t paths.splice(i, 0, newPoint[i][j]);\n\t }\n\t }\n\t }\n\n\t // get all the cross point\n\t var crossPoint = {};\n\t for (var i = 0; i < paths.length; i++) {\n\t var x = paths[i][0];\n\t var y = paths[i][1];\n\t var key = x + '|' + y;\n\n\t crossPoint[key] = crossPoint[key] || [];\n\t if (paths[i - 1]) {\n\t crossPoint[key].push([paths[i - 1][0], paths[i - 1][1]]);\n\t };\n\t if (paths[i + 1]) {\n\t paths[i + 1] && crossPoint[key].push([paths[i + 1][0], paths[i + 1][1]]);\n\t }\n\t }\n\n\t var cross = {};\n\t // if the road is X way (two ways cross and the cross point is not on the end of each way)\n\t for (var i in crossPoint) {\n\t if (crossPoint[i].length !== 4) {\n\t continue;\n\t }\n\n\t cross[i] = cross[i] || [];\n\n\t var startPoint = crossPoint[i][0];\n\t var thisPoint = [Number(i.split('|')[0]), Number(i.split('|')[1])];\n\t var nextPoint = crossPoint[i][2];\n\t var vectorys = getVectorByThreePoint(startPoint, thisPoint, nextPoint, width);\n\t cross[i].push([thisPoint[0] + vectorys.toBisector[0], thisPoint[1] + vectorys.toBisector[1]]);\n\t cross[i].push([thisPoint[0] - vectorys.toBisector[0], thisPoint[1] - vectorys.toBisector[1]]);\n\n\t var startPoint = crossPoint[i][0];\n\t var thisPoint = [Number(i.split('|')[0]), Number(i.split('|')[1])];\n\t var nextPoint = crossPoint[i][3];\n\t var vectorys = getVectorByThreePoint(startPoint, thisPoint, nextPoint, width);\n\t cross[i].push([thisPoint[0] + vectorys.toBisector[0], thisPoint[1] + vectorys.toBisector[1]]);\n\t cross[i].push([thisPoint[0] - vectorys.toBisector[0], thisPoint[1] - vectorys.toBisector[1]]);\n\t }\n\n\t // deal with every cross (X,T,L);\n\t var isLoop = paths[0][0] == paths[paths.length - 1][0] && paths[0][1] == paths[paths.length - 1][1];\n\t for (var i = 0; i < paths.length; i++) {\n\t if (isLoop && paths.length - 1 == i) {\n\t continue;\n\t }\n\t // break\n\t var startPoint = paths[i - 1] ? paths[i - 1] : isLoop ? paths[paths.length - 2] : paths[i];\n\t var thisPoint = paths[i];\n\t var nextPoint = paths[i + 1] ? paths[i + 1] : isLoop ? paths[1] : paths[i];\n\n\t var key = paths[i][0] + '|' + paths[i][1];\n\t if (crossPoint[key].length == 4) {\n\t continue;\n\t }\n\t cross[key] = cross[key] || [];\n\n\t var vectorys = getVectorByThreePoint(startPoint, thisPoint, nextPoint, width);\n\n\t cross[key].push([thisPoint[0] + vectorys.toBisector[0], thisPoint[1] + vectorys.toBisector[1]]);\n\t cross[key].push([thisPoint[0] - vectorys.toBisector[0], thisPoint[1] - vectorys.toBisector[1]]);\n\t }\n\n\t // get the outline path\n\t var outlines = [];\n\t for (var i = 0; i < paths.length - 1; i++) {\n\t /*\n\t v3 ------- v2\n\t v4 | | v1\n\t | |\n\t v5 ------- v6\n\t */\n\t var v1, v2, v3, v4, v5, v6;\n\n\t var key = paths[i][0] + '|' + paths[i][1];\n\t var keyNext = paths[i + 1][0] + '|' + paths[i + 1][1];\n\t v1 = paths[i];\n\t v4 = paths[i + 1];\n\t if (cross[key].length == 4) {\n\t var v1PointssortByV4 = sortPoint(v4, [cross[key][0], cross[key][1], cross[key][2], cross[key][3]]);\n\t v2 = v1PointssortByV4[2];\n\t v6 = v1PointssortByV4[3];\n\t } else {\n\t v2 = cross[key][0];\n\t v6 = cross[key][1];\n\t }\n\n\t if (cross[keyNext].length == 4) {\n\t var v4PointssortByV1 = sortPoint(v1, [cross[keyNext][0], cross[keyNext][1], cross[keyNext][2], cross[keyNext][3]]);\n\t v3 = v4PointssortByV1[2];\n\t v5 = v4PointssortByV1[3];\n\t } else {\n\t v3 = cross[keyNext][0];\n\t v5 = cross[keyNext][1];\n\t }\n\n\t if (isCross([v3, v2], [v5, v6])) {\n\t var temp = v5;\n\t v5 = v3;\n\t v3 = temp;\n\t }\n\n\t var _outlines = [];\n\t _outlines.push(v1, v2, v3, v4, v5, v6);\n\t _outlines = _outlines.map(function (item) {\n\t return item.map(function (si) {\n\t return si.toFixed(2);\n\t });\n\t });\n\t outlines.push(_outlines);\n\t }\n\t return outlines;\n\t}", "transform(path, operation) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n return Object(__WEBPACK_IMPORTED_MODULE_1_immer__[\"d\" /* produce */])(path, p => {\n var {\n affinity = 'forward'\n } = options; // PERF: Exit early if the operation is guaranteed not to have an effect.\n\n if (path.length === 0) {\n return;\n }\n\n switch (operation.type) {\n case 'insert_node':\n {\n var {\n path: op\n } = operation;\n\n if (Path.equals(op, p) || Path.endsBefore(op, p) || Path.isAncestor(op, p)) {\n p[op.length - 1] += 1;\n }\n\n break;\n }\n\n case 'remove_node':\n {\n var {\n path: _op\n } = operation;\n\n if (Path.equals(_op, p) || Path.isAncestor(_op, p)) {\n return null;\n } else if (Path.endsBefore(_op, p)) {\n p[_op.length - 1] -= 1;\n }\n\n break;\n }\n\n case 'merge_node':\n {\n var {\n path: _op2,\n position\n } = operation;\n\n if (Path.equals(_op2, p) || Path.endsBefore(_op2, p)) {\n p[_op2.length - 1] -= 1;\n } else if (Path.isAncestor(_op2, p)) {\n p[_op2.length - 1] -= 1;\n p[_op2.length] += position;\n }\n\n break;\n }\n\n case 'split_node':\n {\n var {\n path: _op3,\n position: _position\n } = operation;\n\n if (Path.equals(_op3, p)) {\n if (affinity === 'forward') {\n p[p.length - 1] += 1;\n } else if (affinity === 'backward') ; else {\n return null;\n }\n } else if (Path.endsBefore(_op3, p)) {\n p[_op3.length - 1] += 1;\n } else if (Path.isAncestor(_op3, p) && path[_op3.length] >= _position) {\n p[_op3.length - 1] += 1;\n p[_op3.length] -= _position;\n }\n\n break;\n }\n\n case 'move_node':\n {\n var {\n path: _op4,\n newPath: onp\n } = operation; // If the old and new path are the same, it's a no-op.\n\n if (Path.equals(_op4, onp)) {\n return;\n }\n\n if (Path.isAncestor(_op4, p) || Path.equals(_op4, p)) {\n var copy = onp.slice();\n\n if (Path.endsBefore(_op4, onp) && _op4.length < onp.length) {\n copy[_op4.length - 1] -= 1;\n }\n\n return copy.concat(p.slice(_op4.length));\n } else if (Path.isSibling(_op4, onp) && (Path.isAncestor(onp, p) || Path.equals(onp, p))) {\n if (Path.endsBefore(_op4, p)) {\n p[_op4.length - 1] -= 1;\n } else {\n p[_op4.length - 1] += 1;\n }\n } else if (Path.endsBefore(onp, p) || Path.equals(onp, p) || Path.isAncestor(onp, p)) {\n if (Path.endsBefore(_op4, p)) {\n p[_op4.length - 1] -= 1;\n }\n\n p[onp.length - 1] += 1;\n } else if (Path.endsBefore(_op4, p)) {\n if (Path.equals(onp, p)) {\n p[onp.length - 1] += 1;\n }\n\n p[_op4.length - 1] -= 1;\n }\n\n break;\n }\n }\n });\n }", "function augmentingPaths (graph, start, end) {\n \n// Keep track of vertices with that have been visited with \"processedList\" to avoid cycles\n// If a cycle existed and \"end\" could not be found the code would execute forever\n// Also, using \"processedList\" may be faster in graphs with a large edges/vertices ratio\nprocessedList = [];\nprocessedList.push(start)\n \n// \"Queue\" keeps track of the growth of the paths as the breadth first search proceeds\nqueue = [];\nqueue.push([start]);\n \nwhile (queue.length > 0) {\n path = [];\n path = queue[0];\n queue.splice(0, 1);\n\n vert = path[path.length - 1];\n \n \n if (vert == end) {\n return path;\n }\n\n adjacentVerts = [];\n\n for (var j = 0; j < graph.length; j++) {\n if (graph[vert][j] != 0) {\n adjacentVerts.push(j);\n }\n }\n\n for (var i = 0; i < adjacentVerts.length; i++) {\n\n currVert = adjacentVerts[i];\n\n if (!(processedList.includes(currVert))) {\n processedList.push(currVert);\n newPath = path.slice();\n newPath.push(currVert);\n queue.push(newPath);\n }\n }\n}\nreturn (\"Failure\")\n}", "function drawPath() {\n //path 1\n ctx.beginPath();\n ctx.rect(0, 80, 650, 50);\n ctx.fillStyle = \"gray\";\n ctx.fill();\n ctx.closePath();\n\n ctx.beginPath();\n ctx.rect(0, 77, 700, 3);\n ctx.fillStyle = \"black\";\n ctx.fill();\n ctx.closePath();\n\n ctx.beginPath();\n ctx.rect(0, 130, 650, 3);\n ctx.fillStyle = \"black\";\n ctx.fill();\n ctx.closePath();\n\n //path 2\n ctx.beginPath();\n ctx.rect(650, 80, 50, 120);\n ctx.fillStyle = \"gray\";\n ctx.fill();\n ctx.closePath();\n\n ctx.beginPath();\n ctx.rect(647, 130, 3, 70);\n ctx.fillStyle = \"black\";\n ctx.fill();\n ctx.closePath();\n\n ctx.beginPath();\n ctx.rect(700, 77, 3, 174);\n ctx.fillStyle = \"black\";\n ctx.fill();\n ctx.closePath();\n //path 3\n ctx.beginPath();\n ctx.rect(100, 200, 600, 50);\n ctx.fillStyle = \"gray\";\n ctx.fill();\n ctx.closePath();\n\n ctx.beginPath();\n ctx.rect(100, 197, 550, 3);\n ctx.fillStyle = \"black\";\n ctx.fill();\n ctx.closePath();\n\n ctx.beginPath();\n ctx.rect(150, 250, 553, 3);\n ctx.fillStyle = \"black\";\n ctx.fill();\n ctx.closePath();\n\n //path 4\n ctx.beginPath();\n ctx.rect(100, 200, 50, 200);\n ctx.fillStyle = \"gray\";\n ctx.fill();\n ctx.closePath();\n\n ctx.beginPath();\n ctx.rect(97, 197, 3, 255);\n ctx.fillStyle = \"black\";\n ctx.fill();\n ctx.closePath();\n\n ctx.beginPath();\n ctx.rect(150, 250, 3, 150);\n ctx.fillStyle = \"black\";\n ctx.fill();\n ctx.closePath();\n\n //path 5\n ctx.beginPath();\n ctx.rect(100, 400, 600, 50);\n ctx.fillStyle = \"gray\";\n ctx.fill();\n ctx.closePath();\n\n ctx.beginPath();\n ctx.rect(97, 450, 553, 3);\n ctx.fillStyle = \"black\";\n ctx.fill();\n ctx.closePath();\n\n ctx.beginPath();\n ctx.rect(150, 398, 550, 3);\n ctx.fillStyle = \"black\";\n ctx.fill();\n ctx.closePath();\n\n //path 6\n ctx.beginPath();\n ctx.rect(650, 450, 50, 160);\n ctx.fillStyle = \"gray\";\n ctx.fill();\n ctx.closePath();\n\n ctx.beginPath();\n ctx.rect(647, 450, 3, 160);\n ctx.fillStyle = \"black\";\n ctx.fill();\n ctx.closePath();\n\n ctx.beginPath();\n ctx.rect(700, 398, 3, 220);\n ctx.fillStyle = \"black\";\n ctx.fill();\n ctx.closePath();\n\n}", "function collapse(paths) {\n return paths.filter(p => !paths.some(fp => contains(fp, p) && fp !== p));\n}", "function applyPath(){\n\t\tvar cap = [];\n\t\tdelta = 0;\n\t\tGraph.instance.edges.forEach(function(key,edge){\n\t\t\tstate.edgePrevCost[edge.id] = edge.resources[1];\n\t\t});\n\t\tfor (var i =0; i<state.edgesOfSP.length; i++){\n\t\t\t\n\t\t\tcap[i] = state.edgesOfSP[i].resources[0]-state.edgesOfSP[i].state.flow;\n\t\t\t\n\t\t}\n var minCap = d3.min(cap);\n\t\t\n\t\tvar excessDemandMin = Math.min(Graph.instance.nodes.get(state.sourceId).b , -Graph.instance.nodes.get(state.targetId).b);\n\t\tdelta = Math.min(minCap, excessDemandMin);\n\t\t\n\t\n\t\tfor (var i = 0; i < state.edgesOfSP.length; i++){\n \n var edge = state.edgesOfSP[i];\n\n edge.state.flow += edge.start.state.predecessor[\"direction\"] * delta;\n\t\t\tminCost += delta * edge.edges[\"cost\"];\n }\n\t\tGraph.instance.nodes.forEach(function(key,node){\n\t\t\tbs[node.id] = node.b;\n\t\t\tif(node.id == state.sourceId){\n\t\t\t\tnode.b = node.b-delta;\n\t\t\t\tbOfS = node.b;\n\t\t\t}else if(node.id == state.targetId){\n\t\t\t\tnode.b = node.b + delta;\n\t\t\t\tbOfT = node.b;\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tnode.b = 0;\n\t\t\t}\n\t\t});\n\t\t\n\t\tGraph.instance.edges.forEach(function(key, edge) {\n\t\t\tedge.inSP = false;\n\t\t\tif(edge.state.flow == edge.resources[0]){\n\t\t\t\tedge.state.usedUp = true;\t\n\t\t\t}else{\n\t\t\t\tedge.state.usedUp = false;\t\n\n\t\t\t}\n });\n logger.log(\"Applied augmenting path with flow \"+state.augmentation);\n\t\tdel = 0;\n\t\tstate.distancesOfNodes = [];\n state.show_residual_graph = false;\n\t\tstate.shortestPath = [];\n state.current_step = STEP_MAINLOOP;\n\t\t\n\t}", "applyPlacement(placement) {\n var i, j, k;\n var clone = [];\n for (i = 0; i < parts.length; i++) {\n clone.push(parts[i].cloneNode(false));\n }\n\n var svglist = [];\n\n for (i = 0; i < placement.length; i++) {\n var newsvg = svg.cloneNode(false);\n newsvg.setAttribute('viewBox', '0 0 ' + binBounds.width + ' ' + binBounds.height);\n newsvg.setAttribute('width', binBounds.width + 'px');\n newsvg.setAttribute('height', binBounds.height + 'px');\n var binclone = bin.cloneNode(false);\n\n binclone.setAttribute('class', 'bin');\n binclone.setAttribute('transform', 'translate(' + (-binBounds.x) + ' ' + (-binBounds.y) + ')');\n newsvg.appendChild(binclone);\n\n for (j = 0; j < placement[i].length; j++) {\n var p = placement[i][j];\n var part = tree[p.id];\n\n // the original path could have transforms and stuff on it, so apply our transforms on a group\n var partgroup = document.createElementNS(svg.namespaceURI, 'g');\n partgroup.setAttribute('transform', 'translate(' + p.x + ' ' + p.y + ') rotate(' + p.rotation + ')');\n partgroup.appendChild(clone[part.source]);\n\n if (part.children && part.children.length > 0) {\n var flattened = _flattenTree(part.children, true);\n for (k = 0; k < flattened.length; k++) {\n\n var c = clone[flattened[k].source];\n // add class to indicate hole\n if (flattened[k].hole && (!c.getAttribute('class') || c.getAttribute('class').indexOf('hole') < 0)) {\n c.setAttribute('class', c.getAttribute('class') + ' hole');\n }\n partgroup.appendChild(c);\n }\n }\n\n newsvg.appendChild(partgroup);\n }\n\n svglist.push(newsvg);\n }\n\n // flatten the given tree into a list\n function _flattenTree(t, hole) {\n var flat = [];\n for (var i = 0; i < t.length; i++) {\n flat.push(t[i]);\n t[i].hole = hole;\n if (t[i].children && t[i].children.length > 0) {\n flat = flat.concat(_flattenTree(t[i].children, !hole));\n }\n }\n\n return flat;\n }\n\n return svglist;\n }", "combineMergeImage() {\n for (let i1 = this.daySuffix.length - 1; i1 >= 0; i1--) {\n console.log(\"Creating Merge Master:: \" + this.daySuffix[i1]);\n // Copy the data in reverse day order without replacement - \n //\n let mergePath = path.join(this.cwd, this.MERGE_DATA + this.daySuffix[i1]);\n var folderList = fs.readdirSync(mergePath);\n // Enumerate the user account folders in EdForge_MERGEMASTER.\n // \n for (let entry of folderList) {\n let mergeDst = path.join(this.cwd, this.MERGE_MASTER, entry);\n let mergeSrc = path.join(this.cwd, this.MERGE_DATA + this.daySuffix[i1], entry);\n var stat = fs.statSync(mergeSrc);\n if (stat.isDirectory()) {\n Utils_1.Utils.validatePath(mergeDst, null);\n this.combineUserFolder(mergeSrc, mergeDst, true);\n }\n else {\n // Do a non-destructive Copy \n // \n try {\n fs.copyFileSync(mergeSrc, mergeDst, constants_1.COPYFILE_EXCL);\n }\n catch (err) {\n // Ignore dupliciates\n }\n }\n }\n }\n }", "function joinPaths(paths, closed = false) {\n let joint = new Path().move(paths[0].ops[0].to);\n for (let p of paths) {\n for (let op of p.ops) {\n if (op.type === \"curve\") {\n joint.curve(op.cp1, op.cp2, op.to);\n } else if (op.type !== \"close\") {\n joint.line(op.to);\n } else {\n throw \"Cannot join a closed paths with another\";\n }\n }\n }\n if (closed) joint.close();\n\n return joint;\n}", "function findAndAdd2ProngsOnAllPaths(shape) {\n let for2ProngsArray = shape.for2ProngsArray;\n for (let k = 0; k < for2ProngsArray.length; k++) {\n let for2Prongs = for2ProngsArray[k];\n findAndAdd2Prongs(shape, k, for2Prongs);\n }\n}", "function processPathData(data) {\n let collection = [];\n let j;\n let arrayCollection = parsePathData(data);\n if (arrayCollection.length > 0) {\n for (let i = 0; i < arrayCollection.length; i++) {\n let ob = arrayCollection[i];\n let char = '';\n char = ob[0];\n switch (char.toLowerCase()) {\n case 'm':\n for (j = 1; j < ob.length; j++) {\n collection.push({ command: char, x: ob[j], y: ob[j + 1] });\n j = j + 1;\n if (char === 'm') {\n char = 'l';\n }\n else if (char === 'M') {\n char = 'L';\n }\n }\n break;\n case 'l':\n case 't':\n for (j = 1; j < ob.length; j++) {\n collection.push({ command: char, x: ob[j], y: ob[j + 1] });\n j = j + 1;\n }\n break;\n case 'h':\n for (j = 1; j < ob.length; j++) {\n collection.push({ command: char, x: ob[j] });\n }\n break;\n case 'v':\n for (j = 1; j < ob.length; j++) {\n collection.push({ command: char, y: ob[j] });\n }\n break;\n case 'z':\n collection.push({ command: char });\n break;\n case 'c':\n for (j = 1; j < ob.length; j++) {\n collection.push({\n command: char, x1: ob[j], y1: ob[j + 1], x2: ob[j + 2], y2: ob[j + 3], x: ob[j + 4], y: ob[j + 5]\n });\n j = j + 5;\n }\n break;\n case 's':\n for (j = 1; j < ob.length; j++) {\n collection.push({ command: char, x2: ob[j], y2: ob[j + 1], x: ob[j + 2], y: ob[j + 3] });\n j = j + 3;\n }\n break;\n case 'q':\n for (j = 1; j < ob.length; j++) {\n collection.push({ command: char, x1: ob[j], y1: ob[j + 1], x: ob[j + 2], y: ob[j + 3] });\n j = j + 3;\n }\n break;\n case 'a':\n for (j = 1; j < ob.length; j++) {\n collection.push({\n command: char, r1: ob[j], r2: ob[j + 1], angle: ob[j + 2], largeArc: ob[j + 3],\n sweep: ob[j + 4], x: ob[j + 5], y: ob[j + 6]\n });\n j = j + 6;\n }\n break;\n }\n }\n }\n return collection;\n}", "function printPathBi(p1, p2, k, src, dst) {\n\n /* FillArray returns the path from intersecting location 'k' upto source and hence will be in reverseorder. */\n let arr1 = fillArray(p1, k, src).reverse(); /* reversing explicitly to get the correct path. */\n\n /* Fill Array returns the path from intersection location 'k' upto destination and hence will be straight */\n let arr2 = fillArray(p2, k, dst); /* No need to reverse */\n\n /* \n * Add the intersecting in the first array because:-\n * arr1: contains the path from src to K [K is excluded].\n * arr2: contains the path from k to dst [K is excluded].\n * In order to get full path we need to do -> arr1 + K + arr2 [Full path from src to dst including intersection]\n */\n arr1.push(k); /* performing arr1 + K */\n\n /* Performing arr1 + K + arr2 [As stated above] */\n let arr = arr1.concat(arr2);\n\n /* \n * Loop for the array created after split and Do not forget to skip 0th and last 2 elements otherwise they will be coloured too\n * Hence, src and dest locations will be coloured and user will not be able to src and dest again so ignore these indices. \n */\n for (let i = 1; i < arr.length - 1; i++) {\n\n /* Now split the individual element of array with ':' [colon] to get row_number and col_number */\n let temp = arr[i].split(\":\");\n\n /* Convert row_number to number inorder to use it as row index of matrix */\n let nx = parseInt(temp[0]);\n\n /* Convert col_number to number inorder to use it as col index of matrix */\n let ny = parseInt(temp[1]);\n\n /* Update the matrix value to 9 to denote that the current rect is part of shortest path */\n matrix[nx][ny] = 9;\n\n /* Update the color of shortest path to show the User there exist an Shortest Path */\n document.getElementById(`${nx}:${ny}`).style.fill = \"rgb(0, 68, 137)\";\n }\n}", "function drawPath() {\n // draw the path\n for (var j = 0; j < AllPoints.length; j++) {\n var pathString = \"M\";\n for (var i = 0; i < AllPoints[j].length; i++) {\n var x =\n allCordsMap[\n \"h\" + AllPoints[j][i][0] + \"-v\" + AllPoints[j][i][1]\n ][AllPoints[j][i][2]];\n var y =\n allCordsMap[\n \"h\" + AllPoints[j][i][0] + \"-v\" + AllPoints[j][i][1]\n ][AllPoints[j][i][2]];\n pathString = pathString + x + \",\" + y;\n if (i !== AllPoints[j].length - 1) {\n pathString += \"L\";\n } else {\n Snap.select(LIGHT_PATHS[j])\n .path(pathString)\n .attr(\"stroke\", LIGHT_COLOR)\n .attr(\"stroke-width\", 1)\n .attr(\"fill\", \"none\");\n Snap.select(DARK_PATHS[j])\n .path(pathString)\n .attr(\"stroke\", DARKER_COLOR)\n .attr(\"stroke-width\", 1)\n .attr(\"fill\", \"none\");\n console.log(\"draw path\");\n }\n }\n }\n}", "function redrawPaths(){\n let cvx = document.getElementById('canvas');\n let ctx = cvx.getContext('2d');\n \n pathBuffer.forEach(data => {\n drawOnCanvas(ctx, data.canvas.width, data.canvas.height, data.paths[0].x1, data.paths[0].y1, data.paths[0].x2, data.paths[0].y2, data.color, data.thickness)\n });\n}", "graft(path = [], root) {\n if (path.length === 0) {\n return this;\n } else {\n return map(tree => tree.assign({\n meta: {\n path: [...path, ...tree.path],\n root\n }\n }), this);\n }\n }", "orderedPaths() {\n /**\n * Sort the list of faces by distance then map the entries, returning\n * only the path and not the added \"further point\" from earlier.\n */\n return this.paths.sort(function(pathA, pathB) {\n return pathB.depth() - pathA.depth();\n });\n }", "wipeAllPathData() {\n for (let i = 0; i < this.nodes.length; i++) {\n let node = this.nodes[i]\n node.setShortestPath(node)\n node.distance = Number.MAX_SAFE_INTEGER\n }\n\n }", "eliminateDuplicates () {\n let oldGroupPaths = this.groupPath.split(\"¬\");\n let reducedPathSet = [];\n // We've already sorted the paths\n for (let i = 0; i<oldGroupPaths.length; i++) {\n if (i == oldGroupPaths.length-1 || oldGroupPaths[i+1].indexOf(oldGroupPaths[i])!=0) {\n reducedPathSet.push(oldGroupPaths[i]);\n }\n }\n this.update(reducedPathSet);\n }", "function mergeEmptyPathMatches(nodes) {\n const result = []; // The set of nodes which contain children that were merged from two duplicate empty path nodes.\n\n const mergedNodes = new Set();\n\n for (const node of nodes) {\n if (!hasEmptyPathConfig(node)) {\n result.push(node);\n continue;\n }\n\n const duplicateEmptyPathNode = result.find(resultNode => node.value.routeConfig === resultNode.value.routeConfig);\n\n if (duplicateEmptyPathNode !== undefined) {\n duplicateEmptyPathNode.children.push(...node.children);\n mergedNodes.add(duplicateEmptyPathNode);\n } else {\n result.push(node);\n }\n } // For each node which has children from multiple sources, we need to recompute a new `TreeNode`\n // by also merging those children. This is necessary when there are multiple empty path configs in\n // a row. Put another way: whenever we combine children of two nodes, we need to also check if any\n // of those children can be combined into a single node as well.\n\n\n for (const mergedNode of mergedNodes) {\n const mergedChildren = mergeEmptyPathMatches(mergedNode.children);\n result.push(new TreeNode(mergedNode.value, mergedChildren));\n }\n\n return result.filter(n => !mergedNodes.has(n));\n}", "function setPath(body) {\n if (body.grid1 != null) {\n setPath1(path1 => [...path1, start]);\n \n for (let data of body.grid1){ \n let pos = {lat: data.lat, lng: data.long};\n // console.log(pos);\n setPath1(path1 => [...path1, pos]);\n // setGrid(grid => [...grid, pos]);\n \n } \n setPath1(path1 => [...path1, end]);\n setPath1Length(body.grid1Length);\n setPath1NetElev(body.grid1ElevNet);\n setPath1Shortest(body.grid1Shortest);\n }\n if (body.grid2 != null) { \n setPath2(path2 => [...path2, start]);\n for (let data of body.grid2){ \n let pos = {lat: data.lat, lng: data.long};\n setPath2(path2 => [...path2, pos]);\n }\n \n setPath2(path2 => [...path2, end]);\n setPath2Length(body.grid2Length);\n setPath2NetElev(body.grid2ElevNet);\n setPath2Shortest(body.grid2Shortest);\n }\n if (body.grid3 != null) { \n setPath3(path3=> [...path3, start]);\n for (let data of body.grid3){ \n let pos = {lat: data.lat, lng: data.long};\n setPath3(path3 => [...path3, pos]);\n }\n \n setPath3(path3 => [...path3, end]);\n\n }\n \n }", "function mergeEmptyPathMatches(nodes) {\n const result = [];\n // The set of nodes which contain children that were merged from two duplicate empty path nodes.\n const mergedNodes = new Set();\n for (const node of nodes) {\n if (!hasEmptyPathConfig(node)) {\n result.push(node);\n continue;\n }\n const duplicateEmptyPathNode = result.find(resultNode => node.value.routeConfig === resultNode.value.routeConfig);\n if (duplicateEmptyPathNode !== undefined) {\n duplicateEmptyPathNode.children.push(...node.children);\n mergedNodes.add(duplicateEmptyPathNode);\n }\n else {\n result.push(node);\n }\n }\n // For each node which has children from multiple sources, we need to recompute a new `TreeNode`\n // by also merging those children. This is necessary when there are multiple empty path configs in\n // a row. Put another way: whenever we combine children of two nodes, we need to also check if any\n // of those children can be combined into a single node as well.\n for (const mergedNode of mergedNodes) {\n const mergedChildren = mergeEmptyPathMatches(mergedNode.children);\n result.push(new TreeNode(mergedNode.value, mergedChildren));\n }\n return result.filter(n => !mergedNodes.has(n));\n}", "function mergeEmptyPathMatches(nodes) {\n const result = [];\n // The set of nodes which contain children that were merged from two duplicate empty path nodes.\n const mergedNodes = new Set();\n for (const node of nodes) {\n if (!hasEmptyPathConfig(node)) {\n result.push(node);\n continue;\n }\n const duplicateEmptyPathNode = result.find(resultNode => node.value.routeConfig === resultNode.value.routeConfig);\n if (duplicateEmptyPathNode !== undefined) {\n duplicateEmptyPathNode.children.push(...node.children);\n mergedNodes.add(duplicateEmptyPathNode);\n }\n else {\n result.push(node);\n }\n }\n // For each node which has children from multiple sources, we need to recompute a new `TreeNode`\n // by also merging those children. This is necessary when there are multiple empty path configs in\n // a row. Put another way: whenever we combine children of two nodes, we need to also check if any\n // of those children can be combined into a single node as well.\n for (const mergedNode of mergedNodes) {\n const mergedChildren = mergeEmptyPathMatches(mergedNode.children);\n result.push(new TreeNode(mergedNode.value, mergedChildren));\n }\n return result.filter(n => !mergedNodes.has(n));\n}", "function mergeEmptyPathMatches(nodes) {\n const result = [];\n // The set of nodes which contain children that were merged from two duplicate empty path nodes.\n const mergedNodes = new Set();\n for (const node of nodes) {\n if (!hasEmptyPathConfig(node)) {\n result.push(node);\n continue;\n }\n const duplicateEmptyPathNode = result.find(resultNode => node.value.routeConfig === resultNode.value.routeConfig);\n if (duplicateEmptyPathNode !== undefined) {\n duplicateEmptyPathNode.children.push(...node.children);\n mergedNodes.add(duplicateEmptyPathNode);\n }\n else {\n result.push(node);\n }\n }\n // For each node which has children from multiple sources, we need to recompute a new `TreeNode`\n // by also merging those children. This is necessary when there are multiple empty path configs in\n // a row. Put another way: whenever we combine children of two nodes, we need to also check if any\n // of those children can be combined into a single node as well.\n for (const mergedNode of mergedNodes) {\n const mergedChildren = mergeEmptyPathMatches(mergedNode.children);\n result.push(new TreeNode(mergedNode.value, mergedChildren));\n }\n return result.filter(n => !mergedNodes.has(n));\n}", "function mergeEmptyPathMatches(nodes) {\n const result = [];\n // The set of nodes which contain children that were merged from two duplicate empty path nodes.\n const mergedNodes = new Set();\n for (const node of nodes) {\n if (!hasEmptyPathConfig(node)) {\n result.push(node);\n continue;\n }\n const duplicateEmptyPathNode = result.find(resultNode => node.value.routeConfig === resultNode.value.routeConfig);\n if (duplicateEmptyPathNode !== undefined) {\n duplicateEmptyPathNode.children.push(...node.children);\n mergedNodes.add(duplicateEmptyPathNode);\n }\n else {\n result.push(node);\n }\n }\n // For each node which has children from multiple sources, we need to recompute a new `TreeNode`\n // by also merging those children. This is necessary when there are multiple empty path configs in\n // a row. Put another way: whenever we combine children of two nodes, we need to also check if any\n // of those children can be combined into a single node as well.\n for (const mergedNode of mergedNodes) {\n const mergedChildren = mergeEmptyPathMatches(mergedNode.children);\n result.push(new TreeNode(mergedNode.value, mergedChildren));\n }\n return result.filter(n => !mergedNodes.has(n));\n}", "transform(point, op) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n return Object(__WEBPACK_IMPORTED_MODULE_1_immer__[\"d\" /* produce */])(point, p => {\n var {\n affinity = 'forward'\n } = options;\n var {\n path,\n offset\n } = p;\n\n switch (op.type) {\n case 'insert_node':\n case 'move_node':\n {\n p.path = Path.transform(path, op, options);\n break;\n }\n\n case 'insert_text':\n {\n if (Path.equals(op.path, path) && op.offset <= offset) {\n p.offset += op.text.length;\n }\n\n break;\n }\n\n case 'merge_node':\n {\n if (Path.equals(op.path, path)) {\n p.offset += op.position;\n }\n\n p.path = Path.transform(path, op, options);\n break;\n }\n\n case 'remove_text':\n {\n if (Path.equals(op.path, path) && op.offset <= offset) {\n p.offset -= Math.min(offset - op.offset, op.text.length);\n }\n\n break;\n }\n\n case 'remove_node':\n {\n if (Path.equals(op.path, path) || Path.isAncestor(op.path, path)) {\n return null;\n }\n\n p.path = Path.transform(path, op, options);\n break;\n }\n\n case 'split_node':\n {\n if (Path.equals(op.path, path)) {\n if (op.position === offset && affinity == null) {\n return null;\n } else if (op.position < offset || op.position === offset && affinity === 'forward') {\n p.offset -= op.position;\n p.path = Path.transform(path, op, _objectSpread$2({}, options, {\n affinity: 'forward'\n }));\n }\n } else {\n p.path = Path.transform(path, op, options);\n }\n\n break;\n }\n }\n });\n }", "function dedupePaths(fs, paths) {\n const root = { children: new Map() };\n for (const path of paths) {\n addPath(fs, root, path);\n }\n return flattenTree(root);\n}", "function mergeEmptyPathMatches(nodes) {\n const result = [];\n for (const node of nodes) {\n if (!hasEmptyPathConfig(node)) {\n result.push(node);\n continue;\n }\n const duplicateEmptyPathNode = result.find(resultNode => node.value.routeConfig === resultNode.value.routeConfig);\n if (duplicateEmptyPathNode !== undefined) {\n duplicateEmptyPathNode.children.push(...node.children);\n }\n else {\n result.push(node);\n }\n }\n return result;\n}", "function groupPath(d) {\n // if we only have one point, form a mini pair\n if(d.values.length == 1) return \"M\" + d.values.map(function(i) {\n return [[x(i.x) - 0.2, y(i.y) - 0.2], [x(i.x) + 0.2, y(i.y) + 0.2]];\n }).join(\"L\") + \"Z\";\n // if we only have two points, just bind them\n if(d.values.length == 2) return \"M\" + d.values.map(function(i) {\n return [x(i.x), y(i.y)];\n }).join(\"L\") + \"Z\";\n // otherwise, compute the convex hull\n return \"M\" + d3.geom.hull(d.values.map(function(i) {\n return [x(i.x), y(i.y)];\n })).join(\"L\") + \"Z\";\n }", "merge(tree) {\n let arr = tree.toArray();\n for(let i=0; i<arr.length; i++) {\n this.add(arr[i]);\n }\n }", "function orAndOrMerge(orPathA, orPathB) {\n var result = [];\n orPathA.forEach(function(andPathA) {\n orPathB.forEach(function(andPathB) {\n result.push(andAndMerge(andPathA, andPathB));\n });\n });\n\n return result;\n}", "merge() {\n\n\t\tconst children = this.children;\n\n\t\tlet i, l;\n\t\tlet child;\n\n\t\tif(children !== null) {\n\n\t\t\tthis.points = [];\n\t\t\tthis.data = [];\n\n\t\t\tfor(i = 0, l = children.length; i < l; ++i) {\n\n\t\t\t\tchild = children[i];\n\n\t\t\t\tif(child.points !== null) {\n\n\t\t\t\t\tthis.points.push(...child.points);\n\t\t\t\t\tthis.data.push(...child.data);\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tthis.children = null;\n\n\t\t}\n\n\t}", "optimiseSetOperation(path, nextValue) {\n // console.log('optimiseSetOperation', path, nextValue)\n // If target value is not a plain value, unable to optimise\n if (typeof nextValue === 'object') {\n // console.log(\"Not optimisable because next value is object\")\n return false;\n } // Check the source values, if there is more than one value being assigned,\n // we won't optimise\n\n\n var matches = (0, _extractWithPath.default)(path, this.PRESTAGE); // If we are not overwriting exactly one key, this cannot be optimised, so we bail\n\n if (matches.length !== 1) {\n // console.log('Not optimisable because match count is != 1', JSON.stringify(matches))\n return false;\n } // Okay, we are assigning exactly one value to exactly one existing slot, so we might optimise\n\n\n var match = matches[0]; // If the value of the match is an array or object, we cannot safely optimise this since the meaning\n // of pre-existing operations might change (in theory, at least), so we bail\n\n if (typeof match.value === 'object') {\n // console.log(\"Not optimisable because old value is object\")\n return false;\n } // If the new and old value are the equal, we optimise this operation by discarding it\n // Now, let's build the operation\n\n\n var op;\n\n if (match.value === nextValue) {\n // If new and old values are equal, we optimise this by deleting the operation\n // console.log(\"Omitting operation\")\n op = null;\n } else if (typeof match.value === 'string' && typeof nextValue === 'string') {\n // console.log(\"Rewriting to dmp\")\n // We are updating a string to another string, so we are making a diffMatchPatch\n var patch = this.dmp.patch_make(match.value, nextValue).map(patch => patch.toString()).join('');\n op = {\n patch: {\n id: this.PRESTAGE._id,\n diffMatchPatch: {\n [path]: patch\n }\n }\n };\n } else {\n // console.log(\"Not able to rewrite to dmp, making normal set\")\n // We are changing the type of the value, so must make a normal set-operation\n op = {\n patch: {\n id: this.PRESTAGE._id,\n set: {\n [path]: nextValue\n }\n }\n };\n } // Let's make a plain, concrete path from the array-path. We use this to keep only the latest set\n // operation touching this path in the buffer.\n\n\n var canonicalPath = (0, _arrayToJSONMatchPath.default)(match.path); // Store this operation, overwriting any previous operations touching this same path\n\n if (op) {\n this.setOperations[canonicalPath] = op;\n } else {\n delete this.setOperations[canonicalPath];\n } // Signal that we succeeded in optimizing this patch\n\n\n return true;\n }", "function pathToAbsolute(path) {\n\n var currentPoint = [0, 0];\n var subpathPoint = [0, 0];\n\n function set(dest, source) {\n dest[0] = source[source.length - 2];\n dest[1] = source[source.length - 1];\n return dest;\n }\n\n path = path.map(function(segment) {\n\n var command = segment.command;\n var data = segment.data && segment.data.slice();\n\n switch (command) {\n\n case \"a\":\n data[5] += currentPoint[0];\n data[6] += currentPoint[1];\n set(currentPoint, data);\n break;\n\n case \"h\":\n data[0] += currentPoint[0];\n currentPoint[0] = data[0];\n break;\n\n case \"v\":\n data[0] += currentPoint[1];\n currentPoint[1] = data[0];\n break;\n\n case \"z\":\n set(currentPoint, subpathPoint);\n break;\n\n case \"H\":\n currentPoint[0] = data[0];\n break;\n\n case \"M\":\n set(currentPoint, data);\n set(subpathPoint, data);\n break;\n\n case \"V\":\n currentPoint[1] = data[0];\n break;\n\n default:\n\n if (\"mlcsqt\".indexOf(command) > -1) {\n for (var i = 0; i < data.length; i++) {\n data[i] += currentPoint[i % 2];\n }\n\n set(currentPoint, data);\n\n if (command === \"m\") {\n set(subpathPoint, data);\n }\n }\n\n if (\"MLCSQTAZ\".indexOf(command) > -1) {\n set(currentPoint, data);\n }\n }\n\n return command === \"z\" ?\n {\n command: \"z\"\n } :\n {\n command: command.toUpperCase(),\n data: data\n };\n });\n\n return path;\n}", "function dissolveArcs(dataset) {\n var arcs = dataset.arcs,\n layers = dataset.layers.filter(layerHasPaths);\n\n if (!arcs || !layers.length) {\n dataset.arcs = null;\n return;\n }\n\n var arcsCanDissolve = getArcDissolveTest(layers, arcs),\n newArcs = [],\n totalPoints = 0,\n arcIndex = new Int32Array(arcs.size()), // maps old arc ids to new ids\n arcStatus = new Uint8Array(arcs.size());\n // arcStatus: 0 = unvisited, 1 = dropped, 2 = remapped, 3 = remapped + reversed\n layers.forEach(function(lyr) {\n // modify copies of the original shapes; original shapes should be unmodified\n // (need to test this)\n lyr.shapes = lyr.shapes.map(function(shape) {\n return editShapeParts(shape && shape.concat(), translatePath);\n });\n });\n dataset.arcs = dissolveArcCollection(arcs, newArcs, totalPoints);\n\n function translatePath(path) {\n var pointCount = 0;\n var newPath = [];\n var newArc, arcId, absId, arcLen, fw, newArcId;\n\n for (var i=0, n=path.length; i<n; i++) {\n arcId = path[i];\n absId = absArcId(arcId);\n fw = arcId === absId;\n\n if (arcs.arcIsDegenerate(arcId)) {\n // arc has collapsed -- skip\n } else if (arcStatus[absId] !== 0) {\n // arc has already been translated -- skip\n newArc = null;\n } else {\n arcLen = arcs.getArcLength(arcId);\n\n if (newArc && arcsCanDissolve(path[i-1], arcId)) {\n if (arcLen > 0) {\n arcLen--; // shared endpoint not counted;\n }\n newArc.push(arcId); // arc data is appended to previous arc\n arcStatus[absId] = 1; // arc is dropped from output\n } else {\n // start a new dissolved arc\n newArc = [arcId];\n arcIndex[absId] = newArcs.length;\n newArcs.push(newArc);\n arcStatus[absId] = fw ? 2 : 3; // 2: unchanged; 3: reversed\n }\n pointCount += arcLen;\n }\n\n if (arcStatus[absId] > 1) {\n // arc is retained (and renumbered) in the dissolved path -- add to path\n newArcId = arcIndex[absId];\n if (fw && arcStatus[absId] == 3 || !fw && arcStatus[absId] == 2) {\n newArcId = ~newArcId;\n }\n newPath.push(newArcId);\n }\n }\n totalPoints += pointCount;\n return newPath;\n }\n }", "joinAdjacent(shapes, fractionalDigits) {\n let joined = 0;\n if (shapes.length < 2) {\n return joined;\n }\n let idx = 0;\n let last = shapes[idx++];\n while (idx < shapes.length) {\n const next = shapes[idx];\n if (next.geometry) {\n idx++;\n continue;\n }\n const lastEnd = this.end(last);\n const nextStart = this.start(next);\n //console.info(lastEnd, nextStart);\n //TODO check reverse path as well and reverse that\n if (last.geometry.type === 'LINE' && next.geometry.type === 'LINE') {\n if (this.pointEquals(lastEnd, nextStart, fractionalDigits)) {\n Array.prototype.push.apply(last.geometry.vectors, next.geometry.vectors);\n //\n this.updateLimit(last.geometry);\n this.updateBounds([last]);\n shapes.splice(idx, 1);\n joined++;\n }\n else {\n last = next;\n idx++;\n }\n }\n }\n return joined;\n }", "get transformPaths() {}", "joinComplexes(complexes) {\n // clear target complex\n this._chains = [];\n this._components = [];\n this._helices = [];\n this._sheets = [];\n this.structures = [];\n this._atoms = [];\n this._residues = [];\n this._bonds = [];\n this._sgroups = [];\n\n const self = this;\n let atomBias = 0;\n let bondBias = 0;\n let residueBias = 0;\n let chainBias = 0;\n let componentBias = 0;\n\n function processAtom(atom, bias) {\n atom.serial += bias;\n atom.index += bias;\n }\n\n function processBond(bond, bias) {\n bond._index += bias;\n }\n\n function processResidue(residue, bias) {\n residue._index += bias;\n }\n\n function processChain(chain, bias) {\n chain._complex = self;\n chain._index += bias;\n }\n\n function processComponent(component, bias) {\n component._complex = self;\n component._index += bias;\n }\n\n /**\n * Simple function to do nothing.\n */\n function doNothing() {\n }\n\n for (let i = 0; i < complexes.length; ++i) {\n const c = complexes[i];\n this.addElement(c._atoms, this._atoms, atomBias, processAtom);\n this.addElement(c._bonds, this._bonds, bondBias, processBond);\n this.addElement(c._residues, this._residues, residueBias, processResidue);\n this.addElement(c._chains, this._chains, chainBias, processChain);\n this.addElement(c._sheets, this._sheets, 0, doNothing);\n this.addElement(c._helices, this._helices, 0, doNothing);\n this.addElement(c._sgroups, this._sgroups, 0, doNothing);\n this.addElement(c._components, this._components, componentBias, processComponent);\n this.addElement(c.structures, this.structures, 0, doNothing);\n // merge residue types\n for (const rt in c._residueTypes) {\n if (c._residueTypes.hasOwnProperty(rt)) {\n this._residueTypes[rt] = c._residueTypes[rt];\n }\n }\n\n atomBias += c._atoms.length;\n bondBias += c._bonds.length;\n residueBias += c._residues.length;\n chainBias += c._chains.length;\n componentBias += c._components.length;\n }\n\n this._computeBounds();\n }", "function mergePaths(base, path) {\n // Handle null or undefined arguments.\n if (base == null) {\n base = '';\n }\n if (path == null) {\n path = '';\n }\n // Get everything up to and including the last slash. The following\n // also handles the case when no slash is in the base. (The index will\n // be -1, which, after adding one, will result in an empty substring.)\n base = base.substring(0, base.lastIndexOf('/') + 1);\n // Merge the base and the path.\n return base + path;\n }", "create_path_from_adjacent(v, s) { \r\n if (v.segments.length < 2) {\r\n console.log(\"Invalid input to create_path_from_adjacent\");\r\n return;\r\n }\r\n \r\n var v1 = s.other_vert(v), v2 = v.other_segment(s).other_vert(v);\r\n var av1 = this.get_vdata(v1.eid, false), av2 = this.get_vdata(v2.eid, false);\r\n \r\n if (av1 === undefined && av2 === undefined) {\r\n console.log(\"no animation data to interpolate\");\r\n return;\r\n } else if (av1 === undefined) {\r\n av1 = av2;\r\n } else if (av2 === undefined) {\r\n av2 = av1;\r\n } \r\n \r\n var av3 = this.get_vdata(v.eid, true);\r\n \r\n var keyframes = new set();\r\n for (var v of av1.verts) {\r\n keyframes.add(get_vtime(v));\r\n }\r\n \r\n for (var v of av2.verts) {\r\n keyframes.add(get_vtime(v));\r\n }\r\n \r\n var co = new Vector2();\r\n \r\n //ensure step func interpolation mode is off for this\r\n var oflag1 = av1.animflag, oflag2 = av2.animflag;\r\n \r\n av1.animflag &= VDAnimFlags.STEP_FUNC;\r\n av2.animflag &= VDAnimFlags.STEP_FUNC;\r\n \r\n for (var time of keyframes) {\r\n var co1 = av1.evaluate(time), co2 = av2.evaluate(time);\r\n \r\n co.load(co1).add(co2).mulScalar(0.5);\r\n av3.update(co, time);\r\n }\r\n \r\n av3.animflag = oflag1 | oflag2;\r\n \r\n av1.animflag = oflag1;\r\n av2.animflag = oflag2;\r\n }", "createPaths(id) {\n let polyPath = [ 0, [] ];\n let i, b;\n let panoid=0, panoidx;\n for(i=0; i<this.nav.panoMetadata[id].sequence.panos.length; i++) {\n if(this.nav.panoMetadata[id].sequence.panos.length == 1) continue;\n const pano = this.nav.panoMetadata[id].sequence.panos[i];\n const latDelta = Math.abs(this.nav.panoMetadata[id].lat - pano.lat);\n if(latDelta * 111 * 1000 > 200) {\n polyPath = [polyPath[0] + 1, [] ];\n continue;\n }\n // skip lon next..\n const lonDelta = Math.abs(this.nav.panoMetadata[id].lon - pano.lon);\n if(lonDelta * Math.pow(290-(105+pano.lon), 1.065) * 1000 > 200) {\n polyPath = [polyPath[0] + 1, [] ];\n continue;\n }\n // reposition the spot directly below.. a minimum distance is \n // needed because directly below (-.5*PI) there is no impact of yaw!\n if(id == pano.panoid) {\n panoidx = i;\n const theOtherOne = (i==0) ? \n this.nav.panoMetadata[id].sequence.panos[1] : \n this.nav.panoMetadata[id].sequence.panos[i-1] ; \n // Not sure what distance1 and distance2 are used for or whether they are even needed\n // if removed the line does not cover the current pano\n let distance1 = coordtrans.distance(\n this.nav.panoMetadata[id].lat,\n this.nav.panoMetadata[id].lon,\n theOtherOne.lat,\n theOtherOne.lon\n );\n // Half 1/distance\n const distance2 = (distance1 < 0.7) ? 0.9 : 0.5/distance1;\n distance1 = 1 - distance2;\n\n b = coordtrans.geodeticToEnu(\n theOtherOne.lat * distance2 + pano.lat * distance1,\n theOtherOne.lon * distance2 + pano.lon * distance1,\n 0,\n this.nav.panoMetadata[id].lat,\n this.nav.panoMetadata[id].lon,\n this.gaVars.baseHeight * 0.9\n );\n\t\t\t\tconsole.log(`${i} ${id} theotherone ${theOtherOne.panoid}`);\n panoid=theOtherOne.panoid;\n } else {\n b = coordtrans.geodeticToEnu(\n pano.lat,\n pano.lon,\n pano.ele * this.gaVars.flattener,\n this.nav.panoMetadata[id].lat,\n this.nav.panoMetadata[id].lon,\n this.nav.panoMetadata[id].ele * this.gaVars.flattener + this.gaVars.baseHeight\n );\n\t\t\t\tconsole.log(`${i} ${id} ${this.nav.panoMetadata[id].sequence.panos[i].panoid}`);\n panoid = this.nav.panoMetadata[id].sequence.panos[i].panoid;\n } \n\n // into the ground by X degrees\n b[3] = Math.sqrt(b[0]*b[0] + b[1]*b[1]);\n b[2] -= Math.sin ( this.gaVars.degDown * Math.PI/180) * b[3];\n // b[3] = distance | b[4] = radians Pitch (-.5pi - 0.5pi)\n // b[5] = radians Yaw (0 - 2pi)\n b = coordtrans.enuPlusMarkerdata(b, this.nav.viewer.heading);\n\n // b[6] = marker scale (result formula is via trial and error ;)\n b[6] = (300/(b[3]>300 ? 300:b[3]))*(4/100)+0.03;\n\n\n // create polyline to show the path of the images!\n if ( i < this.nav.imageNow || (i == this.nav.imageNow && i != 0) ) {\n polyPath[1].push([b[5]-b[6]/this.gaVars.pathWidth, b[4] ]); \n polyPath[1].unshift([Math.round((b[5]+b[6]/this.gaVars.pathWidth)*1000)/1000, b[4] ]);\n } else {\n polyPath[1].push([Math.round((b[5]+b[6]/this.gaVars.pathWidth)*1000)/1000, b[4] ]);\n polyPath[1].unshift([b[5]-b[6]/this.gaVars.pathWidth, b[4] ]);\n }\n // in an earlier version the path was created for every 100 images \n //or when the distance was over 100 meters\n // now it is only a polyline of one image to the next, \n // so that a circle gradient can be placed on the mouse over, \n // for a cooler effect ;)\n if (polyPath[1].length > 2 ) {\n\t\t\t\tconsole.log(`path-${id}-${panoid}`);\n \tthis.nav.viewer.markersPlugin.addMarker({\n id : `path-${id}-${panoid}`,\n //content : 'This mountain is so great it has dots on it!',\n tooltip: `Pano ${panoid}`,\n polylineRad: polyPath[1],\n svgStyle : {\n fill : this.gaVars.markerBaseFill, \n stroke : this.gaVars.markerBaseFill.replace(/([0-9.]+)\\)/, function (x,y) {\n return parseFloat(y)/4+')';\n }),\n strokeWidth: '1px',//'0.1em',\n },\n \t});\n \t\t\tpolyPath= [polyPath[0]+1,\n [polyPath[1][ 0 ],\n polyPath[1][ polyPath[1].length-1 ]]\n ];\n\n\t\t\t}\n }\n \t\t// always draw the last polyline.. you might end up not to in the for loop\n \t\tif (polyPath[1].length > 1 && !this.nav.viewer.markersPlugin.markers[`polygon${panoid}`] ) {\n\t\t\t\tconsole.log(`**path-${id}-${panoid}`);\n \t\tthis.nav.viewer.markersPlugin.addMarker({\n \t\t\tid : `path-${id}-${panoid}`, \n tooltip: `Pano ${panoid}`,\n \t\t//content : 'This mountain is so great it has dots on it!',\n \t\tpolylineRad: polyPath[1],\n \t\tsvgStyle : {\n \t\tfill : this.gaVars.markerBaseFill, //'url(#GAgradient0)',//'rgba(255, 255, 255, 0.3)', //'rgba(255,0,0,0.3)',\n \t\tstroke : this.gaVars.markerBaseFill.replace(/([0-9.]+)\\)/, function (x,y) {\n return parseFloat(y)/4+')';\n }),\n \t\tstrokeWidth: '1px',//'0.1em',\n \t\t},\n \t\t});\n \t\tpolyPath= [[],[]];\n \t\t}\n }", "function prepForPath(points){\n let arr = points.slice();\n return arr.push(arr[arr.length - 1]);\n}", "transform(path, operation) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n return fn(path, p => {\n var {\n affinity = 'forward'\n } = options; // PERF: Exit early if the operation is guaranteed not to have an effect.\n\n if (!path || (path === null || path === void 0 ? void 0 : path.length) === 0) {\n return;\n }\n\n if (p === null) {\n return null;\n }\n\n switch (operation.type) {\n case 'insert_node':\n {\n var {\n path: op\n } = operation;\n\n if (Path.equals(op, p) || Path.endsBefore(op, p) || Path.isAncestor(op, p)) {\n p[op.length - 1] += 1;\n }\n\n break;\n }\n\n case 'remove_node':\n {\n var {\n path: _op\n } = operation;\n\n if (Path.equals(_op, p) || Path.isAncestor(_op, p)) {\n return null;\n } else if (Path.endsBefore(_op, p)) {\n p[_op.length - 1] -= 1;\n }\n\n break;\n }\n\n case 'merge_node':\n {\n var {\n path: _op2,\n position\n } = operation;\n\n if (Path.equals(_op2, p) || Path.endsBefore(_op2, p)) {\n p[_op2.length - 1] -= 1;\n } else if (Path.isAncestor(_op2, p)) {\n p[_op2.length - 1] -= 1;\n p[_op2.length] += position;\n }\n\n break;\n }\n\n case 'split_node':\n {\n var {\n path: _op3,\n position: _position\n } = operation;\n\n if (Path.equals(_op3, p)) {\n if (affinity === 'forward') {\n p[p.length - 1] += 1;\n } else if (affinity === 'backward') ; else {\n return null;\n }\n } else if (Path.endsBefore(_op3, p)) {\n p[_op3.length - 1] += 1;\n } else if (Path.isAncestor(_op3, p) && path[_op3.length] >= _position) {\n p[_op3.length - 1] += 1;\n p[_op3.length] -= _position;\n }\n\n break;\n }\n\n case 'move_node':\n {\n var {\n path: _op4,\n newPath: onp\n } = operation; // If the old and new path are the same, it's a no-op.\n\n if (Path.equals(_op4, onp)) {\n return;\n }\n\n if (Path.isAncestor(_op4, p) || Path.equals(_op4, p)) {\n var copy = onp.slice();\n\n if (Path.endsBefore(_op4, onp) && _op4.length < onp.length) {\n copy[_op4.length - 1] -= 1;\n }\n\n return copy.concat(p.slice(_op4.length));\n } else if (Path.isSibling(_op4, onp) && (Path.isAncestor(onp, p) || Path.equals(onp, p))) {\n if (Path.endsBefore(_op4, p)) {\n p[_op4.length - 1] -= 1;\n } else {\n p[_op4.length - 1] += 1;\n }\n } else if (Path.endsBefore(onp, p) || Path.equals(onp, p) || Path.isAncestor(onp, p)) {\n if (Path.endsBefore(_op4, p)) {\n p[_op4.length - 1] -= 1;\n }\n\n p[onp.length - 1] += 1;\n } else if (Path.endsBefore(_op4, p)) {\n if (Path.equals(onp, p)) {\n p[onp.length - 1] += 1;\n }\n\n p[_op4.length - 1] -= 1;\n }\n\n break;\n }\n }\n });\n }", "function path() {\n if (finds(loc + 61) && tmp - 1 == result[loc + 61]) //bottom node to destinations node\n value = loc + 61;\n else if (finds(loc - 61) && tmp - 1 == result[loc - 61]) //top node to destinations node\n {\n value = loc - 61;\n } else if (\n (loc - 1) % 61 < loc % 61 &&\n finds(loc - 1) &&\n tmp - 1 == result[loc - 1]\n )\n //left side node to destination node\n value = loc - 1;\n else if (\n (loc + 1) % 61 > loc % 61 &&\n finds(loc + 1) &&\n tmp - 1 == result[loc + 1]\n )\n //right side node to destination node\n value = loc + 1;\n else if (\n finds(loc - 62) &&\n (loc - 62) % 61 < loc % 61 &&\n tmp - 1 == result[loc - 62]\n )//top right side node to destination node\n value = loc - 62;\n else if (\n finds(loc - 60) &&\n (loc - 60) % 61 > loc % 61 &&\n tmp - 1 == result[loc - 60]\n )//top left side node to destination node\n value = loc - 60;\n else if (\n finds(loc + 60) &&\n (loc + 60) % 61 < loc % 61 &&\n tmp - 1 == result[loc + 60]\n )//bottom right side node to destination node\n value = loc + 60;\n else if (\n finds(loc + 62) &&\n (loc + 62) % 61 > loc % 61 &&\n tmp - 1 == result[loc + 62]\n )//bottom right side node to destination node\n value = loc + 62;\n\n tmp = result[value];\n loc = value;\n if (loc != source)\n //this gives moving effect to bot\n {\n d[loc].style.backgroundColor = destinationColor;\n \n }\n}", "merge() {\n this.assets.push(this.files.merge(this.data.output, this.data.babel));\n }", "static join() {\n // Split the inputs into a list of path commands.\n var parts = [];\n for (var i = 0, l = arguments.length; i < l; i++) {\n parts = parts.concat(arguments[i].split('/'));\n }\n // Interpret the path commands to get the new resolved path.\n var newParts = [];\n for (i = 0, l = parts.length; i < l; i++) {\n var part = parts[i];\n // Remove leading and trailing slashes\n // Also remove '.' segments\n if (!part || part === '.') {\n continue;\n }\n // Interpret '..' to pop the last segment\n if (part === '..') {\n newParts.pop();\n }\n // Push new path segments.\n else {\n newParts.push(part);\n }\n }\n // Preserve the initial slash if there was one.\n if (parts[0] === '') {\n newParts.unshift('');\n }\n // Turn back into a single string path.\n return newParts.join('/') || (newParts.length ? '/' : '.');\n }", "transform(point, op) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n return fn(point, p => {\n if (p === null) {\n return null;\n }\n\n var {\n affinity = 'forward'\n } = options;\n var {\n path,\n offset\n } = p;\n\n switch (op.type) {\n case 'insert_node':\n case 'move_node':\n {\n p.path = Path.transform(path, op, options);\n break;\n }\n\n case 'insert_text':\n {\n if (Path.equals(op.path, path) && op.offset <= offset) {\n p.offset += op.text.length;\n }\n\n break;\n }\n\n case 'merge_node':\n {\n if (Path.equals(op.path, path)) {\n p.offset += op.position;\n }\n\n p.path = Path.transform(path, op, options);\n break;\n }\n\n case 'remove_text':\n {\n if (Path.equals(op.path, path) && op.offset <= offset) {\n p.offset -= Math.min(offset - op.offset, op.text.length);\n }\n\n break;\n }\n\n case 'remove_node':\n {\n if (Path.equals(op.path, path) || Path.isAncestor(op.path, path)) {\n return null;\n }\n\n p.path = Path.transform(path, op, options);\n break;\n }\n\n case 'split_node':\n {\n if (Path.equals(op.path, path)) {\n if (op.position === offset && affinity == null) {\n return null;\n } else if (op.position < offset || op.position === offset && affinity === 'forward') {\n p.offset -= op.position;\n p.path = Path.transform(path, op, _objectSpread$6(_objectSpread$6({}, options), {}, {\n affinity: 'forward'\n }));\n }\n } else {\n p.path = Path.transform(path, op, options);\n }\n\n break;\n }\n }\n });\n }", "async function traversePaths(canvas) {\n log(\"Traversing all paths...\");\n\n if (DEBUG_PATH) {\n drawing.canvasClear(tilesOverlay);\n drawing.canvasDrawLine(tilesOverlay, 0, 0, tilesOverlay.width, 0, [0xff, 0, 0, 0xff], 3);\n drawing.canvasDrawLine(tilesOverlay, tilesOverlay.width, 0, tilesOverlay.width, tilesOverlay.height, [0xff, 0, 0, 0xff], 3);\n drawing.canvasDrawLine(tilesOverlay, tilesOverlay.width, tilesOverlay.height, 0, tilesOverlay.height, [0xff, 0, 0, 0xff], 3);\n drawing.canvasDrawLine(tilesOverlay, 0, tilesOverlay.height, 0, 0, [0xff, 0, 0, 0xff], 3);\n }\n\n // top paths\n for (let i = 0; i < metaInfo.topPaths.length; i++) {\n const path = metaInfo.topPaths[i];\n path.x0 = path.offset;\n path.y0 = metaInfo.topEdge;\n await traversePath(canvas, path, DIR.BOTTOM);\n }\n // right paths\n for (let i = 0; i < metaInfo.rightPaths.length; i++) {\n const path = metaInfo.rightPaths[i];\n path.x0 = metaInfo.rigthEdge;\n path.y0 = path.offset;\n await traversePath(canvas, path, DIR.LEFT);\n }\n // bottom paths\n for (let i = 0; i < metaInfo.bottomPaths.length; i++) {\n const path = metaInfo.bottomPaths[i];\n path.x0 = path.offset;\n path.y0 = metaInfo.bottomEdge;\n await traversePath(canvas, path, DIR.TOP);\n }\n // left paths\n for (let i = 0; i < metaInfo.leftPaths.length; i++) {\n const path = metaInfo.leftPaths[i];\n path.x0 = metaInfo.leftEdge;\n path.y0 = path.offset;\n await traversePath(canvas, path, DIR.RIGHT);\n }\n}", "function compress_nodes(readings) {\n //add text of other readings to 1st reading\n\n var first = get_ellipse(readings[0]);\n var first_title = first.parent().find('text')[0];\n var last_edges = edges_of(get_ellipse(readings[readings.length - 1]));\n for (var i = 0; i < last_edges.length; i++) {\n if (last_edges[i].is_incoming == false) {\n var last = last_edges[i];\n }\n }\n\n var total = parseInt(first[0].getAttribute('cx'), 10);\n\n for (var i = 1; i < readings.length; i++) {\n var cur = get_ellipse(readings[i]);\n var cur_title = cur.parent().find('text')[0];\n\n first_title.textContent += \" \" + cur_title.textContent;\n total += parseInt(cur[0].getAttribute('cx'), 10);\n };\n\n var avg = Math.round(total / readings.length);\n\n // Reattach last external edge to new to-be-merged node: NB: We\n // can't to this after the removal as startpoint wants the cx etc\n // of the ellipse the edge is moving from..\n // last.attach_startpoint(readings[0]);\n\n\n // do this once:\n var x = parseInt(first[0].getAttribute('cx'), 10);\n first[0].setAttribute('rx', 4.5 * first_title.textContent.length);\n\n if (text_direction !== \"BI\") {\n first[0].setAttribute('cx', avg);\n first_title.setAttribute('x', first[0].getAttribute('cx'));\n }\n\n //merge then delete all others\n for (var i = 1; i < readings.length; i++) {\n var node = get_ellipse(readings[i]);\n var rid = readings[i - 1] + '->' + readings[i];\n\n var titles = svg_root.getElementsByTagName('title');\n var titlesArray = [].slice.call(titles);\n\n // old edge, delete after moving stuff around!\n if (titlesArray.length > 0) {\n var title = titlesArray.find(function(elem) {\n return elem.textContent === rid;\n });\n }\n\n // only merge start on the last one, else, we get ourselves confused!\n if (readings[i] == readings[readings.length - 1]) {\n merge_node(rid2node[readings[i]], rid2node[readings[0]], true);\n } else {\n merge_left(rid2node[readings[i]], rid2node[readings[0]]);\n }\n\n if (title && title.parentNode) {\n title.parentNode.remove();\n }\n }\n\n /* Fix size of arrows to node for LR/RL texts. */\n if (text_direction !== \"BI\") {\n /* This is the remaining node; find the incoming edge, which is now the\n * wrong size */\n var first_edge;\n var first_edges = edges_of(first);\n\n for (var i = 0; i < first_edges.length; i++) {\n if (first_edges[i].is_incoming == true) {\n first_edge = first_edges[i];\n break;\n }\n }\n\n if (first_edge) {\n //arrow\n var polygon = first_edge.g_elem.children('polygon');\n\n if (polygon.size() > 0) {\n //the line\n var edge_elem = first_edge.g_elem.children('path')[0];\n\n var d = edge_elem.getAttribute('d');\n //https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d\n //This 'Curveto' property determines how long the line is.\n //The Syntax is C c1x,c1y c2x,c2y x,y where x,y are where the\n //path ends.\n var c_attr = d.match(/C\\s?(\\S+) (\\S+) (\\S+)/);\n\n var c_x = parseInt(first[0].getAttribute('cx'), 10);\n var r_x = parseInt(first[0].getAttribute('rx'), 10);\n\n var x;\n if (text_direction === 'LR') {\n //line ends to the left of the ellipse,\n //so its center minus its radius\n x = c_x - r_x;\n } else if (text_direction === 'RL') {\n //line ends to the right of the ellipse,\n //so its center plus its radius\n x = c_x + r_x;\n }\n\n if (c_attr.length >= 4) {\n var full = c_attr.shift();\n\n var end_point = c_attr[2].split(',');\n var end_x = parseInt(end_point[0]);\n var end_y = parseInt(end_point[1]);\n //how much do we need to move the arrow by?\n //this is the same amount we'll be moving its line\n var dx = x - end_x;\n\n //build the new 'C' property. We only changed 'x' here\n var new_cattr = \"C\" + c_attr[0] + \" \" + c_attr[1] + \" \" + x + \",\" + end_y;\n edge_elem.setAttribute('d', d.replace(full, new_cattr));\n\n //and moe the arrow\n var end_point_arrowhead = new svgshape(polygon);\n end_point_arrowhead.reposition(dx, 0);\n }\n }\n }\n }\n\n get_node_obj(readings[0]).update_elements();\n}", "function removeMultilayerPaths(matrixId)\n {\n // d3.selectAll('#' + AugmentedNodeTrix._parentID +\n // ' .layer3').attr(\"opacity\",0);\n }", "connectPath() {\n this.entities.node = {}\n this.entities.path = {}\n this.geo.indexes.forEach((i) => (this.entities.square[i] = true))\n const { makeWalls, walls } = this.options\n\n // walls generated by makeWalls are not stored in options.walls\n makeWalls(this)\n Object.assign(this.entities.wall, walls)\n\n if (this.options.nodes.length === 0) {\n this.options.nodes = getCorners(this, 3)\n }\n const nodes = this.options.nodes.slice() // clone because we might add one to it\n const first_xy = this.geo.index2xy(nodes[0])\n const last_xy = this.geo.index2xy(nodes[nodes.length - 1])\n this.start1 = nodes[0]\n this.start2 = nodes[nodes.length - 1]\n const half = Math.floor(nodes.length / 2)\n nodes.forEach((index, i) => {\n this.entities.node[index] = i >= half ? 2 : 1\n })\n if (nodes.length > 2 && vector.magnitude(vector.subtract(first_xy, last_xy)) < 8) {\n // nodes wrap around board\n nodes.push(nodes[0])\n this.start2 = nodes[half]\n }\n let last_node = nodes[0]\n // TODO this will break if not orthogonal\n // probably need to insert extra nodes into the temporary list of nodes\n nodes.slice(1).forEach((node) => {\n const xy1 = this.geo.index2xy(last_node)\n const xy2 = this.geo.index2xy(node)\n const dindex = this.geo.floorDindex(last_node - node)\n range(vector.magnitude(vector.subtract(xy1, xy2))).forEach((i_step) => {\n const index = node + i_step * dindex\n this.entities.path[index] = dindex\n })\n last_node = node\n })\n }", "function combineChildren(resultsAr) {\n try {\n var pathList = [];\n\n //loop through the array of path arrays\n resultsAr.forEach(function forEachPathAr(pathAr) {\n\n //loop through the path array\n pathAr.forEach(function forEachPath(path) {\n pathList.push(path);\n });\n\n });\n\n return promise.resolve(pathList);\n }\n catch(ex) {\n return promise.reject(ex);\n }\n }", "function drawPaths() {\n\n // clear links container\n var linksDOM = d3.select('#links');\n linksDOM.selectAll('*').remove();\n\n for (var i = 0, n = links.length; i < n; i++) {\n\n var tubes = tubesInLink(links[i]);\n var colors = linkCables(links[i], false);\n var count = 1;\n\n // compute lines for link/tube\n if (view == 'tube' && tubes.length > 0)\n count = tubes.length;\n else if (view == 'cable' && colors.length > 0)\n count = colors.length;\n\n if (count == 0)\n count = 1;\n\n for (var j = 0; j < count; j++) {\n\n // get stroke color\n var strokeColor = 'grey';\n if (view == 'tube' && tubes.length > 0)\n strokeColor = 'black';\n else if ((view == 'cable' && colors.length > 0) || vertical)\n strokeColor = colors[j] || 'grey';\n\n // add line\n linksDOM.append('svg:path')\n .attr('class', 'link')\n .attr('id', 'link_' + i)\n .attr('fill', 'none')\n .attr('stroke', strokeColor)\n .attr('stroke-width', (20 * size) + 'px')\n .attr('d', (function () {\n\n var d = links[i];\n var x1 = d.source.x;\n var x2 = d.target.x;\n var y1 = d.source.y;\n var y2 = d.target.y;\n\n var distanceX = Math.abs(x1 - x2);\n var distanceY = Math.abs(y1 - y2);\n var offset = 4;\n\n var desc = ((count - j) * offset) - ((count + 1) * offset / 2);\n var asc = ((j + 1) * offset) - ((count + 1) * offset / 2);\n\n var verticalOffset;\n var horizontalOffset;\n\n // horizontal line\n if (distanceX >= distanceY) {\n verticalOffset = asc;\n return 'M' + (x1 + sizeSquare * size / 2) + ',' + ((y1 + sizeSquare * size / 2) + verticalOffset) + ' ' + (x2 + sizeSquare * size / 2) + ',' + ((y2 + sizeSquare * size / 2) + verticalOffset);\n }\n // vertical line\n else {\n\n horizontalOffset = asc;\n\n // 1. down -> right\n if (x1 < x2 && y1 < y2)\n verticalOffset = desc;\n // 2. down -> left\n else if (x1 > x2 && y1 < y2)\n verticalOffset = asc;\n // 3. up -> right\n else if (x1 < x2 && y1 > y2)\n verticalOffset = asc;\n // 4. up -> left\n else\n verticalOffset = desc;\n\n return 'M' + (x1 + horizontalOffset + sizeSquare * size / 2) + ',' + ((y1 + sizeSquare * size / 2) + verticalOffset) + ' ' + (x2 + horizontalOffset + sizeSquare * size / 2) + ',' + ((y2 + sizeSquare * size / 2) + verticalOffset);\n }\n })());\n }\n }\n\n // ----------------\n // -----Events-----\n // ----------------\n $('path.link').each(function () {\n\n var pathIndex = $(this).attr('id');\n if (pathIndex != undefined) {\n pathIndex = parseInt(pathIndex.substring(5));\n\n $(this)\n .off()\n .on('mouseover', function () {\n path_mouseover(pathIndex);\n })\n .on('mouseout', function () {\n path_mouseout();\n })\n .on('click', function (event) {\n path_mousedown(event, pathIndex);\n });\n }\n });\n}", "function simplifyPaths(arcs, opts) {\n var simplifyPath = getSimplifyFunction(opts);\n arcs.setThresholds(new Float64Array(arcs.getPointCount())); // Create array to hold simplification data\n if (opts.spherical) {\n simplifyPaths3D(arcs, simplifyPath);\n protectWorldEdges(arcs);\n } else {\n simplifyPaths2D(arcs, simplifyPath);\n }\n if (opts.lock_box) {\n protectContentEdges(arcs);\n }\n }", "composedPath() {\n const composedPath = [];\n\n const { currentTarget, _path: path } = this;\n\n if (path.length === 0) {\n return composedPath;\n }\n\n composedPath.push(currentTarget);\n\n let currentTargetIndex = 0;\n let currentTargetHiddenSubtreeLevel = 0;\n\n for (let index = path.length - 1; index >= 0; index--) {\n const { item, rootOfClosedTree, slotInClosedTree } = path[index];\n\n if (rootOfClosedTree) {\n currentTargetHiddenSubtreeLevel++;\n }\n\n if (item === idlUtils.implForWrapper(currentTarget)) {\n currentTargetIndex = index;\n break;\n }\n\n if (slotInClosedTree) {\n currentTargetHiddenSubtreeLevel--;\n }\n }\n\n let currentHiddenLevel = currentTargetHiddenSubtreeLevel;\n let maxHiddenLevel = currentTargetHiddenSubtreeLevel;\n\n for (let i = currentTargetIndex - 1; i >= 0; i--) {\n const { item, rootOfClosedTree, slotInClosedTree } = path[i];\n\n if (rootOfClosedTree) {\n currentHiddenLevel++;\n }\n\n if (currentHiddenLevel <= maxHiddenLevel) {\n composedPath.unshift(idlUtils.wrapperForImpl(item));\n }\n\n if (slotInClosedTree) {\n currentHiddenLevel--;\n if (currentHiddenLevel < maxHiddenLevel) {\n maxHiddenLevel = currentHiddenLevel;\n }\n }\n }\n\n currentHiddenLevel = currentTargetHiddenSubtreeLevel;\n maxHiddenLevel = currentTargetHiddenSubtreeLevel;\n\n for (let index = currentTargetIndex + 1; index < path.length; index++) {\n const { item, rootOfClosedTree, slotInClosedTree } = path[index];\n\n if (slotInClosedTree) {\n currentHiddenLevel++;\n }\n\n if (currentHiddenLevel <= maxHiddenLevel) {\n composedPath.push(idlUtils.wrapperForImpl(item));\n }\n\n if (rootOfClosedTree) {\n currentHiddenLevel--;\n if (currentHiddenLevel < maxHiddenLevel) {\n maxHiddenLevel = currentHiddenLevel;\n }\n }\n }\n\n return composedPath;\n }", "getPaths(regex, point = new Coordinate(0,0)){\n // Paths will be a multi-dimension array that basically \n // substitutes the parenthesis in the regex\n // We can traverse down any path this way\n let paths = [[0]];\n let i = 0;\n let j = 0;\n let char = -1;\n\n // Keeps track of where we are\n let location = new Coordinate(point.x, point.y);\n this.visited[location] = true;\n\n // Navigate through the regex\n while(++char < regex.length){\n // New path\n if(regex[char] == '|'){\n paths[++i] = [0];\n j = 0;\n location = new Coordinate(point.x, point.y);\n }\n // Another layer found, recurse down\n else if(regex[char] == '('){\n let inner = this.getPaths(regex.substring(char + 1), location);\n // Offset what character we are looking at to avoid infinite recursion\n char += inner.end;\n // Group the inner paths with the outer path\n paths[i][++j] = inner.paths;\n // True if the path doesn't need to traverse down into deeper layers\n // Example: EESS(WNSE|)SSS\n if(regex[char + 1] && regex[char + 1] != '|' && regex[char + 1] != ')'){ \n paths[i][++j] = 0;\n }\n }\n // Layer ends\n else if(regex[char] == ')'){\n break;\n }\n // Add to the path\n else{\n // Move our location\n switch(regex[char]){\n case 'N': location.north(); break;\n case 'S': location.south(); break;\n case 'E': location.east(); break;\n case 'W': location.west(); break;\n }\n // We have not been here before, count it\n if(!this.visited[location]){\n this.visited[location] = true;\n paths[i][j]++;\n }\n }\n }\n // Return where we ended and the paths created\n return {\n end: char + 1,\n paths: paths\n }\n }", "function convertAllClosedPaths(layer) {\n _.each(layer.children, function(path){\n if (path.closed) {\n path.closed = false;\n path.add(path.firstSegment.point);\n }\n });\n }", "function mergeEmptyPathMatches(nodes) {\n var result = [];\n\n var _iterator19 = _createForOfIteratorHelper(nodes),\n _step18;\n\n try {\n var _loop4 = function _loop4() {\n var node = _step18.value;\n\n if (!hasEmptyPathConfig(node)) {\n result.push(node);\n return \"continue\";\n }\n\n var duplicateEmptyPathNode = result.find(function (resultNode) {\n return node.value.routeConfig === resultNode.value.routeConfig;\n });\n\n if (duplicateEmptyPathNode !== undefined) {\n var _duplicateEmptyPathNo;\n\n (_duplicateEmptyPathNo = duplicateEmptyPathNode.children).push.apply(_duplicateEmptyPathNo, _toConsumableArray(node.children));\n } else {\n result.push(node);\n }\n };\n\n for (_iterator19.s(); !(_step18 = _iterator19.n()).done;) {\n var _ret = _loop4();\n\n if (_ret === \"continue\") continue;\n }\n } catch (err) {\n _iterator19.e(err);\n } finally {\n _iterator19.f();\n }\n\n return result;\n }", "function MultiFlattener() {}", "compress(upto = this.items.length) {\n let remap = this.remapping(0, upto), mapFrom = remap.maps.length;\n let items = [], events = 0;\n this.items.forEach((item, i) => {\n if (i >= upto) {\n items.push(item);\n if (item.selection)\n events++;\n } else if (item.step) {\n let step = item.step.map(remap.slice(mapFrom)), map2 = step && step.getMap();\n mapFrom--;\n if (map2)\n remap.appendMap(map2, mapFrom);\n if (step) {\n let selection = item.selection && item.selection.map(remap.slice(mapFrom));\n if (selection)\n events++;\n let newItem = new Item(map2.invert(), step, selection), merged, last = items.length - 1;\n if (merged = items.length && items[last].merge(newItem))\n items[last] = merged;\n else\n items.push(newItem);\n }\n } else if (item.map) {\n mapFrom--;\n }\n }, this.items.length, 0);\n return new Branch(ropeSequence.from(items.reverse()), events);\n }", "function mergeDatasetsForExport(arr) {\n // copy layers but not arcs, which get copied in mergeDatasets()\n var copy = arr.map(function(dataset) {\n return utils.defaults({\n layers: dataset.layers.map(copyLayerShapes)\n }, dataset);\n });\n return mergeDatasets(copy);\n }", "extendArrayWithPaths (array, path) {\n if (array.length && path) {\n const extendedArray = []\n array.forEach(function (value) {\n extendedArray.push(`${path}/${value}`)\n })\n return extendedArray\n }\n }", "function paths(selected, ctx, count) {\n\t var n = selected.length,\n\t i = 0,\n\t opacity = d3.min([3/Math.pow(n,0.4),1]),\n\t timer = (new Date()).getTime();\n\t\n\t selection_stats(opacity, n, data.length);\n\t\n\t shuffled_data = _.shuffle(selected);\n\t //console.log(shuffled_data);\n\t $scope.data_table(shuffled_data);\n\t\n\t ctx.clearRect(0,0,w+1,h+1);\n\t\n\t // render all lines until finished or a new brush event\n\t function animloop(){\n\t if (i >= n || count < brush_count) return true;\n\t var max = d3.min([i+render_speed, n]);\n\t render_range(shuffled_data, i, max, opacity);\n\t render_stats(max,n,render_speed);\n\t i = max;\n\t timer = optimize(timer); // adjusts render_speed\n\t };\n\t\n\t d3.timer(animloop);\n\t}", "function clearPath() {\n\tif(curPath != false) {\n\t\tcurPath.setMap(null);\n\t\tcurPath = false;\n\t}\n\t\n\tif(prePath != false) {\n\t\tprePath.setMap(null);\n\t\tprePath = false;\n\t}\n\t\n\tif(postPath != false) {\n\t\tpostPath.setMap(null);\n\t\tpostPath = false;\n\t}\n\n\tmarkerPath = false;\n\t\n\t// remove points from map\n\tfor(var i = 0; i < prePathPoints.length; i++)\n\t\tprePathPoints[i].setMap(null);\n\t\n\tprePathPoints = [];\n\t\n\t// remove all but the last, which is the representative\n\tfor(var i = 0; i < pathPoints.length -1 ; i++)\n\t\tpathPoints[i].setMap(null);\n\t\n\tif(pathPoints.length > 0) {\n\t\tvar representative = pathPoints[pathPoints.length - 1];\n\t\tpathPoints = [];\n\t\tupdateMarkerIcon(representative);\n\t}\n\t\n\tfor(var i = 0; i < postPathPoints.length; i++)\n\t\tpostPathPoints[i].setMap(null);\n\t\t\n\tpostPathPoints = [];\n\t\n\tupdateMapPoints($('#slider-range').slider('option'));\n}", "function paths2map(paths) {\n var comboSyntax = config.comboSyntax || ['??', ',']\n var map = []\n\n gutil.forEach(paths, function(path) {\n var root = path[0] + '/'\n var group = files2group(path[1])\n\n gutil.forEach(group, function(files) {\n\n var hash = {}\n var comboPath = root + comboSyntax[0] + files.join(comboSyntax[1])\n\n // http://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url\n if (comboPath.length > 2000) {\n throw new Error('The combo url is too long: ' + comboPath)\n }\n\n gutil.forEach(files, function(part) {\n hash[root + part] = comboPath\n })\n\n map.push(function(url) {\n return hash[url] || url\n })\n\n })\n\n })\n //console.log('map',map)\n return map\n }", "function calculatePath() {\n\t // create Nodes from the Start and End x,y coordinates\n\t var mypathStart = Node(null, { x: pathStart[0], y: pathStart[1] });\n\t var mypathEnd = Node(null, { x: pathEnd[0], y: pathEnd[1] });\n\t // create an array that will contain all world cells\n\t var AStar = new Array(worldSize);\n\t // list of currently open Nodes\n\t var Open = [mypathStart];\n\t // list of closed Nodes\n\t var Closed = [];\n\t // list of the final output array\n\t var result = [];\n\t // reference to a Node (that is nearby)\n\t var myNeighbours;\n\t // reference to a Node (that we are considering now)\n\t var myNode;\n\t // reference to a Node (that starts a path in question)\n\t var myPath;\n\t // temp integer variables used in the calculations\n\t var length, max, min, i, j;\n\t // iterate through the open list until none are left\n\t while (length = Open.length) {\n\t max = worldSize * 999999;\n\t min = -1;\n\t for (i = 0; i < length; i++) {\n\t if (Open[i].f < max) {\n\t max = Open[i].f;\n\t min = i;\n\t }\n\t }\n\t // grab the next node and remove it from Open array\n\t myNode = Open.splice(min, 1)[0];\n\t // is it the destination node?\n\t if (myNode.value === mypathEnd.value) {\n\t myPath = Closed[Closed.push(myNode) - 1];\n\t do {\n\t result.push([myPath.x, myPath.y]);\n\t } while (myPath = myPath.Parent);\n\t // clear the working arrays\n\t AStar = Closed = Open = [];\n\t // we want to return start to finish\n\t result.reverse();\n\t } else // not the destination\n\t {\n\t // find which nearby nodes are walkable\n\t myNeighbours = Neighbours(myNode.x, myNode.y);\n\t // test each one that hasn't been tried already\n\t for (i = 0, j = myNeighbours.length; i < j; i++) {\n\t myPath = Node(myNode, myNeighbours[i], world[myNeighbours[i].x][myNeighbours[i].y]);\n\t if (!AStar[myPath.value]) {\n\t // estimated cost of this particular route so far\n\t myPath.g += myNode.g + distanceFunction(myNeighbours[i], myNode);\n\t // estimated cost of entire guessed route to the destination\n\t myPath.f = myPath.g + distanceFunction(myNeighbours[i], mypathEnd);\n\t // remember this new path for testing above\n\t Open.push(myPath);\n\t // mark this node in the world graph as visited\n\t AStar[myPath.value] = true;\n\t }\n\t }\n\t // remember this route as having no more untested options\n\t Closed.push(myNode);\n\t }\n\t } // keep iterating until the Open list is empty\n\t return result;\n\t }", "buildPath(num) {\n var result = new Set();\n var cur = num;\n const maxBound = this.props.maxBound;\n while (!result.has(cur) && cur <= maxBound && cur >= -maxBound) {\n result.add(cur);\n cur = this.getDestination(cur);\n }\n return [...result];\n }", "function connectPaths() {\n \n \n var thread = $(\".home__logo-thread\").offset(); // gets positions of threaded elements, used to calculate thread paths\n var titleCard = $(\".home__title-wrap\");\n var mission = $(\".home__mission-statement\");\n \n var aboutTitle = $(\".about__title\").offset(); \n \n var dolyaTitle = $(\".dolya__title\").position();\n \n var values = $(\".values__values\");\n var principles = $(\".values__principles\");\n \n var servicesTitle = $(\".services__title\").position();\n\n var kurt = $(\"#team1\").position();\n var targ = $(\"#team4\").position();\n \n var myth = $(\".dolya__content-inner\");\n var valuesTitle = $(\".values__title\").position();\n \n var contact = $(\".contact__title\").position();\n \n var hex1 = $(\".expertise-1\");\n var hex2 = $(\".expertise-2\");\n var hex3 = $(\".expertise-3\");\n var hex4 = $(\".expertise-4\");\n var hexW = $(\".expertise__wrap-2\").position();\n var hexWidth = 0;\n if (w > 600) {\n hexWidth = (200/3)*1.8;\n } else hexWidth = (( (w/100) * 23 ) /3) * 2;\n \n var z = 0;\n if (w > 740) {\n z = 13;\n }\n \n var arc = 30;\n var pad = 30;\n var threadOffset = 237;\n \n if (w > 1099) {\n \n $(\".path-logo\").attr(\"d\", \"M\" + (thread.left) + \" \" + (thread.top + 1) +\n \" H\" + (thread.left + threadOffset)\n );\n \n $(\".path-home\").attr(\"d\", \"M\" + (thread.left + threadOffset) + \" \" + (thread.top + 1) +\n \" H\" + (titleCard.offset().left + titleCard.width() - 10 ) +\n \" A\" + \" \" + arc + \" \" + arc + \" 0 0 1 \" + (titleCard.offset().left + titleCard.width() + arc - 10 ) + \" \" + (thread.top + arc) +\n \" V\" + (mission.offset().top + mission.height()) +\n \" A\" + \" \" + arc + \" \" + arc + \" 0 0 1 \" + (titleCard.offset().left + titleCard.width() - 10 ) + \" \" + (mission.offset().top + mission.height() + arc) +\n \" H\" + ( mission.offset().left + arc) +\n \" A\" + \" \" + arc + \" \" + arc + \" 0 0 0 \" + (w/2 ) + \" \" + (mission.offset().top + mission.height() + arc*2 ) +\n \" V\" + (aboutTitle.top) \n );\n \n } else {\n $(\".path-logo\").attr(\"d\", \"M\" + (thread.left) + \" \" + (thread.top) +\n \" H\" + (thread.left + threadOffset)\n );\n $(\".path-home\").attr(\"d\", \"M\" + (thread.left + threadOffset) + \" \" + (thread.top) + // fix init alignment issue\n \" H\" + (titleCard.offset().left + titleCard.width() ) +\n \" A\" + \" \" + arc + \" \" + arc + \" 0 0 1 \" + (titleCard.offset().left + (titleCard.width()) + arc ) + \" \" + (thread.top + arc) +\n \" V\" + (mission.offset().top + mission.height() ) +\n \" A\" + \" \" + arc + \" \" + arc + \" 0 0 1 \" + (titleCard.offset().left + (titleCard.width()) ) + \" \" + (mission.offset().top + mission.height() + arc) +\n \" H\" + ((w/2) + arc) +\n \" A\" + \" \" + arc + \" \" + arc + \" 0 0 0 \" + (w/2 ) + \" \" + (mission.offset().top + mission.height() + arc + arc ) +\n \" V\" + (aboutTitle.top) \n );\n }\n \n $(\".path-about\").attr(\"d\", \"M\" + (w/2) + \" \" + (0) + \n \" V\" + (dolyaTitle.top ) \n );\n \n $(\".path-dolya\").attr(\"d\", \"M\" + (w/2) + \" \" + (0) + \n \" V\" + (myth.position().top - arc) +\n \" A\" + \" \" + arc + \" \" + arc + \" 0 0 1 \" + (w/2 - arc) + \" \" + myth.position().top +\n \" H\" + (myth.position().left + arc) +\n \" A\" + \" \" + arc + \" \" + arc + \" 0 0 0 \" + myth.position().left + \" \" + (myth.position().top + arc) +\n \" V\" + (myth.position().top + myth.outerHeight() - arc) +\n \" A\" + \" \" + arc + \" \" + arc + \" 0 0 0 \" + (myth.position().left + arc) + \" \" + (myth.position().top + myth.outerHeight() ) +\n \" H\" + (w/2 - arc) +\n \" A\" + \" \" + arc + \" \" + arc + \" 0 0 1 \" + (w/2) + \" \" + (myth.position().top + myth.outerHeight() + arc) +\n \" V\" + valuesTitle.top \n );\n \n $(\".path-values\").attr(\"d\", \"M\" + (w/2) + \" \" + (0) + \n \" V\" + (values.position().top - arc - (pad*2) ) +\n \" A\" + \" \" + arc + \" \" + arc + \" 0 0 1 \" + (w/2 - arc) + \" \" + (values.position().top - arc - pad) +\n \" H\" + (values.position().left ) +\n \" A\" + \" \" + arc + \" \" + arc + \" 0 0 0 \" + (values.position().left - arc) + \" \" + (values.position().top - arc) +\n \" V\" + (values.position().top + (values.outerHeight() /2) - arc - 20 ) +\n \" A\" + \" \" + arc + \" \" + arc + \" 0 0 0 \" + (values.position().left ) + \" \" + (values.position().top + (values.outerHeight() / 2) - 20) +\n \" H\" + (values.position().left + values.outerWidth() ) +\n \" A\" + \" \" + arc + \" \" + arc + \" 0 0 1 \" + (values.position().left + values.outerWidth() + arc) + \" \" + (values.position().top + (values.outerHeight() / 2) - 20 + arc) +\n \" V\" + (principles.position().top + principles.outerHeight() ) +\n \" A\" + \" \" + arc + \" \" + arc + \" 0 0 1 \" + (values.position().left + values.outerWidth() ) + \" \" + (principles.position().top + principles.outerHeight() + arc) +\n \" H\" + (w/2 + arc) +\n \" A\" + \" \" + arc + \" \" + arc + \" 0 0 0 \" + (w/2) + \" \" + (principles.position().top + principles.outerHeight() + (arc*2)) +\n \" V\" + (servicesTitle.top) \n );\n \n $(\".path-services\").attr(\"d\", \"M\" + (w/2) + \" \" + (0) + \n \" V\" + ($(\".services__content\").height() ) \n );\n \n $(\".path-team\").attr(\"d\", \"M\" + (w/2) + \" \" + (0) + \n \" V\" + (kurt.top - arc - pad) +\n \" A\" + \" \" + arc + \" \" + arc + \" 0 0 1 \" + (w/2 - arc) + \" \" + (kurt.top - arc) +\n \" H\" + (kurt.left + ( $(\"#team1\").width() /2 ) + arc) +\n \" A\" + \" \" + arc + \" \" + arc + \" 0 0 0 \" + (kurt.left + ( $(\"#team1\").width()/2) ) + \" \" + (kurt.top) +\n \" V\" + (kurt.top + ( $(\"#team1\").height() /2 ) - arc ) +\n \" A\" + \" \" + arc + \" \" + arc + \" 0 0 0 \" + (kurt.left + ( $(\"#team1\").width()/2) + arc ) + \" \" + (kurt.top + ( $(\"#team1\").height()/2) ) +\n \" H\" + (targ.left + ( $(\"#team4\").width() /2 ) - arc ) +\n \" A\" + \" \" + arc + \" \" + arc + \" 0 0 1 \" + (targ.left + ( $(\"#team4\").width() /2 ) ) + \" \" + (kurt.top + ( $(\"#team1\").height()/2) + arc) +\n \" V\" + (kurt.top + $(\"#team1\").height() ) +\n \" A\" + \" \" + arc + \" \" + arc + \" 0 0 1 \" + (targ.left + ( $(\"#team4\").width() /2 ) - arc) + \" \" + (kurt.top + ( $(\"#team1\").height()) + arc) +\n \" H\" + ((w/2) + arc ) +\n \" A\" + \" \" + arc + \" \" + arc + \" 0 0 0 \" + ( w/2 ) + \" \" + (kurt.top + ( $(\"#team1\").height()) + (arc*2)) +\n \" V\" + contact.top\n );\n \n $(\".path-expertise\").attr(\"d\", \"M\" + (w/2) + \" \" + (0) +\n \" V\" + (hex1.position().top - arc - pad) +\n \" A\" + \" \" + arc + \" \" + arc + \" 0 0 1 \" + ((w/2) - arc ) + \" \" + (hex1.position().top - arc) +\n \" H\" + (hex1.position().left + (hexWidth / 2) + arc ) +\n \" A\" + \" \" + arc + \" \" + arc + \" 0 0 0 \" + (hex1.position().left + (hex1.outerWidth() / 3) ) + \" \" + (hex1.position().top) +\n \" V\" + (hex1.position().top + (hex1.outerHeight() / 2) - arc + 3 + z) +\n \" A\" + \" \" + arc + \" \" + arc + \" 0 0 0 \" + (hex1.position().left + (hex1.outerWidth() / 3) + arc ) + \" \" + (hex1.position().top + (hex1.outerHeight() / 2) + 3 + z) +\n \" H\" + (hex3.position().left + hexWidth) +\n \" A\" + \" \" + arc + \" \" + arc + \" 0 0 1 \" + (hex3.position().left + hexWidth + arc ) + \" \" + (hex1.position().top + (hex1.outerHeight() / 2) + arc ) +\n \" V\" + (hexW.top + (hex4.outerHeight()/4 ) - arc ) +\n \" A\" + \" \" + arc + \" \" + arc + \" 0 0 1 \" + (hex3.position().left + hexWidth ) + \" \" + (hexW.top + (hex4.outerHeight()/4 ) ) +\n \" H\" + (hex2.position().left - 15 ) +\n \" A\" + \" \" + arc + \" \" + arc + \" 0 0 0 \" + (hex2.position().left - 15 - arc ) + \" \" + (hexW.top + (hex4.outerHeight()/4 ) +arc ) +\n \" V\" + (hexW.top + (hex4.outerHeight() ) - arc - 15) +\n \" A\" + \" \" + arc + \" \" + arc + \" 0 0 0 \" + (hex2.position().left - 15 ) + \" \" + (hexW.top + (hex4.outerHeight() - 15 ) ) +\n \" H\" + ( (w/2) - arc ) +\n \" A\" + \" \" + arc + \" \" + arc + \" 0 0 1 \" + (w/2) + \" \" + (hexW.top + (hex4.outerHeight() - 15 + arc ) ) +\n \" V\" + (dolyaTitle.top)\n );\n}" ]
[ "0.6273108", "0.59052885", "0.58947754", "0.5766077", "0.574933", "0.5727824", "0.5727817", "0.5704255", "0.5704255", "0.5682538", "0.5682538", "0.5682538", "0.5682538", "0.56654656", "0.5660568", "0.5651678", "0.5628781", "0.56250507", "0.56250507", "0.5593339", "0.55876833", "0.55876833", "0.55876833", "0.55876833", "0.55524427", "0.5506271", "0.54638356", "0.54575866", "0.54378563", "0.54184896", "0.54175454", "0.54078305", "0.5401076", "0.5388115", "0.5379073", "0.53609806", "0.53471714", "0.5333896", "0.53330487", "0.5320573", "0.53048944", "0.5300356", "0.5265349", "0.5226179", "0.52250695", "0.521231", "0.521231", "0.521231", "0.521231", "0.5212288", "0.5204428", "0.52033997", "0.52009875", "0.5194996", "0.5191499", "0.51867783", "0.51692903", "0.51599634", "0.51526695", "0.5147867", "0.5146763", "0.51448673", "0.5131488", "0.511287", "0.5110475", "0.51005965", "0.5097333", "0.5097052", "0.50943756", "0.5093971", "0.50920415", "0.50630873", "0.50608164", "0.5048897", "0.50435233", "0.50335944", "0.5021777", "0.50185186", "0.5018507", "0.5010463", "0.50077844", "0.499395", "0.49924612", "0.49880996", "0.49828637", "0.49819547", "0.4981807", "0.4977894", "0.49768025", "0.49687642", "0.4957264", "0.4945637" ]
0.61321384
8
Retruns the global event processors.
function getGlobalEventProcessors() { /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */ var global = Object(misc["e" /* getGlobalObject */])(); global.__SENTRY__ = global.__SENTRY__ || {}; global.__SENTRY__.globalEventProcessors = global.__SENTRY__.globalEventProcessors || []; return global.__SENTRY__.globalEventProcessors; /* eslint-enable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getGlobalEventProcessors() {\n\t return getGlobalSingleton('globalEventProcessors', () => []);\n\t}", "function getGlobalEventProcessors() {\n return utils.getGlobalSingleton('globalEventProcessors', () => []);\n}", "function getGlobalEventProcessors() {\n return getGlobalSingleton('globalEventProcessors', () => []);\n }", "function getGlobalEventProcessors() {\n var global = misc_1.getGlobalObject();\n global.__SENTRY__ = global.__SENTRY__ || {};\n global.__SENTRY__.globalEventProcessors = global.__SENTRY__.globalEventProcessors || [];\n return global.__SENTRY__.globalEventProcessors;\n}", "function getGlobalEventProcessors() {\n /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */\n var global = utils_1.getGlobalObject();\n global.__SENTRY__ = global.__SENTRY__ || {};\n global.__SENTRY__.globalEventProcessors = global.__SENTRY__.globalEventProcessors || [];\n return global.__SENTRY__.globalEventProcessors;\n /* eslint-enable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */\n}", "function getGlobalEventProcessors() {\n var global = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__[\"getGlobalObject\"])();\n global.__SENTRY__ = global.__SENTRY__ || {};\n global.__SENTRY__.globalEventProcessors = global.__SENTRY__.globalEventProcessors || [];\n return global.__SENTRY__.globalEventProcessors;\n}", "function getGlobalEventProcessors() {\r\n var global = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__[\"getGlobalObject\"])();\r\n global.__SENTRY__ = global.__SENTRY__ || {};\r\n global.__SENTRY__.globalEventProcessors = global.__SENTRY__.globalEventProcessors || [];\r\n return global.__SENTRY__.globalEventProcessors;\r\n}", "function addGlobalEventProcessor(callback) {\n\t getGlobalEventProcessors().push(callback);\n\t}", "function addGlobalEventProcessor(callback) {\n getGlobalEventProcessors().push(callback);\n }", "function addGlobalEventProcessor(callback) {\n getGlobalEventProcessors().push(callback);\n}", "function addGlobalEventProcessor(callback) {\n getGlobalEventProcessors().push(callback);\n}", "function addGlobalEventProcessor(callback) {\n getGlobalEventProcessors().push(callback);\n}", "function addGlobalEventProcessor(callback) {\n getGlobalEventProcessors().push(callback);\n}", "function addGlobalEventProcessor(callback) {\r\n getGlobalEventProcessors().push(callback);\r\n}", "function addGlobalEventProcessor(callback) {\n getGlobalEventProcessors().push(callback);\n}", "function getEvents()\n{\n\tconsole.log( \"getEvents2\" );\n\t\n\t//console.log( events );\n\tif(preloadEvents)\n\t\treturn preloadedEvents;\n\telse\n\t\treturn NULL;\n}", "getProcessorTypes(){\n\t\tif( 'function' === typeof this.props.getProcessorTypes){\n\t\t\treturn this.props.getProcessorTypes();\n\t\t}\n\t\treturn processorTypesMap;\n\t}", "async events() {\n return await this.call({func:\"get_events\", context:\"locals\"})\n }", "async function globalSync () {\n globalEvents = await helper.getLatestEvents()\n}", "getPluginsByRegisteredEvent(ev_type) {\n return this.plugins_by_events[ev_type];\n }", "get eventListeners() {\n return this.eventListenersLocal;\n }", "get eventSubscriptions() {\n return this.internal.eventSubscriptions;\n }", "getEvents() {\n\t\treturn this.metadata.events || {};\n\t}", "addListeners() {\n return dispatch => {\n Platform.prefs.addEventListener('message', prefs => dispatch(receive(c.RECEIVE_PREFS, prefs)));\n Platform.search.addEventListener('enginechange', event => {\n dispatch(receive(c.RECEIVE_CURRENT_SEARCH_ENGINE, {body: event.engine}));\n });\n Platform.search.addEventListener('visibleenginechange', event => {\n dispatch(receive(c.RECEIVE_VISIBLE_SEARCH_ENGINES, {body: event.engines}));\n });\n };\n }", "registerEvents() {\r\n const gridEvents = [\r\n // Register Grid Events.\r\n {\r\n handler: this.slickGrid,\r\n events: this.events.slickGrid\r\n },\r\n\r\n // Register DataView Events.\r\n {\r\n handler: this.dataView,\r\n events: this.events.dataView\r\n },\r\n\r\n // Register SelectionModel Events.\r\n {\r\n handler: this.selectionModel,\r\n events: this.events.selectionModel\r\n }\r\n ];\r\n\r\n // Register any plugin events.\r\n const pluginEvents = _(this.plugins)\r\n .pickBy(plugin => {\r\n return plugin.hasOwnProperty(\"events\");\r\n })\r\n .map(plugin => {\r\n return { handler: plugin.plugin, events: plugin.events };\r\n })\r\n .value();\r\n\r\n _.forEach(_.concat(gridEvents, pluginEvents), registee => this.handleEventRegistration(registee));\r\n\r\n this.registerHeaderInputEvent();\r\n }", "function getGlobal(e){if(!e)return e;var t=global;return each(e.split(\".\"),function(e){t=t[e]}),t}", "static get listenedEvents() {\n\t\treturn DOM_EVENTS;\n\t}", "async registerSystemEventListeners () {\n await Collect(this.coreEventListener)\n .map(Listener => {\n return new Listener()\n })\n .concat(\n await this.getSystemEventListeners()\n )\n .forEach(listener => {\n this.registerListeners(listener.on(), listener)\n })\n }", "async getSystemEventListeners () {\n const listenerFiles = await this.loadListeners()\n\n return listenerFiles\n .map(listenerFile => {\n const Listener = this.resolve(listenerFile)\n const listener = new Listener()\n this.ensureListener(listener)\n\n return listener\n })\n .filter(listener => {\n return listener.type() === 'system'\n })\n }", "static get listeners() {\n return {\n 'mouseenter': '_mouseEnterHandler',\n 'mouseleave': '_mouseLeaveHandler',\n 'container.swipeleft': '_swipeHandler',\n 'container.swiperight': '_swipeHandler',\n 'container.swipetop': '_swipeHandler',\n 'container.swipebottom': '_swipeHandler'\n };\n }", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function EventHandlers() {}", "function getEvents(){\n self.events = eventsService.getEvents();\n }", "getEventsToRender() {}", "get processes() {\n return this._processes.values();\n }", "parseEvents() {\n return {\n onStart: createEventCallback('onStart', this.pathNavigator).bind(this),\n onPause: createEventCallback('onPause', this.pathNavigator).bind(this),\n onMove: createEventCallback('onMove', this.pathNavigator).bind(this),\n onStop: createEventCallback('onStop', this.pathNavigator).bind(this),\n };\n }", "init () {\n const me = this;\n\n if (!me.eventsInitialized) {\n me.events.forEach(event => process.addListener(event, me.exec));\n\n me.eventsInitialized = true;\n }\n }", "function getProcessorMap() {\r\n adminFactory.getprocessors().then(function(res) {\r\n console.log(\"processors res.data\", res.data);\r\n $scope.watchtaskfilter = \"none\";\r\n $scope.processors = res.data;\r\n $scope.nop = Object.keys($scope.processors).length;\r\n }, function(res) {\r\n //error\r\n console.log(\"Failed to get proccessors info error:\", res.data.error);\r\n });\r\n }", "get eventListeners() {\n\t\treturn [\"onOpening\",\"onOpen\",\"onClosing\",\"onClose\",\"onCollapse\",\"onDragEnd\",\"onDragStart\",\"onExpand\",\"onMaximize\",\"onMinimize\",\"onResizeEnd\",\"onResizeStart\",\"onRestore\",\"onCreate\",\"onReady\"];\n\t}", "_initEvents(){\n this._eventInstances.forEach((list,i)=>{\n const hasTargets = list.length,\n isInitialised = this._eventInitialised[i]\n if (hasTargets&&!isInitialised) {\n this._body.addEventListener(this._eventNames[i],this._onEvent.bind(this,list,this._eventHandlers[i]))\n this._eventInitialised[i] = true\n }\n })\n }", "function collectEvents(self, db) {\n var collectedEvents = [];\n\n if(self instanceof MongoClient) {\n var events = [\"timeout\", \"close\", 'serverOpening', 'serverDescriptionChanged', 'serverHeartbeatStarted',\n 'serverHeartbeatSucceeded', 'serverHeartbeatFailed', 'serverClosed', 'topologyOpening',\n 'topologyClosed', 'topologyDescriptionChanged', 'joined', 'left', 'ping', 'ha', 'all', 'fullsetup'];\n events.forEach(function(event) {\n db.serverConfig.on(event, function(object1, object2) {\n collectedEvents.push({\n event: event, object1: object1, object2: object2\n });\n });\n });\n }\n\n return collectedEvents;\n}", "_events() {\n var _this = this;\n\n $(window).on('changed.zf.mediaquery', function() {\n _this._checkMediaQueries();\n });\n // $(window).on('resize.zf.ResponsiveMenu', function() {\n // _this._checkMediaQueries();\n // });\n }", "function mapPluginEvents(core) {\n return Object.keys(EVENT_MAPPING).map(function (pluginEvent) {\n return core.api.attachDomEvent(core, pluginEvent, EVENT_MAPPING[pluginEvent]);\n });\n}", "loadGlobals() {\n // TODO: Make Private\n log('Loading Global Commands...');\n this.loadDirectory(path.join(__dirname, 'global/commands'), true);\n log('Loading Global Plugins...');\n this.loadDirectory(path.join(__dirname, 'global/plugins'), true);\n }", "function getGraphHooks() {\n\tconst hookFiles = readHookConfig();\n\treturn hookFiles ? hookFiles.map(loadHandler) : null;\n}", "function setEventsListeners() {\n events.on(CONSTANTS.EVENTS.AUCTION_INIT, (args) => {\n subModules.forEach(sm => { sm.auctionInit && sm.auctionInit(args, sm.config) })\n });\n events.on(CONSTANTS.EVENTS.AUCTION_END, (args) => {\n subModules.forEach(sm => { sm.auctionEnd && sm.auctionEnd(args, sm.config) })\n });\n events.on(CONSTANTS.EVENTS.BEFORE_REQUEST_BIDS, (args) => {\n subModules.forEach(sm => { sm.updateBidRequest && sm.updateBidRequest(args, sm.config) })\n });\n events.on(CONSTANTS.EVENTS.BID_RESPONSE, (args) => {\n subModules.forEach(sm => { sm.updateBidResponse && sm.updateBidResponse(args, sm.config) })\n });\n}", "getCorePluginScheduler () {\n return this.corePluginScheduler\n }", "static get listeners() {\n return {\n 'resize': '_resizeHandler',\n 'backButton.click': '_backButtonClickHandler',\n 'filterInput.keyup': '_filterInputKeyupHandler',\n 'mainContainer.down': '_mainContainerDownHandler',\n 'mainContainer.move': '_mainContainerMoveHandler',\n 'mainContainer.swipeleft': '_mainContainerSwipeHandler',\n 'mainContainer.swiperight': '_mainContainerSwipeHandler',\n 'view.click': '_viewHandler',\n 'view.mouseout': '_viewHandler',\n 'view.mouseover': '_viewHandler',\n 'view.transitionend': '_viewHandler',\n 'view.wheel': '_wheelHandler'\n };\n }", "function GlobalExternalHandler() {\n //a map of context ids to specific handlers\n var specificHandlers = {};\n //whether or not this handler has replaced the default functions\n var installed = false;\n return {\n /**\n * Sets the global handler up. this should override the global browser\n * API function with a variant that emits events.\n **/\n install() {\n installed = true;\n },\n installed: () => installed,\n /**\n * Tells this global handler that a context is using it. This will set up\n * a specific handler.\n **/\n registerCtx(ctx) {\n specificHandlers[ctx.id()] = EventAware();\n },\n /**\n * Returns the specific handler associated with the context.\n **/\n getSpecificHandler(ctx) {\n return specificHandlers[ctx.id()] || null;\n },\n /**\n * Restores the replaced functions with the default ones.\n **/\n cleanup() {\n installed = false;\n },\n uses() {\n return [];\n }\n };\n }", "function attachEvents(){\n Object.keys(he.globalEvents).forEach(function(name){\n document.addEventListener(name, function(e){\n _.each(he.globalEvents[name], function(id){\n var control;\n if(control = CACHE[id]){\n control.trigger(\"global:\" + name, e);\n return;\n }\n // Control was removed\n delete CACHE[id];\n });\n });\n });\n\n delegateEvent('click');\n delegateEvent('keyup');\n delegateEvent('keydown');\n delegateEvent('mousemove');\n delegateEvent('mousedown');\n delegateEvent('mouseup');\n delegateEvent('keypress');\n }", "static get PLUGINS() {\n return PLUGINS;\n }", "function onAllLoaded() {\n console.log('all loaded');\n}", "function collectFunctions() {\n var keys = Object.keys(window);\n var functions = [];\n\n keys.forEach(function(key) {\n if (window[key] instanceof Function) { // Step (1)\n functions.push(window[key].name || \"<Anonymous function>\"); // anonymous function support does not currently exist\n }\n });\n\n window.postMessage({ // Step (2)\n type: \"FROM_PAGE\",\n text: functions\n }, \"*\");\n}", "function addGlobalListeners(replay) {\n // Listeners from core SDK //\n const scope = getCurrentHub().getScope();\n if (scope) {\n scope.addScopeListener(handleScopeListener(replay));\n }\n addInstrumentationHandler('dom', handleDomListener(replay));\n addInstrumentationHandler('fetch', handleFetchSpanListener(replay));\n addInstrumentationHandler('xhr', handleXhrSpanListener(replay));\n addInstrumentationHandler('history', handleHistorySpanListener(replay));\n\n // Tag all (non replay) events that get sent to Sentry with the current\n // replay ID so that we can reference them later in the UI\n addGlobalEventProcessor(handleGlobalEventListener(replay));\n }", "initializeEvents () {\n }", "get global() {\n return globals;\n }", "getCallbacksByRegisteredEvent(ev_type) {\n return this.callbacks_by_events[ev_type];\n }", "get events() {\n\t\treturn this.nativeElement ? this.nativeElement.events : undefined;\n\t}", "hookListeners(dispatchEvents, callback) {\n debug('hookListeners()');\n return this.hookListenersImpl(dispatchEvents, callback);\n }", "getTopics() {\n return Object.keys(this.listeners);\n }", "function useGlobals() {\n var channel = _index__WEBPACK_IMPORTED_MODULE_22__[/* addons */ \"a\"].getChannel();\n\n var _useStoryContext3 = useStoryContext(),\n globals = _useStoryContext3.globals;\n\n var updateGlobals = useCallback(function (newGlobals) {\n return channel.emit(_storybook_core_events__WEBPACK_IMPORTED_MODULE_21__[/* UPDATE_GLOBALS */ \"h\"], {\n globals: newGlobals\n });\n }, [channel]);\n return [globals, updateGlobals];\n}", "static get listeners() {\n return {\n 'container.down': '_mouseDownHandler',\n 'document.move': '_drag',\n 'document.up': '_switchThumbDropHandler',\n 'mouseenter': '_switchButtonOnMouseEnter',\n 'mouseleave': '_switchButtonOnMouseLeave',\n 'resize': '_resizeHandler',\n 'container.resize': '_resizeHandler',\n 'document.selectstart': '_selectStartHandler'\n };\n }", "initDomEvents() {\n const me = this;\n\n // Set thisObj and element of the configured listener specs.\n me.scheduledBarEvents.element = me.schedulerEvents.element = me.timeAxisSubGridElement;\n me.scheduledBarEvents.thisObj = me.schedulerEvents.thisObj = me;\n\n // same listener used for different events\n EventHelper.on(me.scheduledBarEvents);\n EventHelper.on(me.schedulerEvents);\n }", "get_listeners() { return null; }", "get UseGlobal() {}", "__initEvents() {\n if (this.__hasInitEvents) {\n return;\n }\n\n this.__hasInitEvents = true;\n this.$eventHub = eventCenter;\n let events = this.$rawBroadcastEvents;\n if (typeof events === 'function') {\n events = this.$rawBroadcastEvents = events();\n }\n this.__bindBroadcastEvents(events);\n }", "function getGlobal() {\n var moduleGlobal = {};\n\n for (var g in jspm.global) {\n if (jspm.global.hasOwnProperty(g) && g != 'window' && globalObj[g] != jspm.global[g])\n moduleGlobal[g] = jspm.global[g];\n }\n return moduleGlobal;\n }", "initDomEvents() {\n const me = this; // Set thisObj and element of the configured listener specs.\n\n me.scheduledBarEvents.element = me.schedulerEvents.element = me.timeAxisSubGridElement;\n me.scheduledBarEvents.thisObj = me.schedulerEvents.thisObj = me; // same listener used for different events\n\n EventHelper.on(me.scheduledBarEvents);\n EventHelper.on(me.schedulerEvents);\n }", "static get listeners() {\n return {\n 'keydown': '_keyHandler',\n 'keyup': '_keyHandler',\n 'dragstart': '_dragStartHandler',\n 'button.click': '_buttonClickHandler',\n 'button.mouseenter': '_buttonMouseEnterHandler',\n 'button.mouseleave': '_buttonMouseLeaveHandler',\n 'document.up': '_documentUpHandler'\n };\n }", "static getEvents() {\n let events =\n localStorage.getItem(\"events\") === null\n ? []\n : JSON.parse(localStorage.getItem(\"events\"));\n\n return events;\n }", "allCustomEvents() {\n // add custom events here\n }", "get_processor_kwargs() {\n return {}\n }", "init() {\n\t\tglobalApplication.events.document();\n\t\tglobalApplication.events.header();\n\t}", "function getGlobalRegistry() {\n return global.__SENTRY__;\n}", "_eventEmitterListen() {\n\t\t\n\t\tObject.keys (allowedRoutes).map ((eventRoute) => {\n\t\t\t\n\t\t\tthis.debug ('now listening for eventRoute : ' + eventRoute);\n\t\t\t\n\t\t\teventEmitter.on (eventRoute, (data) => {\n\t\t\t\tif ( !data.payload ) {\n\t\t\t\t\tthis.debug ('dataEvent:PAYLOAD_MISSING');\n\t\t\t\t\treturn;\n\t\t\t\t\t// throw new Error ('dataEvent:PAYLOAD_MISSING');\n\t\t\t\t}\n\t\t\t\tif ( data.payload.roles ) {\n\t\t\t\t\tthis._eventEmitterDispatch (eventRoute, data);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tthis.debug ('dataEvent:PAYLOAD_ROLE_MISSING');\n\t\t\t\t\treturn;\n\t\t\t\t\t// throw new Error ('dataEvent:PAYLOAD_ROLE_MISSING');\n\t\t\t\t}\n\t\t\t});\n\t\t})\n\t}", "getEvents() {\n let remoteAction = new RemoteAction(RemoteActions.GetEvents, {}, {}, result => {\n debug('getEvents->remoteAction result:', result);\n this.onEvents(result.events);\n });\n\n // Set the context for the current embed\n remoteAction.setContext({\n embedId: this.getId()\n });\n this.getDispatcher().sendAction(remoteAction, true);\n }", "function invokeDataProcessors() {\n plugins.forEach(function(plugin) {\n try {\n plugin.moduleInstance.process();\n }\n catch(e) {\n console.log(\"Error processing analytics data for\", plugin.manifest.name, \":\", e);\n }\n });\n}", "peekGlobalTerminators() {\n var _a;\n return (_a = this.globalTerminators[this.globalTerminators.length - 1]) !== null && _a !== void 0 ? _a : [];\n }", "function EventDispatcher() {}", "function EventDispatcher() {}", "function watchedEvents(obj) {\n var meta$$1 = exports.peekMeta(obj);\n return meta$$1 && meta$$1.watchedEvents() || [];\n }", "_dispatchOnInit(){\n for (const instance of this._instances.values()) {\n instance.onInit&&instance.onInit()\n }\n }", "function registerEvents() {\n}" ]
[ "0.8494986", "0.8441576", "0.8419894", "0.8315455", "0.81234026", "0.7935585", "0.7902069", "0.6231468", "0.6218892", "0.6087853", "0.6087853", "0.6087853", "0.6087853", "0.6087767", "0.60697734", "0.60263985", "0.594165", "0.59127104", "0.5666589", "0.5600421", "0.5533949", "0.5501829", "0.5452732", "0.54132533", "0.5379757", "0.53694636", "0.5363226", "0.5322027", "0.53137606", "0.52789956", "0.5274395", "0.5274395", "0.5274395", "0.5274395", "0.5274395", "0.5274395", "0.5274395", "0.5274395", "0.5274395", "0.5274395", "0.5274395", "0.5274395", "0.5274395", "0.5274395", "0.5274395", "0.5274395", "0.5274395", "0.5274395", "0.5274395", "0.5272758", "0.5215656", "0.5188756", "0.51064426", "0.5104676", "0.51043874", "0.50771886", "0.5068637", "0.50672126", "0.50530624", "0.50488025", "0.5032376", "0.5025299", "0.5022298", "0.5012989", "0.50116205", "0.5007744", "0.4989646", "0.4984596", "0.49829596", "0.49701267", "0.4964864", "0.4963065", "0.4958825", "0.495829", "0.49424845", "0.49408126", "0.4928138", "0.49247107", "0.49154288", "0.4912126", "0.49111274", "0.48997876", "0.48843157", "0.48712453", "0.48613814", "0.48482093", "0.4839642", "0.48286048", "0.48190933", "0.4815462", "0.4810484", "0.480895", "0.4799542", "0.47934037", "0.47915334", "0.47905993", "0.47905993", "0.47803494", "0.47727352", "0.47696954" ]
0.80795264
5
Add a EventProcessor to be kept globally.
function addGlobalEventProcessor(callback) { getGlobalEventProcessors().push(callback); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addGlobalEventProcessor(callback) {\n getGlobalEventProcessors().push(callback);\n }", "function addGlobalEventProcessor(callback) {\n getGlobalEventProcessors().push(callback);\n}", "function addGlobalEventProcessor(callback) {\n\t getGlobalEventProcessors().push(callback);\n\t}", "function addGlobalEventProcessor(callback) {\r\n getGlobalEventProcessors().push(callback);\r\n}", "function getGlobalEventProcessors() {\n return getGlobalSingleton('globalEventProcessors', () => []);\n }", "function getGlobalEventProcessors() {\n\t return getGlobalSingleton('globalEventProcessors', () => []);\n\t}", "function add(event, subscriber, handler) {\n\n\n if (eventers.hasOwnProperty(event) == true) {\n eventers[event].push({s: subscriber, h: handler})\n }\n else {\n eventers[event] = [];\n eventers[event].push({s: subscriber, h: handler})\n }\n\n\n}", "function getGlobalEventProcessors() {\n return utils.getGlobalSingleton('globalEventProcessors', () => []);\n}", "function addOnEvent(eventListener) {\n eventQueue.push(eventListener);\n }", "function getGlobalEventProcessors() {\n var global = misc_1.getGlobalObject();\n global.__SENTRY__ = global.__SENTRY__ || {};\n global.__SENTRY__.globalEventProcessors = global.__SENTRY__.globalEventProcessors || [];\n return global.__SENTRY__.globalEventProcessors;\n}", "function getGlobalEventProcessors() {\r\n var global = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__[\"getGlobalObject\"])();\r\n global.__SENTRY__ = global.__SENTRY__ || {};\r\n global.__SENTRY__.globalEventProcessors = global.__SENTRY__.globalEventProcessors || [];\r\n return global.__SENTRY__.globalEventProcessors;\r\n}", "function getGlobalEventProcessors() {\n /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */\n var global = utils_1.getGlobalObject();\n global.__SENTRY__ = global.__SENTRY__ || {};\n global.__SENTRY__.globalEventProcessors = global.__SENTRY__.globalEventProcessors || [];\n return global.__SENTRY__.globalEventProcessors;\n /* eslint-enable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */\n}", "constructor() {\n this.eventPool = {}\n }", "function getGlobalEventProcessors() {\n var global = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__[\"getGlobalObject\"])();\n global.__SENTRY__ = global.__SENTRY__ || {};\n global.__SENTRY__.globalEventProcessors = global.__SENTRY__.globalEventProcessors || [];\n return global.__SENTRY__.globalEventProcessors;\n}", "function getGlobalEventProcessors() {\n /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */\n var global = Object(misc[\"e\" /* getGlobalObject */])();\n global.__SENTRY__ = global.__SENTRY__ || {};\n global.__SENTRY__.globalEventProcessors = global.__SENTRY__.globalEventProcessors || [];\n return global.__SENTRY__.globalEventProcessors;\n /* eslint-enable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access */\n}", "on_assign_processor() {\n }", "function createEventCollector() {\n return eventCollectorFactory(autoflow);\n }", "add() {\n this.target.addEventListener(this.eventType, this.fn, false);\n }", "function interpreterAddEvent(mode) {\n updateBreakpointEvent();\n if (interpreters !== null) {\n for (var i = 0; i < numRobots; i++) {\n interpreters[i].addEvent(mode);\n }\n }\n }", "register(processType) { this.register_(processType) }", "function addGlobalListeners(replay) {\n // Listeners from core SDK //\n const scope = getCurrentHub().getScope();\n if (scope) {\n scope.addScopeListener(handleScopeListener(replay));\n }\n addInstrumentationHandler('dom', handleDomListener(replay));\n addInstrumentationHandler('fetch', handleFetchSpanListener(replay));\n addInstrumentationHandler('xhr', handleXhrSpanListener(replay));\n addInstrumentationHandler('history', handleHistorySpanListener(replay));\n\n // Tag all (non replay) events that get sent to Sentry with the current\n // replay ID so that we can reference them later in the UI\n addGlobalEventProcessor(handleGlobalEventListener(replay));\n }", "onCreatedPreProcessor(preprocessor) {}", "ADD_EVENT(state, event) {\n state.events.push(event);\n }", "function EventDispatcher() {\n\t\tthis.eventMap = {};\n\t}", "addEventListener (f) {\n this.eventListeners.push(f)\n }", "function EventDispatcher() {}", "function EventDispatcher() {}", "init () {\n const me = this;\n\n if (!me.eventsInitialized) {\n me.events.forEach(event => process.addListener(event, me.exec));\n\n me.eventsInitialized = true;\n }\n }", "registerOnce(event, listener){\n this._emiter.once(event, listener);\n }", "function addAProcess(){\n handleAddAProcess();\n}", "function addEvents() {\n if (typeof settings.enable === 'function') {\n settings.enable = settings.enable.bind(instance)();\n }\n\n if (!settings.enable) {\n return; // interaction is disabled\n }\n\n Object.keys(settings.events).forEach(function (key) {\n var listener = settings.events[key].bind(instance);\n element.addEventListener(key, listener);\n nativeEvents.push({\n key: key,\n listener: listener\n });\n });\n }", "function registerEvents() {\n}", "function registerEventSourceDef(def) {\n defs.push(def);\n }", "function add_ev(node, event, f) {\n var eventHandler = function(e) { change_world(function(w, k) { f(w, e, k); },\n doNothing); };\n attachEvent(node, event, eventHandler);\n eventDetachers.push(function() { detachEvent(node, event, eventHandler); });\n }", "function add_ev(node, event, f) {\n var eventHandler = function(e) { change_world(function(w, k) { f(w, e, k); },\n doNothing); };\n attachEvent(node, event, eventHandler);\n eventDetachers.push(function() { detachEvent(node, event, eventHandler); });\n }", "function EventManager() {\n}", "function main() {\n addEventListeners();\n addAdvancedEventListeners();\n}", "registerTopicProcessor (topic, callback) {\n\t\tthis.topicProcessors[topic] = callback\n\t}", "function accumulateDispatches(inst,ignoredDirection,event){if(event&&event.dispatchConfig.registrationName){var registrationName=event.dispatchConfig.registrationName;var listener=getListener(inst,registrationName);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}}", "function accumulateDispatches(inst,ignoredDirection,event){if(event&&event.dispatchConfig.registrationName){var registrationName=event.dispatchConfig.registrationName;var listener=getListener(inst,registrationName);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}}", "function accumulateDispatches(inst,ignoredDirection,event){if(event&&event.dispatchConfig.registrationName){var registrationName=event.dispatchConfig.registrationName;var listener=getListener(inst,registrationName);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}}", "function accumulateDispatches(inst,ignoredDirection,event){if(inst&&event&&event.dispatchConfig.registrationName){var registrationName=event.dispatchConfig.registrationName;var listener=getListener(inst,registrationName);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}}", "function accumulateDispatches(inst,ignoredDirection,event){if(inst&&event&&event.dispatchConfig.registrationName){var registrationName=event.dispatchConfig.registrationName;var listener=getListener(inst,registrationName);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}}", "function accumulateDispatches(inst,ignoredDirection,event){if(inst&&event&&event.dispatchConfig.registrationName){var registrationName=event.dispatchConfig.registrationName;var listener=getListener(inst,registrationName);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}}", "function accumulateDispatches(inst,ignoredDirection,event){if(inst&&event&&event.dispatchConfig.registrationName){var registrationName=event.dispatchConfig.registrationName;var listener=getListener(inst,registrationName);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}}", "function accumulateDispatches(inst,ignoredDirection,event){if(inst&&event&&event.dispatchConfig.registrationName){var registrationName=event.dispatchConfig.registrationName;var listener=getListener(inst,registrationName);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}}", "function accumulateDispatches(inst,ignoredDirection,event){if(inst&&event&&event.dispatchConfig.registrationName){var registrationName=event.dispatchConfig.registrationName;var listener=getListener(inst,registrationName);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}}", "function accumulateDispatches(inst,ignoredDirection,event){if(inst&&event&&event.dispatchConfig.registrationName){var registrationName=event.dispatchConfig.registrationName;var listener=getListener(inst,registrationName);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}}", "function accumulateDispatches(inst,ignoredDirection,event){if(inst&&event&&event.dispatchConfig.registrationName){var registrationName=event.dispatchConfig.registrationName;var listener=getListener(inst,registrationName);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}}", "function accumulateDispatches(inst,ignoredDirection,event){if(inst&&event&&event.dispatchConfig.registrationName){var registrationName=event.dispatchConfig.registrationName;var listener=getListener(inst,registrationName);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}}", "function accumulateDispatches(inst,ignoredDirection,event){if(inst&&event&&event.dispatchConfig.registrationName){var registrationName=event.dispatchConfig.registrationName;var listener=getListener(inst,registrationName);if(listener){event._dispatchListeners=accumulateInto(event._dispatchListeners,listener);event._dispatchInstances=accumulateInto(event._dispatchInstances,inst);}}}", "function main() {\n addEventListeners();\n}", "_addMessageListener({\n eventHandler,\n eventName,\n frameId\n }) {\n\n if (typeof eventHandler === 'function') {\n\n handlers.add({\n componentId: this.componentId,\n eventName: eventName,\n eventHandler: eventHandler,\n frameId,\n });\n\n }\n\n }", "setupGlobalEvents() {\n // TODO: Put every flag in the ressourceManager\n /* --- Lifecycle flags --- */\n const R = this.R\n R.add({\n flags: { // TODO think about how to order those strings so not mess everything up and keep it understandable\n hasLoaded: 'hasLoaded',\n sceneStarts: 'scene_starts',\n sceneEnds: 'scene_ends',\n },\n events: {\n mouseMove: 'mouse_move',\n click: 'mouse_click',\n pick: 'mouse_pick',\n keydown: 'key_down',\n keyup: 'key_up',\n resize: 'resize',\n windowFocus: 'windowFocus',\n windowBlur: 'windowBlur',\n pause: 'pause',\n wasHandled: 'was_handled',\n beingHandled: 'being_handled',\n modalDismissed: 'modalDismissed',\n tooltipDismissed: 'tooltipDismissed',\n },\n })\n\n /* Add keyboard listener */\n window.addEventListener('keydown', (evt) => {\n debuglog('TaskObject: Keydown event.')\n debuglog(evt)\n\n // call taskObject keyfunction handler\n this.keyfunction(evt)\n\n // store keydown event\n const eventData = new EventData(\n R.get.events_keydown,\n this.timeInMs, {\n belongsTo: ['globalLog', 'keyEvents'],\n handledAt: null,\n storedAt: null,\n keyCode: evt.keyCode,\n key: evt.key,\n },\n )\n\n // TODO add event to current scene should be a method\n if (typeof this.currentSceneObject !== 'undefined') {\n if (typeof this.currentSceneObject.stateManager !== 'undefined') {\n this.currentSceneObject.stateManager.addEvent(eventData)\n }\n }\n })\n\n // update the keystates when keyup but do not store event\n // TODO think if usefull to store keyup\n window.addEventListener('keyup', (evt) => {\n this.keyfunction(evt)\n })\n\n /* window.addEventListener(\"mousemove\", function(evt) {\n debuglog(\"TaskObject: mousemove event.\");\n debuglog(evt);\n\n var eventData = new EventData(thisObject.FLAG_EVENTS_INPUT_MOUSEMOVE, thisObject.timeInMs, {\n belongsTo: [\"globalLog\", \"mouseEvents\"],\n handledAt: null,\n storedAt: null,\n clientX: evt.clientX,\n clientY: evt.clientY\n }); //make an static EventData from dom event?\n\n if (typeof thisObject.currentSceneObject !== \"undefined\") {\n if (typeof thisObject.currentSceneObject.stateManager !== \"undefined\") {\n thisObject.currentSceneObject.stateManager.addEvent(eventData);\n }\n }\n\n });*/\n window.addEventListener('mousedown', (evt) => {\n debuglog('TaskObject: mousedown event.')\n debuglog(evt)\n\n const eventData = new EventData(\n R.get.events_click,\n new Date().getTime(), {\n belongsTo: ['globalLog', 'mouseEvents'],\n handledAt: null,\n storedAt: null,\n clientX: evt.clientX,\n clientY: evt.clientY,\n engineX: evt.clientX *\n (this.renderSize.width / window.innerWidth),\n engineY: (window.innerHeight - evt.clientY) *\n (this.renderSize.height / window.innerHeight),\n },\n )\n\n // make an static EventData from dom event?\n if (typeof this.currentSceneObject !== 'undefined') {\n if (typeof this.currentSceneObject.stateManager !== 'undefined') {\n this.currentSceneObject.stateManager.addEvent(eventData)\n }\n }\n })\n\n\n window.addEventListener('resize', (evt) => {\n debuglog('TaskObject: resize event.')\n debuglog(evt)\n\n const eventData = new EventData(\n R.get.events_resize,\n this.timeInMs, {\n belongsTo: ['globalLog'],\n handledAt: null,\n storedAt: null,\n outerHeight: evt.target.outerHeight,\n outerWidth: evt.target.outerWidth,\n },\n )\n\n // if a current scene exists pass it down the stateManager\n // and look for a resize handler updateContentFrame\n if (typeof this.currentSceneObject !== 'undefined') {\n try {\n this.addEventToCurrentScene(eventData)\n } catch (e) {\n console.error(e)\n } finally {\n if (typeof this.currentSceneObject.updateContentFrame !== 'undefined') {\n this.currentSceneObject.updateContentFrame()\n }\n }\n }\n })\n\n /* --- Focus event --- */\n const checkFocus = function () {\n let event = R.get.events_windowBlur\n if (document.hasFocus()) {\n event = R.get.events_windowFocus\n }\n\n this.addEventToCurrentScene(new EventData(event, this.timeInMs))\n }.bind(this)\n\n let visibilityChange\n if (typeof document.hidden !== 'undefined') {\n visibilityChange = 'visibilitychange'\n } else if (typeof document.mozHidden !== 'undefined') {\n visibilityChange = 'mozvisibilitychange'\n } else if (typeof document.msHidden !== 'undefined') {\n visibilityChange = 'msvisibilitychange'\n } else if (typeof document.webkitHidden !== 'undefined') {\n visibilityChange = 'webkitvisibilitychange'\n }\n\n document.addEventListener(visibilityChange, checkFocus)\n window.addEventListener('focus', checkFocus)\n window.addEventListener('blur', checkFocus)\n }", "function processEvent(event) {\n if (!event.action) {\n console.error(\"Event with no action is received.\");\n return;\n }\n\n var i = 0;\n switch(event.action) {\n case \"add\":\n for (; i < event.events.length; i++) {\n events[event.events[i]] = true;\n }\n break;\n case \"remove\":\n for (; i < event.events.length; i++) {\n events[event.events[i]] = false;\n }\n break;\n default:\n console.error(\"Unknown action for event.\");\n }\n}", "function EventSubscriber() {\n return function (target) {\n __1.getMetadataArgsStorage().entitySubscribers.push({\n target: target\n });\n };\n}", "on(type, fn) {\n if (this.eventEmitter[type]) {\n this.eventEmitter[type].push(fn)\n } else {\n this.eventEmitter[type] = [fn];\n }\n }", "function init() {\n var targetEmitter;\n CAL.logger._publishToList.forEach(function (target) {\n if (target.emitter === process &&\n target.topic === TOPIC) {\n targetEmitter = target;\n }\n });\n if (!targetEmitter) {\n CAL.logger._publishToList.push({\n emitter: process,\n topic: TOPIC\n });\n }\n}", "any(eventSource) {\n this.anyListeners.push(eventSource);\n return this;\n }", "addEvent(eventID: number) {\n this._events.push(getReferenceById(eventID));\n if (!g_loading && !g_playing) g_history.ike(this._ID, this.addEvent.name, this.constructor.name, arguments);\n }", "addEvent(event) {\n this.eventsToClean.push(event);\n }", "function processEvent(event) {\n if(!event.action)\n {\n console.error(\"Event with no action is received.\");\n return;\n }\n\n var i = 0;\n switch(event.action)\n {\n case \"add\":\n for(; i < event.events.length; i++)\n {\n events[event.events[i]] = true;\n }\n break;\n case \"remove\":\n for(; i < event.events.length; i++)\n {\n events[event.events[i]] = false;\n }\n break;\n default:\n console.error(\"Unknown action for event.\");\n }\n\n}", "on(event: string, listener: Function): void {\n if (typeof this.__events[event] !== 'object') {\n this.__events[event] = [];\n }\n\n this.__events[event].push(listener);\n }", "function addWatchers() {\n\t\t\t\tif (addWatchers.hasRun) { return; }\n\t\t\t\taddWatchers.hasRun = true;\n\n\t\t\t\tKEYS.forEach(function(key) {\n\t\t\t\t\tenquire.register(CONFIG[key].query, {\n\t\t\t\t\t\tmatch: _.throttle(function() {\n\t\t\t\t\t\t\tpublishChange(new BreakpointChangeEvent(key, previousBP));\n\t\t\t\t\t\t\tpreviousBP = key;\n\t\t\t\t\t\t}, 20)\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}", "addEventListener(name, callFunction){\n /*if(this.eventNameList.has(name)){\n this.eventNameList.get(name).callFunctionList.add(callFunction);\n }*/\n this.eventNameList.get(name).callFunctionList.add(callFunction);\n }", "if (handlers[event].indexOf(handler) === -1) {\n handlers[event].push(handler);\n }", "function addEvent(e) {\n\tif (! (layout.events.some(function (ee) {\n\t\treturn ((ee.nn == e.nn) && (ee.en == e.en));\n\t})))\n\t\tlayout.events.push(e);\n}", "static register(type) {\n if(OS.kernel) OS.kernel.register(type);\n else processTypes.push(type);\n }", "addEventListener(event, callback, useCapture) {\n\t\tthis.$pwMain.subscribe({event: event, fn: callback, useCapture: useCapture});\n\t}", "addEventListener(event, callback, useCapture) {\n\t\tthis.$pwMain.subscribe({event: event, fn: callback, useCapture: useCapture});\n\t}", "initPublisherListener() {\n // Enable keyevents in redis and subsribe for EXPIRED event\n redisPSub.config('SET', 'notify-keyspace-events', 'Ex');\n redisPSub.psubscribe('__keyevent@0__:*');\n redisPSub.on('pmessage', (pattern, channel, message) => {\n if (message === 'publisherHere') {\n this.check().then(mode => {\n if (mode === 'IamPublisher') {\n this.emit('mode:change', 'publisher');\n }\n });\n }\n });\n }", "function registerModuleEventListener (name, module, meta) {\n if (name !== 'globalEvent') {\n module['addEventListener'] = function (evt, callbackId, options) {\n return addEventListener.call(this, name, evt, callbackId, options)\n }\n module['removeAllEventListeners'] = function (evt) {\n return removeAllEventListeners.call(this, name, evt)\n }\n ; [{\n name: 'addEventListener',\n args: ['string', 'function', 'object']\n }, {\n name: 'removeAllEventListeners',\n args: ['string']\n }].forEach(info => meta[name].push(info))\n }\n}", "function registerModuleEventListener (name, module, meta) {\n if (name !== 'globalEvent') {\n module['addEventListener'] = function (evt, callbackId, options) {\n return addEventListener.call(this, name, evt, callbackId, options)\n }\n module['removeAllEventListeners'] = function (evt) {\n return removeAllEventListeners.call(this, name, evt)\n }\n ; [{\n name: 'addEventListener',\n args: ['string', 'function', 'object']\n }, {\n name: 'removeAllEventListeners',\n args: ['string']\n }].forEach(info => meta[name].push(info))\n }\n}", "function addEvent() {\n sendLog(\"Add Event\")\n selectEvent(0);\n handleShow();\n }", "on(event, fn) {\n if (!this.eventMap[event]) {\n this.eventMap[event] = [];\n }\n\n this.eventMap[event].push(fn);\n return this\n }", "async registerSystemEventListeners () {\n await Collect(this.coreEventListener)\n .map(Listener => {\n return new Listener()\n })\n .concat(\n await this.getSystemEventListeners()\n )\n .forEach(listener => {\n this.registerListeners(listener.on(), listener)\n })\n }", "function EventPool() {\n this.events = [];\n}", "addListener(listener) {\n if (!activeListeners.includes(listener)) {\n activeListeners.push(listener);\n }\n }", "RegisterEventSource() {\n\n }", "function EventReader() {}", "addGlobalEventListener(target, eventName, handler) {\n const plugin = this._findPluginFor(eventName);\n\n return plugin.addGlobalEventListener(target, eventName, handler);\n }", "_addListeners() {\n try {\n WINDOW$1.document.addEventListener('visibilitychange', this._handleVisibilityChange);\n WINDOW$1.addEventListener('blur', this._handleWindowBlur);\n WINDOW$1.addEventListener('focus', this._handleWindowFocus);\n\n // We need to filter out dropped events captured by `addGlobalEventProcessor(this.handleGlobalEvent)` below\n overwriteRecordDroppedEvent(this._context.errorIds);\n\n // There is no way to remove these listeners, so ensure they are only added once\n if (!this._hasInitializedCoreListeners) {\n addGlobalListeners(this);\n\n this._hasInitializedCoreListeners = true;\n }\n } catch (err) {\n this._handleException(err);\n }\n\n // PerformanceObserver //\n if (!('PerformanceObserver' in WINDOW$1)) {\n return;\n }\n\n this._performanceObserver = setupPerformanceObserver(this);\n }", "addEvent(eventLine) {\n let event = new Event(eventLine, this.use_24h_clock);\n this.eventsList.push(event);\n this.addEventToWidget(event);\n }", "createdProcessor(event, message)\n {\n let mutation = this.getStateModuleName(event, 'Created') + '/ADD';\n\n this.vue.$store.commit(mutation, message);\n }", "on(sEventName, f) {\n\t\tthis.getEventHandlers(sEventName).push(f);\n\t}", "addProcess(process) {\n if (this.processes.has(process.processName)) {\n throw Error('Process with name: ' + process.processName + ' already defined.');\n } else {\n this.processes.set(process.processName, process);\n }\n return process;\n }", "function addEvent(eventFile) {\n\t\tif (validate(eventFile)) {\n\t\t\tevents[eventFile.event] = {\n\t\t\t\trun: eventFile.run\n\t\t\t};\n\t\t} else {\n\t\t\tLog.error(`Command file ${file} is invalid.`);\n\t\t\tthrow `Command file ${file} is invalid.`;\n\t\t}\n\t}", "function addEvents(eventList) {\n angular.forEach(eventList, function(e) {\n $scope.eventQueue.enqueue(e);\n });\n }", "function makeOrderEventHandler(dispatch){\n\t\n}", "addEvent(event, cb) {\n if (this._observer) {\n this._observer(event.setKey(this._groupBy(event)));\n }\n if (cb) {\n cb(null);\n }\n }", "regsiterLocalHandler(event, Handler) {\n this.session.localHandlers[event] = new Handler(this)\n }", "_addKeypress() {\n\t\tif (this.options.keyword) {\n\t\t\tthis.keylog = [];\n\t\t\tthis.keyword = this.options.keyword;\n\t\t\tthis._onKeypress = this._onKeypress.bind(this);\n\t\t\tdocument.addEventListener('keypress', this._onKeypress);\n\t\t}\n\t}", "function attachEvents(){\n Object.keys(he.globalEvents).forEach(function(name){\n document.addEventListener(name, function(e){\n _.each(he.globalEvents[name], function(id){\n var control;\n if(control = CACHE[id]){\n control.trigger(\"global:\" + name, e);\n return;\n }\n // Control was removed\n delete CACHE[id];\n });\n });\n });\n\n delegateEvent('click');\n delegateEvent('keyup');\n delegateEvent('keydown');\n delegateEvent('mousemove');\n delegateEvent('mousedown');\n delegateEvent('mouseup');\n delegateEvent('keypress');\n }", "_addEvent(event, timeline) {\n this._scheduledEvents[event.id.toString()] = {\n event,\n timeline,\n };\n timeline.add(event);\n return event.id;\n }", "function addEventListeners() {\n\n}", "on(e, fn) {\n // After doing some research, I felt like a Set rather than an array would work better since it wouldnt allow duplicate function within a specific event. Basically this method is checking to see if the event already exists - and if it does it will add the function to that Set, otherwise create a new set where it contains the called function.\n\t\tif (this.events[e]) {\n\t\treturn this.event[e].add(fn);\n\t\t}\n\t\tthis.events[e] = new Set([fn]);\n\t}", "_setupScopeListener() {\n const hubScope = core_1.getCurrentHub().getScope();\n if (hubScope) {\n hubScope.addScopeListener(updatedScope => {\n const cloned = core_1.Scope.clone(updatedScope);\n cloned._eventProcessors = [];\n cloned._scopeListeners = [];\n // tslint:disable-next-line:no-object-literal-type-assertion\n this._scopeStore.update((current) => (Object.assign(Object.assign({}, current), cloned)));\n });\n }\n }" ]
[ "0.7936899", "0.7878661", "0.78346163", "0.7829425", "0.5965462", "0.59309137", "0.5707509", "0.5608199", "0.5497957", "0.54723257", "0.544641", "0.5426993", "0.5412833", "0.54049814", "0.53995687", "0.5344003", "0.5283757", "0.52602077", "0.524846", "0.519032", "0.5148142", "0.5126946", "0.512694", "0.5123453", "0.50934935", "0.5018184", "0.5018184", "0.5003613", "0.4947054", "0.49146897", "0.4911793", "0.48967206", "0.48941657", "0.48914054", "0.48914054", "0.48760015", "0.48653537", "0.4865169", "0.48559523", "0.48559523", "0.48559523", "0.48423102", "0.48423102", "0.48423102", "0.48423102", "0.48423102", "0.48423102", "0.48423102", "0.48423102", "0.48423102", "0.48423102", "0.48331577", "0.47980848", "0.47961634", "0.477493", "0.47739485", "0.4770837", "0.4768022", "0.47662395", "0.47657105", "0.47453275", "0.4736295", "0.47356978", "0.4735422", "0.4716796", "0.47069144", "0.4699654", "0.46886262", "0.46845457", "0.46845457", "0.4673929", "0.46673208", "0.46673208", "0.46666682", "0.46654612", "0.46587002", "0.46519062", "0.4650534", "0.46432206", "0.4641306", "0.4641005", "0.4632416", "0.46253988", "0.46051162", "0.46020782", "0.4600505", "0.45960733", "0.45918933", "0.45740607", "0.45687792", "0.45583457", "0.4557841", "0.45539594", "0.4553408", "0.45529568", "0.4543759", "0.45396563" ]
0.78643775
5
Returns the global shim registry.
function getMainCarrier() { var carrier = Object(misc["e" /* getGlobalObject */])(); carrier.__SENTRY__ = carrier.__SENTRY__ || { extensions: {}, hub: undefined, }; return carrier; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getGlobalRegistry() {\n return global.__SENTRY__;\n}", "async setRegistry() {\n const cacheKey = ''\n if (this._registries[cacheKey]) {\n return this._registries[cacheKey]\n }\n\n let registry\n if (await shouldUseTaobao(this.bin)) {\n registry = registries.taobao\n } else {\n try {\n if (!registry || registry === 'undefined') {\n registry = (await execa(this.bin, ['config', 'get', 'registry'])).stdout\n }\n } catch (e) {\n // Yarn 2 uses `npmRegistryServer` instead of `registry`\n registry = (await execa(this.bin, ['config', 'get', 'npmRegistryServer'])).stdout\n }\n }\n\n this._registries[cacheKey] = stripAnsi(registry).trim()\n return this._registries[cacheKey]\n }", "get global() {\n return globals;\n }", "function getGlobal() {\n if (typeof self !== 'undefined') {\n return self;\n }\n if (typeof window !== 'undefined') {\n return window;\n }\n if (typeof __webpack_require__.g !== 'undefined') {\n return __webpack_require__.g;\n }\n throw new Error('Unable to locate global object.');\n}", "function getBrowserGlobals() {\n var i = document.createElement('iframe');\n i.style.display = 'none';\n document.body.appendChild(i);\n var builtins = Object.keys(i.contentWindow);\n document.body.removeChild(i);\n return builtins;\n }", "function getGlobal() {\r\n if (typeof self !== 'undefined') {\r\n return self;\r\n }\r\n if (typeof window !== 'undefined') {\r\n return window;\r\n }\r\n if (typeof __webpack_require__.g !== 'undefined') {\r\n return __webpack_require__.g;\r\n }\r\n throw new Error('Unable to locate global object.');\r\n}", "function getCurrentRegistry(cbk) {\n npm.load(function(err, conf) {\n if (err) return exit(err);\n cbk(npm.config.get('registry'));\n });\n}", "function getGlobal() {\n var moduleGlobal = {};\n\n for (var g in jspm.global) {\n if (jspm.global.hasOwnProperty(g) && g != 'window' && globalObj[g] != jspm.global[g])\n moduleGlobal[g] = jspm.global[g];\n }\n return moduleGlobal;\n }", "systemLib() {\n const getSysLib = this.getGlobalFunc(\"runtime.SystemLib\");\n const mod = getSysLib();\n getSysLib.dispose();\n return mod;\n }", "function PackageRegistry() {\n this._promiseInfoMap = Object.create(null);\n }", "function PackageRegistry() {\n this._promiseInfoMap = Object.create(null);\n }", "static clearRegistry() {\n frameworkRegistry.clear();\n }", "get UseGlobal() {}", "function setupRegistry() {\n return {\n getUniqueId: getSeqNumberGenerator(),\n icus: new Map()\n };\n }", "function setupRegistry() {\n return {\n getUniqueId: getSeqNumberGenerator(),\n icus: new Map()\n };\n}", "function getGlobalObject() {\n return (Object(_node__WEBPACK_IMPORTED_MODULE_0__[/* isNodeEnv */ \"b\"])()\n ? global\n : typeof window !== 'undefined'\n ? window\n : typeof self !== 'undefined'\n ? self\n : fallbackGlobalObject);\n}", "function getGlobal() {\n if (typeof self !== 'undefined') {\n return self;\n }\n if (typeof window !== 'undefined') {\n return window;\n }\n if (typeof global !== 'undefined') {\n return global;\n }\n throw new Error('Unable to locate global object.');\n}", "function getGlobal(value) {\n if (!value) {\n return value;\n }\n var g = global;\n each(value.split('.'), function (part) {\n g = g[part];\n });\n return g;\n }", "function getGlobal(value) {\n if (!value) {\n return value;\n }\n var g = global;\n each(value.split('.'), function (part) {\n g = g[part];\n });\n return g;\n }", "function getGlobal(value) {\n if (!value) {\n return value;\n }\n var g = global;\n each(value.split('.'), function (part) {\n g = g[part];\n });\n return g;\n }", "function getGlobal(value) {\n if (!value) {\n return value;\n }\n var g = global;\n each(value.split('.'), function (part) {\n g = g[part];\n });\n return g;\n }", "function getGlobal(value) {\n if (!value) {\n return value;\n }\n var g = global;\n each(value.split('.'), function (part) {\n g = g[part];\n });\n return g;\n }", "function getGlobal(value) {\n if (!value) {\n return value;\n }\n var g = global;\n each(value.split('.'), function (part) {\n g = g[part];\n });\n return g;\n }", "function getGlobal(value) {\n if (!value) {\n return value;\n }\n var g = global;\n each(value.split('.'), function (part) {\n g = g[part];\n });\n return g;\n }", "function getGlobal(value) {\n if (!value) {\n return value;\n }\n var g = global;\n each(value.split('.'), function (part) {\n g = g[part];\n });\n return g;\n }", "function getGlobal(value) {\n if (!value) {\n return value;\n }\n var g = global;\n each(value.split('.'), function (part) {\n g = g[part];\n });\n return g;\n }", "function getGlobal(value) {\n if (!value) {\n return value;\n }\n var g = global;\n each(value.split('.'), function (part) {\n g = g[part];\n });\n return g;\n }", "function getGlobal(value) {\n if (!value) {\n return value;\n }\n var g = global;\n each(value.split('.'), function (part) {\n g = g[part];\n });\n return g;\n }", "function getGlobal(value) {\n if (!value) {\n return value;\n }\n var g = global;\n each(value.split('.'), function (part) {\n g = g[part];\n });\n return g;\n }", "function getGlobal(value) {\n if (!value) {\n return value;\n }\n var g = global;\n each(value.split('.'), function (part) {\n g = g[part];\n });\n return g;\n }", "function getGlobal(value) {\n if (!value) {\n return value;\n }\n var g = global;\n each(value.split('.'), function (part) {\n g = g[part];\n });\n return g;\n }", "function getGlobal(value) {\n if (!value) {\n return value;\n }\n var g = global;\n each(value.split('.'), function (part) {\n g = g[part];\n });\n return g;\n }", "function getGlobal(value) {\n if (!value) {\n return value;\n }\n var g = global;\n each(value.split('.'), function (part) {\n g = g[part];\n });\n return g;\n }", "function getGlobal(value) {\n if (!value) {\n return value;\n }\n var g = global;\n each(value.split('.'), function (part) {\n g = g[part];\n });\n return g;\n }", "function getGlobal(value) {\n if (!value) {\n return value;\n }\n var g = global;\n each(value.split('.'), function (part) {\n g = g[part];\n });\n return g;\n }", "function getGlobal(value) {\n if (!value) {\n return value;\n }\n var g = global;\n each(value.split('.'), function (part) {\n g = g[part];\n });\n return g;\n }", "function getGlobal(value) {\n if (!value) {\n return value;\n }\n var g = global;\n each(value.split('.'), function (part) {\n g = g[part];\n });\n return g;\n }", "function getGlobal(value) {\n if (!value) {\n return value;\n }\n var g = global;\n each(value.split('.'), function (part) {\n g = g[part];\n });\n return g;\n }", "function getRegisterAddIns() {\n return __awaiter(this, void 0, void 0, function* () {\n switch (process.platform) {\n case \"darwin\":\n return devSettingsMac.getRegisteredAddIns();\n case \"win32\":\n return devSettingsWindows.getRegisteredAddIns();\n default:\n throw new office_addin_usage_data_1.ExpectedError(`Platform not supported: ${process.platform}.`);\n }\n });\n}", "function setRegistry(registry) {\n global[GLOBAL_THEME_REGISTRY] = registry;\n}", "function getGlobal(e){if(!e)return e;var t=global;return each(e.split(\".\"),function(e){t=t[e]}),t}", "function global(loader) {\n\n loader._extensions.push(global);\n\n function readGlobalProperty(p, value) {\n var pParts = p.split('.');\n while (pParts.length)\n value = value[pParts.shift()];\n return value;\n }\n\n function createHelpers(loader) {\n if (loader.has('@@global-helpers'))\n return;\n\n var hasOwnProperty = loader.global.hasOwnProperty;\n var moduleGlobals = {};\n\n var curGlobalObj;\n var ignoredGlobalProps;\n\n function makeLookupObject(arr) {\n var out = {};\n for(var i = 0, len = arr.length; i < len; i++) {\n out[arr[i]] = true;\n }\n return out;\n }\n\n loader.set('@@global-helpers', loader.newModule({\n prepareGlobal: function(moduleName, deps, exportName) {\n // first, we add all the dependency modules to the global\n for (var i = 0; i < deps.length; i++) {\n var moduleGlobal = moduleGlobals[deps[i]];\n if (moduleGlobal)\n for (var m in moduleGlobal)\n loader.global[m] = moduleGlobal[m];\n }\n\n // If an exportName is defined there is no need to perform the next\n // expensive operation.\n if(exportName || exportName === false || loader.inferGlobals === false) {\n return;\n }\n\n // now store a complete copy of the global object\n // in order to detect changes\n curGlobalObj = {};\n ignoredGlobalProps = makeLookupObject(['indexedDB', 'sessionStorage', 'localStorage',\n 'clipboardData', 'frames', 'webkitStorageInfo', 'toolbar', 'statusbar',\n 'scrollbars', 'personalbar', 'menubar', 'locationbar', 'webkitIndexedDB',\n 'screenTop', 'screenLeft'\n ]);\n for (var g in loader.global) {\n if (ignoredGlobalProps[g]) { continue; }\n if (!hasOwnProperty || loader.global.hasOwnProperty(g)) {\n try {\n curGlobalObj[g] = loader.global[g];\n } catch (e) {\n ignoredGlobalProps[g] = true;\n }\n }\n }\n },\n retrieveGlobal: function(moduleName, exportName, init) {\n var singleGlobal;\n var multipleExports;\n var exports = {};\n\n // run init\n if (init)\n singleGlobal = init.call(loader.global);\n\n // check for global changes, creating the globalObject for the module\n // if many globals, then a module object for those is created\n // if one global, then that is the module directly\n else if (exportName) {\n var firstPart = exportName.split('.')[0];\n singleGlobal = readGlobalProperty(exportName, loader.global);\n exports[firstPart] = loader.global[firstPart];\n }\n\n else if(exportName !== false && loader.inferGlobals !== false) {\n for (var g in loader.global) {\n if (ignoredGlobalProps[g])\n continue;\n if ((!hasOwnProperty || loader.global.hasOwnProperty(g)) && g != loader.global && curGlobalObj[g] != loader.global[g]) {\n exports[g] = loader.global[g];\n if (singleGlobal) {\n if (singleGlobal !== loader.global[g])\n multipleExports = true;\n }\n else if (singleGlobal === undefined) {\n singleGlobal = loader.global[g];\n }\n }\n }\n }\n\n moduleGlobals[moduleName] = exports;\n\n return multipleExports ? exports : singleGlobal;\n }\n }));\n }\n\n createHelpers(loader);\n\n var loaderInstantiate = loader.instantiate;\n loader.instantiate = function(load) {\n var loader = this;\n\n createHelpers(loader);\n\n var exportName = load.metadata.exports;\n\n if (!load.metadata.format)\n load.metadata.format = 'global';\n\n // global is a fallback module format\n if (load.metadata.format == 'global') {\n load.metadata.execute = function(require, exports, module) {\n\n loader.get('@@global-helpers').prepareGlobal(module.id, load.metadata.deps, exportName);\n\n if (exportName)\n load.source += '\\nthis[\"' + exportName + '\"] = ' + exportName + ';';\n\n // disable module detection\n var define = loader.global.define;\n var require = loader.global.require;\n\n loader.global.define = undefined;\n loader.global.module = undefined;\n loader.global.exports = undefined;\n\n loader.__exec(load);\n\n loader.global.require = require;\n loader.global.define = define;\n\n return loader.get('@@global-helpers').retrieveGlobal(module.id, exportName, load.metadata.init);\n }\n }\n return loaderInstantiate.call(loader, load);\n }\n}", "function setupRegistry() {\n return { getUniqueId: getSeqNumberGenerator(), icus: new Map() };\n}", "function setupRegistry() {\n return { getUniqueId: getSeqNumberGenerator(), icus: new Map() };\n}", "function setupRegistry() {\n return { getUniqueId: getSeqNumberGenerator(), icus: new Map() };\n}", "function setupRegistry() {\n return { getUniqueId: getSeqNumberGenerator(), icus: new Map() };\n}", "function setupRegistry() {\n return { getUniqueId: getSeqNumberGenerator(), icus: new Map() };\n}", "function setupRegistry() {\n return { getUniqueId: getSeqNumberGenerator(), icus: new Map() };\n}", "function setupRegistry() {\n return { getUniqueId: getSeqNumberGenerator(), icus: new Map() };\n}", "function Registry() {\n this.aliases = {};\n }", "function getGlobalObject() {\n return (node_1.isNodeEnv()\n ? global\n : typeof window !== 'undefined' // eslint-disable-line no-restricted-globals\n ? window // eslint-disable-line no-restricted-globals\n : typeof self !== 'undefined'\n ? self\n : fallbackGlobalObject);\n}", "function getGlobalObject() {\r\n return isNodeEnv() ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : fallbackGlobalObject;\r\n}", "function globalize(env){\n\tif( !env){\n\t\tenv= require( \".\")\n\t}\n\tfor( var i in env){\n\t\tglobal[ i]= env[i]\n\t}\n\treturn global\n}", "function getGlobalObject() {\r\n return (isNodeEnv()\r\n ? global\r\n : typeof window !== 'undefined'\r\n ? window\r\n : typeof self !== 'undefined'\r\n ? self\r\n : fallbackGlobalObject);\r\n}", "function getGlobalObject() {\n return isNodeEnv() ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {};\n}", "function getGlobalObject() {\n return (isNodeEnv()\n ? global\n : typeof window !== 'undefined'\n ? window\n : typeof self !== 'undefined'\n ? self\n : fallbackGlobalObject);\n}", "function globals() {\n\t\textend(window, {\n\t\t\tconsole: {\n\t\t\t\tlog: function() {},\n\t\t\t\tdebug: function() {},\n\t\t\t\twarn: function() {},\n\t\t\t\terror: function() {}\n\t\t\t}\n\t\t});\n\t}", "function getCurrentHub() {\n // Get main carrier (global for every environment)\n var registry = getMainCarrier();\n // If there's no hub, or its an old API, assign a new one\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(exports.API_VERSION)) {\n setHubOnCarrier(registry, new Hub());\n }\n // Prefer domains over global if they are there\n try {\n // We need to use `dynamicRequire` because `require` on it's own will be optimized by webpack.\n // We do not want this to happen, we need to try to `require` the domain node module and fail if we are in browser\n // for example so we do not have to shim it and use `getCurrentHub` universally.\n var domain = misc_1.dynamicRequire(module, 'domain');\n var activeDomain = domain.active;\n // If there no active domain, just return global hub\n if (!activeDomain) {\n return getHubFromCarrier(registry);\n }\n // If there's no hub on current domain, or its an old API, assign a new one\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(exports.API_VERSION)) {\n var registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, scope_1.Scope.clone(registryHubTopStack.scope)));\n }\n // Return hub that lives on a domain\n return getHubFromCarrier(activeDomain);\n }\n catch (_Oo) {\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }\n}", "function getCurrentHub() {\r\n // Get main carrier (global for every environment)\r\n var registry = getMainCarrier();\r\n // If there's no hub, or its an old API, assign a new one\r\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\r\n setHubOnCarrier(registry, new Hub());\r\n }\r\n // Prefer domains over global if they are there\r\n try {\r\n // We need to use `dynamicRequire` because `require` on it's own will be optimized by webpack.\r\n // We do not want this to happen, we need to try to `require` the domain node module and fail if we are in browser\r\n // for example so we do not have to shim it and use `getCurrentHub` universally.\r\n var domain = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__[\"dynamicRequire\"])(module, 'domain');\r\n var activeDomain = domain.active;\r\n // If there no active domain, just return global hub\r\n if (!activeDomain) {\r\n return getHubFromCarrier(registry);\r\n }\r\n // If there's no hub on current domain, or its an old API, assign a new one\r\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\r\n var registryHubTopStack = getHubFromCarrier(registry).getStackTop();\r\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, _scope__WEBPACK_IMPORTED_MODULE_2__[\"Scope\"].clone(registryHubTopStack.scope)));\r\n }\r\n // Return hub that lives on a domain\r\n return getHubFromCarrier(activeDomain);\r\n } catch (_Oo) {\r\n // Return hub that lives on a global object\r\n return getHubFromCarrier(registry);\r\n }\r\n}", "function globals() {\n return {\n range: function range(start, stop, step) {\n if (typeof stop === 'undefined') {\n stop = start;\n start = 0;\n step = 1;\n } else if (!step) {\n step = 1;\n }\n\n var arr = [];\n\n if (step > 0) {\n for (var i = start; i < stop; i += step) {\n arr.push(i);\n }\n } else {\n for (var _i = start; _i > stop; _i += step) {\n // eslint-disable-line for-direction\n arr.push(_i);\n }\n }\n\n return arr;\n },\n cycler: function cycler() {\n return _cycler(Array.prototype.slice.call(arguments));\n },\n joiner: function joiner(sep) {\n return _joiner(sep);\n }\n };\n}", "function lisp_js_global(name) {\n lisp_assert(lisp_is_instance(name, Lisp_String));\n return window[lisp_string_native_string(name)];\n}", "function getGlobal() {\n if (typeof globalThis !== 'undefined') {\n return globalThis;\n }\n if (typeof global !== 'undefined') {\n return global;\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore: Cannot find name 'window'.\n if (typeof window !== 'undefined') {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore: Cannot find name 'window'.\n return window;\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore: Cannot find name 'self'.\n if (typeof self !== 'undefined') {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore: Cannot find name 'self'.\n return self;\n }\n}", "function getGlobal() {\n if (typeof globalThis !== 'undefined') {\n return globalThis;\n }\n if (typeof global !== 'undefined') {\n return global;\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore: Cannot find name 'window'.\n if (typeof window !== 'undefined') {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore: Cannot find name 'window'.\n return window;\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore: Cannot find name 'self'.\n if (typeof self !== 'undefined') {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore: Cannot find name 'self'.\n return self;\n }\n}", "function getGlobal() {\n if (typeof globalThis !== 'undefined') {\n return globalThis;\n }\n if (typeof global !== 'undefined') {\n return global;\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore: Cannot find name 'window'.\n if (typeof window !== 'undefined') {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore: Cannot find name 'window'.\n return window;\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore: Cannot find name 'self'.\n if (typeof self !== 'undefined') {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore: Cannot find name 'self'.\n return self;\n }\n}", "getGlobalNames() {\n return new Set([\n ...this.identifierReplacements.keys(),\n ...this.exportBindingsByLocalName.keys(),\n ]);\n }", "static getAvailableImportPaths(scanGlobal) {\n return new Promise((resolve, reject) => {\n let globalPath = scanGlobal ? globalModules : null;\n let paths = Util.getMainModulePaths();\n if (paths) {\n return Promise.all([globalPath ? Util.getImportPaths(globalPath) : {}].concat(paths.map(Util.getImportPaths)))\n .then((paths) => {\n // Local paths can overwrite global paths\n resolve(paths.reduce((paths, currentPaths) => {\n _.forOwn(currentPaths, (v, k) => paths[k] = v);\n return paths;\n }, {}));\n })\n .catch(reject);\n }\n else {\n reject(null);\n }\n });\n }", "function getGlobal() {\n return this;\n}", "function getGlobalObject() {\n return self;\n }", "function getGlobalObject() {\n return self;\n }", "shareGlobalVars() {\r\n this.addGlobal('appDiskRoot', electron_1.remote.getGlobal('appDiskRoot'));\r\n this.addGlobal('appCodeRoot', electron_1.remote.getGlobal('appCodeRoot'));\r\n this.addGlobal('webRoot', electron_1.remote.getGlobal('webRoot'));\r\n this.addGlobal('packMode', this._mainApp.options.packMode);\r\n this.addGlobal('isDebug', this._mainApp.isDebug);\r\n this.addGlobal('windowName', this._parentWindow.name);\r\n return this;\r\n }", "function getAngularJSGlobal() {\n return angular;\n}", "_filterGlobals() {\n\t\tif (!global.RocketGlobals)\n\t\t\treturn;\n\n\t\tconst {defineGlobals} = new Function(`return {${global.RocketGlobals}}`)();\n\t\t\n\t\tconst globals = Object.assign([], globalList, defineGlobals !== undefined ? defineGlobals() : []);\n\t\t\n\t\tvar fileData = global.RocketFunction;\n\n\t\tglobals.forEach(glob => {\n\t\t\tfileData = fileData.replace(new RegExp(`:\\\\s*${glob}`), `: \"${glob}\"`);\n\t\t});\n\n\t\tglobal.RocketFunction = fileData;\n\t}", "function h$getGlobal(that) {\n if(typeof global !== 'undefined') return global;\n return that;\n}", "function getGlobal() {\n return $http.get('/api/core/global');\n }", "static getAvailableModuleComponentPaths(scanGlobal) {\n return new Promise((resolve, reject) => {\n let globalPath = scanGlobal ? globalModules : null;\n let paths = Util.getMainModulePaths();\n if (paths) {\n return Promise.all([globalPath ? Util.getModuleComponentPaths(globalPath) : {}].concat(paths.map(Util.getModuleComponentPaths)))\n .then((paths) => {\n // Local paths can overwrite global paths\n resolve(paths.reduce((paths, currentPaths) => {\n _.forOwn(currentPaths, (v, k) => paths[k] = v);\n return paths;\n }, {}));\n })\n .catch(reject);\n }\n else {\n reject(null);\n }\n });\n }", "function spinnakerSharedLibraries() {\n const libraries = ['lodash', 'react', 'react-dom', '@spinnaker/core'];\n\n function getGlobalVariable(libraryName) {\n const prefix = 'spinnaker.plugins.sharedLibraries';\n const sanitizedLibraryName = libraryName.replace(/[^a-zA-Z0-9_]/g, '_');\n return `${prefix}.${sanitizedLibraryName}`;\n }\n\n return libraries.reduce((globalsMap, libraryName) => {\n return { ...globalsMap, [ libraryName ]: getGlobalVariable(libraryName) }\n }, {});\n}", "static get PLUGINS() {\n return PLUGINS;\n }", "constructor() {\n this._registry = {};\n }", "function getClassRegistry(target) {\n return getOwnMetadata_1.getOwnMetadata(baseRegistry_1._registryKey, target);\n}", "function get_gears(){\n var factory;\n\n if (window.google && window.google.gears) { \n return window.google.gears; \n } // already defined elsewhere\n\n if(typeof GearsFactory != \"undefined\"){ // Firefox\n factory = new GearsFactory();\n } else {\n if(sys.browser.IE){\n try{\n factory = new ActiveXObject(\"Gears.Factory\");\n }catch(e){\n // ok to squelch; there's no gears factory. move on.\n }\n }else if(navigator.mimeTypes[\"application/x-googlegears\"]){\n // Safari?\n factory = document.createElement(\"object\");\n factory.setAttribute(\"type\", \"application/x-googlegears\");\n factory.setAttribute(\"width\", 0);\n factory.setAttribute(\"height\", 0);\n factory.style.display = \"none\";\n document.documentElement.appendChild(factory);\n }\n }\n\n window.google = {}, window.google.gears = {'installed': !!factory, 'objects': {}};\n if(factory) {\n window.google.gears._factory = factory;\n\n window.google.gears.getBuildInfo = function() {\n return window.google.gears._factory.getBuildInfo();\n }\n window.google.gears.getPermission = function(siteName, imageUrl, extraMessage) { \n return window.google.gears._factory.getPermission(siteName, imageUrl, extraMessage);\n }\n\n window.google.gears.__defineGetter__('hasPermission', function() {return window.google.gears._factory.hasPermission;});\n window.google.gears.__defineGetter__('version', function() {return window.google.gears._factory.version;});\n\n window.google.gears.create = function (className, classVersion) {\n var gears_object = null;\n var module_name = className.slice(className.lastIndexOf('.') + 1);\n \n if (!isundefined(window.google.gears.objects[module_name]))\n \treturn window.google.gears.objects[module_name];\n \n try {\n gears_object = require('gears.' + module_name, module_name);\n } catch (e if isinstance(e, LoadError)) {\n gears_object = window.google.gears._factory.create(className, classVersion);\n }\n window.google.gears.objects[module_name] = gears_object;\n return gears_object;\n }\n } else {\n \twindow.google.gears.create = window.google.gears.install = function () {\n message = 'To enable fast client-side search of this website please install Gears';\n var url = 'http://gears.google.com/?action=install'\n + '&message=' + encodeURIComponent(message)\n + '&return=' + encodeURIComponent(window.location.href);\n window.location.href = url;\n }\n }\n return window.google.gears;\n }", "function clearRegistry () {\n setRegistry(makeRegistry())\n}", "function addToGlobalScope() {\n var shell = require('./shell');\n for (var i in shell) {\n if (shell.hasOwnProperty(i)) {\n global[i] = shell[i];\n }\n }\n}", "function getRegExePath() {\r\n if (process.platform === 'win32') {\r\n return path.join(process.env.windir, 'system32', 'reg.exe');\r\n } else {\r\n return \"REG\";\r\n }\r\n}", "function clearRegistry() {\n setRegistry(makeRegistry());\n}", "function getFinder() {\n return gBrowser.finder;\n}", "function getGlobalStack() {\n return global.__SENTRY__.stack;\n}", "function getRegistry(\n// FIXME: Cater for Polkadot\nspecName = 'kusama', \n// FIXME: Make this hardcoded version user-customizable\nspecVersion = 1042) {\n const registry = new types_1.TypeRegistry();\n // Register types specific to chain/runtimeVersion\n registry.register(known_1.getSpecTypes(registry, registry.createType('Text'), // Value unneeded for now\n registry.createType('RuntimeVersion', {\n specName,\n specVersion\n })));\n return registry;\n}", "function installPolyfills() {\n\tfor (const name in globals) {\n\t\tObject.defineProperty(globalThis, name, {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\t\t\twritable: true,\n\t\t\tvalue: globals[name]\n\t\t});\n\t}\n}", "function monkeyPatchFindSimulatorsForWin32Tests() {\n for (var k in require.cache) {\n if (k.indexOf('node-firefox-find-simulators\\\\index.js') !== -1) {\n monkeyPatchRequireCacheForWin32(require.cache[k]);\n }\n }\n}", "function getGlobalSettings() {\n return global_settings;\n}", "function getMainCarrier() {\n var carrier = utils_1.getGlobalObject();\n carrier.__SENTRY__ = carrier.__SENTRY__ || {\n extensions: {},\n hub: undefined,\n };\n return carrier;\n}", "function set_registry(map) {\n registry = map;\n}", "function getMainCarrier() {\n utils.GLOBAL_OBJ.__SENTRY__ = utils.GLOBAL_OBJ.__SENTRY__ || {\n extensions: {},\n hub: undefined,\n };\n return utils.GLOBAL_OBJ;\n}", "getModuleNames() {\n var sizePtr = Memory.alloc(4);\n var modsPtr = QBDI_C.getModuleNames(sizePtr);\n var size = Memory.readU32(sizePtr);\n if (modsPtr.isNull() || size === 0) {\n return [];\n }\n var mods = [];\n var p = modsPtr;\n for (var i = 0; i < size; i++) {\n var strPtr = Memory.readPointer(p);\n var str = Memory.readCString(strPtr);\n mods.push(str);\n System.free(strPtr);\n p = p.add(Process.pointerSize);\n }\n System.free(modsPtr);\n return mods;\n }", "toJSON() {\n const json = {};\n for (const [k, v] of this.registry) {\n json[k] = v.toJSON();\n }\n return json;\n }", "clear() {\n return registry.clear();\n }", "function setupRegistry(){return{getUniqueId:getSeqNumberGenerator(),icus:new Map()};}", "function getMainCarrier() {\n var carrier = misc_1.getGlobalObject();\n carrier.__SENTRY__ = carrier.__SENTRY__ || {\n hub: undefined,\n };\n return carrier;\n}", "async getCockpitSingletons() {\n const singletons = await this.getSingletonNames();\n return Promise.all(singletons.map(name => this.getSingletonItems(name)));\n }", "function getBrowserAPI() {\n var api;\n\n try {\n api = global.chrome || global.browser || browser;\n } catch (error) {\n api = browser;\n }\n\n if (!api) {\n throw new Error(\"Browser API is not present\");\n }\n\n return api;\n}" ]
[ "0.755306", "0.6765899", "0.640535", "0.6235392", "0.6233184", "0.6180067", "0.6119691", "0.6078562", "0.5983584", "0.58899087", "0.58899087", "0.58603895", "0.58354175", "0.5773825", "0.5744", "0.5703548", "0.5663477", "0.5645151", "0.5645151", "0.5645151", "0.5645151", "0.5645151", "0.5645151", "0.5645151", "0.5645151", "0.5645151", "0.5645151", "0.5645151", "0.5645151", "0.5645151", "0.5645151", "0.5645151", "0.5645151", "0.5645151", "0.5645151", "0.5645151", "0.5645151", "0.5645151", "0.56282765", "0.56070083", "0.55905855", "0.5585252", "0.55751115", "0.55751115", "0.55751115", "0.55751115", "0.55751115", "0.55751115", "0.55751115", "0.55585325", "0.5554597", "0.5542549", "0.5531273", "0.55287004", "0.55249715", "0.5523984", "0.5482487", "0.545398", "0.5453871", "0.54342955", "0.5422482", "0.5406636", "0.5406636", "0.5406636", "0.5381058", "0.5356675", "0.53483695", "0.53140163", "0.53140163", "0.5310961", "0.5295106", "0.52943385", "0.52843434", "0.52758443", "0.5261887", "0.52536273", "0.5251727", "0.5246941", "0.524565", "0.5243092", "0.52330256", "0.52160966", "0.5198798", "0.5196047", "0.518923", "0.51850235", "0.51774037", "0.5176472", "0.5169406", "0.51687276", "0.51580805", "0.51418054", "0.51400656", "0.51354414", "0.51268786", "0.5119978", "0.511383", "0.5108997", "0.5091626", "0.5090586" ]
0.5168644
90
Replaces the current main hub with the passed one on the global object
function makeMain(hub) { var registry = getMainCarrier(); var oldHub = getHubFromCarrier(registry); setHubOnCarrier(registry, hub); return oldHub; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeMain(hub) {\r\n var registry = getMainCarrier();\r\n var oldHub = getHubFromCarrier(registry);\r\n setHubOnCarrier(registry, hub);\r\n return oldHub;\r\n}", "function makeMain(hub) {\n const registry = getMainCarrier();\n const oldHub = getHubFromCarrier(registry);\n setHubOnCarrier(registry, hub);\n return oldHub;\n }", "function makeMain(hub) {\n\t const registry = getMainCarrier();\n\t const oldHub = getHubFromCarrier(registry);\n\t setHubOnCarrier(registry, hub);\n\t return oldHub;\n\t}", "function makeMain(hub) {\n const registry = getMainCarrier();\n const oldHub = getHubFromCarrier(registry);\n setHubOnCarrier(registry, hub);\n return oldHub;\n}", "function hub_getCurrentHub() {\n // Get main carrier (global for every environment)\n var registry = getMainCarrier();\n // If there's no hub, or its an old API, assign a new one\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\n setHubOnCarrier(registry, new hub_Hub());\n }\n // Prefer domains over global if they are there (applicable only to Node environment)\n if (Object(node[\"b\" /* isNodeEnv */])()) {\n return getHubFromActiveDomain(registry);\n }\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n}", "function getCurrentHub() {\n // Get main carrier (global for every environment)\n const registry = getMainCarrier();\n\n // If there's no hub, or its an old API, assign a new one\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\n setHubOnCarrier(registry, new Hub());\n }\n\n // Prefer domains over global if they are there (applicable only to Node environment)\n if (isNodeEnv()) {\n return getHubFromActiveDomain(registry);\n }\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }", "function getCurrentHub() {\n\t // Get main carrier (global for every environment)\n\t const registry = getMainCarrier();\n\n\t // If there's no hub, or its an old API, assign a new one\n\t if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\n\t setHubOnCarrier(registry, new Hub());\n\t }\n\n\t // Prefer domains over global if they are there (applicable only to Node environment)\n\t if (isNodeEnv()) {\n\t return getHubFromActiveDomain(registry);\n\t }\n\t // Return hub that lives on a global object\n\t return getHubFromCarrier(registry);\n\t}", "function getCurrentHub() {\n // Get main carrier (global for every environment)\n var registry = getMainCarrier();\n // If there's no hub, or its an old API, assign a new one\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(exports.API_VERSION)) {\n setHubOnCarrier(registry, new Hub());\n }\n // Prefer domains over global if they are there (applicable only to Node environment)\n if (utils_1.isNodeEnv()) {\n return getHubFromActiveDomain(registry);\n }\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n}", "function getCurrentHub() {\n // Get main carrier (global for every environment)\n const registry = getMainCarrier();\n\n // If there's no hub, or its an old API, assign a new one\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\n setHubOnCarrier(registry, new Hub());\n }\n\n // Prefer domains over global if they are there (applicable only to Node environment)\n if (utils.isNodeEnv()) {\n return getHubFromActiveDomain(registry);\n }\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n}", "function setBot(mainBot) {\n bot = mainBot;\n}", "function getCurrentHub() {\n // Get main carrier (global for every environment)\n var registry = getMainCarrier();\n // If there's no hub, or its an old API, assign a new one\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\n setHubOnCarrier(registry, new Hub());\n }\n // Prefer domains over global if they are there (applicable only to Node environment)\n if (Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__[\"isNodeEnv\"])()) {\n return getHubFromActiveDomain(registry);\n }\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n}", "function getCurrentHub() {\n // Get main carrier (global for every environment)\n var registry = getMainCarrier();\n // If there's no hub, or its an old API, assign a new one\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(exports.API_VERSION)) {\n setHubOnCarrier(registry, new Hub());\n }\n // Prefer domains over global if they are there\n try {\n // We need to use `dynamicRequire` because `require` on it's own will be optimized by webpack.\n // We do not want this to happen, we need to try to `require` the domain node module and fail if we are in browser\n // for example so we do not have to shim it and use `getCurrentHub` universally.\n var domain = misc_1.dynamicRequire(module, 'domain');\n var activeDomain = domain.active;\n // If there no active domain, just return global hub\n if (!activeDomain) {\n return getHubFromCarrier(registry);\n }\n // If there's no hub on current domain, or its an old API, assign a new one\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(exports.API_VERSION)) {\n var registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, scope_1.Scope.clone(registryHubTopStack.scope)));\n }\n // Return hub that lives on a domain\n return getHubFromCarrier(activeDomain);\n }\n catch (_Oo) {\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }\n}", "function getCurrentHub() {\r\n // Get main carrier (global for every environment)\r\n var registry = getMainCarrier();\r\n // If there's no hub, or its an old API, assign a new one\r\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\r\n setHubOnCarrier(registry, new Hub());\r\n }\r\n // Prefer domains over global if they are there\r\n try {\r\n // We need to use `dynamicRequire` because `require` on it's own will be optimized by webpack.\r\n // We do not want this to happen, we need to try to `require` the domain node module and fail if we are in browser\r\n // for example so we do not have to shim it and use `getCurrentHub` universally.\r\n var domain = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__[\"dynamicRequire\"])(module, 'domain');\r\n var activeDomain = domain.active;\r\n // If there no active domain, just return global hub\r\n if (!activeDomain) {\r\n return getHubFromCarrier(registry);\r\n }\r\n // If there's no hub on current domain, or its an old API, assign a new one\r\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\r\n var registryHubTopStack = getHubFromCarrier(registry).getStackTop();\r\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, _scope__WEBPACK_IMPORTED_MODULE_2__[\"Scope\"].clone(registryHubTopStack.scope)));\r\n }\r\n // Return hub that lives on a domain\r\n return getHubFromCarrier(activeDomain);\r\n } catch (_Oo) {\r\n // Return hub that lives on a global object\r\n return getHubFromCarrier(registry);\r\n }\r\n}", "registerHubSite() {\r\n return this.clone(Site_1, `registerHubSite`).postCore();\r\n }", "getHubs() {\nif (this._gettingHubs) {\nreturn;\n}\nthis._gettingHubs = true;\nsetInterval(() => {\nlet hubs = this._poweredUP.getHubs();\nhubs.forEach(this._addHub.bind(this));\n}, 2000);\n}", "unRegisterHubSite() {\r\n return this.clone(Site_1, `unRegisterHubSite`).postCore();\r\n }", "function updateFoundHub(hubURL: ?string, hub: HUB_TYPE) {\n const foundHub = hub;\n // Hub keys returns ids, idQuerys return hubId\n if (foundHub.hubId) {\n foundHub.id = foundHub.hubId;\n delete foundHub.hubId;\n }\n if (!foundHub.id) {\n return;\n }\n\n if (!hubsMap[foundHub.id]) {\n hubsMap[foundHub.id] = {\n id: foundHub.id,\n name: foundHub.name || '',\n };\n }\n hubsMap[foundHub.id].name = foundHub.name;\n hubsMap[foundHub.id].connected = foundHub.connected;\n hubsMap[foundHub.id].features = foundHub.features;\n hubsMap[foundHub.id].state = foundHub.state;\n hubsMap[foundHub.id].version = foundHub.version;\n hubsMap[foundHub.id].connectionState = foundHub.connected ? HUB_CONNECTION_STATES.REMOTE : HUB_CONNECTION_STATES.UNCONNECTED;\n if (hubURL) {\n hubsMap[foundHub.id].connectionState = HUB_CONNECTION_STATES.LOCAL;\n hubsMap[foundHub.id].url = hubURL;\n } else {\n hubsMap[foundHub.id].url = undefined;\n }\n}", "surveyBridges() {\n this.currentBridge = null;\n\n // update the state without reloading the controller\n this.$state.go('app.structure.bridge');\n }", "function setContext(name, context) {\n hub.getCurrentHub().setContext(name, context);\n}", "function getHubFromActiveDomain(registry) {\n try {\n var activeDomain = getActiveDomain();\n // If there's no active domain, just return global hub\n if (!activeDomain) {\n return getHubFromCarrier(registry);\n }\n // If there's no hub on current domain, or it's an old API, assign a new one\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\n var registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n setHubOnCarrier(activeDomain, new hub_Hub(registryHubTopStack.client, scope_Scope.clone(registryHubTopStack.scope)));\n }\n // Return hub that lives on a domain\n return getHubFromCarrier(activeDomain);\n }\n catch (_Oo) {\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }\n}", "function getHubFromActiveDomain(registry) {\n var _a, _b, _c;\n try {\n var activeDomain = (_c = (_b = (_a = getMainCarrier().__SENTRY__) === null || _a === void 0 ? void 0 : _a.extensions) === null || _b === void 0 ? void 0 : _b.domain) === null || _c === void 0 ? void 0 : _c.active;\n // If there's no active domain, just return global hub\n if (!activeDomain) {\n return getHubFromCarrier(registry);\n }\n // If there's no hub on current domain, or it's an old API, assign a new one\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(exports.API_VERSION)) {\n var registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, scope_1.Scope.clone(registryHubTopStack.scope)));\n }\n // Return hub that lives on a domain\n return getHubFromCarrier(activeDomain);\n }\n catch (_Oo) {\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }\n}", "function getHubFromActiveDomain(registry) {\n try {\n const sentry = getMainCarrier().__SENTRY__;\n const activeDomain = sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;\n\n // If there's no active domain, just return global hub\n if (!activeDomain) {\n return getHubFromCarrier(registry);\n }\n\n // If there's no hub on current domain, or it's an old API, assign a new one\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\n const registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, Scope.clone(registryHubTopStack.scope)));\n }\n\n // Return hub that lives on a domain\n return getHubFromCarrier(activeDomain);\n } catch (_Oo) {\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }\n }", "function setUser(user) {\n hub.getCurrentHub().setUser(user);\n}", "_setGlobal() {\n if (this.config.setGlobal) {\n window.__ = this.__.bind(this);\n }\n }", "function getMainCarrier() {\n GLOBAL_OBJ.__SENTRY__ = GLOBAL_OBJ.__SENTRY__ || {\n extensions: {},\n hub: undefined,\n };\n return GLOBAL_OBJ;\n }", "function getHubFromActiveDomain(registry) {\n\t try {\n\t const sentry = getMainCarrier().__SENTRY__;\n\t const activeDomain = sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;\n\n\t // If there's no active domain, just return global hub\n\t if (!activeDomain) {\n\t return getHubFromCarrier(registry);\n\t }\n\n\t // If there's no hub on current domain, or it's an old API, assign a new one\n\t if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\n\t const registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n\t setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, Scope.clone(registryHubTopStack.scope)));\n\t }\n\n\t // Return hub that lives on a domain\n\t return getHubFromCarrier(activeDomain);\n\t } catch (_Oo) {\n\t // Return hub that lives on a global object\n\t return getHubFromCarrier(registry);\n\t }\n\t}", "function refreshHubDependentControlState() {\n updateHubDependentControlState(hubIsConnected);\n}", "function getHubFromActiveDomain(registry) {\n try {\n const sentry = getMainCarrier().__SENTRY__;\n const activeDomain = sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;\n\n // If there's no active domain, just return global hub\n if (!activeDomain) {\n return getHubFromCarrier(registry);\n }\n\n // If there's no hub on current domain, or it's an old API, assign a new one\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\n const registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, scope.Scope.clone(registryHubTopStack.scope)));\n }\n\n // Return hub that lives on a domain\n return getHubFromCarrier(activeDomain);\n } catch (_Oo) {\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }\n}", "function setSignalrCallbacks(map) {\n var vehicleHub = $.connection.vehicleHub\n \n //This is the listener for getting target commands from signalr\n vehicleHub.client.sendTargetCommand = function (target, connId) {\n receivedCommand(map, target, \"CMD_NAV_Target\", { connId: connId });\n }\n\n vehicleHub.client.sendReturnCommand = function (cmd, connId) {\n receivedCommand(map, cmd, \"CMD_NAV_Return\", { connId: connId });\n }\n\n vehicleHub.client.sendHoldCommand = function (cmd, connId) {\n receivedCommand(map, cmd, \"CMD_NAV_Hold\", { connId: connId });\n }\n vehicleHub.client.sendAdjustCommand = function (cmd, connId) {\n receivedCommand(map, cmd, \"CMD_NAV_Adjust\", { connId: connId });\n }\n vehicleHub.client.sendLandCommand = function (cmd, connId) {\n receivedCommand(map, cmd, \"CMD_NAV_Land\", { connId: connId });\n }\n\n vehicleHub.waypointCommand = function (wp, connId) {\n receivedCommand(map, wp, \"CMD_NAV_Waypoint\", {});\n }\n vehicleHub.client.broadcastAcceptedCommand = function (ack) {\n console.log(ack);\n }\n\n vehicleHub.client.newMissionAssignment = function (uavId, mission) {\n if (uavId) {\n var uav = map.getVehicleById(uavId);\n if (uav) {\n uav.addMissionToSchedule(mission);\n }\n }\n }\n\n vehicleHub.client.uavBackAtBase = function(id)\n {\n console.log(\"UAV \" + id + \" has arrived back at base\");\n }\n\n var adminHub = $.connection.adminHub;\n adminHub.client.newDrop = function (drop) {\n console.log(\"UAV ID for battery drop is: \" + drop.uavID);\n console.log(\"Amount for battery drop is: \" + drop.amount);\n console.log(\"UAV is: \" + map.getVehicleById(drop.uavID));\n if (map.hasVehicleById(drop.uavID)) {\n map.getVehicleById(drop.uavID).FlightState.BatteryLevel -= drop.amount / 100;\n }\n }\n}", "function switchGlobalUrl() {\n if (currentUrl === alternateUrl) {\n // if the last url is the initial url\n // change the default share url to the alternate url\n $.addthis().shareUrl(initialUrl);\n // track last used share url\n currentUrl = initialUrl;\n } else {\n // else the last url is the alternate url\n // change the default share url to the initial url\n $.addthis().shareUrl(alternateUrl);\n // track last used share url\n currentUrl = alternateUrl;\n }\n\n // update the pre element with the current share url\n document.getElementById('shareUrl').innerText = currentUrl;\n}", "function getMainCarrier() {\n\t GLOBAL_OBJ.__SENTRY__ = GLOBAL_OBJ.__SENTRY__ || {\n\t extensions: {},\n\t hub: undefined,\n\t };\n\t return GLOBAL_OBJ;\n\t}", "function getMainCarrier() {\n var carrier = misc_1.getGlobalObject();\n carrier.__SENTRY__ = carrier.__SENTRY__ || {\n hub: undefined,\n };\n return carrier;\n}", "function getHubFromActiveDomain(registry) {\n try {\n var property = 'domain';\n var carrier = getMainCarrier();\n var sentry = carrier.__SENTRY__;\n // tslint:disable-next-line: strict-type-predicates\n if (!sentry || !sentry.extensions || !sentry.extensions[property]) {\n return getHubFromCarrier(registry);\n }\n var domain = sentry.extensions[property];\n var activeDomain = domain.active;\n // If there no active domain, just return global hub\n if (!activeDomain) {\n return getHubFromCarrier(registry);\n }\n // If there's no hub on current domain, or its an old API, assign a new one\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\n var registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, _scope__WEBPACK_IMPORTED_MODULE_2__[\"Scope\"].clone(registryHubTopStack.scope)));\n }\n // Return hub that lives on a domain\n return getHubFromCarrier(activeDomain);\n }\n catch (_Oo) {\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }\n}", "function withScope(callback) {\n hub.getCurrentHub().withScope(callback);\n}", "repickHost() {\n this.host = null;\n var newHostId = Object.keys(this.socketNames)[0];\n this.host = newHostId ? newHostId : null;\n }", "function setDefaultBackend(newBackend) {\n backend = newBackend\n}", "function setContext(name, context) {\n getCurrentHub().setContext(name, context);\n }", "function setContext(name, context) {\n\t getCurrentHub().setContext(name, context);\n\t}", "function setUser(user) {\n getCurrentHub().setUser(user);\n }", "function withScope(callback) {\n getCurrentHub().withScope(callback);\n }", "function setExtras(extras) {\n hub.getCurrentHub().setExtras(extras);\n}", "setJSplumbInstance(ins){\r\n this.jsPlumbInstance = ins;\r\n }", "function BOT_onSwitchBot(oldbotid,newbotid) {\r\n\treturn;\r\n}", "connectedCallback(){super.connectedCallback();// ensure singleton is set\nwindow.Hal9000=window.Hal9000||{};window.Hal9000.instance=this}", "function trackBot(bot) {\n _bots[bot.config.token] = bot;\n}", "function swapToManageSensors() {\r\n\tsensorFormVm.emptySensors();\r\n\tvar sensor;\r\n\tfor (let i = 0; i < sensorsPayload.length; i++) {\r\n\t\tsensor = JSON.stringify(sensorsPayload[i]);\r\n\t\tsensor = JSON.parse(sensor);\r\n\t\tdelete sensor._id;\r\n\t\tdelete sensor.samples;\r\n\t\tvar precision = sensor.precision;\r\n\t\tsensor.measure = evaluateContext(sensor.context);\r\n\t\tprecision = precision.substring(3);\r\n\t\tsensor.disableButton = true;\r\n\t\tsensor.nodeName = nodes[sensor.nodeId].name;\r\n\t\tsensor.precision = parseFloat(precision);\r\n\t\tif (!sensorFormVm.contains(sensor.code))\r\n\t\t\tsensorFormVm.addSensorForm(sensor);\r\n\t}\r\n\tclearCoreFrame();\r\n\tcoreFrame.append(manageSensorsFrame);\r\n\tmanageSensorsFrame.style.display = 'block';\r\n}", "set UseGlobal(value) {}", "function setUser(user) {\n\t getCurrentHub().setUser(user);\n\t}", "function setUser(user) {\n callOnHub('setUser', user);\n}", "function setUser(user) {\n callOnHub('setUser', user);\n}", "function setUser(user) {\n callOnHub('setUser', user);\n}", "joinHubSite(siteId) {\r\n return this.clone(Site_1, `joinHubSite('${siteId}')`).postCore();\r\n }", "connect() {\n this.hub = signalhub(this.channel, [ CONSTANTS.SIGNAL_SERVER ]);\n this.sw = swarm(this.hub, this.options);\n }", "function setHost(newHost) {\n host = newHost;\n $(\".host\").html(host);\n}", "notifyBrowser(tjbot) {\n\t\tlet tjbotCopy = {};\n\n\t\ttjbotCopy.data = tjbot.data;\n\t\ttjbotCopy.web = tjbot.web;\n\t\ttjbotCopy.basic = tjbot.basic;\n\t\ttjbotCopy.config = tjbot.config;\n\t\tfor (let browser of Object.values(this.browserList)) {\n\t\t\tbrowser.emit('updateBot', JSON.stringify(tjbotCopy));\n\t\t}\n\t}", "function withScope(callback) {\n\t getCurrentHub().withScope(callback);\n\t}", "function reloadOutBrainModules() {\n if (typeof(OBR) !== \"undefined\" && typeof(OBR.extern) !== \"undefined\" &&\n typeof(OBR.extern.researchWidget) !== \"undefined\") {\n OBR.extern.researchWidget(\"http://\" + document.location.hostname + document.location.pathname);\n }\n}", "function prepareAPIHubs() {\r\n\t\t\tvar i,arr = null;\r\n\t\t\t// client hubs\r\n\t\t\tif (BaseObject.is(options.PriorityLocalAPI, \"LocalAPI\")) {\r\n\t\t\t\tarr = [options.PriorityLocalAPI];\r\n\t\t\t} else if (BaseObject.is(options.PriorityLocalAPI, \"Array\")) {\r\n\t\t\t\tarr = options.PriorityLocalAPI;\r\n\t\t\t}\r\n\t\t\tif (arr != null && arr.length > 0) {\r\n\t\t\t\tfor (i = 0;i< arr.length;i++) {\r\n\t\t\t\t\tif (BaseObject.is(arr[i],\"LocalAPI\")) {\r\n\t\t\t\t\t\tapiHubs.unshift(arr[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tarr = null;\r\n\t\t\tif (BaseObject.is(options.AdditionalLocalAPI, \"LocalAPI\")) {\r\n\t\t\t\tarr = [options.AdditionalLocalAPI];\r\n\t\t\t} else if (BaseObject.is(options.AdditionalLocalAPI, \"Array\")) {\r\n\t\t\t\tarr = options.AdditionalLocalAPI;\r\n\t\t\t}\r\n\t\t\tif (arr != null && arr.length > 0) {\r\n\t\t\t\tfor (i = 0;i< arr.length;i++) {\r\n\t\t\t\t\tif (BaseObject.is(arr[i],\"LocalAPI\")) {\r\n\t\t\t\t\t\tapiHubs.push(arr[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// server hubs\r\n\t\t\tif (BaseObject.is(options.RegisterInLocalAPIHub, \"LocalAPI\")) {\r\n\t\t\t\tapiHubsServe = [options.RegisterInLocalAPIHub];\r\n\t\t\t}\r\n\t\t}", "syncHubSiteTheme() {\r\n return this.clone(Web_1, `syncHubSiteTheme`).postCore();\r\n }", "function setGateway(gw) {\r\n _defaultGateway = gw;\r\n}", "shareGlobalVars() {\r\n this.addGlobal('appDiskRoot', electron_1.remote.getGlobal('appDiskRoot'));\r\n this.addGlobal('appCodeRoot', electron_1.remote.getGlobal('appCodeRoot'));\r\n this.addGlobal('webRoot', electron_1.remote.getGlobal('webRoot'));\r\n this.addGlobal('packMode', this._mainApp.options.packMode);\r\n this.addGlobal('isDebug', this._mainApp.isDebug);\r\n this.addGlobal('windowName', this._parentWindow.name);\r\n return this;\r\n }", "function setExtra(key, extra) {\n hub.getCurrentHub().setExtra(key, extra);\n}", "function setGlobal(parameters) {\n\twindow[parameters.name] = parameters.value;\n}", "function _BindGlobals(){\r\n\t\t\r\n\t\tif(typeof window.$$ !== \"undefined\"){\r\n\t\t\t_Original$$ = window.$$;\r\n\t\t}\r\n\t\t\r\n\t\twindow.$$ = _Penguin;\r\n\t\twindow.Penguin = _Penguin;\r\n\t\t\r\n\t}", "function messageHub(request, sender, reply) {\n bal.commonMessageHub(request.message, request, sender.tab);\n }", "function getMainCarrier() {\n utils.GLOBAL_OBJ.__SENTRY__ = utils.GLOBAL_OBJ.__SENTRY__ || {\n extensions: {},\n hub: undefined,\n };\n return utils.GLOBAL_OBJ;\n}", "function moveToMixingBridge(channel, dialed, mixingBridge, holdingBridge,self) {\n console.log('Adding channel %s and dialed channel %s to bridge %s',\n channel.name, dialed.name, mixingBridge.id);\n let currentStack = self.holdStack;\n let callThis = currentStack.find((element)=>{\n return element.channelId === channel.id;\n })\n callThis.idReporte=self.mapStack[channel.id].idReporte;\n \n callThis.dialed=dialed.caller.number;\n //console.log(callThis);\n self.emit('ChannelEnteredMixingBridge',callThis)\n \n holdingBridge.removeChannel({channel: channel.id}, function(err) {\n if (err) {\n console.log(err);\n }\n\n mixingBridge.addChannel(\n {channel: [channel.id, dialed.id]}, function(err) {\n if (err) {\n console.log(err);\n }else{\n\n //self.emit(`${dialed.channel.number}:answer`, callThis.condo,\"192.168.0.200\")\n }\n \n \n });\n });\n }", "setBot(bot) {\n this.bot = bot;\n }", "function setTags(tags) {\n hub.getCurrentHub().setTags(tags);\n}", "function setContext(name, context) {\n callOnHub('setContext', name, context);\n}", "function setContext(name, context) {\n callOnHub('setContext', name, context);\n}", "function setContext(name, context) {\n callOnHub('setContext', name, context);\n}", "enablePushin() {\n get(this, '_elevio').pushin = 'true';\n }", "function setSelectedHubs(newHubs: HUBS_MAP_TYPE) {\n const hubs = getHubs();\n (Object.values(hubs): any).forEach((hub: HUB_TYPE) => {\n if (hub.selected) {\n const selectedNewHub = newHubs[hub.id];\n if (selectedNewHub) {\n selectedNewHub.selected = true;\n }\n }\n });\n}", "setWindowMain() {\r\n this.mainWindow = new BrowserWindow({\r\n width: settings.size.width || 1800,\r\n height: settings.size.height || 1020,\r\n webPreferences: {\r\n nodeIntegration: true,\r\n spellcheck: true,\r\n enableRemoteModule: true,\r\n contextIsolation: false\r\n }\r\n });\r\n this.mainWindow.hide();\r\n this.mainWindow.loadURL(path.join(__dirname, \"/public/index.html\"));\r\n this.mainWindow.removeMenu();\r\n\r\n const webContents = this.mainWindow.webContents;\r\n\r\n webContents.once(\"dom-ready\", () => {\r\n this.mainWindow.show();\r\n this.loadingWindow.close();\r\n this.showUpdateMessage();\r\n this.autoupdate();\r\n this.registerAutoShortcut();\r\n this.setSpellChecking();\r\n });\r\n\r\n webContents.on(\"dom-ready\", () => {\r\n this.mainWindow.webContents.send(\r\n \"isReadOnly:response\",\r\n this.isReadOnly\r\n );\r\n });\r\n\r\n /**\r\n * Where the controllers get initialized\r\n */\r\n this.notesController = new NotesController(\r\n ipcMain,\r\n this.mainWindow,\r\n storage,\r\n settings\r\n );\r\n this.classController = new ClassController(\r\n ipcMain,\r\n this.mainWindow,\r\n storage,\r\n settings\r\n );\r\n this.settingsController = new SettingsController(\r\n ipcMain,\r\n this.mainWindow,\r\n settings\r\n );\r\n\r\n /**\r\n * Sets all of the controller listeners\r\n */\r\n this.notesController.setAll();\r\n this.classController.setAll();\r\n this.settingsController.setAll();\r\n\r\n this.registerUtilityListners();\r\n }", "function setExtras(extras) {\n\t getCurrentHub().setExtras(extras);\n\t}", "function createContentHubApi(backendBridge) {\n var PLUGIN_URI = 'ContentHub';\n\n/**\n * ContentTransfer is an object created by the ContentHub to\n and allows one to properly setup and manage a data\n transfer between two peers.\n\n * @class ContentTransfer\n * @constructor\n * @example\n\n var api = external.getUnityObject('1.0');\n var hub = api.ContentHub;\n\n var pictureContentType = hub.ContentType.Pictures;\n\n hub.defaultSourceForType(\n pictureContentType\n , function(peer) {\n hub.importContentForPeer(\n pictureContentType,\n peer,\n function(transfer) {\n [setup the transfer options and store]\n transfer.start(function(state) { [...] });\n });\n });\n */\n function ContentTransfer(objectid, content) {\n this._proxy = backendBridge.createRemoteObject(\n PLUGIN_URI, 'ContentTransfer', objectid);\n\n this._store = content && content.store\n ? content.store : null;\n this._state = content && content.state\n ? content.state : null;\n this._selectionType = content && content.selectionType\n ? content.selectionType : null;\n this._direction = content && content.direction\n ? content.direction : null;\n };\n ContentTransfer.prototype = {\n // object methods\n serialize: function() {\n var self = this;\n return {\n type: 'object-proxy',\n apiid: 'ContentHub',\n objecttype: 'ContentTransfer',\n objectid: self._proxy.id(),\n }\n },\n\n // properties\n\n /**\n * Retrieves the current store.\n *\n * If the callback parameter is not set, the current \"local\" value is retrieved.\n *\n * @method store\n * @param callback (optional) {Function(String)}\n */\n store: function(callback) {\n if (callback && typeof(callback) === 'function') {\n this._proxy.call('store', [], callback);\n return;\n }\n return this._store;\n },\n /**\n * Sets the current store for the ContentTransfer.\n *\n * @method setStore\n * @param store {ContentStore}\n * @param callback (optional) {Function()} called when the store has been updated\n */\n setStore: function(store, callback) {\n this._proxy.call('setStore', [store.serialize(), callback]);\n },\n\n /**\n * Retrieves the current state.\n *\n * If the callback parameter is not set, the current \"local\" value is retrieved.\n *\n * @method state\n * @param callback (optional) {Function(ContentTransfer.State)}\n */\n state: function(callback) {\n if (callback && typeof(callback) === 'function') {\n this._proxy.call('state', [], callback);\n return;\n }\n return this._state;\n },\n /**\n * Sets the state of the transfer.\n *\n * @method setState\n * @param state {ContentTransfer.State}\n * @param callback {Function()} called when the state has been updated\n */\n setState: function(state, callback) {\n this._proxy.call('setState', [state, callback]);\n },\n /**\n * Notifies the listener when the state of the transfer changes.\n *\n * @method onStateChanged\n * @param callback {Function(ContentTransfer.State)}\n */\n onStateChanged: function(callback) {\n this._proxy.call('onStateChanged', [callback]);\n },\n\n /**\n * Retrieves the current selection type.\n *\n * @method selectionType\n * @param callback {Function(ContentTransfer.SelectionType)}\n */\n selectionType: function(callback) {\n if (callback && typeof(callback) === 'function') {\n this._proxy.call('selectionType', [], callback);\n return;\n }\n return this._selectionType;\n },\n /**\n * Sets the selection type (single or multiple).\n *\n * @method setSelectionType\n * @param selectionType {ContentTransfer.SelectionType}\n * @param callback {Function()} called when the state has been updated\n */\n setSelectionType: function(selectionType, callback) {\n this._selectionType = selectionType;\n this._proxy.call('setSelectionType', [selectionType, callback]);\n },\n\n /**\n * Retrieves the current transfer direction.\n *\n * If the callback parameter is not set, the current \"local\" value is retrieved.\n *\n * @method direction\n * @param callback (optional) {Function(ContentTransfer.Direction)}\n */\n direction: function(callback) {\n if (callback && typeof(callback) === 'function') {\n this._proxy.call('direction', [], callback);\n return;\n }\n return this._direction;\n },\n /**\n * Sets the transfer direction (import or export).\n *\n * @method setDirection\n * @param direction {ContentTransfer.Direction}\n * @param callback {Function()} called when the state has been updated\n */\n setDirection: function(direction, callback) {\n this._direction = direction;\n this._proxy.call('setDirection', [direction, callback]);\n },\n\n /**\n * Retrieves the list of items associated with the ContentTransfer.\n *\n * @method items\n * @param callback {Function( {Object{name: , url: }} )}\n */\n items: function(callback) {\n this._proxy.call('items', [], callback);\n },\n /**\n * Sets the list of items for the associated ContentTransfer (used when exporting).\n *\n * @method setItems\n * @param items {Array of Object{name: String, url: String}}\n * @param callback {Function()} called when the state has been updated\n */\n setItems: function(items, callback) {\n this._proxy.call('setItems', [items, callback]);\n },\n\n // methods\n\n /**\n * Starts a transfer\n * \n * @method start\n * @param callback {Function(ContentTransfer.State)} \n */\n start: function(callback) {\n this._proxy.call('start', [callback]);\n },\n\n /**\n * Sets State to ContentTransfer.Finalized and cleans up temporary files.\n *\n * @method finalize\n */\n finalize: function() {\n this._proxy.call('finalize', []);\n },\n\n // extras\n\n /**\n * Destroys the remote object. This proxy object is not valid anymore.\n *\n * @method destroy\n */\n destroy: function() {\n this._proxy.call('destroy', []);\n },\n };\n\n/**\n * ContentPeer is an object returned by the ContentHub.\n It represents a remote peer that can be used in a request\n to export or import date.\n\n * @class ContentPeer\n * @module ContentHub\n * @constructor\n * @example\n\n var api = external.getUnityObject('1.0');\n var hub = api.ContentHub;\n\n var pictureContentType = hub.ContentType.Pictures;\n\n hub.defaultSourceForType(\n pictureContentType\n , function(peer) {\n [do something with the peer]\n });\n */\n function ContentPeer(objectid, content) {\n this._proxy = backendBridge.createRemoteObject(\n PLUGIN_URI, 'ContentPeer', objectid);\n\n this._appId = content && content.appId\n ? content.appId : null;\n this._name = content && content.name\n ? content.name : null;\n this._handler = content && content.handler\n ? content.handler : null;\n this._contentType = content && content.contentType\n ? content.contentType : null;\n this._selectionType = content && content.selectionType\n ? content.selectionType : null;\n this._isDefaultPeer = content && content.isDefaultPeer;\n };\n ContentPeer.prototype = {\n // object methods\n serialize: function() {\n var self = this;\n return {\n type: 'object-proxy',\n apiid: 'ContentHub',\n objecttype: 'ContentPeer',\n objectid: self._proxy.id(),\n }\n },\n\n // properties\n\n /**\n * Retrieves the app Id of the associated peer.\n *\n * If the callback parameter is not set, the current \"local\" value is retrieved.\n *\n * @method appId\n * @return {String} Application Id for this peer\n * @param callback (optional) {Function(String)}\n */\n appId: function(callback) {\n if (callback && typeof(callback) === 'function') {\n this._proxy.call('appId', [], callback);\n return;\n }\n return this._appId;\n },\n /**\n * Sets the app Id of the associated peer.\n *\n * @method setAppId\n * @param appId {String}\n * @param callback {Function()} called when the appId has been updated\n */\n setAppId: function(appId, callback) {\n this._proxy.call('setAppId', [appId, callback]);\n },\n\n /**\n * Retrieves the specific ContentHandler for this peer.\n *\n * If the callback parameter is not set, the current \"local\" value is retrieved.\n *\n * @method handler\n * @return {String} ContentHandler for this peer\n * @param callback (optional) {Function(String)}\n */\n handler: function(callback) {\n if (callback && typeof(callback) === 'function') {\n this._proxy.call('handler', [], callback);\n return;\n }\n return this._handler;\n },\n /**\n * Sets specific ContentHandler for this peer.\n *\n * @method setHandler\n * @param handler {ContentHandler}\n * @param callback {Function()} called when the appId has been updated\n */\n setHandler: function(handler, callback) {\n this._proxy.call('setHandler', [handler, callback]);\n },\n\n /**\n * Retrieves the specific ContentType for this peer.\n *\n * If the callback parameter is not set, the current \"local\" value is retrieved.\n *\n * @method contentType\n * @return {String} ContentType for this peer\n * @param callback (optional) {Function(String)}\n */\n contentType: function(callback) {\n if (callback && typeof(callback) === 'function') {\n this._proxy.call('contentType', [], callback);\n return;\n }\n return this._contentType;\n },\n /**\n * Sets specific ContentType for this peer.\n *\n * @method setContentType\n * @param contentType {ContentType}\n * @param callback {Function()} called when the content type has been updated\n */\n setContentType: function(contentType, callback) {\n this._proxy.call('setContentType', [contentType, callback]);\n },\n\n /**\n * Retrieves the specific SelectionType for this peer.\n *\n * If the callback parameter is not set, the current \"local\" value is retrieved.\n *\n * @method selectionType\n * @return {String} ContentTransfer.SelectionType for this peer\n * @param callback (optional) {Function(String)}\n */\n selectionType: function(callback) {\n if (callback && typeof(callback) === 'function') {\n this._proxy.call('selectionType', [], callback);\n return;\n }\n return this._selectionType;\n },\n /**\n * Sets specific SelectionType for this peer.\n *\n * @method setSelectionType\n * @param selectionType {ContentTransfer.SelectionType}\n * @param callback {Function()} called when the content type has been updated\n */\n setSelectionType: function(selectionType, callback) {\n this._proxy.call('setSelectionType', [selectionType, callback]);\n },\n\n /**\n * Retrieves the name of the associated peer.\n *\n * If the callback parameter is not set, the current \"local\" value is retrieved.\n *\n * @method name\n * @param callback (optional) {Function(String)}\n */\n name: function(callback) {\n if (callback && typeof(callback) === 'function') {\n this._proxy.call('name', [], callback);\n return;\n }\n return this._name;\n },\n\n /**\n * Returns true if the peer is a default one, false otherwise.\n *\n * If the callback parameter is not set, the current \"local\" value is retrieved.\n *\n * @method isDefaultPeer\n * @param callback (optional) {Function(Bool)}\n */\n isDefaultPeer: function(callback) {\n if (callback && typeof(callback) === 'function') {\n this._proxy.call('isDefaultPeer', [], callback);\n return;\n }\n return this._isDefaultPeer;\n },\n\n // methods\n\n /**\n * Request to import data from this ContentPeer.\n *\n * @method request\n * @param callback {Function(ContentTransfer)} Called with the resulting content transfer\n */\n request: function(callback) {\n this._proxy.call('request', [], callback);\n },\n\n /**\n * Request to import data from this ContentPeer and use a ContentStore for permanent storage.\n *\n * @method requestForStore\n * @param store {ContentStore} Store used as a permanent storage\n * @param callback {Function(ContentTransfer)} Called with the resulting content transfer\n */\n requestForStore: function(store, callback) {\n this._proxy.call('requestForStore', [store.serialize()], callback);\n },\n\n // extras\n\n /**\n * Destroys the remote object. This proxy object is not valid anymore.\n *\n * @method destroy\n */\n destroy: function() {\n this._proxy.call('destroy', []);\n },\n };\n\n/**\n * ContentStore is an object returned by the ContentHub.\n\n It represents a location where the resources imported or\n exported from a peer during a transfer operation are to be\n either saved or found.\n\n * @class ContentStore\n * @module ContentHub\n * @constructor\n * @example\n\n var api = external.getUnityObject('1.0');\n var hub = api.ContentHub;\n\n var pictureContentType = hub.ContentType.Pictures;\n\n hub.defaultStoreForType(pictureContentType, function(store) {\n [do something with the store]\n });\n */\n function ContentStore(objectid, content) {\n this._proxy = backendBridge.createRemoteObject(\n PLUGIN_URI, 'ContentStore', objectid);\n\n this._uri = content && content.uri\n ? content.uri : null;\n this._scope = content && content.scope\n ? content.scope : null;\n };\n ContentStore.prototype = {\n // object methods\n serialize: function() {\n return {\n type: 'object-proxy',\n apiid: 'ContentHub',\n objecttype: 'ContentStore',\n objectid: this._proxy.id(),\n }\n },\n\n // properties\n\n //immutable\n\n /**\n * Retrieves the uri of the associated store.\n *\n * If the callback parameter is not set, the current \"local\" value is retrieved.\n *\n * @method uri\n * @return {String} current uri\n * @param callback (optional) {Function(String)}\n */\n uri: function(callback) {\n if (callback && typeof(callback) === 'function') {\n this._proxy.call('uri', [], callback);\n return;\n }\n return this._uri;\n },\n\n /**\n * Retrieves the current scope.\n *\n * If the callback parameter is not set, the current \"local\" value is retrieved.\n *\n * @method scope\n * @return {ContentScope} current scope\n * @param callback (optional) {Function(ContentScope)}\n */\n scope: function(callback) {\n if (callback && typeof(callback) === 'function') {\n this._proxy.call('scope', [], callback);\n return;\n }\n return this._scope;\n },\n /**\n * Sets the current scope.\n *\n * @method setScope\n * @param scope {ContentScope}\n * @param callback {Function()} called when the scope has been updated\n */\n setScope: function(scope, callback) {\n this._proxy.call('setScope', [scope, callback]);\n },\n\n // extras\n\n /**\n * Destroys the remote object. This proxy object is not valid anymore.\n *\n * @method destroy\n */\n destroy: function() {\n this._proxy.call('destroy', []);\n },\n };\n\n function _constructorFromName(className) {\n var constructorPerName = {\n \"ContentPeer\": ContentPeer,\n \"ContentStore\": ContentStore,\n \"ContentTransfer\": ContentTransfer,\n };\n return className in constructorPerName\n ? constructorPerName[className]\n : null;\n };\n\n/**\n * The ContentHub object.\n\n * @class ContentHub\n * @static\n * @constructor\n */\n return {\n /**\n ContentType is an enumeration of well known content types.\n \n Values:\n\n Pictures\n\n Documents\n \n Music\n\n Contacts\n\n @static\n @property ContentType {String}\n \n @example\n\n var api = external.getUnityObject('1.0');\n var hub = api.ContentHub;\n \n var pictureContentType = hub.ContentType.Pictures;\n */\n ContentType: {\n All: \"All\",\n Unknown: \"Unknown\",\n Pictures: \"Pictures\",\n Documents: \"Documents\",\n Music: \"Music\",\n Contacts: \"Contacts\",\n },\n\n /**\n ContentHandler is an enumeration of well known content handlers.\n\n Values:\n\n Source\n\n Destination\n\n Share\n\n @static\n @property ContentHandler {String}\n */\n ContentHandler: {\n Source: \"Source\",\n Destination: \"Destination\",\n Share: \"Share\",\n },\n\n /**\n ContentScope is an enumeration of well known scope types.\n\n Values:\n\n System\n\n User\n\n App\n\n @static\n @property ContentScope {String}\n */\n ContentScope: {\n System: \"System\",\n User: \"User\",\n App: \"App\",\n },\n\n ContentTransfer: {\n\n /**\n ContentTransfer.State is an enumeration of the state of a given ongoing ContentTransfer.\n \n Values:\n\n Created: Transfer created, waiting to be initiated.\n\n Initiated: Transfer has been initiated.\n\n InProgress: Transfer is in progress.\n\n Charged: Transfer is charged with items and ready to be collected.\n\n Collected: Items in the transfer have been collected.\n\n Aborted: Transfer has been aborted.\n\n Finalized: Transfer has been finished and cleaned up.\n \n @static\n @property ContentTransfer.State {String}\n \n @example\n\n var api = external.getUnityObject('1.0');\n var hub = api.ContentHub;\n \n var transferState = hub.ContentTransfer.State;\n var pictureContentType = hub.ContentType.Pictures;\n\n hub.importContentForPeer(\n pictureContentType,\n peer,\n function(transfer) {\n hub.defaultStoreForType(pictureContentType, function(store) {\n transfer.setStore(store, function() {\n transfer.start(function(state) {\n if (transferState.Aborted === state) {\n [...]\n }\n [...]\n });\n });\n });\n });\n\n */\n State: {\n // Transfer created, waiting to be initiated.\n Created: \"Created\",\n\n // Transfer has been initiated.\n Initiated: \"Initiated\",\n\n // Transfer is in progress.\n InProgress: \"InProgress\",\n\n // Transfer is charged with items and ready to be collected.\n Charged: \"Charged\",\n\n // Items in the transfer have been collected.\n Collected: \"Collected\",\n\n // Transfer has been aborted.\n Aborted: \"Aborted\",\n\n // Transfer has been finished and cleaned up.\n Finalized: \"Finalized\",\n },\n\n /**\n ContentTransfer.Direction is an enumeration of the directions of a given ContentTransfer.\n \n Values:\n\n Import\n\n Export\n\n @static\n @property ContentTransfer.Direction {String}\n */\n Direction: {\n // Transfer is a request to import content\n Import: \"Import\",\n\n // Transfer is a request to export content\n Export: \"Export\",\n },\n\n /**\n ContentTransfer.SelectionType is an enumeration of the directions of a given ContentTransfer.\n \n Values:\n\n Single: Transfer should contain a single item\n\n Multiple: Transfer can contain multiple items\n\n @static\n @property ContentTransfer.SelectionType {String}\n */\n SelectionType: {\n // Transfer should contain a single item\n Single: \"Single\",\n\n // Transfer can contain multiple items\n Multiple: \"Multiple\",\n },\n },\n\n /**\n * Creates a ContentPeer object for the given source type.\n *\n * @method getPeers\n * @param filters {Object} A dictionary of parameters to filter the result. The filtering keys are:\n * - contentType: desired ContentType\n * - handler: desired ContentHandler\n *\n * @param callback {Function(List of ContentPeer objects)} Callback that receives the result or null\n */\n getPeers: function(filter, callback) {\n backendBridge.call('ContentHub.getPeers',\n [filter],\n callback);\n },\n\n /**\n * Creates a ContentStore object for the given scope type.\n *\n * @method getStore\n * @param scope {ContentScope} The content scope for the store\n * @param callback {Function(ContentStore)} Callback that receives the result or null\n */\n getStore: function(scope, callback) {\n backendBridge.call('ContentHub.getStore',\n [scope],\n callback);\n },\n\n /**\n * Launches the content peer picker ui that allows the user to select a peer.\n *\n * @method launchContentPeerPicker\n * @param filters {Object} A dictionary of parameters to filter the result. The filtering keys are:\n * - contentType: desired ContentType\n * - handler: desired ContentHandler\n * - showTitle: boolean value indicating if the title should be visible\n * @param onPeerSelected {Function(ContentPeer)} Called when the user has selected a peer\n * @param onCancelPressed {Function()} Called when the user has pressed cancel\n */\n launchContentPeerPicker: function(filters, onPeerSelected, onCancelPressed) {\n backendBridge.call('ContentHub.launchContentPeerPicker',\n [filters, onPeerSelected, onCancelPressed]);\n },\n\n /**\n * Sets a handler that is to be called when the current application is the\n * target of an export request.\n *\n * @method onExportRequested\n * @param callback {Function(ContentTransfer)} Function when one requests a resource to be exported.\n * The corresponding ContentTransfer is provided as a parameter.\n * \n * @example\n \n var api = external.getUnityObject(1.0);\n var hub = api.ContentHub;\n \n var transferState = hub.ContentTransfer.State;\n \n function _exportRequested(transfer) {\n var url = window.location.href;\n url = url.substr(0, url.lastIndexOf('/')+1) + 'img/ubuntuone-music.png';\n \n transfer.setItems([{name: 'Ubuntu One', url: url}],\n function() {\n transfer.setState(hub.ContentTransfer.State.Charged);\n });\n };\n \n hub.onExportRequested(_exportRequested);\n \n */\n onExportRequested: function(callback) {\n backendBridge.call('ContentHub.onExportRequested',\n [callback]);\n },\n\n api: {\n\n /**\n * Creates a ContentStore object for the given ContentPeer.\n *\n * @method api.importContent\n * @param type {ContentType} type of the content to import\n * @param peer {ContentPeer} peer whos content should be imported\n * @param transferOptions {Object} a dictionary of transfer options. The options are the following:\n * - multipleFiles {Bool}: specified if a transfer should involve multiple files or not\n * - scope {ContentScope}: specifies the location where the transferred files should be copied to\n * @param onError {Function(reason:)} called when the transfer has failed\n * @param onSuccess {Function(Array of {ContentItem})} called when the transfer has been a success and items are available\n */\n importContent: function(type, peer, transferOptions, onSuccess, onError) {\n backendBridge.call('ContentHub.apiImportContent',\n [type, peer.serialize(), transferOptions, onSuccess, onError]);\n }\n },\n\n // Internal\n\n /**\n * @private\n *\n */\n createObjectWrapper: function(objectType, objectId, content) {\n var Constructor = _constructorFromName(objectType);\n return new Constructor(objectId, content);\n },\n };\n}", "get mainChannel() {\n return this.getElement('main');\n }", "function initGUI() {\n gui = new dat.GUI();\n var parameters = \n {\n newGame: function() {\n window.location.hash = '';\n window.location.reload();\n }\n };\n\n gui.add( parameters, 'newGame' ).name('New Game');\n gui.open();\n}", "static setNewGraph(graphData = null) {\n exports.graph = new GraphCustom(graphData);\n }", "function setupDefaultBot() {\r\n bot = {\r\n root: args.root,\r\n restrictedMode: false,\r\n outputLevel: 'regular',\r\n channel: {}\r\n }\r\n}", "function setNewModuleNode(object,count,num,racknum){\n var number = GlobalPortIP; \n var modulename = \"\";\n var redflag = \"\";\n var moduledescription = \"\";\n var subchannel = \"\";\n var moduleid = \"\";\n var serialnumber = \"\";\n\tif(globalStructure == \"devrackslotport\"){\n\t\tvar moduledevname = \"Device_\"+deviceCtr+\".Rack_\"+racknum+\".Slot_\"+num;\n\t\tvar objectpath = \"Device_\"+deviceCtr+\".Rack_\"+racknum+\".Slot_\"+num+\".Module_\"+count;\n\t}else{\n \tvar objectpath = \"Device_\"+deviceCtr;\n \tvar moduledevname = \"Device_\"+deviceCtr+\".Module_\"+count;\n\t}\n var moduleresid = \"\";\n var updateflag = \"new\";\n var moduleslotid = \"\";\n\n\tvar JsonStr = '';\n\tJsonStr += '{ \"Number\":\"'+number+'\",\"ModuleName\":\"'+modulename+'\",\"RedFlag\":\"'+redflag+'\",\"ModuleDescription\":\"'+moduledescription+'\",\"SubChannel\":\"'+subchannel+'\",\"ObjectPath\":\"'+objectpath+'\",\"ModuleId\":\"'+moduleid+'\",\"SerialNumber\":\"'+serialnumber+'\",\"ModuleDevName\":\"'+moduledevname+'\",\"ModuleResId\":\"'+moduleresid+'\",\"UpdateFlag\":\"'+updateflag+'\",\"ModuleSlotId\":\"'+moduleslotid+'\"';\n\tJsonStr += ',\"PORT\":[] }';\n\tvar parseJ = $.parseJSON(JsonStr);\n\tvar physicalporttype = \"\";\n\tvar type = \"\";\t\t\n\tvar speed = \"\";\n\tvar objectpath = \"\";\n\tvar portname = \"\";\n\tvar portmap = \"\";\n\tvar portnameid = \"\";\n\tif(globalStructure == \"devslotmod\"){\n\t\tGlobalNewDevice[0].DEVICES[0].SLOT[num].MODULE.push(parseJ);\n\t\tvar portcount = arrModuleCount[num].Value\n\t}else if(globalStructure == \"devrackslotport\"){\n\t\tGlobalNewDevice[0].DEVICES[0].RACK[racknum].SLOT[num].MODULE.push(parseJ);\n\t\tvar portcount = arrModuleCount[num].Value\n\t}else{\n\t\tGlobalNewDevice[0].DEVICES[0].MODULE.push(parseJ);\n\t\tvar portcount = arrModuleCount[count].Value\n\t}\n\tportcount--\n\tfor(var i = 0; i <= portcount; i++){\n\t\tif(globalStructure == \"devslotmod\"){\n\t\t\tportid = \"Slot\"+num+\"_Module\"+count+\"_Port\"+i\n\t\t}else if(globalStructure == \"devrackslotport\"){\n\t\t\tportid = \"Rack\"+racknum+\"_Slot\"+num+\"_Module\"+count+\"_Port\"+i\n\t\t}else{\n\t\t\tportid = \"Module\"+count+\"_Port\"+i\n\t\t}\n\t\tpysicalport = arrModuleCount[count].PhysicalPortType\n\t\tfor(var x = 0; x < devPortInfoArray.length; x++){\n\t\t\tnewportid = devPortInfoArray[x].PortId\n\t\t\tif(newportid==portid){\n\t\t\t\ttype = \"untagged\";\n\t\t\t\tspeed = physicalPortTypeSpeed(physicalporttype);\n\t\t\t\tobjectpath = \"Device_\"+deviceCtr+\".Module_\"+count+\"Port_\"+x\n\t\t\t\tportnameid = devPortInfoArray[x].PortName\n\t\t\t\tportnameid = portnameid.split(\"_\");\n\t\t\t\tportname = portnameid[0]\n\t\t\t\tportmap = portnameid[1]\n\t\t\t\tports = setNewPortNode(physicalporttype,type,speed,objectpath,portname,\"new\",\"false\",portmap);\n\t\t\t\tif(globalStructure == \"devslotmod\"){\n\t\t\t\t\tGlobalNewDevice[0].DEVICES[0].SLOT[num].MODULE[count].PORT.push(ports);\n\t\t\t\t}else if(globalStructure == \"devrackslotport\"){\n\t\t\t\t\tGlobalNewDevice[0].DEVICES[0].RACK[racknum].SLOT[num].MODULE[count].PORT.push(ports);\n\t\t\t\t}else{\n\t\t\t\t\tGlobalNewDevice[0].DEVICES[0].MODULE[count].PORT.push(ports);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tGlobalPortIP++\n\treturn parseJ;\n\t\n}", "handleYup () {\n\n var connection = {\n type : 'hell',\n source_id: currentUserIdGlobal,\n target_id: currentCard._id\n };\n createConnectionGlobal(connection);\n }", "function setExtra(key, extra) {\n\t getCurrentHub().setExtra(key, extra);\n\t}", "function setExtras(extras) {\n callOnHub('setExtras', extras);\n}", "function setExtras(extras) {\n callOnHub('setExtras', extras);\n}", "function setExtras(extras) {\n callOnHub('setExtras', extras);\n}", "init() {\n // hello from the other side\n }", "disablePushin() {\n get(this, '_elevio').pushin = 'false';\n }", "API_registerDriver()\n{\n if (this.API_driver_id === undefined)\n {\n // Create a driver at a random place with a random id :-)\n this.API_driver_id = Math.round(Math.random() * 1000000000);\n\n this.ws.send(`{\"event\":\"test_newdriver\", \"data\":{\"id\":${this.API_driver_id },\"lat\":${this.state.driver_region.latitude},\"lon\":${this.state.driver_region.longitude}}}`)\n }\n\n}", "function lisp_set_js_global(name, value) {\n lisp_assert(lisp_is_instance(name, Lisp_String));\n lisp_assert(lisp_is_instance(value, Lisp_Object));\n window[lisp_string_native_string(name)] = value;\n return name;\n}", "function refresh_database( done) {\n var Hub = require( '../models/hub');\n Hub.remove({}, function( err) {\n if( err) {\n console.log( err);\n } else {\n try {\n var default_hub = { \n mac:'11:22:33:44:55:66',\n ip:'123.456.789.012',\n hub_token:'defaulthub123456', \n is_deleted:false,\n created_at:Date.now(),\n updated_at:Date.now()\n };\n\n var actived_hub = extend( {}, default_hub);\n actived_hub.hub_token = 'activedhub123456';\n var hub = new Hub( actived_hub);\n hub.save();\n\n var deleted_hub = extend( {}, default_hub);\n deleted_hub.is_deleted = true;\n deleted_hub.hub_token = 'deletedhub123456';\n var hub = new Hub( deleted_hub);\n hub.save();\n\n var inactive_hub = extend( {}, default_hub);\n inactive_hub.mac = '';\n inactive_hub.ip = '';\n inactive_hub.hub_token = 'inactivehub12345';\n var hub = new Hub( inactive_hub);\n hub.save();\n\n done();\n } catch( e) {\n console.log( e);\n }\n }\n });\n}", "function setNick(nick){\n // Complete:\n // \n // Get a reference to the DOM object in the appwall.html file\n \n // change the html of the object\n\n}", "function globalReset () {\n\t\t\t// Reset Modal GUI:\n\t\t\tglob.domObjects.$modalBox.empty();\n\t\t\tglob.domObjects.$errorModalBox.empty().hide();\n\t\t\t// Reset vars:\n\t\t\tglob.curr = {\n\t\t\t\tnewTemplate: false,\n\t\t\t\tparamDomElements: {},\n\t\t\t\tparamsJson: {}\n\t\t\t};\n\t\t}", "initSocket() {\n const channels = this.get('channels');\n const pusher = this.get('pusher');\n const node = this.get('nodeId');\n const sensors = this.get('sensorMap').keys();\n\n for (const channel of channels) {\n pusher.unsubscribe(channel);\n }\n\n for (const sensor of sensors) {\n const channel = `private-${NETWORK};${node};${sensor}`;\n pusher.subscribe(channel, this.appendObservation.bind(this));\n channels.push(channel);\n }\n }", "function changeRobot(robotFaceSrc) {\r\n let robotDiv = document.getElementById(\"robotFace\");\r\n\r\n // console.log(robotDiv);\r\n\r\n // console.log($('#robotFace'));\r\n\r\n // console.log(_(1234));\r\n robotDiv.src = robotFaceSrc; \r\n }", "reassignHostSocket() {\n this.hostSocket = undefined;\n\n if (this.playerMap.getActivePlayerCount() > 0) {\n this.setHostSocketAndNotify(this.playerMap.getActivePlayerList()[0].socket);\n }\n }" ]
[ "0.71589226", "0.70410913", "0.7030244", "0.6932362", "0.65008783", "0.6373567", "0.63675654", "0.6346796", "0.63138765", "0.6277299", "0.6224287", "0.6185386", "0.61494035", "0.6002557", "0.57899106", "0.5740317", "0.5700796", "0.56344616", "0.55131125", "0.5504904", "0.5411839", "0.5358588", "0.53377765", "0.53350174", "0.5313874", "0.53086317", "0.5307387", "0.5285484", "0.52839106", "0.5277235", "0.52555454", "0.52077395", "0.5197263", "0.5188525", "0.5180334", "0.51497847", "0.5139873", "0.51259536", "0.51089036", "0.5100801", "0.5099676", "0.5097092", "0.50728", "0.50713414", "0.506302", "0.5054821", "0.5015194", "0.501364", "0.50113034", "0.50113034", "0.50113034", "0.5005965", "0.49992278", "0.4993676", "0.49819094", "0.49589172", "0.4958083", "0.4949835", "0.49368206", "0.49315083", "0.4925261", "0.49250555", "0.49235222", "0.48953128", "0.48855716", "0.4883757", "0.48816168", "0.48671782", "0.48621878", "0.4855892", "0.4855892", "0.4855892", "0.4846245", "0.48362774", "0.48173174", "0.47964528", "0.47962224", "0.47880492", "0.47714242", "0.47673562", "0.47622764", "0.47429523", "0.4738999", "0.47378758", "0.4718405", "0.4718405", "0.4718405", "0.4716406", "0.47114256", "0.47041035", "0.4703315", "0.47030982", "0.4698447", "0.4693038", "0.46906814", "0.46855637", "0.46812794" ]
0.7091031
4
Returns the default hub instance. If a hub is already registered in the global carrier but this module contains a more recent version, it replaces the registered version. Otherwise, the currently registered hub will be returned.
function hub_getCurrentHub() { // Get main carrier (global for every environment) var registry = getMainCarrier(); // If there's no hub, or its an old API, assign a new one if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) { setHubOnCarrier(registry, new hub_Hub()); } // Prefer domains over global if they are there (applicable only to Node environment) if (Object(node["b" /* isNodeEnv */])()) { return getHubFromActiveDomain(registry); } // Return hub that lives on a global object return getHubFromCarrier(registry); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCurrentHub() {\n // Get main carrier (global for every environment)\n var registry = getMainCarrier();\n // If there's no hub, or its an old API, assign a new one\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(exports.API_VERSION)) {\n setHubOnCarrier(registry, new Hub());\n }\n // Prefer domains over global if they are there\n try {\n // We need to use `dynamicRequire` because `require` on it's own will be optimized by webpack.\n // We do not want this to happen, we need to try to `require` the domain node module and fail if we are in browser\n // for example so we do not have to shim it and use `getCurrentHub` universally.\n var domain = misc_1.dynamicRequire(module, 'domain');\n var activeDomain = domain.active;\n // If there no active domain, just return global hub\n if (!activeDomain) {\n return getHubFromCarrier(registry);\n }\n // If there's no hub on current domain, or its an old API, assign a new one\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(exports.API_VERSION)) {\n var registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, scope_1.Scope.clone(registryHubTopStack.scope)));\n }\n // Return hub that lives on a domain\n return getHubFromCarrier(activeDomain);\n }\n catch (_Oo) {\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }\n}", "function getCurrentHub() {\n // Get main carrier (global for every environment)\n const registry = getMainCarrier();\n\n // If there's no hub, or its an old API, assign a new one\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\n setHubOnCarrier(registry, new Hub());\n }\n\n // Prefer domains over global if they are there (applicable only to Node environment)\n if (isNodeEnv()) {\n return getHubFromActiveDomain(registry);\n }\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }", "function getCurrentHub() {\n // Get main carrier (global for every environment)\n var registry = getMainCarrier();\n // If there's no hub, or its an old API, assign a new one\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(exports.API_VERSION)) {\n setHubOnCarrier(registry, new Hub());\n }\n // Prefer domains over global if they are there (applicable only to Node environment)\n if (utils_1.isNodeEnv()) {\n return getHubFromActiveDomain(registry);\n }\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n}", "function getCurrentHub() {\n\t // Get main carrier (global for every environment)\n\t const registry = getMainCarrier();\n\n\t // If there's no hub, or its an old API, assign a new one\n\t if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\n\t setHubOnCarrier(registry, new Hub());\n\t }\n\n\t // Prefer domains over global if they are there (applicable only to Node environment)\n\t if (isNodeEnv()) {\n\t return getHubFromActiveDomain(registry);\n\t }\n\t // Return hub that lives on a global object\n\t return getHubFromCarrier(registry);\n\t}", "function getCurrentHub() {\r\n // Get main carrier (global for every environment)\r\n var registry = getMainCarrier();\r\n // If there's no hub, or its an old API, assign a new one\r\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\r\n setHubOnCarrier(registry, new Hub());\r\n }\r\n // Prefer domains over global if they are there\r\n try {\r\n // We need to use `dynamicRequire` because `require` on it's own will be optimized by webpack.\r\n // We do not want this to happen, we need to try to `require` the domain node module and fail if we are in browser\r\n // for example so we do not have to shim it and use `getCurrentHub` universally.\r\n var domain = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__[\"dynamicRequire\"])(module, 'domain');\r\n var activeDomain = domain.active;\r\n // If there no active domain, just return global hub\r\n if (!activeDomain) {\r\n return getHubFromCarrier(registry);\r\n }\r\n // If there's no hub on current domain, or its an old API, assign a new one\r\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\r\n var registryHubTopStack = getHubFromCarrier(registry).getStackTop();\r\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, _scope__WEBPACK_IMPORTED_MODULE_2__[\"Scope\"].clone(registryHubTopStack.scope)));\r\n }\r\n // Return hub that lives on a domain\r\n return getHubFromCarrier(activeDomain);\r\n } catch (_Oo) {\r\n // Return hub that lives on a global object\r\n return getHubFromCarrier(registry);\r\n }\r\n}", "function getCurrentHub() {\n // Get main carrier (global for every environment)\n const registry = getMainCarrier();\n\n // If there's no hub, or its an old API, assign a new one\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\n setHubOnCarrier(registry, new Hub());\n }\n\n // Prefer domains over global if they are there (applicable only to Node environment)\n if (utils.isNodeEnv()) {\n return getHubFromActiveDomain(registry);\n }\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n}", "function getCurrentHub() {\n // Get main carrier (global for every environment)\n var registry = getMainCarrier();\n // If there's no hub, or its an old API, assign a new one\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\n setHubOnCarrier(registry, new Hub());\n }\n // Prefer domains over global if they are there (applicable only to Node environment)\n if (Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__[\"isNodeEnv\"])()) {\n return getHubFromActiveDomain(registry);\n }\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n}", "function getHubFromActiveDomain(registry) {\n try {\n var activeDomain = getActiveDomain();\n // If there's no active domain, just return global hub\n if (!activeDomain) {\n return getHubFromCarrier(registry);\n }\n // If there's no hub on current domain, or it's an old API, assign a new one\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\n var registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n setHubOnCarrier(activeDomain, new hub_Hub(registryHubTopStack.client, scope_Scope.clone(registryHubTopStack.scope)));\n }\n // Return hub that lives on a domain\n return getHubFromCarrier(activeDomain);\n }\n catch (_Oo) {\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }\n}", "function getHubFromActiveDomain(registry) {\n try {\n const sentry = getMainCarrier().__SENTRY__;\n const activeDomain = sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;\n\n // If there's no active domain, just return global hub\n if (!activeDomain) {\n return getHubFromCarrier(registry);\n }\n\n // If there's no hub on current domain, or it's an old API, assign a new one\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\n const registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, Scope.clone(registryHubTopStack.scope)));\n }\n\n // Return hub that lives on a domain\n return getHubFromCarrier(activeDomain);\n } catch (_Oo) {\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }\n }", "function getHubFromActiveDomain(registry) {\n\t try {\n\t const sentry = getMainCarrier().__SENTRY__;\n\t const activeDomain = sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;\n\n\t // If there's no active domain, just return global hub\n\t if (!activeDomain) {\n\t return getHubFromCarrier(registry);\n\t }\n\n\t // If there's no hub on current domain, or it's an old API, assign a new one\n\t if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\n\t const registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n\t setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, Scope.clone(registryHubTopStack.scope)));\n\t }\n\n\t // Return hub that lives on a domain\n\t return getHubFromCarrier(activeDomain);\n\t } catch (_Oo) {\n\t // Return hub that lives on a global object\n\t return getHubFromCarrier(registry);\n\t }\n\t}", "function getHubFromActiveDomain(registry) {\n var _a, _b, _c;\n try {\n var activeDomain = (_c = (_b = (_a = getMainCarrier().__SENTRY__) === null || _a === void 0 ? void 0 : _a.extensions) === null || _b === void 0 ? void 0 : _b.domain) === null || _c === void 0 ? void 0 : _c.active;\n // If there's no active domain, just return global hub\n if (!activeDomain) {\n return getHubFromCarrier(registry);\n }\n // If there's no hub on current domain, or it's an old API, assign a new one\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(exports.API_VERSION)) {\n var registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, scope_1.Scope.clone(registryHubTopStack.scope)));\n }\n // Return hub that lives on a domain\n return getHubFromCarrier(activeDomain);\n }\n catch (_Oo) {\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }\n}", "function getHubFromActiveDomain(registry) {\n try {\n const sentry = getMainCarrier().__SENTRY__;\n const activeDomain = sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;\n\n // If there's no active domain, just return global hub\n if (!activeDomain) {\n return getHubFromCarrier(registry);\n }\n\n // If there's no hub on current domain, or it's an old API, assign a new one\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\n const registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, scope.Scope.clone(registryHubTopStack.scope)));\n }\n\n // Return hub that lives on a domain\n return getHubFromCarrier(activeDomain);\n } catch (_Oo) {\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }\n}", "function getHubFromActiveDomain(registry) {\n try {\n var property = 'domain';\n var carrier = getMainCarrier();\n var sentry = carrier.__SENTRY__;\n // tslint:disable-next-line: strict-type-predicates\n if (!sentry || !sentry.extensions || !sentry.extensions[property]) {\n return getHubFromCarrier(registry);\n }\n var domain = sentry.extensions[property];\n var activeDomain = domain.active;\n // If there no active domain, just return global hub\n if (!activeDomain) {\n return getHubFromCarrier(registry);\n }\n // If there's no hub on current domain, or its an old API, assign a new one\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\n var registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, _scope__WEBPACK_IMPORTED_MODULE_2__[\"Scope\"].clone(registryHubTopStack.scope)));\n }\n // Return hub that lives on a domain\n return getHubFromCarrier(activeDomain);\n }\n catch (_Oo) {\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }\n}", "registerHubSite() {\r\n return this.clone(Site_1, `registerHubSite`).postCore();\r\n }", "function getMainCarrier() {\n var carrier = misc_1.getGlobalObject();\n carrier.__SENTRY__ = carrier.__SENTRY__ || {\n hub: undefined,\n };\n return carrier;\n}", "function makeMain(hub) {\r\n var registry = getMainCarrier();\r\n var oldHub = getHubFromCarrier(registry);\r\n setHubOnCarrier(registry, hub);\r\n return oldHub;\r\n}", "function makeMain(hub) {\n const registry = getMainCarrier();\n const oldHub = getHubFromCarrier(registry);\n setHubOnCarrier(registry, hub);\n return oldHub;\n }", "function makeMain(hub) {\n var registry = getMainCarrier();\n var oldHub = getHubFromCarrier(registry);\n setHubOnCarrier(registry, hub);\n return oldHub;\n}", "function makeMain(hub) {\n var registry = getMainCarrier();\n var oldHub = getHubFromCarrier(registry);\n setHubOnCarrier(registry, hub);\n return oldHub;\n}", "function makeMain(hub) {\n var registry = getMainCarrier();\n var oldHub = getHubFromCarrier(registry);\n setHubOnCarrier(registry, hub);\n return oldHub;\n}", "function makeMain(hub) {\n var registry = getMainCarrier();\n var oldHub = getHubFromCarrier(registry);\n setHubOnCarrier(registry, hub);\n return oldHub;\n}", "function getMainCarrier() {\n GLOBAL_OBJ.__SENTRY__ = GLOBAL_OBJ.__SENTRY__ || {\n extensions: {},\n hub: undefined,\n };\n return GLOBAL_OBJ;\n }", "function makeMain(hub) {\n\t const registry = getMainCarrier();\n\t const oldHub = getHubFromCarrier(registry);\n\t setHubOnCarrier(registry, hub);\n\t return oldHub;\n\t}", "function makeMain(hub) {\n const registry = getMainCarrier();\n const oldHub = getHubFromCarrier(registry);\n setHubOnCarrier(registry, hub);\n return oldHub;\n}", "function getMainCarrier() {\n\t GLOBAL_OBJ.__SENTRY__ = GLOBAL_OBJ.__SENTRY__ || {\n\t extensions: {},\n\t hub: undefined,\n\t };\n\t return GLOBAL_OBJ;\n\t}", "defaultDriver () {\n return this._config.default\n }", "getDefaultWindow() {\n return this._windows.get('Default');\n }", "function getMainCarrier() {\r\n var carrier = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__[\"getGlobalObject\"])();\r\n carrier.__SENTRY__ = carrier.__SENTRY__ || {\r\n hub: undefined\r\n };\r\n return carrier;\r\n}", "function getMainCarrier() {\n utils.GLOBAL_OBJ.__SENTRY__ = utils.GLOBAL_OBJ.__SENTRY__ || {\n extensions: {},\n hub: undefined,\n };\n return utils.GLOBAL_OBJ;\n}", "function getMainCarrier() {\n var carrier = utils_1.getGlobalObject();\n carrier.__SENTRY__ = carrier.__SENTRY__ || {\n extensions: {},\n hub: undefined,\n };\n return carrier;\n}", "unRegisterHubSite() {\r\n return this.clone(Site_1, `unRegisterHubSite`).postCore();\r\n }", "function getMainCarrier() {\n var carrier = Object(misc[\"e\" /* getGlobalObject */])();\n carrier.__SENTRY__ = carrier.__SENTRY__ || {\n extensions: {},\n hub: undefined,\n };\n return carrier;\n}", "function defaultGraph() {\n return DEFAULTGRAPH;\n}", "static getInstance() {\n if (!instance) instance = new WirelessMBusMeter();\n return instance;\n }", "function _getInstance(that)\n{\n var ws = that.ws ? that.ws : GLOBAL;\n\n var k = sockets.indexOf(ws);\n if (k < 0) {\n logger.info(\"ROV Module: _getInstance() failed!\");\n return ({});\n }\n\n return (instances[k]);\n}", "syncHubSiteTheme() {\r\n return this.clone(Web_1, `syncHubSiteTheme`).postCore();\r\n }", "static get platform() {\n if (!HostPlatform.platformInstance) {\n switch (process.platform) {\n case \"win32\":\n HostPlatform.platformInstance = new WindowsHostPlatform();\n break;\n case \"darwin\":\n HostPlatform.platformInstance = new OSXHostPlatform();\n break;\n case \"linux\":\n HostPlatform.platformInstance = new LinuxHostPlatform();\n break;\n default:\n HostPlatform.platformInstance = new LinuxHostPlatform();\n break;\n }\n }\n return HostPlatform.platformInstance;\n }", "static getCurrentBrowser() {\n if (typeof (chrome) !== 'undefined')\n return Browser.CHROME;\n else {\n throw \"Invalid Browser\";\n }\n }", "get ROOT_BM() {\n return {\n id: checkBrowser() === 'firefox' ? '' : '0',\n }\n }", "get defaultClient() {\n return this.client;\n }", "static instance() {\n const PublisherSingletonSymbol = Symbol.for('app.pi-weather-station.csv-publisher');\n return Object.getOwnPropertySymbols(global).indexOf(PublisherSingletonSymbol) >= 0 ?\n global[PublisherSingletonSymbol] : (global[PublisherSingletonSymbol] = new CsvPublisher());\n }", "function getMainCarrier() {\n var carrier = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__[\"getGlobalObject\"])();\n carrier.__SENTRY__ = carrier.__SENTRY__ || {\n extensions: {},\n hub: undefined,\n };\n return carrier;\n}", "function hasHubOnCarrier(carrier) {\n return !!(carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub);\n }", "function hasHubOnCarrier(carrier) {\n\t return !!(carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub);\n\t}", "function getSite(){\n\t\tconsole.log('GET SIIIITEEEEE');\n\n\t\t//Bluemix Classic (V3 Header)\n\t\t// if( document.querySelector('header.bluemix-global-header') ){\n\t\t// \treturn 'BLUEMIX_CLASSIC';\n\t\t// }\n\t\t// else if ( document.querySelector('body.link') ){\n\t\t// \treturn 'BLUEMIX_ATLAS';\n\t\t// }\n\t\t// //Registration Page\n\t\t// else if ( document.querySelector('body.registration') ){\n\t\t// \treturn 'BLUEMIX_ATLAS';\n\t\t// }\n\t\t// else if ( ! document.querySelector('header') ){\n\t\t// \treturn 'EXTERNAL_SITE';\n\t\t// }\n\t\t// else if ( document.querySelector('header').getAttribute('data-version') === 'V4' || document.querySelector('header').id === 'global-header'){\n\t\t// \treturn 'BLUEMIX_ATLAS';\n\t\t// }\n\t\t//\n\t\t// return 'EXTERNAL_SITE';\n\t\treturn 'IOTPLATFORM';\n\t}", "async getDefaultInterface() {\n const DefaultInterface = require('./default-interface.js');\n let data = await DefaultInterface.v4();\n if(data === null){\n throw new Error(\"default gateway cannot be determined\");\n }\n\n //we need cdir notation of the lan, so we translate 192.168.1.1/255.255.255.0 to 192.168.1.1/24\n //(to remove Netmask dependencie, we might use ipaddr.js plugin function : prefixLengthFromSubnetMask(), but still need a way to determine network address...)\n let block = new Netmask(data.gateway + '/' + data.netmask);\n\n return {\n name: data.name,\n cidr: data.cidr,\n ip_address: data.address,\n mac_address: F.normalizeMAC(data.mac),\n fullmask: data.netmask,\n bitmask: block.bitmask,\n network: block.base,\n family: data.family,\n gateway_ip: data.gateway,\n };\n }", "function hasHubOnCarrier(carrier) {\n if (carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub) {\n return true;\n }\n else {\n return false;\n }\n}", "function hasHubOnCarrier(carrier) {\n if (carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub) {\n return true;\n }\n return false;\n}", "static getInstance() {\n return CSRankings.theInstance;\n }", "function glb() {\n if (store.glb) {\n return store.glb;\n } else {\n // resolve global\n var t;\n\n try {\n t = global;\n } catch (e) {\n t = window;\n }\n\n store.glb = t;\n return t;\n }\n } // is 各种判断", "function hasHubOnCarrier(carrier) {\r\n if (carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub) {\r\n return true;\r\n }\r\n return false;\r\n}", "getById(id) {\r\n return new HubSite(this, `GetById?hubSiteId='${id}'`);\r\n }", "function getDefaultChainGroup()\n\t{\n\t\treturn _defaultChainGroup;\n\t}", "getRandomUserAgent(){\n\t\tconst idx = Math.floor(Math.random() * userAgentList.length-1)\n\t\treturn userAgentList[idx]||userAgentList[0]\n\t}", "function defaultTransportFactory() {\n if (!selected) {\n selected = detectTransport();\n }\n return selected;\n}", "getStorage() {\n if (!this._storage) {\n this._storage = new BrowserStorage_1.default();\n }\n\n return this._storage;\n }", "static Instance() {\n return new ReturnToHomeRegion();\n }", "function getDefaultUserAgentValue() {\n const runtimeInfo = getRuntimeInfo();\n const platformSpecificData = getPlatformSpecificData();\n const userAgent = getUserAgentString(runtimeInfo.concat(platformSpecificData));\n return userAgent;\n}", "function getDefaultUserAgentValue() {\n const runtimeInfo = getRuntimeInfo();\n const platformSpecificData = getPlatformSpecificData();\n const userAgent = getUserAgentString(runtimeInfo.concat(platformSpecificData));\n return userAgent;\n}", "get _rabbitmqKind() {\n return rabbitmqConstants.globalRabbitmqKind;\n }", "get hubSites() {\r\n return this.create(HubSites);\r\n }", "function createDefaultHttpClient() {\n return createNodeHttpClient();\n}", "function getDefaultDatabaseVersion() {\n if (!defaultDatabaseVersion) {\n // This be the current version according to the software\n defaultDatabaseVersion = _.find(defaultSettings.core, function (setting) {\n return setting.key === 'databaseVersion';\n }).defaultValue;\n }\n\n return defaultDatabaseVersion;\n}", "function getDefaultRSSI(band)\n{\n\tvar rssi = (band == 2 ) ? g_wbdDefRSSI2G : g_wbdDefRSSI5G;\n\n\treturn rssi\n}", "function getGlobalSingleton(name, creator, obj) {\n const gbl = (obj || GLOBAL_OBJ) ;\n const __SENTRY__ = (gbl.__SENTRY__ = gbl.__SENTRY__ || {});\n const singleton = __SENTRY__[name] || (__SENTRY__[name] = creator());\n return singleton;\n }", "function getGlobalObject() {\r\n return (isNodeEnv()\r\n ? global\r\n : typeof window !== 'undefined'\r\n ? window\r\n : typeof self !== 'undefined'\r\n ? self\r\n : fallbackGlobalObject);\r\n}", "static makeDefault() {\n return new Config(ModelType.MODEL3, BasicLevel.LEVEL2, CGChip.LOWER_CASE, RamSize.RAM_48_KB, Phosphor.WHITE, Background.AUTHENTIC, ScanLines.OFF);\n }", "static currentMediaService() {\n if (window.location.host === \"www.youtube.com\") {\n return Service.YouTube;\n }\n else if (window.location.host === \"kissanime.ru\") {\n return Service.KissAnime;\n }\n else if (window.location.host === \"kissmanga.com\") {\n return Service.KissManga;\n }\n return null;\n }", "function hasHubOnCarrier(carrier) {\n return !!(carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub);\n}", "get Device() {\n return require('./device').default\n }", "getDefaultAccount()\n {\n if (this.meta[\"settings.default-account\"] == null)\n return null\n\n return this.getAccount(this.meta[\"settings.default-account\"])\n }", "function updateFoundHub(hubURL: ?string, hub: HUB_TYPE) {\n const foundHub = hub;\n // Hub keys returns ids, idQuerys return hubId\n if (foundHub.hubId) {\n foundHub.id = foundHub.hubId;\n delete foundHub.hubId;\n }\n if (!foundHub.id) {\n return;\n }\n\n if (!hubsMap[foundHub.id]) {\n hubsMap[foundHub.id] = {\n id: foundHub.id,\n name: foundHub.name || '',\n };\n }\n hubsMap[foundHub.id].name = foundHub.name;\n hubsMap[foundHub.id].connected = foundHub.connected;\n hubsMap[foundHub.id].features = foundHub.features;\n hubsMap[foundHub.id].state = foundHub.state;\n hubsMap[foundHub.id].version = foundHub.version;\n hubsMap[foundHub.id].connectionState = foundHub.connected ? HUB_CONNECTION_STATES.REMOTE : HUB_CONNECTION_STATES.UNCONNECTED;\n if (hubURL) {\n hubsMap[foundHub.id].connectionState = HUB_CONNECTION_STATES.LOCAL;\n hubsMap[foundHub.id].url = hubURL;\n } else {\n hubsMap[foundHub.id].url = undefined;\n }\n}", "getInstance() {\n if (!instance) instance = init();\n\n return instance;\n }", "async function getBrowser() {\n //* If browser is currently closing wait for it to fully close.\n await new Promise(resolve => {\n let timer = setInterval(() => {\n if (!browserClosing) {\n clearInterval(timer)\n resolve()\n }\n }, 100)\n })\n\n lastRequest = Date.now()\n\n //* Open a browser if there isn't one already.\n if (!browser) {\n browser = await puppeteer.launch({\n args: [\"--no-sandbox\"],\n headless: process.env.NODE_ENV === \"production\"\n })\n }\n\n //* Add closing interval if there isn't one already.\n if (!interval) {\n interval = setInterval(async () => {\n if (lastRequest < Date.now() - 15 * 60 * 1000) {\n await browser.close()\n browser = null\n clearInterval(interval)\n interval = null\n }\n }, 5000)\n }\n\n //* Open new connection and return the browser with connection id.\n const browserUUID = v4()\n activeConnections.push(browserUUID)\n return { pupBrowser: browser, uuid: browserUUID }\n}", "function getGlobalSingleton(name, creator, obj) {\n\t const gbl = (obj || GLOBAL_OBJ) ;\n\t const __SENTRY__ = (gbl.__SENTRY__ = gbl.__SENTRY__ || {});\n\t const singleton = __SENTRY__[name] || (__SENTRY__[name] = creator());\n\t return singleton;\n\t}", "function hasHubOnCarrier(carrier) {\n return !!(carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub);\n}", "function hasHubOnCarrier(carrier) {\n return !!(carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub);\n}", "function getGlobalObject() {\n return (isNodeEnv()\n ? global\n : typeof window !== 'undefined'\n ? window\n : typeof self !== 'undefined'\n ? self\n : fallbackGlobalObject);\n}", "function getGlobalSingleton(name, creator, obj) {\n const gbl = (obj || GLOBAL_OBJ) ;\n const __SENTRY__ = (gbl.__SENTRY__ = gbl.__SENTRY__ || {});\n const singleton = __SENTRY__[name] || (__SENTRY__[name] = creator());\n return singleton;\n}", "function DefaultConfig() {\n return defaultConfig;\n}", "function getDefaultEngine() {\n var name = \"defaultEngine=\";\n var decodedCookie = decodeURIComponent(document.cookie);\n var ca = decodedCookie.split(';');\n for(var i = 0; i <ca.length; i++) {\n var c = ca[i];\n while (c.charAt(0) == ' ') {\n c = c.substring(1);\n }\n if (c.indexOf(name) == 0) {\n return c.substring(name.length, c.length);\n }\n }\n return \"\";\n}", "lastIsMaster() {\n const serverDescriptions = Array.from(this.description.servers.values());\n if (serverDescriptions.length === 0) return {};\n\n const sd = serverDescriptions.filter(sd => sd.type !== ServerType.Unknown)[0];\n const result = sd || { maxWireVersion: this.description.commonWireVersion };\n return result;\n }", "lastIsMaster() {\n const serverDescriptions = Array.from(this.description.servers.values());\n if (serverDescriptions.length === 0) return {};\n\n const sd = serverDescriptions.filter(sd => sd.type !== ServerType.Unknown)[0];\n const result = sd || { maxWireVersion: this.description.commonWireVersion };\n return result;\n }", "lastIsMaster() {\n const serverDescriptions = Array.from(this.description.servers.values());\n if (serverDescriptions.length === 0) return {};\n\n const sd = serverDescriptions.filter(sd => sd.type !== ServerType.Unknown)[0];\n const result = sd || { maxWireVersion: this.description.commonWireVersion };\n return result;\n }", "async getCurrentBranch() {\n const branches = await this.getBranches();\n const head = branches.getHeadBranch();\n if (head.isPresent()) {\n return head;\n }\n\n const description = await this.getHeadDescription();\n return Branch.createDetached(description || 'no branch');\n }", "function getCoreInstance(id) {\n\t const registry = storage.getRegistry(id);\n\t return registry\n\t ? registry.getCustom('core', true)\n\t : void 0;\n\t}", "function getGlobalObject() {\n return (Object(_node__WEBPACK_IMPORTED_MODULE_0__[/* isNodeEnv */ \"b\"])()\n ? global\n : typeof window !== 'undefined'\n ? window\n : typeof self !== 'undefined'\n ? self\n : fallbackGlobalObject);\n}", "static get instance() {\n // Set object isn't first create\n this._firstCreateFlag = false;\n // Class.instance, use static attribute to retrieve instance\n // In here, this is class defined.\n if (typeof instances[this.appName] === \"undefined\" || instances[this.appName] === null) {\n instances[this.appName] = new this();\n }\n return instances[this.appName];\n }", "function ready_wrapper() {\n return gadget_instance;\n }", "_default() {\n return super._missingPreDefault();\n }", "getNewDriver() {\n return __awaiter(this, void 0, void 0, function* () {\n let builder;\n if (this.config_.useBlockingProxy) {\n builder =\n new selenium_webdriver_1.Builder().usingServer(this.getBPUrl()).withCapabilities(this.config_.capabilities);\n }\n else {\n builder = new selenium_webdriver_1.Builder()\n .usingServer(this.config_.seleniumAddress)\n .usingWebDriverProxy(this.config_.webDriverProxy)\n .withCapabilities(this.config_.capabilities);\n }\n if (this.config_.disableEnvironmentOverrides === true) {\n builder.disableEnvironmentOverrides();\n }\n let newDriver;\n try {\n newDriver = yield builder.build();\n }\n catch (e) {\n throw new exitCodes_1.BrowserError(logger, e.message);\n }\n this.drivers_.push(newDriver);\n return newDriver;\n });\n }", "getHubs() {\nif (this._gettingHubs) {\nreturn;\n}\nthis._gettingHubs = true;\nsetInterval(() => {\nlet hubs = this._poweredUP.getHubs();\nhubs.forEach(this._addHub.bind(this));\n}, 2000);\n}", "static getInstance(){\r\n if(this.instance==null){\r\n\r\n this.instance=new GenratShortener();\r\n\r\n return this.instance;\r\n }else {\r\n\r\n return this.instance;\r\n }\r\n\r\n }", "default() {\n return this;\n }", "function getInstanceFromNode(node){var inst=getClosestInstanceFromNode(node);if(inst!=null&&inst._hostNode===node){return inst;}else{return null;}}", "function locateWindow() {\n if (typeof window !== \"undefined\") {\n return window;\n }\n else if (typeof self !== \"undefined\") {\n return self;\n }\n return fallbackWindow;\n}", "function locateWindow() {\n if (typeof window !== \"undefined\") {\n return window;\n }\n else if (typeof self !== \"undefined\") {\n return self;\n }\n return fallbackWindow;\n}", "function locateWindow() {\n if (typeof window !== \"undefined\") {\n return window;\n }\n else if (typeof self !== \"undefined\") {\n return self;\n }\n return fallbackWindow;\n}", "async function getDefaultBranch(catalog) {\n const defaultBranch = await catalogClient.getDefaultBranch({ catalog });\n return defaultBranch[0]\n}", "defaultLanguage() {\n // Kirby 3.6 Fiber\n if (this.hasFiber) {\n return window.panel.$languages.find(l => l.default == true) ?? window.panel.$languages[0];\n }\n // Pre 3.6\n return this.$store.state.languages.default;\n }" ]
[ "0.813337", "0.80405915", "0.7990091", "0.7972129", "0.7968875", "0.79396135", "0.7857112", "0.6571274", "0.6486028", "0.6367278", "0.636274", "0.6359101", "0.6246236", "0.5939922", "0.58937955", "0.5676761", "0.558653", "0.5585142", "0.5585142", "0.5585142", "0.5585142", "0.5528963", "0.5489825", "0.54617697", "0.5423065", "0.5407847", "0.53031373", "0.5274375", "0.5256237", "0.52047837", "0.5203086", "0.51751447", "0.5131108", "0.50807047", "0.5062945", "0.49274045", "0.49233946", "0.49213466", "0.49047047", "0.4874066", "0.4815074", "0.47963127", "0.47815296", "0.47735834", "0.47616494", "0.4751326", "0.47458595", "0.474321", "0.47413862", "0.47385186", "0.47353998", "0.47324774", "0.47251743", "0.47134107", "0.46973926", "0.4657579", "0.46381745", "0.46353582", "0.46353582", "0.46310273", "0.46304148", "0.46226534", "0.46199158", "0.46190512", "0.46184042", "0.45888454", "0.4588581", "0.4588042", "0.45831656", "0.45770052", "0.45758253", "0.45732343", "0.45695144", "0.4565744", "0.4561117", "0.455835", "0.455835", "0.45535797", "0.45403278", "0.4533263", "0.45323014", "0.45185262", "0.45185262", "0.45185262", "0.4517573", "0.45170274", "0.45135683", "0.45122805", "0.45061433", "0.4503869", "0.44973728", "0.4494966", "0.44948614", "0.44931167", "0.4490506", "0.44867268", "0.44867268", "0.44867268", "0.4478221", "0.4471602" ]
0.79383117
6
Returns the active domain, if one exists
function getActiveDomain() { var sentry = getMainCarrier().__SENTRY__; return sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getActiveDomain() {\n utils_1.logger.warn('Function `getActiveDomain` is deprecated and will be removed in a future version.');\n var sentry = getMainCarrier().__SENTRY__;\n return sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;\n}", "function getDomain() {\n const domain = urlUtils.urlFor('home', true).match(new RegExp('^https?://([^/:?#]+)(?:[/:?#]|$)', 'i'));\n return domain && domain[1];\n}", "function currentDomain() {\n chrome.tabs.getCurrent(function(tab){\n console.log(tab.url);\n });\n \n // console.log(\"DOMAIN\");\n // console.log(domain);\n // if (domain.length == 0) {\n // return '_';\n // } else {\n // return domain;\n // }\n}", "function isFirstParty(url, domain) {\n\t\tlet hostname = new URL(url).hostname;\n\t\treturn hostname.match(domain + \"$\");\n\t}", "function getCurrentDomain() {\n\t\tlet dirs = window.location.href.split(\"/\");\n\t\tlet s = dirs[0];\n\t\tfor (let i=1; i<dirs.length-1; i++) {\n\t\t\ts += \"/\" + dirs[i];\n\t\t}\n\t\treturn s;\n\t}", "function getDomainName() {\n return window.location.hostname;\n}", "function getDomainName () {\r\n var hostname = window.location.hostname.split('.');\r\n if ( hostname.length >= 2 ) {\r\n var len = hostname.length;\r\n var domainname = '.' + hostname[len - 2] + '.' + hostname[len - 1];\r\n } else {\r\n var domainname = '.' + window.location.hostname;\r\n }\r\n return domainname;\r\n}", "function domain() {\n return wrap('domain', function domainCheckTLD() {\n var result = or(obsDomain, dotAtom, domainLiteral)();\n if (opts.rejectTLD) {\n if (result.semantic.indexOf('.') < 0) {\n return null;\n }\n }\n // strip all whitespace from domains\n if (result) {\n result.semantic = result.semantic.replace(/\\s+/g, '');\n }\n return result;\n }());\n }", "function domain() {\n return wrap('domain', function domainCheckTLD() {\n var result = or(obsDomain, dotAtom, domainLiteral)();\n if (opts.rejectTLD) {\n if (result.semantic.indexOf('.') < 0) {\n return null;\n }\n }\n // strip all whitespace from domains\n if (result) {\n result.semantic = result.semantic.replace(/\\s+/g, '');\n }\n return result;\n }());\n }", "function domain() {\n return wrap('domain', function domainCheckTLD() {\n var result = or(obsDomain, dotAtom, domainLiteral)();\n if (opts.rejectTLD) {\n if (result.semantic.indexOf('.') < 0) {\n return null;\n }\n }\n // strip all whitespace from domains\n if (result) {\n result.semantic = result.semantic.replace(/\\s+/g, '');\n }\n return result;\n }());\n }", "function domain() {\n return wrap('domain', function domainCheckTLD() {\n var result = or(obsDomain, dotAtom, domainLiteral)();\n if (opts.rejectTLD) {\n if (result && result.semantic && result.semantic.indexOf('.') < 0) {\n return null;\n }\n }\n // strip all whitespace from domains\n if (result) {\n result.semantic = result.semantic.replace(/\\s+/g, '');\n }\n return result;\n }());\n }", "function getDomain(req) {\n var x = req.url.split('/');\n if (x.length < 2) return parent.config.domains[''];\n if (parent.config.domains[x[1].toLowerCase()]) return parent.config.domains[x[1].toLowerCase()];\n return parent.config.domains[''];\n }", "function _stGetD(){\n\t\t\tvar str = document.domain.split(/\\./)\n\t\t\tvar domain=\"\";\n\t\t\tif(str.length>1){\n\t\t\t domain=\".\"+str[str.length-2]+\".\"+str[str.length-1];\n\t\t\t}\n\t\t\treturn domain;\n\t\t}", "get domain(){\n return this._domain||window.location.domain;\n \n }", "get domain(){\n return this._domain||window.location.domain;\n \n }", "function getHubFromActiveDomain(registry) {\n try {\n var property = 'domain';\n var carrier = getMainCarrier();\n var sentry = carrier.__SENTRY__;\n // tslint:disable-next-line: strict-type-predicates\n if (!sentry || !sentry.extensions || !sentry.extensions[property]) {\n return getHubFromCarrier(registry);\n }\n var domain = sentry.extensions[property];\n var activeDomain = domain.active;\n // If there no active domain, just return global hub\n if (!activeDomain) {\n return getHubFromCarrier(registry);\n }\n // If there's no hub on current domain, or its an old API, assign a new one\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\n var registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, _scope__WEBPACK_IMPORTED_MODULE_2__[\"Scope\"].clone(registryHubTopStack.scope)));\n }\n // Return hub that lives on a domain\n return getHubFromCarrier(activeDomain);\n }\n catch (_Oo) {\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }\n}", "function getDomain(url)\r\n{\r\n\tvar dom = url.split('/');\r\n\t\r\n\tif(dom[2] == undefined)\r\n\t{\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\t//console.log(dom[2], url)\r\n\t\r\n\treturn dom[2].split(':')[0];\r\n}", "function findDomain(domains,hostname){return domains.find(function(domain){return[endsWithHostName,endsWithParsedDomain].some(function(callable){return callable(hostname,domain);});});}", "function getCookieDomain() {\r\n var parts = window.location.hostname.split(\".\");\r\n var domain = '.' + parts.slice(parts.length-2)[0] + '.' + parts.slice(parts.length-1)[0];\r\n return domain;\r\n}", "getDomainName () {\n return window.location.hostname.replace (/www|docs|blog/gi, '');\n }", "function getHubFromActiveDomain(registry) {\n\t try {\n\t const sentry = getMainCarrier().__SENTRY__;\n\t const activeDomain = sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;\n\n\t // If there's no active domain, just return global hub\n\t if (!activeDomain) {\n\t return getHubFromCarrier(registry);\n\t }\n\n\t // If there's no hub on current domain, or it's an old API, assign a new one\n\t if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\n\t const registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n\t setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, Scope.clone(registryHubTopStack.scope)));\n\t }\n\n\t // Return hub that lives on a domain\n\t return getHubFromCarrier(activeDomain);\n\t } catch (_Oo) {\n\t // Return hub that lives on a global object\n\t return getHubFromCarrier(registry);\n\t }\n\t}", "function toggleEnabledForCurrentDomain() {\n var isCurrentDomainBlacklisted = !getEnabledForDomainCheckbox().checked;\n\n chrome.tabs.query({\n 'active': true,\n 'currentWindow': true\n }, function (tabs) {\n var tab = tabs[0];\n var domain = domainFromURL(tab.url);\n toggleEnabledForDomain(domain);\n });\n}", "function GetThirdPartyDomain(domain) {\r\n var match = domain.match(/[^.]+\\.(co\\.)?[^.]+$/) || [ domain ];\r\n return match[0].toLowerCase();\r\n }", "get domain() {\n if (!this.options.domain) return domain;\n return `${this.options.domain.replace(/\\/+$/, '')}`;\n }", "function updatePageFromCurrentDomain() {\n console.log('loadCurrentDomainSettings');\n chrome.tabs.query({ //This method output active URL \n 'active': true,\n 'currentWindow': true\n }, function (tabs) {\n var tab = tabs[0];\n var domain = domainFromURL(tab.url);\n updatePageWithDomain(domain);\n });\n}", "canonicalizedDomain() {\n if (this.domain == null) {\n return null;\n }\n return canonicalDomain(this.domain);\n }", "canonicalizedDomain() {\n if (this.domain == null) {\n return null;\n }\n return canonicalDomain(this.domain);\n }", "function getHubFromActiveDomain(registry) {\n try {\n const sentry = getMainCarrier().__SENTRY__;\n const activeDomain = sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;\n\n // If there's no active domain, just return global hub\n if (!activeDomain) {\n return getHubFromCarrier(registry);\n }\n\n // If there's no hub on current domain, or it's an old API, assign a new one\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\n const registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, Scope.clone(registryHubTopStack.scope)));\n }\n\n // Return hub that lives on a domain\n return getHubFromCarrier(activeDomain);\n } catch (_Oo) {\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }\n }", "function getDomain(url) {\r\n anchor.href = url;\r\n var host = anchor.hostname;\r\n var labels = host.split('.');\r\n return {\r\n name:\r\n isNaN(parseFloat(labels[labels.length - 1])) ?\r\n labels.splice(-2).join('.') : host,\r\n // IP addresses should't be munged.\r\n host: host\r\n };\r\n}", "function GetTopDomain(strThisDomain) {\n strTopDomains = \".co,.com,.net,.org,.edu,.biz,.info\";\n arrTopDomains = strTopDomains.split(\",\");\n strThisTopDomain = \"\";\n strLocalDomainPrefix = \"\";\n strLocalDomain = \"\";\n \n if (!strThisDomain || strThisDomain == \"\") {\n strThisDomain = location.hostname;\n }\n \n for (i=0; i < arrTopDomains.length; i++) {\n intIndexOfTopDomain = strThisDomain.indexOf(arrTopDomains[i]);\n if (intIndexOfTopDomain > 0) {\n // These conditions are intended to be mutually exclusive for all elements listed in\n // strTopDomains. Therefore only one of them should match, if any.\n if ((strThisDomain.substring(intIndexOfTopDomain,strThisDomain.length) != arrTopDomains[i]) || (strThisDomain.indexOf(arrTopDomains[i] + \".\") > 0)) {\n strLocalDomainPrefix = strThisDomain.substring(0,intIndexOfTopDomain);\n strThisTopDomain = strThisDomain.substring(intIndexOfTopDomain,strThisDomain.length);\n } else {\n intIndexOfTopDomain = -1;\n }\n }\n }\n if (strLocalDomainPrefix != \"\" && strThisTopDomain != \"\") {\n if (strLocalDomainPrefix.indexOf(\".\") > 0) {\n strLocalDomain = strLocalDomainPrefix.substring(strLocalDomainPrefix.lastIndexOf(\".\")+1,strLocalDomainPrefix.length) + strThisTopDomain;\n } else {\n strLocalDomain = strLocalDomainPrefix + strThisTopDomain;\n }\n }\n if (strLocalDomain != \"\") {\n return strLocalDomain;\n } else {\n //No supported top level domain was found. Pass back the passed in domain.\n return strThisDomain;\n }\n}", "get domainId() {\n return this.getStringAttribute('domain_id');\n }", "function getHubFromActiveDomain(registry) {\n try {\n const sentry = getMainCarrier().__SENTRY__;\n const activeDomain = sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;\n\n // If there's no active domain, just return global hub\n if (!activeDomain) {\n return getHubFromCarrier(registry);\n }\n\n // If there's no hub on current domain, or it's an old API, assign a new one\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\n const registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, scope.Scope.clone(registryHubTopStack.scope)));\n }\n\n // Return hub that lives on a domain\n return getHubFromCarrier(activeDomain);\n } catch (_Oo) {\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }\n}", "function GetEraDomain(current_window) \r\n\t{\r\n\t\tif (current_window.era_rc != null && current_window.era_rc[\"ERADomain\"] != null) \r\n\t\t{\r\n\t\t\t\treturn \"http://\" + (current_window.era_rc[\"ERADomain\"]) + ERA_INTERFACE_LINK;;\r\n\t\t} \r\n\t\t\r\n\t\treturn \"http://\" + DEFAULT_DOMAIN + ERA_INTERFACE_LINK;\r\n\t}", "function _uDomain() {\n if (!_udn || _udn==\"\" || _udn==\"none\") { _udn=\"\"; return 1; }\n if (_udn==\"auto\") {\n var d=_ubd.domain;\n if (d.substring(0,4)==\"www.\") {\n d=d.substring(4,d.length);\n }\n _udn=d;\n }\n \n if (_uhash==\"off\") return 1;\n return _uHash(_udn); \n}", "getDomain (url) {\n let a = document.createElement('a');\n a.href = url;\n return a.hostname;\n }", "function getTopLevelDomain(domain)\r\n{\t\r\n\tif(domain != null)\r\n\t{\r\n\t\tvar domainArray = domain.split(\".\");\t\r\n\t\tif(domainArray[domainArray.length - 1].length == 2)\r\n\t\t{\r\n\t\t\treturn \".\" + domainArray[domainArray.length - 3] + \".\" + domainArray[domainArray.length - 2] + \".\" + domainArray[domainArray.length - 1];\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn \".\" + domainArray[domainArray.length - 2] + \".\" + domainArray[domainArray.length - 1];\r\n\t\t}\r\n\t}\t\r\n}", "function getEnabledForDomainCheckbox() {\n return document.getElementById('enabledForDomain');\n}", "function url_domain(url) {\n var a = document.createElement('a');\n a.href = url;\n return a.hostname;\n}", "function getAppDomain()\n{\n var domain = getBaseDomain();\n var iCRM=domain.indexOf(\"netcrm\");\n if (iCRM != -1)\n domain=domain.substring(0,iCRM)+\"netsuite\"+domain.substring(iCRM+6);\n return domain;\n}", "function is_subdomain(cookie_domain, current_domain) {\n var protocol_matched = \"yes\";\n cod_protocol = cookie_domain.split(\":\")[0];\n cud_protocol = current_domain.split(\":\")[0];\n \n if (cod_protocol == \"https\" &&\n\tcod_protocol != cud_protocol) {\n\treturn false;\n }\n\n cod_hostname = cookie_domain.split(\"/\")[2];\n cud_hostname = current_domain.split(\"/\")[2];\n\n if (cod_hostname != cud_hostname &&\n\tcod_hostname[0] != \".\") {\n\treturn false;\n }\n\n if (cod_hostname != cud_hostname &&\n\tcod_hostname[0] == \".\") {\n\tcod_hostname = cod_hostname.slice(1);\n\trev_cod_hostname = cod_hostname.split(\"\").reverse().join(\"\");\n\trev_cud_hostname = cud_hostname.split(\"\").reverse().join(\"\");\n\tif (rev_cud_hostname.indexOf(rev_cod_hostname) != 0) {\n\t return false;\n\t}\n }\n \n cod_path = cookie_domain.split(\"/\").slice(3).join(\"/\").split(\":\")[0];\n cud_path = current_domain.split(\"/\").slice(3).join(\"/\");\n\n if (cud_path.indexOf(cod_path) != 0) {\n\treturn false;\n }\n\n return true;\n}", "function pickDomainToPullFrom(url) {\n var result;\n Object.keys(controllerToDomainDic).forEach(function(key) {\n if (url.lastIndexOf(key, 0) === 0)\n result = controllerToDomainDic[key];\n });\n return result;\n}", "function getHubFromActiveDomain(registry) {\n var _a, _b, _c;\n try {\n var activeDomain = (_c = (_b = (_a = getMainCarrier().__SENTRY__) === null || _a === void 0 ? void 0 : _a.extensions) === null || _b === void 0 ? void 0 : _b.domain) === null || _c === void 0 ? void 0 : _c.active;\n // If there's no active domain, just return global hub\n if (!activeDomain) {\n return getHubFromCarrier(registry);\n }\n // If there's no hub on current domain, or it's an old API, assign a new one\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(exports.API_VERSION)) {\n var registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, scope_1.Scope.clone(registryHubTopStack.scope)));\n }\n // Return hub that lives on a domain\n return getHubFromCarrier(activeDomain);\n }\n catch (_Oo) {\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }\n}", "function pickdomain(arg) {\n if (typeof arg.url == 'string' && arg.url.indexOf('https:') == 0) {\n return securedomain;\n } else {\n return domain;\n }\n}", "function obsDomain() {\n return opts.strict ? null : wrap('obs-domain', and(atom, star(and(literal('.'), atom)))());\n }", "function obsDomain() {\n return opts.strict ? null : wrap('obs-domain', and(atom, star(and(literal('.'), atom)))());\n }", "function obsDomain() {\n return opts.strict ? null : wrap('obs-domain', and(atom, star(and(literal('.'), atom)))());\n }", "function obsDomain() {\n return opts.strict ? null : wrap('obs-domain', and(atom, star(and(literal('.'), atom)))());\n }", "function resolveDomain(req) {\n var host = req.get('host'); // Ex: \"mysite.com:8000, localhost:4300, 127.0.0.1:3090\"\n var truncateAt = host.indexOf(':');\n var hosts = host.substr(0, truncateAt > -1 ? truncateAt : host.length); // Ex: \"mysite.com\"\n hosts = hosts.search(/[a-z]/i) != -1 ? hosts.split('.') : hosts = [hosts]; // Ex: \"127.0.0.1:3090 should not split like abc.xyz.com\"\n var domain = hosts.length > 1 ? hosts[hosts.length - 2] + '.' + hosts[hosts.length - 1] : hosts[0]; // Set-cookie works for base domain if URL is having sub domains\n return domain;\n}", "function determineHost() {\n\t\tvar sub = window.location.host;\n\t\tvar secureDomain = (sub.indexOf('dev.') > -1)\n\t\t\t? 'secure.'\n\t\t\t: 'secure2.';\n\t\tvar domains = {};\n\t\tvar httpProtocol = window.location.protocol;\n\t\t/* sub = \"t.hd-st71.homedepotdev.com\";\n\t\tsub = \"www.homedepot.com\";\n\t\tsub = \"hd-st71.homedepot.com\";\n\t\tsub = \"t.homedepot.com\";\n\t\tsub = \"secure2.homedepot.com\";\n\t\tsub = \"secure2.hd-st71.homedepotdev.com\";\n\t\tsub = \"t.secure2.homedepot.com\";\n\t\tsub = \"origin.hd-st71.homedepotdev.com\";\n\t\tsub = \"secure2.origin.hd-st71.homedepotdev.com\";\n\t\thttProtocol = \"https:\";*/\n\n\t\tsub = sub.split('.');\n\t\t// checking to see if we are in and LLC\n\t\ttry {\n\t\t\tdomains.secure = (httpProtocol === 'https:') ? secureDomain : '';\n\t\t\tif(sub[0].length === 1) {\n\t\t\t/* tablet */\n\t\t\t\tdomains.channel = sub[0] + '.';\n\t\t\t\tif (sub[2].indexOf('dev') > -1 || sub[1].indexOf('dev') > -1) {\n\t\t\t\t\tif (httpProtocol === 'https:') {\n\t\t\t\t\t\tdomains.environment = '';\n\t\t\t\t\t\tdomains.topLevel = sub[2] + '.com';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdomains.environment = sub[1] + '.';\n\t\t\t\t\t\tdomains.topLevel = sub[2] + '.com';\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif(httpProtocol === 'https:') {\n\t\t\t\t\t\tdomains.environment = '';\n\t\t\t\t\t\tdomains.topLevel = sub[2] + '.com';\n\t\t\t\t\t}else{\n\t\t\t\t\t\tdomains.environment = '';\n\t\t\t\t\t\tdomains.topLevel = sub[1] + '.com';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t/* desktop*/\n\t\t\t\tdomains.channel = '';\n\n\t\t\t\tif(sub[1].indexOf('dev') > -1 || sub[2].indexOf('dev') > -1 || (sub[3] && sub[3].indexOf('dev') > -1)) {\n\t\t\t\t\tif(httpProtocol === 'https:') {\n\t\t\t\t\t\tdomains.environment = sub[1] + '.';\n\t\t\t\t\t\tdomains.topLevel = isURLTypeOrigin(sub[1])\n\t\t\t\t\t\t\t? (sub[2] + '.' + sub[3] + '.com')\n\t\t\t\t\t\t\t: sub[2] + '.com';\n\t\t\t\t\t}else{\n\t\t\t\t\t\tdomains.environment = sub[0] + '.';\n\t\t\t\t\t\tdomains.topLevel = isURLTypeOrigin(sub[0])\n\t\t\t\t\t\t\t? (sub[1] + '.' + sub[2] + '.com')\n\t\t\t\t\t\t\t: (sub[1] + '.com');\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (httpProtocol === 'https:') {\n\t\t\t\t\t\tdomains.environment = '';\n\t\t\t\t\t\tdomains.topLevel = sub[1] + '.com';\n\t\t\t\t\t}else{\n\t\t\t\t\t\tdomains.environment = sub[0] + '.';\n\t\t\t\t\t\tdomains.topLevel = sub[1] + '.com';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tTHD.isLogging = true;\n\t\t\tthdLogger.log('Error: ' + e + ' - D\\'OH! You\\'re getting this error becasue you are running on localhost:XXXX. The workaround is for you to update your hosts file localhost domain (127.0.0.1 localhost) to a genric domain like, local.homedepot.com! Don\\'t know how to change your hosts file you say? Check out this article: http://bit.ly/1fueDGB.');\n\t\t}\n\t\treturn domains;\n\t}", "specialDomain() {\n if (this.domain === 'extensions')\n return 'extensions'\n\n if (this.domain === chrome.runtime.id)\n return 'options'\n\n if (this.domain === 'newtab')\n return 'new tab'\n\n if (this.domain === 'about') {\n return 'about'\n }\n\n if (browser === 'moz' && !this.domain) {\n return 'new tab'\n }\n\n return false\n }", "function extractMainDomain(domain) {\n\t//Return the domain if it is an ip address\n\tlet reIP = new RegExp('[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+');\n\tif(reIP.test(domain)) {\n\t\treturn domain;\n\t}\n\t//Delete a '.' if domain contains it at the end\n\tif(domain.charAt(domain.length - 1) === \".\") {\n\t\tdomain = domain.slice(0, domain.length - 1);\n\t}\n\tlet re = new RegExp('[a-z0-9|-]+\\.[a-z]+$');\n\treturn re.exec(domain)[0];\n}", "isInDomain(url) {\n return url.replace(/(https|http):/i, \"\").startsWith(\"//\" + this.args.domain);\n }", "function url_domain(data) \n {\n var a = document.createElement('a');\n a.href = data;\n return a.hostname;\n }", "function extractDomain(url){\n var psl = torpedo.publicSuffixList.getDomain(url);\n // psl empty -> url is already a valid domain\n return psl != \"\"? psl : url;\n}", "function loadSimpleDomain() {\n var path = ExtensionUtils.getModulePath(module, \"node/SimpleDomain\");\n var loadPromise = nodeConnection.loadDomains([path], true);\n loadPromise.fail(function () {\n console.log(\"[brackets-simple-node] failed to load domain\");\n });\n return loadPromise;\n }", "function selectActivationPageDomain (state) {\n return state.activationPage;\n}", "function getDomain(url) {\n return url.split(\"/\").slice(0, 3).join(\"/\");\n }", "function domainName(url){\n return url.replace(/(https?:\\/\\/)?(www\\.)?/, '').split('.')[0]\n}", "static get_website() {\n return window.location.host.split('.').reverse()[1];\n }", "static getActive() {\n\t\t\t\treturn _activeAccount;\n\t\t\t}", "function ifIndomain(x,y){\r\n\t\tvar props=[];\r\n\t\tvar cookies=$.cookie();\r\n\t\t\t$.each(cookies,function(name,value){\r\n\t\t\t\tvar temp=JSON.parse(value);\r\n\t\t\t\tif(temp.left<=x && temp.left+temp.width>=x &&\r\n\t\t\t\t\t\ttemp.top<=y&&temp.top+temp.height>=y){\r\n\t\t\t\t\tprops.push(temp);\r\n\t\t\t\t}\r\n\t\t\t})\r\n\t\treturn props;\r\n\t}", "function loadApifyDomain() {\n var path = ExtensionUtils.getModulePath(module, \"node/ApifyDomain\"),\n projectPath = ProjectManager.getProjectRoot().fullPath,\n loadPromise = nodeConnection.loadDomains([path], true);\n\n loadPromise.then(function () {\n //console.log(\"[brackets-apif] ok\");\n }).fail(function (err) {\n console.error(\"[brackets-apify] error:\" + err);\n });\n\n return loadPromise;\n }", "function validateDomain() {\n HttpFactory.post('/api/v1/validate', {domain: ctrl.domain.domain})\n .then(function(response) {\n ctrl.isValidDomain = response.data;\n\n if (ctrl.isValidDomain) {\n Notification.success({\n message:'This domain is valid!',\n title: 'Success'\n });\n } else {\n Notification.error({\n message: 'This domain already exists in our database.',\n title: 'Uh Oh'\n });\n }\n })\n .catch(function(response) {\n Notification.error({\n message: response.data,\n title: 'Uh Oh'\n });\n\n ctrl.isValidDomain = false;\n })\n }", "function activeExists(){\n let active = document.querySelector('.active');\n if(active){\n return active;\n }\n return false;\n}", "getDomainNetwork(domainNetworkName)\n {\n \n for (let domainNetwork of this.dataElement.domainNetworks)\n if (domainNetwork.domainNetworkName === domainNetworkName) return domainNetwork;\n \n return undefined;\n }", "function onDomain() {\n if (window.location.href.indexOf('https://junn3r.github.io/') != -1) {\n return true;\n } else {\n return false;\n }\n }", "function CloudFrontDist(domainName) {\n return new Promise((resolve, reject) => {\n cloudfront.listDistributions({}).promise()\n .then(data=>{\n let items = data.DistributionList.Items\n let lastElem = items.length-1\n for(let i in items){\n if(items[i].Origins.Items[0].DomainName.startsWith(domainName)){\n let exists = items[i].Id\n resolve(exists)\n }\n if(i === lastElem.toString()) resolve(null)\n }\n }).catch(err=>reject(err))\n }) \n}", "function isDomainName(domain) {\r\n\t// Set regex to be used to validate the domain\r\n\tvar dwRegex = /^([a-z0-9-]+)(\\.[a-z0-9-]+)*(\\.[a-z]{2,4})$/i;\r\n\t// Return boolean\r\n\treturn dwRegex.test(trim(domain));\r\n}", "function _defineCookieDomain()\n{\n\tvar domainPattern = /(([^.\\/]+\\.[^.\\/]{2,3}\\.[^.\\/]{2})|(([^.\\/]+\\.)[^.\\/]{2,4}))(\\/.*)?$/;\n\n\tif(domainPattern.test(oCONFIG.SUBDOMAIN_BASED.toString()))\n\t{\n\t\toCONFIG.COOKIE_DOMAIN = oCONFIG.SUBDOMAIN_BASED.toLowerCase().replace('www.','');\n\t\toCONFIG.SUBDOMAIN_BASED = true;\n\t}\n\telse\n\t{\n\t\tif (oCONFIG.SUBDOMAIN_BASED.toString() == 'false')\n\t\t{\n\t\t\toCONFIG.COOKIE_DOMAIN = document.location.hostname.match(/(([^.\\/]+\\.[^.\\/]{2,3}\\.[^.\\/]{2})|(([^.\\/]+\\.)[^.\\/]{2,4}))(\\/.*)?$/)[1];\n\t\t\toCONFIG.SUBDOMAIN_BASED = true;\n\t\t}\n\t\telse if(oCONFIG.SUBDOMAIN_BASED.toString() == 'auto' || oCONFIG.SUBDOMAIN_BASED == 'true')\n\t\t{\n\t\t\toCONFIG.COOKIE_DOMAIN = location.hostname.toLowerCase().replace('www.','');\n\t\t\toCONFIG.SUBDOMAIN_BASED = false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\toCONFIG.COOKIE_DOMAIN = location.hostname.toLowerCase().replace('www.','');\n\t\t\toCONFIG.SUBDOMAIN_BASED = false;\n\t\t}\n\t}\n}", "function domainName(url){\n let pattern = /(https?[:/]+)?(www[.]{1})?([\\w-]+)/;\n return url.match(pattern)[3];\n}", "function url_domain(url)\n{\nvar matches = url.match(/^(https?\\:\\/\\/[^\\/?#]+)(?:[\\/?#]|$)/i);\nreturn matches[1];\n}", "getRootDomain(host) {\n const domain = host.split(\".\");\n domain.shift();\n return domain.join(\".\");\n }", "function domainName(url){\n let split1 = url.split('.')\n let split2 = []\n let domain = ''\n if(split1[0].includes('//')){\n split2 = split1[0].split('//')\n } \n \n if(split2.length === 0){\n split1.forEach((x,i)=>{\n if(x==='www'){\n domain = split1[i+1]\n } else if (i===0) {\n domain = x\n }\n })\n }\n \n split2.forEach((x,i)=>{\n if(x === 'http:' || x === 'https:' && x !== 'www'){\n if(split2[i+1] !== 'www'){\n domain = split2[i+1]\n } \n } else if (x === 'www'){\n domain = split2[i+1]\n } else if (i === 0) {\n domain = x\n }\n })\n \n return domain || split1[1]\n }", "function checkDomain() {\r\n\tvar url = window.location.href;\r\n\r\n\tif (url.indexOf('http://nordinvasion') > -1)\r\n\t{\r\n\t\twindow.location.href = 'http://www.nordinvasion.com';\r\n\t}\r\n}", "function getDomain(url) {\n var regEx = /:\\/\\/(www\\.)?(.+?)\\//;\n return url.match(regEx)[2];\n}", "function BOOMR_check_doc_domain(a){if(window){if(!a){if(window.parent===window||!document.getElementById(\"boomr-if-as\"))return;if(window.BOOMR&&BOOMR.boomerang_frame&&BOOMR.window)try{BOOMR.boomerang_frame.document.domain!==BOOMR.window.document.domain&&(BOOMR.boomerang_frame.document.domain=BOOMR.window.document.domain)}catch(b){BOOMR.isCrossOriginError(b)||BOOMR.addError(b,\"BOOMR_check_doc_domain.domainFix\")}a=document.domain}if(-1!==a.indexOf(\".\")){try{window.parent.document;return}catch(b){document.domain=a}try{window.parent.document;return}catch(b){a=a.replace(/^[\\w\\-]+\\./,\"\")}BOOMR_check_doc_domain(a)}}}", "function getHubFromActiveDomain(registry) {\n try {\n var activeDomain = getActiveDomain();\n // If there's no active domain, just return global hub\n if (!activeDomain) {\n return getHubFromCarrier(registry);\n }\n // If there's no hub on current domain, or it's an old API, assign a new one\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\n var registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n setHubOnCarrier(activeDomain, new hub_Hub(registryHubTopStack.client, scope_Scope.clone(registryHubTopStack.scope)));\n }\n // Return hub that lives on a domain\n return getHubFromCarrier(activeDomain);\n }\n catch (_Oo) {\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }\n}", "function domainName(url){\n // Needs to be tested against subdomains.\n return url.match(/(?:http(?:s)?:\\/\\/)?(?:w{3}\\.)?([^\\.]+)/i)[1];\n }", "async single(domain) {\n\n let domains = []\n \n domains.push(domain)\n\n return await this.sendWhoisRequest(domains)\n }", "function getActiveSlide(){\n var activeSlide = $(SLIDE_ACTIVE_SEL, $(SECTION_ACTIVE_SEL)[0])[0];\n return nullOrSlide(activeSlide);\n }", "function getActiveSlide(){\n var activeSlide = $(SLIDE_ACTIVE_SEL, $(SECTION_ACTIVE_SEL)[0])[0];\n return nullOrSlide(activeSlide);\n }", "function getActiveSlide(){\n var activeSlide = $(SLIDE_ACTIVE_SEL, $(SECTION_ACTIVE_SEL)[0])[0];\n return nullOrSlide(activeSlide);\n }", "function getActiveSlide() {\n var activeSlide = $(SLIDE_ACTIVE_SEL, $(SECTION_ACTIVE_SEL)[0])[0];\n return nullOrSlide(activeSlide);\n }", "function detectHost() {\n\t\tvar host;\n\t\thost = (location.hostname.indexOf(\"10.128\") === 0) ? \"localhost\" : location.hostname;\n\n\t\tswitch (host) {\n\t\t\tcase \"localhost\":\n\t\t\tcase \"127.0.0.1\":\n\t\t\tcase \"skynet\":\n\t\t\tcase \"skynet-1\":\n\t\t\t\thost = \"local\";\n\t\t\t\tbreak;\n\t\t\tcase \"www.csps-efpc.gc.ca\":\n\t\t\tcase \"csps-efpc.gc.ca\":\n\t\t\t\thost = \"public\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\thost = \"prod\";\n\t\t\t\tbreak;\n\t\t}\n\t\t//console.log(host);\n\t\treturn host;\n\n\t}", "function getActiveSlide(){\r\n var activeSlide = $(SLIDE_ACTIVE_SEL, $(SECTION_ACTIVE_SEL)[0])[0];\r\n return nullOrSlide(activeSlide);\r\n }", "function getActiveSlide(){\r\n var activeSlide = $(SLIDE_ACTIVE_SEL, $(SECTION_ACTIVE_SEL)[0])[0];\r\n return nullOrSlide(activeSlide);\r\n }", "function getDomain(currentURL) {\n var newURL = \"\";\n if (currentURL.charAt(currentURL.length - 1) == '\\/' || currentURL.charAt(currentURL.length - 1) == '\\\\') {\n currentURL.slice(-1);\n }\n newURL = /(http(s|S)?:(\\/|\\\\){2}).*[.][\\w]{2,6}((\\\\|\\/){1}?)/i.exec(currentURL);\n\n if (newURL == null) {\n newURL = /(http(s|S)?:(\\/|\\\\){2}).*[.][\\w]{2,6}((\\\\|\\/){1}?)/i.exec((currentURL + '\\/'));\n }\n return newURL;\n }", "function getCurrentTabUrl(callback) {\n\n var queryInfo = {\n active: true,\n currentWindow: true\n };\n\n chrome.tabs.query(queryInfo, (tabs) => {\n\n var tab = tabs[0];\n\n var url = tab.url;\n\n console.assert(typeof url == 'string', 'tab.url should be a string');\n var urls = new URL(tab.url);\n var domain = urls.hostname;\n callback(url,domain);\n });\n}", "function domainName(url) {\n var removeScheme,\n noScheme,\n host,\n scheme = /https?:\\/\\/(?=www)/.test(url);\n \n if (scheme ==! true) {\n \n removeScheme = url.replace(/https?:\\/\\//, '');\n noScheme = removeScheme.replace(/www./, '');\n host = noScheme.replace(/\\..*$/, '');\n \n } else {\n \n removeScheme = url.replace(/https?:\\/\\/www./, '');\n host = removeScheme.replace(/\\..*$/, '');\n \n }\n \n return host;\n }", "function matchDomain(href) {\n const hrefDomain = href.match(/^(?:https?:\\/\\/)?(?:[^@\\/\\n]+@)?(?:www\\.)?([^:\\/?\\n]+)/g);\n if (!hrefDomain) return null;\n return hrefDomain[0];\n }", "function getDomainPart(s){\r\n var domparts = domainname.split(\".\");\r\n domparts.reverse();\r\n // for ccTLD - overkill, just for completeness\r\n if((domparts[2]) && (domparts[0].length == 2 && domparts[1].length <= 3)){\r\n // ccTLD TLD - not sure of all valid ones\r\n var re = /(com|org|edu|sch|gov|mod)/;\r\n if(re.test(domparts[1]) || domparts[1].length == 2){\r\n domparts[1] = domparts[1] + \".\" + domparts[0];\r\n domparts.shift();\r\n }\r\n }\r\n while(domparts[3]){\r\n domparts[2] = domparts[3] + \".\" + domparts[2];\r\n domparts.splice(3,1);\r\n }\r\n return domparts[s-1];\r\n}", "function domainName(url){\n\n // TODO: possibly add check / convert to lowercase?\n \n // split on protocol part\n let pieces = url.split('://');\n \n // remove left if it had one\n if(pieces.length > 1) {\n pieces.shift();\n }\n \n // if substring 0,4 is www. remove\n if(pieces[0].substring(0,4) === 'www.' ) {\n\n pieces[0] = pieces[0].substring(4);\n }\n \n // now should have the domain in the first section before a dot\n pieces = pieces[0].split('.');\n return pieces[0];\n \n}", "function getHostname(url) {\n if (!url) {\n return \"\";\n }\n\n var match = url.match(HOSTNAME);\n return match ? match[1] : \"\";\n} // This list of domains that count as internal domains is from", "function is_apiDomain(){\n\treturn inArray(url(1), apiPrefixA);\n}", "function toggleCurrentDomainHighlighting() {\n chrome.tabs.getSelected(null, function(tab) {\n chrome.storage.sync.get(\"USER\", function (obj) {\n var user = obj['USER'];\n if (USER_KEY in user) {\n var URL = \"https://quotedserver.herokuapp.com/lookup/toggledomain/__/\";\n URL = URL.replace('__', btoa(domainFromURL(tab.url)));\n console.log(user.username);\n xhttprequest(URL, user.username, function(xhr) {\n chrome.runtime.sendMessage({task: \"getUser\"}, function(response) {});\n delayPopulate();\n });\n }\n });\n });\n \n}", "async function getZoneIdFromDomain(domain) {\n return new Promise((resolve, reject) => {\n axios.request({\n url: '/zones',\n method: 'GET',\n baseURL: cfBaseEndpoint,\n headers: {\n 'Authorization': 'Bearer ' + cfAPIToken,\n 'Content-Type': 'application/json'\n },\n params: {\n name: domain\n },\n responseType: 'json'\n })\n .then((response) => {\n // console.dir(response.data);\n const zoneResult = response.data.result[0];\n const zoneName = zoneResult.name;\n const zoneId = zoneResult.id;\n console.log(`Zone ID for ${domain} found! ID: ${zoneId}`);\n resolve(zoneId);\n })\n .catch((error) => {\n console.log(`Error occured while getting zone ID for ${domain}`);\n console.error(error);\n if (error.response) {\n console.error(error.response.data);\n }\n reject();\n });\n });\n}", "function GetBlockedSite(hostname) {\n return Vars.UserData.BlockedSites[hostname];\n}", "allowDomains(domains) {\n if (domains.includes(this.getDomain())) {\n return true;\n }\n return false;\n }", "getActiveConnection() {\r\n return this.store.getState().connectivityState.ejabberdConnection;\r\n }", "async domainInfo() {\n const provider = this.serverless.getProvider('aws');\n const stackName = provider.naming.getStackName(this.options.stage);\n const result = await provider.request(\n 'CloudFormation',\n 'describeStacks',\n { StackName: stackName },\n this.options.stage,\n this.options.region,\n );\n\n const outputs = result.Stacks[0].Outputs;\n const output = outputs.find(\n (entry) => entry.OutputKey === 'WebAppCloudFrontDistributionOutput',\n );\n\n if (output.OutputValue) {\n this.serverless.cli.log(`Web App Domain: ${output.OutputValue}`);\n return output.OutputValue;\n }\n this.serverless.cli.log('Web App Domain: Not Found');\n return undefined;\n }" ]
[ "0.781052", "0.6472479", "0.6423256", "0.6216244", "0.62022746", "0.60298795", "0.5951261", "0.5944124", "0.5944124", "0.5944124", "0.59373915", "0.591535", "0.59065324", "0.58955085", "0.58955085", "0.58635014", "0.58484954", "0.57850885", "0.5783557", "0.5746694", "0.5714483", "0.57091767", "0.5707043", "0.5691299", "0.566542", "0.56529105", "0.56529105", "0.56500906", "0.5627569", "0.55658984", "0.55630213", "0.55516744", "0.55277973", "0.54999274", "0.5477538", "0.5474964", "0.5473639", "0.54642814", "0.54458714", "0.54354614", "0.54192257", "0.5395939", "0.5393938", "0.5391614", "0.5391614", "0.5391614", "0.5391614", "0.53892833", "0.5370677", "0.5345629", "0.5344389", "0.53137785", "0.53136307", "0.5311975", "0.5307076", "0.5301338", "0.52920705", "0.5291322", "0.52804136", "0.5276381", "0.5266079", "0.52610236", "0.52595747", "0.5258026", "0.523566", "0.5230924", "0.52109694", "0.5210396", "0.51950103", "0.51867497", "0.51819545", "0.51637", "0.51630384", "0.5161884", "0.515299", "0.51515245", "0.51334345", "0.5107416", "0.5105679", "0.50972027", "0.50972027", "0.50972027", "0.5096502", "0.509585", "0.5088527", "0.5088527", "0.50744265", "0.5071964", "0.50532347", "0.5048383", "0.5035974", "0.50318515", "0.50279504", "0.5025382", "0.5008761", "0.5007729", "0.50016075", "0.49992254", "0.49964595", "0.49941838" ]
0.80169576
0
Try to read the hub from an active domain, and fallback to the registry if one doesn't exist
function getHubFromActiveDomain(registry) { try { var activeDomain = getActiveDomain(); // If there's no active domain, just return global hub if (!activeDomain) { return getHubFromCarrier(registry); } // If there's no hub on current domain, or it's an old API, assign a new one if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) { var registryHubTopStack = getHubFromCarrier(registry).getStackTop(); setHubOnCarrier(activeDomain, new hub_Hub(registryHubTopStack.client, scope_Scope.clone(registryHubTopStack.scope))); } // Return hub that lives on a domain return getHubFromCarrier(activeDomain); } catch (_Oo) { // Return hub that lives on a global object return getHubFromCarrier(registry); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getHubFromActiveDomain(registry) {\n try {\n var property = 'domain';\n var carrier = getMainCarrier();\n var sentry = carrier.__SENTRY__;\n // tslint:disable-next-line: strict-type-predicates\n if (!sentry || !sentry.extensions || !sentry.extensions[property]) {\n return getHubFromCarrier(registry);\n }\n var domain = sentry.extensions[property];\n var activeDomain = domain.active;\n // If there no active domain, just return global hub\n if (!activeDomain) {\n return getHubFromCarrier(registry);\n }\n // If there's no hub on current domain, or its an old API, assign a new one\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\n var registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, _scope__WEBPACK_IMPORTED_MODULE_2__[\"Scope\"].clone(registryHubTopStack.scope)));\n }\n // Return hub that lives on a domain\n return getHubFromCarrier(activeDomain);\n }\n catch (_Oo) {\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }\n}", "function getHubFromActiveDomain(registry) {\n\t try {\n\t const sentry = getMainCarrier().__SENTRY__;\n\t const activeDomain = sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;\n\n\t // If there's no active domain, just return global hub\n\t if (!activeDomain) {\n\t return getHubFromCarrier(registry);\n\t }\n\n\t // If there's no hub on current domain, or it's an old API, assign a new one\n\t if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\n\t const registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n\t setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, Scope.clone(registryHubTopStack.scope)));\n\t }\n\n\t // Return hub that lives on a domain\n\t return getHubFromCarrier(activeDomain);\n\t } catch (_Oo) {\n\t // Return hub that lives on a global object\n\t return getHubFromCarrier(registry);\n\t }\n\t}", "function getHubFromActiveDomain(registry) {\n try {\n const sentry = getMainCarrier().__SENTRY__;\n const activeDomain = sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;\n\n // If there's no active domain, just return global hub\n if (!activeDomain) {\n return getHubFromCarrier(registry);\n }\n\n // If there's no hub on current domain, or it's an old API, assign a new one\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\n const registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, Scope.clone(registryHubTopStack.scope)));\n }\n\n // Return hub that lives on a domain\n return getHubFromCarrier(activeDomain);\n } catch (_Oo) {\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }\n }", "function getHubFromActiveDomain(registry) {\n try {\n const sentry = getMainCarrier().__SENTRY__;\n const activeDomain = sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;\n\n // If there's no active domain, just return global hub\n if (!activeDomain) {\n return getHubFromCarrier(registry);\n }\n\n // If there's no hub on current domain, or it's an old API, assign a new one\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\n const registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, scope.Scope.clone(registryHubTopStack.scope)));\n }\n\n // Return hub that lives on a domain\n return getHubFromCarrier(activeDomain);\n } catch (_Oo) {\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }\n}", "function getHubFromActiveDomain(registry) {\n var _a, _b, _c;\n try {\n var activeDomain = (_c = (_b = (_a = getMainCarrier().__SENTRY__) === null || _a === void 0 ? void 0 : _a.extensions) === null || _b === void 0 ? void 0 : _b.domain) === null || _c === void 0 ? void 0 : _c.active;\n // If there's no active domain, just return global hub\n if (!activeDomain) {\n return getHubFromCarrier(registry);\n }\n // If there's no hub on current domain, or it's an old API, assign a new one\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(exports.API_VERSION)) {\n var registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, scope_1.Scope.clone(registryHubTopStack.scope)));\n }\n // Return hub that lives on a domain\n return getHubFromCarrier(activeDomain);\n }\n catch (_Oo) {\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }\n}", "function getCurrentHub() {\n // Get main carrier (global for every environment)\n var registry = getMainCarrier();\n // If there's no hub, or its an old API, assign a new one\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(exports.API_VERSION)) {\n setHubOnCarrier(registry, new Hub());\n }\n // Prefer domains over global if they are there\n try {\n // We need to use `dynamicRequire` because `require` on it's own will be optimized by webpack.\n // We do not want this to happen, we need to try to `require` the domain node module and fail if we are in browser\n // for example so we do not have to shim it and use `getCurrentHub` universally.\n var domain = misc_1.dynamicRequire(module, 'domain');\n var activeDomain = domain.active;\n // If there no active domain, just return global hub\n if (!activeDomain) {\n return getHubFromCarrier(registry);\n }\n // If there's no hub on current domain, or its an old API, assign a new one\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(exports.API_VERSION)) {\n var registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, scope_1.Scope.clone(registryHubTopStack.scope)));\n }\n // Return hub that lives on a domain\n return getHubFromCarrier(activeDomain);\n }\n catch (_Oo) {\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }\n}", "function getCurrentHub() {\r\n // Get main carrier (global for every environment)\r\n var registry = getMainCarrier();\r\n // If there's no hub, or its an old API, assign a new one\r\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\r\n setHubOnCarrier(registry, new Hub());\r\n }\r\n // Prefer domains over global if they are there\r\n try {\r\n // We need to use `dynamicRequire` because `require` on it's own will be optimized by webpack.\r\n // We do not want this to happen, we need to try to `require` the domain node module and fail if we are in browser\r\n // for example so we do not have to shim it and use `getCurrentHub` universally.\r\n var domain = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__[\"dynamicRequire\"])(module, 'domain');\r\n var activeDomain = domain.active;\r\n // If there no active domain, just return global hub\r\n if (!activeDomain) {\r\n return getHubFromCarrier(registry);\r\n }\r\n // If there's no hub on current domain, or its an old API, assign a new one\r\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\r\n var registryHubTopStack = getHubFromCarrier(registry).getStackTop();\r\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, _scope__WEBPACK_IMPORTED_MODULE_2__[\"Scope\"].clone(registryHubTopStack.scope)));\r\n }\r\n // Return hub that lives on a domain\r\n return getHubFromCarrier(activeDomain);\r\n } catch (_Oo) {\r\n // Return hub that lives on a global object\r\n return getHubFromCarrier(registry);\r\n }\r\n}", "function hub_getCurrentHub() {\n // Get main carrier (global for every environment)\n var registry = getMainCarrier();\n // If there's no hub, or its an old API, assign a new one\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\n setHubOnCarrier(registry, new hub_Hub());\n }\n // Prefer domains over global if they are there (applicable only to Node environment)\n if (Object(node[\"b\" /* isNodeEnv */])()) {\n return getHubFromActiveDomain(registry);\n }\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n}", "function getCurrentHub() {\n // Get main carrier (global for every environment)\n var registry = getMainCarrier();\n // If there's no hub, or its an old API, assign a new one\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\n setHubOnCarrier(registry, new Hub());\n }\n // Prefer domains over global if they are there (applicable only to Node environment)\n if (Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__[\"isNodeEnv\"])()) {\n return getHubFromActiveDomain(registry);\n }\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n}", "function getCurrentHub() {\n // Get main carrier (global for every environment)\n const registry = getMainCarrier();\n\n // If there's no hub, or its an old API, assign a new one\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\n setHubOnCarrier(registry, new Hub());\n }\n\n // Prefer domains over global if they are there (applicable only to Node environment)\n if (isNodeEnv()) {\n return getHubFromActiveDomain(registry);\n }\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }", "function getCurrentHub() {\n // Get main carrier (global for every environment)\n const registry = getMainCarrier();\n\n // If there's no hub, or its an old API, assign a new one\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\n setHubOnCarrier(registry, new Hub());\n }\n\n // Prefer domains over global if they are there (applicable only to Node environment)\n if (utils.isNodeEnv()) {\n return getHubFromActiveDomain(registry);\n }\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n}", "function getCurrentHub() {\n // Get main carrier (global for every environment)\n var registry = getMainCarrier();\n // If there's no hub, or its an old API, assign a new one\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(exports.API_VERSION)) {\n setHubOnCarrier(registry, new Hub());\n }\n // Prefer domains over global if they are there (applicable only to Node environment)\n if (utils_1.isNodeEnv()) {\n return getHubFromActiveDomain(registry);\n }\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n}", "function getCurrentHub() {\n\t // Get main carrier (global for every environment)\n\t const registry = getMainCarrier();\n\n\t // If there's no hub, or its an old API, assign a new one\n\t if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\n\t setHubOnCarrier(registry, new Hub());\n\t }\n\n\t // Prefer domains over global if they are there (applicable only to Node environment)\n\t if (isNodeEnv()) {\n\t return getHubFromActiveDomain(registry);\n\t }\n\t // Return hub that lives on a global object\n\t return getHubFromCarrier(registry);\n\t}", "function loadSimpleDomain() {\n var path = ExtensionUtils.getModulePath(module, \"node/SimpleDomain\");\n var loadPromise = nodeConnection.loadDomains([path], true);\n loadPromise.fail(function () {\n console.log(\"[brackets-simple-node] failed to load domain\");\n });\n return loadPromise;\n }", "async function getDeviceHub(environment) {\n const deviceId = environment.deviceId;\n const now = Date.now();\n\n // A 1 minute backoff is enforced for registration attempts, to prevent unauthorized devices\n // from trying to re-register too often.\n if (deviceCache[deviceId] && deviceCache[deviceId].lasRegisterAttempt && (now - deviceCache[deviceId].lasRegisterAttempt) < minDeviceRegistrationTimeout) {\n const backoff = Math.floor((minDeviceRegistrationTimeout - (now - device[deviceId].lasRegisterAttempt)) / 1000);\n throw new StatusError(`Unable to register device ${deviceId}. Minimum registration timeout not yet exceeded. Please try again in ${backoff} seconds`, 403);\n }\n\n deviceCache[deviceId] = {\n ...deviceCache[deviceId],\n lasRegisterAttempt: Date.now()\n }\n\n const sasToken = await getRegistrationSasToken(environment);\n\n const registrationOptions = {\n url: `https://${registrationHost}/${environment.idScope}/registrations/${deviceId}/register?api-version=${registrationApiVersion}`,\n method: 'PUT',\n json: true,\n headers: { Authorization: sasToken },\n body: { registrationId: deviceId }\n };\n\n try {\n console.log('[HTTP] Initiating device registration');\n console.log('Enviroment: %s', JSON.stringify(environment));\n const response = await request(registrationOptions);\n\n if (response.status !== 'assigning' || !response.operationId) {\n throw new Error('Unknown server response');\n }\n\n const statusOptions = {\n url: `https://${registrationHost}/${environment.idScope}/registrations/${deviceId}/operations/${response.operationId}?api-version=${registrationApiVersion}`,\n method: 'GET',\n json: true,\n headers: { Authorization: sasToken }\n };\n\n // The first registration call starts the process, we then query the registration status\n // every 2 seconds, up to 10 times.\n for (let i = 0; i < registrationStatusQueryAttempts; ++i) {\n await new Promise(resolve => setTimeout(resolve, registrationStatusQueryTimeout));\n\n console.log('[HTTP] Querying device registration status');\n const statusResponse = await request(statusOptions);\n\n if (statusResponse.status === 'assigning') {\n continue;\n } else if (statusResponse.status === 'assigned' && statusResponse.registrationState && statusResponse.registrationState.assignedHub) {\n return statusResponse.registrationState.assignedHub;\n } else if (statusResponse.status === 'failed' && statusResponse.registrationState && statusResponse.registrationState.errorCode === 400209) {\n throw new Error('The device may be unassociated or blocked');\n } else {\n throw new Error('Unknown server response');\n }\n }\n\n throw new Error('Registration was not successful after maximum number of attempts');\n } catch (e) {\n throw new Error(`Unable to register device ${deviceId}: ${e.message}`, e.statusCode);\n }\n}", "lookup (address) {\n return this.settings.registry(address)\n }", "function updateFoundHub(hubURL: ?string, hub: HUB_TYPE) {\n const foundHub = hub;\n // Hub keys returns ids, idQuerys return hubId\n if (foundHub.hubId) {\n foundHub.id = foundHub.hubId;\n delete foundHub.hubId;\n }\n if (!foundHub.id) {\n return;\n }\n\n if (!hubsMap[foundHub.id]) {\n hubsMap[foundHub.id] = {\n id: foundHub.id,\n name: foundHub.name || '',\n };\n }\n hubsMap[foundHub.id].name = foundHub.name;\n hubsMap[foundHub.id].connected = foundHub.connected;\n hubsMap[foundHub.id].features = foundHub.features;\n hubsMap[foundHub.id].state = foundHub.state;\n hubsMap[foundHub.id].version = foundHub.version;\n hubsMap[foundHub.id].connectionState = foundHub.connected ? HUB_CONNECTION_STATES.REMOTE : HUB_CONNECTION_STATES.UNCONNECTED;\n if (hubURL) {\n hubsMap[foundHub.id].connectionState = HUB_CONNECTION_STATES.LOCAL;\n hubsMap[foundHub.id].url = hubURL;\n } else {\n hubsMap[foundHub.id].url = undefined;\n }\n}", "function GetUIDDFromName(sname) {\n var uidd=\"\";\n console.log(sname);\n const connectedHubs = poweredUP.getConnectedHubs();\n connectedHubs.forEach(hub => {\n if (hub.name==sname){\n uidd=hub.uuid;\n }\n });\n return uidd;\n}", "function lookupRegistry (client, registryName, cb) {\n const request = {\n name: registryName\n };\n\n client.projects.locations.registries.get(request, (err, data) => {\n if (err) {\n console.log('Could not look up registry');\n console.log(err);\n cb(err);\n } else {\n console.log('Looked up existing registry');\n console.log(data);\n cb(null);\n }\n });\n}", "getBridgeAddress() {\n return new Promise((resolve, reject) => {\n if (this.settings.bridgeAddress) {\n // @todo Try to ping it to see if it's still connected.\n return resolve(this.settings.bridgeAddress);\n }\n\n loadJSON('GET', 'https://www.meethue.com/api/nupnp')\n .then(response => {\n if (!response) {\n return reject(`Cannot reach the broker server. Make sure you're connected to the internet.`);\n }\n\n if (!response.length) {\n return reject('No bridge found. Please connect a bridge and try again.');\n }\n\n // @todo Manage the case where several bridges are connected.\n this.settings.bridgeAddress = response[0].internalipaddress;\n return resolve(this.settings.bridgeAddress);\n });\n });\n }", "function getActiveDomain() {\n var sentry = getMainCarrier().__SENTRY__;\n return sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;\n}", "function getActiveDomain() {\n utils_1.logger.warn('Function `getActiveDomain` is deprecated and will be removed in a future version.');\n var sentry = getMainCarrier().__SENTRY__;\n return sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;\n}", "function pickDomainToPullFrom(url) {\n var result;\n Object.keys(controllerToDomainDic).forEach(function(key) {\n if (url.lastIndexOf(key, 0) === 0)\n result = controllerToDomainDic[key];\n });\n return result;\n}", "function isFirstParty(url, domain) {\n\t\tlet hostname = new URL(url).hostname;\n\t\treturn hostname.match(domain + \"$\");\n\t}", "function getCurrentRegistry(cbk) {\n npm.load(function(err, conf) {\n if (err) return exit(err);\n cbk(npm.config.get('registry'));\n });\n}", "getHubs() {\nif (this._gettingHubs) {\nreturn;\n}\nthis._gettingHubs = true;\nsetInterval(() => {\nlet hubs = this._poweredUP.getHubs();\nhubs.forEach(this._addHub.bind(this));\n}, 2000);\n}", "function loadTenantAndRegistry(envRecord) {\n\t\t\tvar opts = {\n\t\t\t\tcollection: colName,\n\t\t\t\tconditions: {'_id': req.soajs.inputmaskData.id}\n\t\t\t};\n\t\t\t\n\t\t\tBL.model.findEntry(req.soajs, opts, function (error, tenantRecord) {\n\t\t\t\tcheckReturnError(req, cb, {\n\t\t\t\t\tconfig: config,\n\t\t\t\t\terror: error || !tenantRecord,\n\t\t\t\t\tcode: 440\n\t\t\t\t}, function () {\n\t\t\t\t\tgetKeyInTenant(tenantRecord, envRecord);\n\t\t\t\t});\n\t\t\t});\n\t\t}", "function findBackend(name) {\n return engine_1.ENGINE.findBackend(name);\n}", "function determineHost() {\n\t\tvar sub = window.location.host;\n\t\tvar secureDomain = (sub.indexOf('dev.') > -1)\n\t\t\t? 'secure.'\n\t\t\t: 'secure2.';\n\t\tvar domains = {};\n\t\tvar httpProtocol = window.location.protocol;\n\t\t/* sub = \"t.hd-st71.homedepotdev.com\";\n\t\tsub = \"www.homedepot.com\";\n\t\tsub = \"hd-st71.homedepot.com\";\n\t\tsub = \"t.homedepot.com\";\n\t\tsub = \"secure2.homedepot.com\";\n\t\tsub = \"secure2.hd-st71.homedepotdev.com\";\n\t\tsub = \"t.secure2.homedepot.com\";\n\t\tsub = \"origin.hd-st71.homedepotdev.com\";\n\t\tsub = \"secure2.origin.hd-st71.homedepotdev.com\";\n\t\thttProtocol = \"https:\";*/\n\n\t\tsub = sub.split('.');\n\t\t// checking to see if we are in and LLC\n\t\ttry {\n\t\t\tdomains.secure = (httpProtocol === 'https:') ? secureDomain : '';\n\t\t\tif(sub[0].length === 1) {\n\t\t\t/* tablet */\n\t\t\t\tdomains.channel = sub[0] + '.';\n\t\t\t\tif (sub[2].indexOf('dev') > -1 || sub[1].indexOf('dev') > -1) {\n\t\t\t\t\tif (httpProtocol === 'https:') {\n\t\t\t\t\t\tdomains.environment = '';\n\t\t\t\t\t\tdomains.topLevel = sub[2] + '.com';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdomains.environment = sub[1] + '.';\n\t\t\t\t\t\tdomains.topLevel = sub[2] + '.com';\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif(httpProtocol === 'https:') {\n\t\t\t\t\t\tdomains.environment = '';\n\t\t\t\t\t\tdomains.topLevel = sub[2] + '.com';\n\t\t\t\t\t}else{\n\t\t\t\t\t\tdomains.environment = '';\n\t\t\t\t\t\tdomains.topLevel = sub[1] + '.com';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t/* desktop*/\n\t\t\t\tdomains.channel = '';\n\n\t\t\t\tif(sub[1].indexOf('dev') > -1 || sub[2].indexOf('dev') > -1 || (sub[3] && sub[3].indexOf('dev') > -1)) {\n\t\t\t\t\tif(httpProtocol === 'https:') {\n\t\t\t\t\t\tdomains.environment = sub[1] + '.';\n\t\t\t\t\t\tdomains.topLevel = isURLTypeOrigin(sub[1])\n\t\t\t\t\t\t\t? (sub[2] + '.' + sub[3] + '.com')\n\t\t\t\t\t\t\t: sub[2] + '.com';\n\t\t\t\t\t}else{\n\t\t\t\t\t\tdomains.environment = sub[0] + '.';\n\t\t\t\t\t\tdomains.topLevel = isURLTypeOrigin(sub[0])\n\t\t\t\t\t\t\t? (sub[1] + '.' + sub[2] + '.com')\n\t\t\t\t\t\t\t: (sub[1] + '.com');\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (httpProtocol === 'https:') {\n\t\t\t\t\t\tdomains.environment = '';\n\t\t\t\t\t\tdomains.topLevel = sub[1] + '.com';\n\t\t\t\t\t}else{\n\t\t\t\t\t\tdomains.environment = sub[0] + '.';\n\t\t\t\t\t\tdomains.topLevel = sub[1] + '.com';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tTHD.isLogging = true;\n\t\t\tthdLogger.log('Error: ' + e + ' - D\\'OH! You\\'re getting this error becasue you are running on localhost:XXXX. The workaround is for you to update your hosts file localhost domain (127.0.0.1 localhost) to a genric domain like, local.homedepot.com! Don\\'t know how to change your hosts file you say? Check out this article: http://bit.ly/1fueDGB.');\n\t\t}\n\t\treturn domains;\n\t}", "get ready() {\n return Object(web_lib_esm[\"c\" /* poll */])(() => {\n return this._ready().then((network) => {\n return network;\n }, (error) => {\n // If the network isn't running yet, we will wait\n if (error.code === logger_lib_esm[\"b\" /* Logger */].errors.NETWORK_ERROR && error.event === \"noNetwork\") {\n return undefined;\n }\n throw error;\n });\n });\n }", "function doLocalIdQuery(ip: string): Promise<?string> {\n return new Promise((resolve) => {\n if (ip) {\n const hubURL = `${HUB_PROTOCOL + ip}:${HUB_PORT}`;\n const url = `${hubURL}/hub`;\n send({ url, timeout: 500 })\n .then((hubData) => {\n updateFoundHub(hubURL, hubData);\n resolve(ip);\n })\n .catch((error) => {\n console.log(`doLocalIdQuery ${ip} error `, error.message);\n resolve(ip);\n });\n } else {\n resolve();\n }\n });\n}", "function loadApifyDomain() {\n var path = ExtensionUtils.getModulePath(module, \"node/ApifyDomain\"),\n projectPath = ProjectManager.getProjectRoot().fullPath,\n loadPromise = nodeConnection.loadDomains([path], true);\n\n loadPromise.then(function () {\n //console.log(\"[brackets-apif] ok\");\n }).fail(function (err) {\n console.error(\"[brackets-apify] error:\" + err);\n });\n\n return loadPromise;\n }", "function GetEraDomain(current_window) \r\n\t{\r\n\t\tif (current_window.era_rc != null && current_window.era_rc[\"ERADomain\"] != null) \r\n\t\t{\r\n\t\t\t\treturn \"http://\" + (current_window.era_rc[\"ERADomain\"]) + ERA_INTERFACE_LINK;;\r\n\t\t} \r\n\t\t\r\n\t\treturn \"http://\" + DEFAULT_DOMAIN + ERA_INTERFACE_LINK;\r\n\t}", "registerHubSite() {\r\n return this.clone(Site_1, `registerHubSite`).postCore();\r\n }", "function GetTopDomain(strThisDomain) {\n strTopDomains = \".co,.com,.net,.org,.edu,.biz,.info\";\n arrTopDomains = strTopDomains.split(\",\");\n strThisTopDomain = \"\";\n strLocalDomainPrefix = \"\";\n strLocalDomain = \"\";\n \n if (!strThisDomain || strThisDomain == \"\") {\n strThisDomain = location.hostname;\n }\n \n for (i=0; i < arrTopDomains.length; i++) {\n intIndexOfTopDomain = strThisDomain.indexOf(arrTopDomains[i]);\n if (intIndexOfTopDomain > 0) {\n // These conditions are intended to be mutually exclusive for all elements listed in\n // strTopDomains. Therefore only one of them should match, if any.\n if ((strThisDomain.substring(intIndexOfTopDomain,strThisDomain.length) != arrTopDomains[i]) || (strThisDomain.indexOf(arrTopDomains[i] + \".\") > 0)) {\n strLocalDomainPrefix = strThisDomain.substring(0,intIndexOfTopDomain);\n strThisTopDomain = strThisDomain.substring(intIndexOfTopDomain,strThisDomain.length);\n } else {\n intIndexOfTopDomain = -1;\n }\n }\n }\n if (strLocalDomainPrefix != \"\" && strThisTopDomain != \"\") {\n if (strLocalDomainPrefix.indexOf(\".\") > 0) {\n strLocalDomain = strLocalDomainPrefix.substring(strLocalDomainPrefix.lastIndexOf(\".\")+1,strLocalDomainPrefix.length) + strThisTopDomain;\n } else {\n strLocalDomain = strLocalDomainPrefix + strThisTopDomain;\n }\n }\n if (strLocalDomain != \"\") {\n return strLocalDomain;\n } else {\n //No supported top level domain was found. Pass back the passed in domain.\n return strThisDomain;\n }\n}", "function extractHubInfo(HUBKeys: HUB_KEYS_TYPE): HUBS_MAP_TYPE {\n const hubs: HUBS_MAP_TYPE = {};\n if (HUBKeys) {\n Object.keys(HUBKeys).forEach((hubKey) => {\n if (HUBKeys[hubKey]) {\n const coded = HUBKeys[hubKey].split('.')[1];\n const decoded = urlBase64Decode(coded);\n const payload = JSON.parse(decoded);\n const info = {};\n info.id = payload.hubId || payload.hub_id;\n info.name = payload.hubName || payload.hub_name;\n info.hubKey = HUBKeys[hubKey];\n info.connectionState = HUB_CONNECTION_STATES.UNCONNECTED;\n if (payload.role) {\n info.role = payload.role;\n info.roleString = '';\n Object.keys(ROLES).forEach((roleKey) => {\n if (ROLES[roleKey] === info.role) info.roleString = roleKey;\n });\n }\n hubs[info.id] = info;\n } else {\n hubs[hubKey] = {\n id: hubKey,\n connectionState: HUB_CONNECTION_STATES.UNCONNECTED,\n };\n }\n });\n }\n return hubs;\n}", "initializeBackend(backendName) {\n const registryFactoryEntry = this.registryFactory[backendName];\n if (registryFactoryEntry == null) {\n throw new Error(`Cannot initialize backend ${backendName}, no registration found.`);\n }\n try {\n const backend = registryFactoryEntry.factory();\n /* Test if the factory returns a promise.\n Done in a more liberal way than\n previous 'Promise.resolve(backend)===backend'\n as we needed to account for custom Promise\n implementations (e.g. Angular) */\n if (backend && !(backend instanceof _backends_backend__WEBPACK_IMPORTED_MODULE_0__[\"KernelBackend\"]) &&\n typeof backend.then === 'function') {\n const promiseId = ++this.pendingBackendInitId;\n const success = backend\n .then(backendInstance => {\n // Outdated promise. Another backend was set in the meantime.\n if (promiseId < this.pendingBackendInitId) {\n return false;\n }\n this.registry[backendName] = backendInstance;\n this.pendingBackendInit = null;\n return true;\n })\n .catch(err => {\n // Outdated promise. Another backend was set in the meantime.\n if (promiseId < this.pendingBackendInitId) {\n return false;\n }\n this.pendingBackendInit = null;\n console.warn(`Initialization of backend ${backendName} failed`);\n console.warn(err.stack || err.message);\n return false;\n });\n this.pendingBackendInit = success;\n return { success, asyncInit: true };\n }\n else {\n this.registry[backendName] = backend;\n return { success: true, asyncInit: false };\n }\n }\n catch (err) {\n console.warn(`Initialization of backend ${backendName} failed`);\n console.warn(err.stack || err.message);\n return { success: false, asyncInit: false };\n }\n }", "getById(id) {\r\n return new HubSite(this, `GetById?hubSiteId='${id}'`);\r\n }", "async setRegistry() {\n const cacheKey = ''\n if (this._registries[cacheKey]) {\n return this._registries[cacheKey]\n }\n\n let registry\n if (await shouldUseTaobao(this.bin)) {\n registry = registries.taobao\n } else {\n try {\n if (!registry || registry === 'undefined') {\n registry = (await execa(this.bin, ['config', 'get', 'registry'])).stdout\n }\n } catch (e) {\n // Yarn 2 uses `npmRegistryServer` instead of `registry`\n registry = (await execa(this.bin, ['config', 'get', 'npmRegistryServer'])).stdout\n }\n }\n\n this._registries[cacheKey] = stripAnsi(registry).trim()\n return this._registries[cacheKey]\n }", "function getRegisteredIP () {return new Promise ( (resolve, reject) => { dns.lookup ( C.DOMAIN, 4, (err, address) => {if (err) reject(err); else resolve (address);} ) } ); }", "function updateRegister() {\r\n adapter.log.info('Request actual repository...');\r\n adapter.getForeignObject('system.config', function (err, data) {\r\n if (err) {\r\n console.log(err);\r\n }\r\n if (data && data.common) {\r\n adapter.sendToHost(adapter.host, 'getRepository', {\r\n repo: data.common.activeRepo,\r\n update: true\r\n }, function (_repository) {\r\n if (_repository === 'permissionError') {\r\n adapter.log.error('May not read \"getRepository\"');\r\n } else {\r\n adapter.log.info('Repository received successfully.');\r\n webServer.io.sockets.emit('repoUpdated');\r\n }\r\n });\r\n }\r\n });\r\n}", "_getFirstToTry(urls) {\n let tryThisNode = this._getLastNode(); // fallback to the best of the pre-defined URLs ...\n // ... if there is no preset connectionString fallback to lowest latency\n\n\n if (!tryThisNode) tryThisNode = urls[0]; // ... if auto selection is on (is also ensured in initConnection, but we don't want to ping\n // a unreachable url)\n\n if (this.isAutoSelection()) {\n tryThisNode = urls[0];\n console.log(\"auto selecting to \" + tryThisNode);\n }\n\n if (!tryThisNode) {\n // something went horribly wrong, no node to connect to\n throw \"No node to connect to found, this should not happen.\";\n } // ... if insecure websocket url is used when using secure protocol\n // (the list urls only contains matching ones)\n\n\n if (!this._apiUrlSecuritySuitable(tryThisNode)) tryThisNode = urls[0];\n return tryThisNode;\n }", "function getAddressFromPortal() {\n\t\t\t$.ajax({\n\t\t\t\turl: \"https://www.meethue.com/api/nupnp?callback=?\",\n\t\t\t\tcrossDomain: true,\n\t\t\t\tcache: true\n\t\t\t}).done(function(data){\n\t\t\t\tif(typeof(data[0].internalipaddress) !== \"undefined\") {\n\t\t\t\t\tlocalStorage.address = \"http://\" + data[0].internalipaddress;\n\t\t\t\t\t$(\"#initial-setup-ip-address-result p\").text(\"Found bridge!\");\n\t\t\t\t\t$(\"#initial-setup-ip-address-result\").hide();\n\t\t\t\t\t$(\"#initial-setup-bridge-link\").show();\n\t\t\t\t\tregisterWithBridge();\n\t\t\t\t} else {\n\t\t\t\t\t$(\"#initial-setup-ip-address-result p\").text(\n\t\t\t\t\t\t\"HueCentral could not find your bridge. You will \" +\n\t\t\t\t\t\t\"have to enter the address manually.\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}).fail(function( jqxhr, textStatus, error ) {\n\t\t\t\tvar err = textStatus + \", \" + error;\n\t\t\t\tconsole.log( \"Request Failed: \" + err );\n\t\t\t\t$(\"#initial-setup-ip-address-result p\").text(\n\t\t\t\t\t\"HueCentral could not find your bridge. You will \" +\n\t\t\t\t\t\"have to enter the address manually.\"\n\t\t\t\t);\n\t\t\t});\n\t\t}", "function fetchDCSOByHash(hash) {\n\t\tvar ret;\n\t\tfor (var i = 0; i < window.DataChannels.length; i++) {\n\n\t\t\tif (window.DataChannels[i]['connectionIdHash'] === hash) {\n\t\t\t\tret = window.DataChannels[i];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tconsole.assert(ret['connectionIdHash'] === hash, 'does not pick right channel');\n\t\treturn ret;\n\t}", "handleHubDisconnected() {\n return __awaiter(this, void 0, void 0, function* () {\n this.log.debug(`client for hub ${this.hubInfo.uuid} was disconnected. re-establish.`);\n yield this.disconnect();\n this.makeClient();\n });\n }", "getOrConnect(\n baseId = this.defaultBaseId,\n apiKey = this.defaultApiKey,\n sendWarning = false\n ) {\n let connection;\n if (baseId == null || apiKey == null) {\n if (sendWarning === true) {\n console.log(\n \"warning, no airtable apikey or baseid set, no connection will be openened\"\n );\n }\n return;\n } else if (this.bases[baseId] != null) {\n return this.bases[baseId];\n } else {\n console.log(\"opening new airtable connection\");\n connection = new Connection({ apiKey: apiKey }).base(baseId);\n this.bases[baseId] = connection;\n console.log(this.bases);\n return connection;\n }\n }", "function init(){\n initMaster();\n createDomain(\"gmail.com\");\n createDomain(\"hotmail.com\");\n updateLabel();\n}", "function fetchCustomDomains () {\n var $errorMessage = $('.custom-domain-error-message'),\n $loader = $('.custom-domain-activity-indicator');\n\n $.get({\n url: scope.domainUrl + 'domains',\n xhrFields: { withCredentials: true }\n })\n .done(function (data) {\n //@todo: This is done for backward compatibility. Need to clear that later.\n renderCustomDomainDropdownItems(data.result || data.domains);\n })\n .fail(function (jqXHR) {\n var response = JSON.parse(jqXHR.responseText),\n defaultError = 'Something went wrong while loading your custom domains.';\n\n $errorMessage\n .text(_.get(response, 'error', defaultError))\n .show();\n })\n .always(function () {\n $loader.hide();\n });\n}", "function detectProvider() {\n if (typeof web3 !== 'undefined') {\n console.log(\"MetaMask/Mist detected !\");\n // Use Mist/MetaMask's provider\n provider = new Web3(web3.currentProvider);\n startDapp(provider);\n }\n else if (typeof window.web3 !== 'undefined') {\n console.log(\"MetaMask/Mist detected !\");\n // Use Mist/MetaMask's provider\n provider = new Web3(window.web3.currentProvider);\n startDapp(provider);\n }\n else {\n console.log(\"MetaMask/Mist not detected, trying to contact local node...\");\n try {\n //Will fail if Web3 is not injected\n let Web3 = require(\"web3\");\n\n //Local node\n provider = new Web3(new Web3.providers.HttpProvider(\"http://localhost:9545\"));\n\n if (typeof provider !== \"undefined\") {\n console.log(\"Connecting to : \" + provider.currentProvider.host);\n startDapp(provider);\n }\n }\n catch (err) {\n toast(\"Not connected\");\n //Metamask needed \n displayMetaMaskBanner(); \n }\n }\n}", "function getByRemoteConfig(hostname) {\n var remoteModuleConfig = typeof window !== 'undefined' &&\n window.__fbBatchedBridgeConfig &&\n window.__fbBatchedBridgeConfig.remoteModuleConfig\n if (\n !Array.isArray(remoteModuleConfig) ||\n hostname !== 'localhost' && hostname !== '127.0.0.1'\n ) return { hostname: hostname, passed: false }\n\n var constants = (\n remoteModuleConfig.find(getConstants) || []\n )[1]\n if (constants) {\n var serverHost = constants.ServerHost || hostname\n return { hostname: serverHost.split(':')[0], passed: true }\n }\n return { hostname: hostname, passed: false }\n}", "function findBackend(name) {\n return _engine__WEBPACK_IMPORTED_MODULE_0__[\"ENGINE\"].findBackend(name);\n}", "function callOnHub(method) {\r\n var args = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n args[_i - 1] = arguments[_i];\r\n }\r\n var hub = Object(_sentry_hub__WEBPACK_IMPORTED_MODULE_1__[\"getCurrentHub\"])();\r\n if (hub && hub[method]) {\r\n // tslint:disable-next-line:no-unsafe-any\r\n return hub[method].apply(hub, Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__spread\"])(args));\r\n }\r\n throw new Error(\"No hub defined or \" + method + \" was not found on the hub, please open a bug report.\");\r\n}", "function getDomain() {\r\n // Add value to end of URL to complete fetch URL and return JSON data\r\n fetch('https://unstoppabledomains.com/api/v1/'+ inputVal)\r\n .then(response => response.json()) \r\n}", "function updatePageFromCurrentDomain() {\n console.log('loadCurrentDomainSettings');\n chrome.tabs.query({ //This method output active URL \n 'active': true,\n 'currentWindow': true\n }, function (tabs) {\n var tab = tabs[0];\n var domain = domainFromURL(tab.url);\n updatePageWithDomain(domain);\n });\n}", "function getSite(){\n\t\tconsole.log('GET SIIIITEEEEE');\n\n\t\t//Bluemix Classic (V3 Header)\n\t\t// if( document.querySelector('header.bluemix-global-header') ){\n\t\t// \treturn 'BLUEMIX_CLASSIC';\n\t\t// }\n\t\t// else if ( document.querySelector('body.link') ){\n\t\t// \treturn 'BLUEMIX_ATLAS';\n\t\t// }\n\t\t// //Registration Page\n\t\t// else if ( document.querySelector('body.registration') ){\n\t\t// \treturn 'BLUEMIX_ATLAS';\n\t\t// }\n\t\t// else if ( ! document.querySelector('header') ){\n\t\t// \treturn 'EXTERNAL_SITE';\n\t\t// }\n\t\t// else if ( document.querySelector('header').getAttribute('data-version') === 'V4' || document.querySelector('header').id === 'global-header'){\n\t\t// \treturn 'BLUEMIX_ATLAS';\n\t\t// }\n\t\t//\n\t\t// return 'EXTERNAL_SITE';\n\t\treturn 'IOTPLATFORM';\n\t}", "function getBackendUrl(){\n let backendHost;\n const hostname = window && window.location && window.location.hostname;\n \n if(hostname === 'realsite.com') {\n backendHost = 'https://api.realsite.com';\n } else if(hostname === 'staging.realsite.com') {\n backendHost = 'https://staging.api.realsite.com';\n } else if(/^qa/.test(hostname)) {\n backendHost = `https://api.${hostname}`;\n } else if(process && process.env.REACT_APP_BACKEND_HOST) {\n backendHost = process.env.REACT_APP_BACKEND_HOST;\n } else {\n backendHost = window.location.protocol + '//' + window.location.host + '/';\n }\n return backendHost; \n}", "function getDeviceInfoNode(domain){\n\tvar deviceId = \"\";//ask for ID\n\tif(document.getElementById(\"labelmodel\").style.display==\"none\"){\n\t\tvar modeltype = $(\"#newdevmodel\").val();\n\t}else{\n\t\tvar modeltype = $(\"#newdevmodel1\").val();\n\t}\n\tvar devicename = $(\"#newhostnameid\").val();\n\tvar devicetype = $(\"#dropdowndevicetype\").val();\n\tvar deviceflag = \"1\";\n\tvar connectivity = getNewPortCount();\n\tvar discovery = \"Manual\";\n\tvar prototypeflag = \"false\";//Not sure, ask if the core is ready\n\tvar devicenode = setNewDeviceInfoNode(deviceId,modeltype,devicename,devicetype,deviceflag,connectivity,discovery,domain,prototypeflag);\n\treturn devicenode\n}", "function queryBindedResource(divId){\n \tvar url = getURL(\"Power\",\"JSON\");\n\tvar action = \"getbindeddomain\";\n\tvar queryObj = {'QUERY':[{'user':globalUserName}]};\n\tvar queryStr = JSON.stringify(queryObj);\n\t$.ajax ({\n\t\turl: url,\n\t\tdata: { action: action, query: queryStr },\n\t\tdataType: 'html',\n\t\tsuccess: function (data) {\n\t\t\tdat2 = data.replace(/'/g,'\"');\n\t\t\tvar dat = $.parseJSON(dat2);\n\t\t\tvar domains = dat.data[0].row[0].Domain.split(',');\n\t\t\tvar retStr = \"\";\n\t\t\tfor(var a=0; a<domains.length; a++){\n\t\t\t\tvar domain = domains[a];\n\t\t\t\tif(/default/i.test(domain)){continue;}\n\t\t\t\tretStr += \"<option value='\"+domain+\"'>\"+domain+\"</option>\";\n\t\t\t}\n\t\t\t$(\"#\"+divId).append(retStr);\n\t\t}\t\n\t});\n}", "function callOnHub(method) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var hub = Object(_sentry_hub__WEBPACK_IMPORTED_MODULE_1__[\"getCurrentHub\"])();\n if (hub && hub[method]) {\n // tslint:disable-next-line:no-unsafe-any\n return hub[method].apply(hub, tslib__WEBPACK_IMPORTED_MODULE_0__[\"__spread\"](args));\n }\n throw new Error(\"No hub defined or \" + method + \" was not found on the hub, please open a bug report.\");\n}", "detectDomainLocale(hostname, detectedLocale) {\n if (!hostname || !this.lowerCaseDomains || !this.config.domains) return;\n if (detectedLocale) detectedLocale = detectedLocale.toLowerCase();\n for(let i = 0; i < this.lowerCaseDomains.length; i++){\n var // Configuration validation ensures that the locale is not repeated in\n // other domains locales.\n _domainLocale_locales;\n const domainLocale = this.lowerCaseDomains[i];\n if (// We assume that the hostname is already lowercased.\n domainLocale.hostname === hostname || ((_domainLocale_locales = domainLocale.locales) == null ? void 0 : _domainLocale_locales.some((locale)=>locale === detectedLocale))) {\n return this.config.domains[i];\n }\n }\n return;\n }", "function try_subscribe(chan) {\n /* check channel existence */\n if (!streams.hasChan(chan) && !config.channels[chan]) {\n console.log(\"CHECK_CHAN: channel \" + chan + \" not found\");\n\n throw \"NotFound\";\n }\n\n /* subscribe already started channel stream */\n if (streams.hasChan(chan)) {\n console.log(\"CHECK_CHAN: channel \" + chan + \" ready, stream\");\n\n return;\n }\n\n throw \"NotStarted\";\n}", "function toggleEnabledForCurrentDomain() {\n var isCurrentDomainBlacklisted = !getEnabledForDomainCheckbox().checked;\n\n chrome.tabs.query({\n 'active': true,\n 'currentWindow': true\n }, function (tabs) {\n var tab = tabs[0];\n var domain = domainFromURL(tab.url);\n toggleEnabledForDomain(domain);\n });\n}", "function _uDomain() {\n if (!_udn || _udn==\"\" || _udn==\"none\") { _udn=\"\"; return 1; }\n if (_udn==\"auto\") {\n var d=_ubd.domain;\n if (d.substring(0,4)==\"www.\") {\n d=d.substring(4,d.length);\n }\n _udn=d;\n }\n \n if (_uhash==\"off\") return 1;\n return _uHash(_udn); \n}", "async getAsteriskServer(data){\n //this code is deprecated due to moving kamailio rpc to event driven\n const res = await this.app.service('sbc-management').create({\n command: 'tenantServer',\n tenantCode: data.panelTenantCode\n });\n\n if(res !== 'failed'){\n return res.hostName;\n }\n\n return await this.getTenantServerFromStates(data.panelTenantCode);\n }", "function registerWithBridge() {\n\t\t\tvar data = JSON.stringify({\n\t\t\t\tdevicetype: localStorage.apiDeviceType,\n\t\t\t\tusername: localStorage.apiName\n\t\t\t});\n\t\t\t$.ajax({\n\t\t\t\turl: localStorage.address+\"/api/\",\n\t\t\t\tdata: data,\n\t\t\t\tdataType: 'json',\n\t\t\t\tmethod: 'POST'\n\t\t\t}).done(function(responseData){\n\t\t\t\tif(typeof(responseData[0].error) !== \"undefined\" && responseData[0].error.type == 101) {\n\t\t\t\t\t// Bridge link button not pressed. Wait 2 seconds, then try again.\n\t\t\t\t\tsetTimeout(registerWithBridge, 2000);\n\t\t\t\t} else if (typeof(responseData[0].success) !== \"undefined\") {\n\t\t\t\t\t// Api name is registered. HueCentral is ready to use\n\t\t\t\t\tlocalStorage.appSetup = \"true\";\n\t\t\t\t\t$(\"#initial-setup-bridge-link p\").text(\n\t\t\t\t\t\t\"Setup complete! Press the button below to \" +\n\t\t\t\t\t\t\"using HueCentral.\"\n\t\t\t\t\t);\n\t\t\t\t\t$(\"#initial-setup-complete\").show();\n\t\t\t\t} else {\n\t\t\t\t\t$(\"#initial-setup-bridge-link p\").text(\n\t\t\t\t\t\t\"An unknown error occurred while attempting to \" +\n\t\t\t\t\t\t\"register HueCentral with the bridge.\"\n\t\t\t\t\t);\n\t\t\t\t\tconsole.log(responseData);\n\t\t\t\t}\n\t\t\t}).fail(function( jqxhr, textStatus, error ) {\n\t\t\t\tvar err = textStatus + \", \" + error;\n\t\t\t\tconsole.log( \"Request Failed: \" + err );\n\t\t\t\t$(\"#initial-setup-bridge-link p\").text(\n\t\t\t\t\t\"An error occurred while attempting to communicate with the bridge.\"\n\t\t\t\t);\n\t\t\t});\n\t\t}", "function getDomain() {\n const domain = urlUtils.urlFor('home', true).match(new RegExp('^https?://([^/:?#]+)(?:[/:?#]|$)', 'i'));\n return domain && domain[1];\n}", "function GetThirdPartyDomain(domain) {\r\n var match = domain.match(/[^.]+\\.(co\\.)?[^.]+$/) || [ domain ];\r\n return match[0].toLowerCase();\r\n }", "async single(domain) {\n\n let domains = []\n \n domains.push(domain)\n\n return await this.sendWhoisRequest(domains)\n }", "function lookupRegistry(client, registryId, projectId, cloudRegion) {\n // [START iot_lookup_registry]\n // Client retrieved in callback\n // getClient(serviceAccountJson, function(client) {...});\n // const cloudRegion = 'us-central1';\n // const projectId = 'adjective-noun-123';\n // const registryId = 'my-registry';\n const parentName = `projects/${projectId}/locations/${cloudRegion}`;\n const registryName = `${parentName}/registries/${registryId}`;\n const request = {\n name: registryName,\n };\n\n client.projects.locations.registries.get(request, (err, res) => {\n if (err) {\n console.log('Could not look up registry');\n console.log(err);\n } else {\n console.log('Looked up existing registry');\n console.log(res.data);\n }\n });\n // [END iot_lookup_registry]\n}", "function toggleCurrentDomainHighlighting() {\n chrome.tabs.getSelected(null, function(tab) {\n chrome.storage.sync.get(\"USER\", function (obj) {\n var user = obj['USER'];\n if (USER_KEY in user) {\n var URL = \"https://quotedserver.herokuapp.com/lookup/toggledomain/__/\";\n URL = URL.replace('__', btoa(domainFromURL(tab.url)));\n console.log(user.username);\n xhttprequest(URL, user.username, function(xhr) {\n chrome.runtime.sendMessage({task: \"getUser\"}, function(response) {});\n delayPopulate();\n });\n }\n });\n });\n \n}", "function makeMain(hub) {\r\n var registry = getMainCarrier();\r\n var oldHub = getHubFromCarrier(registry);\r\n setHubOnCarrier(registry, hub);\r\n return oldHub;\r\n}", "function makeMain(hub) {\n const registry = getMainCarrier();\n const oldHub = getHubFromCarrier(registry);\n setHubOnCarrier(registry, hub);\n return oldHub;\n }", "_loadGraphConnector() {\n let _this = this;\n return new Promise((resolve) => {\n\n _this.storageManager.get('graphConnector:globalRegistryRecord').then((globalRegistryRecord) => {\n if (globalRegistryRecord) {\n _this.globalRegistryRecord.timeout = globalRegistryRecord.timeout;\n _this.globalRegistryRecord.active = globalRegistryRecord.active;\n _this.globalRegistryRecord.defaults.chat = globalRegistryRecord.defaults.chat;\n _this.globalRegistryRecord.defaults.video = globalRegistryRecord.defaults.video;\n _this.globalRegistryRecord.defaults.voice = globalRegistryRecord.defaults.voice;\n _this.globalRegistryRecord.guid = globalRegistryRecord.guid;\n _this.globalRegistryRecord.lastUpdate = globalRegistryRecord.lastUpdate;\n _this.globalRegistryRecord.publicKey = globalRegistryRecord.publicKey;\n _this.globalRegistryRecord.revoked = globalRegistryRecord.revoked;\n _this.globalRegistryRecord.salt = globalRegistryRecord.salt;\n _this.globalRegistryRecord.userIDs = globalRegistryRecord.userIDs;\n _this.globalRegistryRecord.legacyIDs = globalRegistryRecord.legacyIDs;\n _this.globalRegistryRecord.schemaVersion = globalRegistryRecord.schemaVersion;\n }\n resolve();\n });\n\n _this.storageManager.get('graphConnector:contacts').then((contacts) => {\n if (contacts) {\n _this.contacts = contacts;\n }\n resolve();\n });\n\n _this.storageManager.get('graphConnector:groups').then((groups) => {\n if (groups) {\n _this.groups = groups;\n }\n resolve();\n });\n\n _this.storageManager.get('graphConnector:privateKey').then((privateKey) => {\n if (privateKey) {\n _this.privateKey = privateKey;\n _this._prvKey = jsrsasign.KEYUTIL.getKey(privateKey, 'PKCS8PRV');\n }\n resolve();\n });\n\n _this.storageManager.get('graphConnector:firstName').then((firstName) => {\n if (firstName) {\n log.info('graphConnector:firstName:', firstName);\n _this.firstName = firstName;\n }\n resolve();\n });\n\n _this.storageManager.get('graphConnector:lastName').then((lastName) => {\n if (lastName) {\n log.info('graphConnector:lastName:', lastName);\n _this.lastName = lastName;\n }\n resolve();\n });\n\n _this.storageManager.get('graphConnector:lastCalculationBloomFilter1Hop').then((lastCalculationBloomFilter1Hop) => {\n if (lastCalculationBloomFilter1Hop) {\n log.info('graphConnector:lastName:', lastCalculationBloomFilter1Hop);\n _this.lastCalculationBloomFilter1Hop = lastCalculationBloomFilter1Hop;\n }\n resolve();\n });\n\n _this.storageManager.get('graphConnector:residenceLocation').then((residenceLocation) => {\n if (residenceLocation) {\n log.info('graphConnector:lastName:', residenceLocation);\n _this.residenceLocation = residenceLocation;\n }\n resolve();\n });\n });\n\n }", "checkForPersistentSettings(port, botPreset) {\n try {\n const availableBots = Bots.find().fetch();\n\n const savedDbProfile = availableBots.find(bot => port.pnpId && bot.endpoint === port.pnpId);\n if (savedDbProfile) {\n return savedDbProfile;\n }\n\n // If pnpid or serial number, need to add it to the database\n // else set port to port\n if (port.pnpId !== undefined) {\n const newSettings = Object.assign({}, botPreset.settings);\n newSettings.endpoint = port.pnpId;\n const newBot = Meteor.call('bots.insert', newSettings);\n return newBot;\n }\n } catch (ex) {\n throw new Meteor.Error('Persistent Bot Check error', ex);\n }\n }", "function detectHost() {\n\t\tvar host;\n\t\thost = (location.hostname.indexOf(\"10.128\") === 0) ? \"localhost\" : location.hostname;\n\n\t\tswitch (host) {\n\t\t\tcase \"localhost\":\n\t\t\tcase \"127.0.0.1\":\n\t\t\tcase \"skynet\":\n\t\t\tcase \"skynet-1\":\n\t\t\t\thost = \"local\";\n\t\t\t\tbreak;\n\t\t\tcase \"www.csps-efpc.gc.ca\":\n\t\t\tcase \"csps-efpc.gc.ca\":\n\t\t\t\thost = \"public\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\thost = \"prod\";\n\t\t\t\tbreak;\n\t\t}\n\t\t//console.log(host);\n\t\treturn host;\n\n\t}", "function getDomain(req) {\n var x = req.url.split('/');\n if (x.length < 2) return parent.config.domains[''];\n if (parent.config.domains[x[1].toLowerCase()]) return parent.config.domains[x[1].toLowerCase()];\n return parent.config.domains[''];\n }", "function pickdomain(arg) {\n if (typeof arg.url == 'string' && arg.url.indexOf('https:') == 0) {\n return securedomain;\n } else {\n return domain;\n }\n}", "async function lookup(host) {\n\treturn new Promise((resolve, reject) => {\n\t\tdns.resolveSrv(host, (err, records) => {\n\t\t\tif(err) reject(err);\n\t\t\tresolve(records);\n\t\t});\n\t});\n}", "getRootDomain(host) {\n const domain = host.split(\".\");\n domain.shift();\n return domain.join(\".\");\n }", "function getInstanceFromNode(node){var inst=getClosestInstanceFromNode(node);if(inst!=null&&inst._hostNode===node){return inst;}else{return null;}}", "getDomainNetwork(domainNetworkName)\n {\n \n for (let domainNetwork of this.dataElement.domainNetworks)\n if (domainNetwork.domainNetworkName === domainNetworkName) return domainNetwork;\n \n return undefined;\n }", "function get_appliance_url(service, fallback_url, timeout) {\n\n if (window.location.protocol === \"file:\") {\n\n if (fallback_url == null) {\n throw \"Admin UI running from local file and no fallback URL given\";\n }\n\n return fallback_url;\n\n } else {\n\n\n var res = new XMLHttpRequest();\n var svc = (service == \"hub-website\" ? \"hub-websocket\" : service);\n res.open('GET', \"/wsconfig/\" + svc, false);\n res.send(null);\n\n if (res.status == 200) {\n try {\n var _port = JSON.parse(res.responseText);\n //console.log(_port);\n switch (service){\n case \"admin-websocket\":\n case \"hub-website\":\n case \"hub-websocket\":\n var port = \"\";\n if (!((_port[1] && _port[0] == 443) || (!_port[1] && _port[0] == 80))) {\n port = \":\" + _port[0];\n }\n var schema;\n var path;\n if (service == \"hub-website\") {\n schema = _port[1] ? \"https\" : \"http\";\n path = \"/\";\n } else {\n schema = _port[1] ? \"wss\" : \"ws\";\n path = \"/\" + _port[2];\n }\n var uri = schema + \"://\" + window.location.hostname + port + path;\n return uri;\n break;\n case \"admin-web\":\n case \"hub-web\":\n var uri = (_port[1] ? \"https\" : \"http\") + \"://\" + window.location.hostname + \":\" + _port[0];\n return uri;\n break;\n default:\n return (\"service not recognized\", service);\n break;\n\n var uri = (_port[1] ? \"https\" : \"http\") + \"://\" + window.location.hostname + \":\" + _port[0];\n return uri;\n\n }\n\n } catch (e) {\n return null;\n }\n } else {\n return null;\n }\n }\n}", "get ready() {\n return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_10__ethersproject_web__[\"c\" /* poll */])(() => {\n return this._ready().then((network) => {\n return network;\n }, (error) => {\n // If the network isn't running yet, we will wait\n if (error.code === __WEBPACK_IMPORTED_MODULE_12__ethersproject_logger__[\"a\" /* Logger */].errors.NETWORK_ERROR && error.event === \"noNetwork\") {\n return undefined;\n }\n throw error;\n });\n });\n }", "function currentDomain() {\n chrome.tabs.getCurrent(function(tab){\n console.log(tab.url);\n });\n \n // console.log(\"DOMAIN\");\n // console.log(domain);\n // if (domain.length == 0) {\n // return '_';\n // } else {\n // return domain;\n // }\n}", "static currentMediaService() {\n if (window.location.host === \"www.youtube.com\") {\n return Service.YouTube;\n }\n else if (window.location.host === \"kissanime.ru\") {\n return Service.KissAnime;\n }\n else if (window.location.host === \"kissmanga.com\") {\n return Service.KissManga;\n }\n return null;\n }", "function makeMain(hub) {\n\t const registry = getMainCarrier();\n\t const oldHub = getHubFromCarrier(registry);\n\t setHubOnCarrier(registry, hub);\n\t return oldHub;\n\t}", "function hasHubOnCarrier(carrier) {\n\t return !!(carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub);\n\t}", "function resolveDomain(req) {\n var host = req.get('host'); // Ex: \"mysite.com:8000, localhost:4300, 127.0.0.1:3090\"\n var truncateAt = host.indexOf(':');\n var hosts = host.substr(0, truncateAt > -1 ? truncateAt : host.length); // Ex: \"mysite.com\"\n hosts = hosts.search(/[a-z]/i) != -1 ? hosts.split('.') : hosts = [hosts]; // Ex: \"127.0.0.1:3090 should not split like abc.xyz.com\"\n var domain = hosts.length > 1 ? hosts[hosts.length - 2] + '.' + hosts[hosts.length - 1] : hosts[0]; // Set-cookie works for base domain if URL is having sub domains\n return domain;\n}", "function checkSiteType(){var hostname=window.location.hostname.toLowerCase().trim();if(hostname.indexOf('cosmo.ru')+1){return'cosmo';}if(hostname.indexOf('freundin.de')+1){return'freundin';}if(hostname.indexOf('kp.ru')+1){return'kp';}if(hostname.indexOf('eva.ru')+1){return'eva';}// wmj\nif(hostname.indexOf('wmj.ru')+1){return'wmj';}return'other';}", "function makeMain(hub) {\n var registry = getMainCarrier();\n var oldHub = getHubFromCarrier(registry);\n setHubOnCarrier(registry, hub);\n return oldHub;\n}", "function makeMain(hub) {\n var registry = getMainCarrier();\n var oldHub = getHubFromCarrier(registry);\n setHubOnCarrier(registry, hub);\n return oldHub;\n}", "function makeMain(hub) {\n var registry = getMainCarrier();\n var oldHub = getHubFromCarrier(registry);\n setHubOnCarrier(registry, hub);\n return oldHub;\n}", "function makeMain(hub) {\n var registry = getMainCarrier();\n var oldHub = getHubFromCarrier(registry);\n setHubOnCarrier(registry, hub);\n return oldHub;\n}", "function lookupChannel (name) \n{\n\tif (channels[name]) \n\t\treturn channels[name];\n\t\t\n\tchannels[name] = new Channel(name);\n\treturn channels[name];\n}", "async loadForApp(did, appName, host) {\n try {\n let response = await Axios.get(host + 'loadForApp?did=' + did + '&appName=' + appName);\n let document = response.data.data.document;\n let doc = new DIDDocument(document, document['@context']);\n\n return doc;\n } catch (err) {\n return null;\n }\n }", "function awcall(){\n\n if(localStorage.getItem(\"devicesData\") === null){ \n console.log(\"No Data Set, getting data\");\n setDeviceData();\n }\n else {\n //getLocalStorage(\"devicesData\");\n ogPicker(); //always set the og list\n console.log(\"Grabbed From Storage\");\n }//end if\n \n}", "function isregistered () // boolean\n{\n if (typeof (webphone_api.plhandler) !== 'undefined' && webphone_api.plhandler !== null)\n return webphone_api.plhandler.IsRegistered();\n else\n return false;\n}", "function makeMain(hub) {\n const registry = getMainCarrier();\n const oldHub = getHubFromCarrier(registry);\n setHubOnCarrier(registry, hub);\n return oldHub;\n}", "find(params) {\n return Promise.resolve(\n availableGateway\n );\n }", "function loadForGmail(){\n if(document.domain === \"mail.google.com\"){\n console.log(\"Its gmail!\");\n var timer = setInterval(function(){retrieveAndFilter()}, 800);\n }\n}" ]
[ "0.74008214", "0.7359838", "0.7298577", "0.7237678", "0.7214202", "0.6919984", "0.68929535", "0.6377765", "0.6257768", "0.6241848", "0.6218201", "0.61899614", "0.61769974", "0.5403008", "0.51618654", "0.5125241", "0.4954452", "0.4938715", "0.4929035", "0.49208465", "0.48853397", "0.47914445", "0.47090185", "0.47049946", "0.46759436", "0.46625122", "0.4617858", "0.4611629", "0.46017292", "0.4596502", "0.45872334", "0.45430633", "0.4523885", "0.4521632", "0.4485697", "0.44802737", "0.44801462", "0.4465834", "0.44514555", "0.44273663", "0.442511", "0.44219765", "0.4418112", "0.43831033", "0.4356815", "0.4352713", "0.43495476", "0.43483496", "0.434621", "0.4342415", "0.43381113", "0.4334399", "0.43336645", "0.4332884", "0.43314916", "0.43170848", "0.42956686", "0.42850187", "0.42781925", "0.42734757", "0.42673358", "0.42632923", "0.42617476", "0.42594662", "0.4249247", "0.42420462", "0.42389786", "0.42352083", "0.42324507", "0.4230464", "0.423022", "0.4229558", "0.42261434", "0.4225467", "0.42231807", "0.42193887", "0.42102674", "0.42088482", "0.42054862", "0.42029682", "0.41951397", "0.41929346", "0.41892233", "0.41891927", "0.41863978", "0.41847184", "0.4184351", "0.41801095", "0.4170474", "0.41690525", "0.41690525", "0.41690525", "0.41690525", "0.4165436", "0.41446367", "0.41441783", "0.41429055", "0.4136513", "0.4133889", "0.41257906" ]
0.7202113
5
This will tell whether a carrier has a hub on it or not
function hasHubOnCarrier(carrier) { return !!(carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hasHubOnCarrier(carrier) {\n\t return !!(carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub);\n\t}", "function hasHubOnCarrier(carrier) {\n if (carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub) {\n return true;\n }\n else {\n return false;\n }\n}", "function hasHubOnCarrier(carrier) {\n return !!(carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub);\n }", "function hasHubOnCarrier(carrier) {\n if (carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub) {\n return true;\n }\n return false;\n}", "function hasHubOnCarrier(carrier) {\r\n if (carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub) {\r\n return true;\r\n }\r\n return false;\r\n}", "function hasHubOnCarrier(carrier) {\n return !!(carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub);\n}", "function checkHeadsetConnected () { return !!getVRDisplay(); }", "function hub_getCurrentHub() {\n // Get main carrier (global for every environment)\n var registry = getMainCarrier();\n // If there's no hub, or its an old API, assign a new one\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\n setHubOnCarrier(registry, new hub_Hub());\n }\n // Prefer domains over global if they are there (applicable only to Node environment)\n if (Object(node[\"b\" /* isNodeEnv */])()) {\n return getHubFromActiveDomain(registry);\n }\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n}", "function isregistered () // boolean\n{\n if (typeof (webphone_api.plhandler) !== 'undefined' && webphone_api.plhandler !== null)\n return webphone_api.plhandler.IsRegistered();\n else\n return false;\n}", "isRadioing(robot) {\n return robot.signal >= 0;\n }", "isRadioing(robot) {\n return robot.signal >= 0;\n }", "function checkConnection() {\n\t if (!window.tronWeb) {\n\t $('#connection-status').html('Not Connected to Tron');\n\t return false;\n\t }\n\t if (!window.tronWeb.defaultAddress.base58) {\n\t $('#connection-status').html('Not Connected to Tron');\n\t return false;\n\t }\n\t $('#connection-status').html('Connected to Tron');\n\t return true;\n\t}", "function getCurrentHub() {\n // Get main carrier (global for every environment)\n const registry = getMainCarrier();\n\n // If there's no hub, or its an old API, assign a new one\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\n setHubOnCarrier(registry, new Hub());\n }\n\n // Prefer domains over global if they are there (applicable only to Node environment)\n if (isNodeEnv()) {\n return getHubFromActiveDomain(registry);\n }\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }", "function botIsAlone() {\r\n let currentChannel = backend.getCurrentChannel();\r\n let clients = currentChannel ? currentChannel.getClientCount() : 0;\r\n return (clients <= 1) \r\n }", "function getCurrentHub() {\n // Get main carrier (global for every environment)\n var registry = getMainCarrier();\n // If there's no hub, or its an old API, assign a new one\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\n setHubOnCarrier(registry, new Hub());\n }\n // Prefer domains over global if they are there (applicable only to Node environment)\n if (Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__[\"isNodeEnv\"])()) {\n return getHubFromActiveDomain(registry);\n }\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n}", "function DetectBlackBerry()\n{\n if (uagent.search(deviceBB) > -1)\n return true;\n else\n return false;\n}", "function getCurrentHub() {\n // Get main carrier (global for every environment)\n var registry = getMainCarrier();\n // If there's no hub, or its an old API, assign a new one\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(exports.API_VERSION)) {\n setHubOnCarrier(registry, new Hub());\n }\n // Prefer domains over global if they are there (applicable only to Node environment)\n if (utils_1.isNodeEnv()) {\n return getHubFromActiveDomain(registry);\n }\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n}", "function DetectKindle()\n {\n if (uagent.search(deviceKindle) > -1)\n return true;\n else\n return false;\n }", "function getCurrentHub() {\n\t // Get main carrier (global for every environment)\n\t const registry = getMainCarrier();\n\n\t // If there's no hub, or its an old API, assign a new one\n\t if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\n\t setHubOnCarrier(registry, new Hub());\n\t }\n\n\t // Prefer domains over global if they are there (applicable only to Node environment)\n\t if (isNodeEnv()) {\n\t return getHubFromActiveDomain(registry);\n\t }\n\t // Return hub that lives on a global object\n\t return getHubFromCarrier(registry);\n\t}", "function getCurrentHub() {\n // Get main carrier (global for every environment)\n const registry = getMainCarrier();\n\n // If there's no hub, or its an old API, assign a new one\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\n setHubOnCarrier(registry, new Hub());\n }\n\n // Prefer domains over global if they are there (applicable only to Node environment)\n if (utils.isNodeEnv()) {\n return getHubFromActiveDomain(registry);\n }\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n}", "function getCurrentHub() {\r\n // Get main carrier (global for every environment)\r\n var registry = getMainCarrier();\r\n // If there's no hub, or its an old API, assign a new one\r\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\r\n setHubOnCarrier(registry, new Hub());\r\n }\r\n // Prefer domains over global if they are there\r\n try {\r\n // We need to use `dynamicRequire` because `require` on it's own will be optimized by webpack.\r\n // We do not want this to happen, we need to try to `require` the domain node module and fail if we are in browser\r\n // for example so we do not have to shim it and use `getCurrentHub` universally.\r\n var domain = Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_1__[\"dynamicRequire\"])(module, 'domain');\r\n var activeDomain = domain.active;\r\n // If there no active domain, just return global hub\r\n if (!activeDomain) {\r\n return getHubFromCarrier(registry);\r\n }\r\n // If there's no hub on current domain, or its an old API, assign a new one\r\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\r\n var registryHubTopStack = getHubFromCarrier(registry).getStackTop();\r\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, _scope__WEBPACK_IMPORTED_MODULE_2__[\"Scope\"].clone(registryHubTopStack.scope)));\r\n }\r\n // Return hub that lives on a domain\r\n return getHubFromCarrier(activeDomain);\r\n } catch (_Oo) {\r\n // Return hub that lives on a global object\r\n return getHubFromCarrier(registry);\r\n }\r\n}", "function getCurrentHub() {\n // Get main carrier (global for every environment)\n var registry = getMainCarrier();\n // If there's no hub, or its an old API, assign a new one\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(exports.API_VERSION)) {\n setHubOnCarrier(registry, new Hub());\n }\n // Prefer domains over global if they are there\n try {\n // We need to use `dynamicRequire` because `require` on it's own will be optimized by webpack.\n // We do not want this to happen, we need to try to `require` the domain node module and fail if we are in browser\n // for example so we do not have to shim it and use `getCurrentHub` universally.\n var domain = misc_1.dynamicRequire(module, 'domain');\n var activeDomain = domain.active;\n // If there no active domain, just return global hub\n if (!activeDomain) {\n return getHubFromCarrier(registry);\n }\n // If there's no hub on current domain, or its an old API, assign a new one\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(exports.API_VERSION)) {\n var registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, scope_1.Scope.clone(registryHubTopStack.scope)));\n }\n // Return hub that lives on a domain\n return getHubFromCarrier(activeDomain);\n }\n catch (_Oo) {\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }\n}", "function DetectGarminNuvifone()\n{\n if (uagent.search(deviceNuvifone) > -1)\n return true;\n else\n return false;\n }", "function DetectBlackBerry()\n{\n if (uagent.search(deviceBB) > -1)\n return true;\n if (uagent.search(vndRIM) > -1)\n return true;\n else\n return false;\n}", "function isBluemix(){\n//\t \tvar site = getSite();\n//\t \tvar bluemix = (site === 'BLUEMIX_ATLAS' || 'BLUEMIX_CLASSIC');\n//\t \treturn bluemix;\n\t\t return true;\n\t }", "function isWX() {\n var ua = window.navigator.userAgent.toLowerCase();\n return ua.match(/MicroMessenger/i) == \"micromessenger\";\n}", "hubVerification () {\n let verifyToken = this.config.chennels.facebook.verify_token\n this.webserver.get(this.config.webhook_uri, function (req, res) {\n\n // This enables subscription to the webhooks\n if (req.query['hub.mode'] === 'subscribe' && req.query['hub.verify_token'] === verifyToken) {\n res.send(req.query['hub.challenge'])\n }\n else {\n res.send('Incorrect verify token')\n }\n })\n }", "function isincall () // boolean\n{\n if (typeof (webphone_api.plhandler) !== 'undefined' && webphone_api.plhandler !== null)\n return webphone_api.plhandler.IsInCall();\n else\n return false;\n}", "get isConnected() {\n return !!this.sender;\n }", "function isPixieStatusCompany() {\n return $(\"#user_pixie_billing_status\").val() === \"company\";\n }", "function DetectBrewDevice()\n {\n if (uagent.search(deviceBrew) > -1)\n return true;\n else\n return false;\n }", "function DetectaBlackBerry(){\n\n if (uagent.search(dispositivoBB) > -1)\n\n return true;\n\n else\n\n return false;\n\n}", "function getHubFromActiveDomain(registry) {\n try {\n var property = 'domain';\n var carrier = getMainCarrier();\n var sentry = carrier.__SENTRY__;\n // tslint:disable-next-line: strict-type-predicates\n if (!sentry || !sentry.extensions || !sentry.extensions[property]) {\n return getHubFromCarrier(registry);\n }\n var domain = sentry.extensions[property];\n var activeDomain = domain.active;\n // If there no active domain, just return global hub\n if (!activeDomain) {\n return getHubFromCarrier(registry);\n }\n // If there's no hub on current domain, or its an old API, assign a new one\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\n var registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, _scope__WEBPACK_IMPORTED_MODULE_2__[\"Scope\"].clone(registryHubTopStack.scope)));\n }\n // Return hub that lives on a domain\n return getHubFromCarrier(activeDomain);\n }\n catch (_Oo) {\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }\n}", "function isBotChannel() {\n\t\treturn ((message.channel.id === setting.salonBotId));\n\t}", "function isBotChannel() {\n\t\treturn ((message.channel.id === setting.salonBotId));\n\t}", "function DetectBlackBerryLow()\n{\n if (DetectBlackBerry())\n {\n //Assume that if it's not in the High tier, then it's Low.\n if (DetectBlackBerryHigh())\n return false;\n else\n return true;\n }\n else\n return false;\n}", "function isHTCMobile() {\n var regExp = new RegExp(\"HTC\", \"i\");\n var test = navigator.userAgent.match(regExp);\n return test;\n}", "function getHubFromActiveDomain(registry) {\n\t try {\n\t const sentry = getMainCarrier().__SENTRY__;\n\t const activeDomain = sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;\n\n\t // If there's no active domain, just return global hub\n\t if (!activeDomain) {\n\t return getHubFromCarrier(registry);\n\t }\n\n\t // If there's no hub on current domain, or it's an old API, assign a new one\n\t if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\n\t const registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n\t setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, Scope.clone(registryHubTopStack.scope)));\n\t }\n\n\t // Return hub that lives on a domain\n\t return getHubFromCarrier(activeDomain);\n\t } catch (_Oo) {\n\t // Return hub that lives on a global object\n\t return getHubFromCarrier(registry);\n\t }\n\t}", "function getHubFromActiveDomain(registry) {\n try {\n const sentry = getMainCarrier().__SENTRY__;\n const activeDomain = sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;\n\n // If there's no active domain, just return global hub\n if (!activeDomain) {\n return getHubFromCarrier(registry);\n }\n\n // If there's no hub on current domain, or it's an old API, assign a new one\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\n const registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, Scope.clone(registryHubTopStack.scope)));\n }\n\n // Return hub that lives on a domain\n return getHubFromCarrier(activeDomain);\n } catch (_Oo) {\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }\n }", "BlackBerry():boolean {\n\t\tthis.playbook = this.agent.match(/PlayBook/i) || false;\n\t\tthis.bb10 = this.agent.match(/BB10/i) || false;\n\t\treturn this.agent.match(/BlackBerry/i)||this.playbook||this.bb10 ? true : false;\n\t}", "function DetectaWindowsMobile(){\n\n if (uagent.search(dispositivoWinMob) > -1)\n\n return true;\n\n else\n\n return false;\n\n}", "isMobile() {\r\n return this.phoneNumber.match(/^0[5][102345689]\\d{7}$/) !== null;\r\n }", "function check() {\n \n var production = \"75f2d410-0a3a-44d0-8240-08637eb5d2f8\";\n //getSnapshot(snapshot);\n postDeviceDetails(\"\", production);\n //getChannels();\n}", "function checkConnection() {\n const { ethereum } = window;\n\n if (!ethereum) {\n throw new Error(\"Metamask not found\");\n }\n\n return ethereum;\n}", "isReady() {\n return __awaiter(this, void 0, void 0, function* () {\n return !!(this.gatewayInstance && this.gatewayInstance.isReady);\n });\n }", "async function isNetAvailable() {\n let res = await NetInfo.getConnectionInfo();\n if (res == 'none') {\n console.log(\"No Network\");\n return false;\n } else {\n console.log(\"Network Available\");\n return true;\n }\n}", "static get hasHost () {\n if (GlobalModel.hasOwnProperty(\"_hasHost\")===false) {\n GlobalModel._hasHost = false;\n }\n \n return GlobalModel._hasHost;\n }", "function getHubFromActiveDomain(registry) {\n var _a, _b, _c;\n try {\n var activeDomain = (_c = (_b = (_a = getMainCarrier().__SENTRY__) === null || _a === void 0 ? void 0 : _a.extensions) === null || _b === void 0 ? void 0 : _b.domain) === null || _c === void 0 ? void 0 : _c.active;\n // If there's no active domain, just return global hub\n if (!activeDomain) {\n return getHubFromCarrier(registry);\n }\n // If there's no hub on current domain, or it's an old API, assign a new one\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(exports.API_VERSION)) {\n var registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, scope_1.Scope.clone(registryHubTopStack.scope)));\n }\n // Return hub that lives on a domain\n return getHubFromCarrier(activeDomain);\n }\n catch (_Oo) {\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }\n}", "Nokia ():boolean {\n\n\t\treturn this.agent.match(/Nokia/i) ? true : false;\n\t}", "function getHubFromActiveDomain(registry) {\n try {\n const sentry = getMainCarrier().__SENTRY__;\n const activeDomain = sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;\n\n // If there's no active domain, just return global hub\n if (!activeDomain) {\n return getHubFromCarrier(registry);\n }\n\n // If there's no hub on current domain, or it's an old API, assign a new one\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\n const registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, scope.Scope.clone(registryHubTopStack.scope)));\n }\n\n // Return hub that lives on a domain\n return getHubFromCarrier(activeDomain);\n } catch (_Oo) {\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }\n}", "function getHubFromActiveDomain(registry) {\n try {\n var activeDomain = getActiveDomain();\n // If there's no active domain, just return global hub\n if (!activeDomain) {\n return getHubFromCarrier(registry);\n }\n // If there's no hub on current domain, or it's an old API, assign a new one\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\n var registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n setHubOnCarrier(activeDomain, new hub_Hub(registryHubTopStack.client, scope_Scope.clone(registryHubTopStack.scope)));\n }\n // Return hub that lives on a domain\n return getHubFromCarrier(activeDomain);\n }\n catch (_Oo) {\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }\n}", "isSmsable() {\r\n return this.isNotKosher() && this.isMobile();\r\n }", "function isPC() {\n return !isMobile();\n}", "function checkNetConnection() {\n\tvar status = window.navigator.onLine;\n\tif (status) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "is_connected() {\n return this.connected\n }", "function isConnected() {\n var networkState = navigator.network.connection.type;\n\n //console.log(\"isConnected network state: \" + networkState);\n return (networkState !== Connection.NONE) && (networkState !== Connection.UNKNOWN);\n}", "isMobileUserAgent() {\n return /Mobi/i.test(this._userAgent)\n }", "function pnAvailable() {\r\n var bAvailable = false;\r\n if (window.isSecureContext) {\r\n\t\t// running in secure context - check for available Push-API\r\n bAvailable = (('serviceWorker' in navigator) && \r\n\t\t ('PushManager' in window) && \r\n\t\t\t\t\t ('Notification' in window)); \r\n } else {\r\n console.log('site have to run in secure context!');\r\n }\r\n return bAvailable;\r\n}", "function hfgIsMobile() {\n\t\treturn HFG.isMobile();\n\t}", "function checkIfMobile() {\n if ($header_nav_btn.css('display') == 'block') {\n return true;\n } else {\n return false;\n }\n }", "async checkSync() {\n const isSync = await this.apiReq.request(\n 'GET',\n `/agents/${this.$scope.agent.id}/group/is_sync`,\n {}\n );\n return (((isSync || {}).data || {}).data || {}).synced || false;\n }", "function ac_detectRelay() {\n\tif (window.location.hostname == '127.0.0.1') {\n\t\tisRelay = true;\n\t} else {\n\t\tisRelay = false;\n\t}\n}", "function DetectSmartphone()\n{\n //First, look for iPhone and iPod Touch.\n if (DetectIphoneOrIpodOrIPad())\n return true;\n\n //Now, look for S60 Open Source Browser on S60 release 3 devices.\n if (DetectS60OssBrowser())\n return true;\n\n //Check for other Symbian devices - older S60, UIQ, other.\n if (DetectSymbianOS())\n return true;\n\n //Check for Windows Mobile devices.\n if (DetectWindowsMobile())\n return true;\n\n //Next, look for a BlackBerry\n if (DetectBlackBerry())\n return true;\n\n //PalmOS.\n if (DetectPalmOS())\n return true;\n\n //Otherwise, return false.\n return false;\n}", "function party_is_in(){\n\n\treturn this.party ? true: false;\n}", "async function pnSubscribed() {\r\n var swReg;\r\n if (pnAvailable()) {\r\n swReg = await navigator.serviceWorker.getRegistration();\r\n }\r\n return (swReg !== undefined);\r\n}", "function DetectSonyPlaystation()\n{\n if (uagent.search(devicePlaystation))\n return true;\n else\n return false;\n }", "function is_connected_wifi() {\n if (navigator.connection.type === 'wifi') {\n return true;\n } else {\n return false;\n }\n}", "function check_iconnection() {\n\n\n if (navigator.onLine) {\n\n\n } else {\n toaster(\"No Internet connection\");\n }\n}", "function check_iconnection() {\n\n\n if (navigator.onLine) {\n\n\n } else {\n toaster(\"No Internet connection\");\n }\n}", "function DetectSmartphone()\n {\n if (DetectIphoneOrIpod())\n return true;\n if (DetectS60OssBrowser())\n return true;\n if (DetectSymbianOS())\n return true;\n if (DetectWindowsMobile())\n return true;\n if (DetectAndroid())\n return true;\n if (DetectBlackBerry())\n return true;\n if (DetectPalmWebOS())\n return true;\n if (DetectPalmOS())\n return true;\n if (DetectGarminNuvifone())\n return true;\n\n //Otherwise, return false.\n return false;\n }", "_shouldUnregisterRpcClient()\n{\n if (0 != this._subscriptions.tickers.count || this._subscriptions.tickers.subscribed)\n {\n return false;\n }\n if (0 != this._subscriptions.orderBooks.count)\n {\n return false;\n }\n if (0 != this._subscriptions.trades.count)\n {\n return false;\n }\n if (0 != this._subscriptions.markets.count)\n {\n return false;\n }\n return true;\n}", "function isAcceptable() {\n\n // Local variables\n var acceptableConnection = false;\n var devConnection = $cordovaNetwork.getNetwork();\n\n // Check to determine the type of connection available\n if (window.Connection) {\n if (navigator.connection.type == Connection.WIFI) {\n acceptableConnection = true;\n $log.info('This device has a WiFi connection');\n } else if (navigator.connection.type == Connection.CELL_3G) {\n acceptableConnection = true;\n $log.info('This device has a 3G connection');\n } else if (navigator.connection.type == Connection.CELL_4G) {\n acceptableConnection = true;\n $log.info('This device has a 4G connection');\n } else if (navigator.connection.type == Connection.CELL_2G) {\n $log.info('This device has a 2G connection');\n } else if (navigator.connection.type == Connection.ETHERNET) {\n acceptableConnection = true;\n $log.info('This device has an Ethernet connection');\n } else if (navigator.connection.type == Connection.NONE) {\n $log.info('This device has no connection');\n }\n }\n return acceptableConnection;\n }", "function DetectBlackBerryHigh()\n{\n if (DetectBlackBerry())\n {\n if (DetectBlackBerryTouch() ||\n uagent.search(deviceBBBold) > -1 ||\n uagent.search(deviceBBTour) > -1 ||\n uagent.search(deviceBBCurve) > -1)\n return true;\n else\n return false;\n }\n else\n return false;\n}", "function isConnected(remote) {\n if (!remote) {\n return false;\n }\n\n var server = remote._getServer();\n if (!server) {\n return false;\n }\n\n return (Date.now() - server._lastLedgerClose <= 1000 * 20);\n}", "function checkHeadsetConnected () {\n\t var orientation;\n\t var vrDisplay = controls.getVRDisplay();\n\n\t // If `isConnected` is available, just use that.\n\t if (vrDisplay && 'isConnected' in vrDisplay) { return vrDisplay.isConnected; }\n\n\t controls.update();\n\t orientation = dolly.quaternion;\n\t if (orientation._x !== 0 || orientation._y !== 0 || orientation._z !== 0) {\n\t return true;\n\t }\n\t return false;\n\t}", "isFree() {\n return this.track === FREE;\n }", "getHubs() {\nif (this._gettingHubs) {\nreturn;\n}\nthis._gettingHubs = true;\nsetInterval(() => {\nlet hubs = this._poweredUP.getHubs();\nhubs.forEach(this._addHub.bind(this));\n}, 2000);\n}", "_checkNetwork() {\n if (\n [HARDHAT_NETWORK_ID, KOVAN_NETWORK_ID].includes(\n window.ethereum.networkVersion\n )\n ) {\n return true;\n }\n\n this.setState({\n networkError:\n \"Please connect Metamask to Localhost:8545, or Kovan Testnet\",\n });\n\n return false;\n }", "function isSmartPhone() {\n if (navigator.userAgent.match(/iPhone|Android.+Mobile/)) {\n return true;\n } else {\n return false;\n }\n}", "function checkIfHardwareIsConnected(callback) {\n if (arduino_connected) callback(true)\n else {\n atteptToConnectToFirstArduino(callback)\n }\n}", "_getIsConnectedState() {\n return this.Driver.IsConnected;\n }", "mobLookup(mob) {\r\n if (this.mobsInfo.filter(mobInfo => mobInfo.name == mob).length > 0) {\r\n return true;\r\n };\r\n }", "function registered(type) {\n return turtles[type] != null;\n }", "isPhone () {\n return !this.isTablet();\n }", "function isMobile() {\n\tvar counter = 0;\n\tif ( bowser.mobile==true ) counter++;\n\tif ( bowser.tablet==true ) counter++;\n\t\t\n\tif ( counter==0 ) {\n\t\t//alert(\"isMobile() \" + \"false\");\n\t\treturn false;\n\t} else {\n\t\t//alert(\"isMobile() \" + \"true\");\n\t\treturn true;\n\t}\n\t\n}", "function isGatewayActive() {\n // Log that connection is being tested\n console.log('Checking connection with the Gateway CLI Tool.');\n // Save Gateway status request to configuration \n zb_network_msg.zigbeeMessage.networkMgmtCmd.type = matrix_io.malos.v1.comm.ZigBeeMsg.NetworkMgmtCmd.NetworkMgmtCmdTypes.IS_PROXY_ACTIVE;\n // Send configuration to Base port\n console.log('\\n\\n\\n');\n console.log('ZB NETWORK MESSAGE!!!!!');\n console.log( util.inspect(zb_network_msg, {depth:null}) );\n console.log('\\n\\n\\n');\n configSocket.send(matrix_io.malos.v1.driver.DriverConfig.encode(zb_network_msg).finish());\n}", "function detectMob() {\n const toMatch = [\n /Android/i,\n /webOS/i,\n /iPhone/i,\n /iPad/i,\n /iPod/i,\n /BlackBerry/i,\n /Windows Phone/i,\n ];\n\n return toMatch.some((toMatchItem) => {\n return navigator.userAgent.match(toMatchItem);\n });\n}", "isstub() {\n return this.state == STUB;\n }", "function isAnyoneConnected() {\n let anyone_connected = false;\n for (let key in players) {\n if (players[key].connected) {\n anyone_connected = true;\n }\n }\n return anyone_connected;\n }", "function getIsApple() {\n if( settings.hasWURFL ) {\n var deviceName = WURFL.complete_device_name.toLowerCase();\n if( deviceName.indexOf( \"apple\" ) > -1 ) {\n return true;\n }\n }\n return false;\n }", "function isSmartphone() {\n\treturn $(window).height() > $(window).width();\n}", "function isOnline() {\r\n return window.navigator.onLine;\r\n}", "function DetectIpod()\n{\n if (uagent.search(deviceIpod) > -1)\n return true;\n else\n return false;\n}", "function DetectIpod()\n{\n if (uagent.search(deviceIpod) > -1)\n return true;\n else\n return false;\n}", "function isNetworkAvailable(){\n var networkState = navigator.connection.type;\n alert(networkState);\n if(networkState == Connection.NONE){\n return false;\n }\n return true;\n}", "isConnected () {\n // TODO(ikajaste): It's possible this acutally returns true, make sure later\n return this.connection && this.connection.connected;\n }", "function isSnapinInitiated(){\ntry{\n snapInCareObject = sendGlobalSnapinCareObjToJson();\n if (snapInCareObject && \"snapinCareChatInitiated\" in snapInCareObject && snapInCareObject.snapinCareChatInitiated)\n return true;\n else\n return false;\n\n}catch(e){\n console.log(e);\n}\n}", "function getMainCarrier() {\n var carrier = misc_1.getGlobalObject();\n carrier.__SENTRY__ = carrier.__SENTRY__ || {\n hub: undefined,\n };\n return carrier;\n}", "function isConnected() {\n return user != null;\n }" ]
[ "0.8268867", "0.82522964", "0.8229626", "0.81986004", "0.8194719", "0.8111537", "0.61041105", "0.60690176", "0.60306686", "0.5975903", "0.5975903", "0.59094", "0.58931303", "0.5885595", "0.58729684", "0.5858422", "0.5856852", "0.58539426", "0.58526766", "0.58326304", "0.58133", "0.57702047", "0.5758166", "0.57304496", "0.56508976", "0.5645632", "0.557417", "0.5485247", "0.5482775", "0.5480784", "0.54767036", "0.5461788", "0.5423565", "0.5408702", "0.5408702", "0.5399647", "0.5388676", "0.5362625", "0.53392667", "0.53223765", "0.53024083", "0.5285618", "0.5279895", "0.5276319", "0.52682525", "0.5259702", "0.52558243", "0.5247333", "0.5245004", "0.5237052", "0.5236197", "0.5228757", "0.52224064", "0.52163345", "0.5212785", "0.5209791", "0.51916087", "0.5176668", "0.5168404", "0.51673025", "0.5166091", "0.5159323", "0.51452637", "0.51446235", "0.5142593", "0.5141851", "0.513757", "0.5131559", "0.5131559", "0.5128953", "0.5125985", "0.5125802", "0.5124668", "0.5122838", "0.5110698", "0.5094305", "0.50914115", "0.5088586", "0.50858617", "0.50812936", "0.5079262", "0.50773215", "0.50703496", "0.5068867", "0.50661784", "0.5061577", "0.5060274", "0.50586295", "0.5055689", "0.50500596", "0.50394034", "0.5037306", "0.5036428", "0.5036428", "0.50337327", "0.50333446", "0.50331813", "0.50298476", "0.50280607" ]
0.8128427
6
setPrototypeOf polyfill using __proto__
function setProtoOf(obj, proto) { // @ts-ignore __proto__ does not exist on obj obj.__proto__ = proto; return obj; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setPrototypeOf (target, proto) {\n Object.setPrototypeOf(target, proto)\n }", "function protoAugment(target,src){/* eslint-disable no-proto */target.__proto__=src;/* eslint-enable no-proto */}", "function protoAugment(target, src) {\n target.__proto__ = src\n}", "function protoAugment(target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n }", "function protoAugment(target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n }", "function protoAugment(target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n }", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n }", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n }", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n }", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n }", "function protoAugment(target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment(target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment(target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment(target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment(target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment(target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}" ]
[ "0.8489821", "0.67634416", "0.6557988", "0.6540139", "0.65239906", "0.65239906", "0.6516097", "0.6516097", "0.6516097", "0.6516097", "0.65149295", "0.65149295", "0.65149295", "0.65149295", "0.65149295", "0.65149295", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046", "0.6509046" ]
0.0
-1
setPrototypeOf polyfill using mixin
function mixinProperties(obj, proto) { for (var prop in proto) { // eslint-disable-next-line no-prototype-builtins if (!obj.hasOwnProperty(prop)) { // @ts-ignore typescript complains about indexing so we remove obj[prop] = proto[prop]; } } return obj; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setPrototypeOf (target, proto) {\n Object.setPrototypeOf(target, proto)\n }", "static mixinEs5(superclass, extra) {\n let proto = extra.prototype;\n\n let props = Object.getOwnPropertyNames(proto);\n for(let i = 0; i < props.length; i++) {\n let key = props[i];\n let desc = Object.getOwnPropertyDescriptor(proto, key);\n if (key !== 'constructor' && desc.configurable) {\n if (superclass.prototype[key]) {\n // Mixin may not overwrite prototype methods.\n console.warn('Mixin overwrites ' + key);\n } else {\n Object.defineProperty(superclass.prototype, key, desc);\n }\n }\n }\n\n return superclass;\n }", "function ExtendableBuiltin(cls){\n function ExtendableBuiltin(){\n cls.apply(this, arguments);\n }\n ExtendableBuiltin.prototype = Object.create(cls.prototype);\n Object.setPrototypeOf(ExtendableBuiltin, cls);\n\n return ExtendableBuiltin;\n}", "function ExtendableBuiltin(cls){\n function ExtendableBuiltin(){\n cls.apply(this, arguments);\n }\n ExtendableBuiltin.prototype = Object.create(cls.prototype);\n Object.setPrototypeOf(ExtendableBuiltin, cls);\n\n return ExtendableBuiltin;\n}", "function protoAugment(target,src){/* eslint-disable no-proto */target.__proto__=src;/* eslint-enable no-proto */}", "function __extends(d,b){function __(){this.constructor=d}extendStatics(d,b),d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)}", "static mixInto (Constructor) {\n const target = Constructor.prototype || Constructor\n const mixin = LifeCycle.prototype\n for (let prop of Object.getOwnPropertyNames(mixin)) {\n target[prop] = mixin[prop]\n }\n }", "function m(a){var b=function(){};return b.prototype=a,new b}", "function protoAugment(target,src,keys){/* eslint-disable no-proto */target.__proto__=src;/* eslint-enable no-proto */}", "function protoAugment(target,src,keys){/* eslint-disable no-proto */target.__proto__=src;/* eslint-enable no-proto */}", "static mixInto (Constructor) {\n const target = Constructor.prototype || Constructor;\n const mixin = LifeCycle.prototype;\n for (let prop of Object.getOwnPropertyNames(mixin)) {\n target[prop] = mixin[prop];\n }\n }", "function derive(proto) {\n return fastExtend(inherit(proto), slice(arguments, 1)) }", "function register() {\n if (Object.prototype.copy !== boundCopy) {\n ocopy = Object.prototype.copy;\n Object.prototype.copy = boundCopy;\n }\n }", "function register() {\n if (Object.prototype.copy !== boundCopy) {\n ocopy = Object.prototype.copy;\n Object.prototype.copy = boundCopy;\n }\n }", "function _setCoerce(obj) {\n return _array.call(this, Array.from(obj));\n}", "static mixin(constr) {\n // instance._events = {};\n [\"on\", \"once\", \"off\", \"emit\"].forEach(name => {\n const property = Object.getOwnPropertyDescriptor(Emitter.prototype, name);\n Object.defineProperty(constr.prototype, name, property);\n });\n }", "function proxyPolyfill () {\n let lastRevokeFn = null;\n\n /**\n * @param {*} o\n * @return {boolean} whether this is probably a (non-null) Object\n */\n function isObject (o) {\n return o ? (typeof o === 'object' || typeof o === 'function') : false;\n }\n\n /**\n * @constructor\n * @param {!Object} target\n * @param {{apply, construct, get, set}} handler\n */\n const ProxyPolyfill = function (target, handler) {\n if (!isObject(target) || !isObject(handler)) {\n throw new TypeError('Cannot create proxy with a non-object as target or handler');\n }\n\n // Construct revoke function, and set lastRevokeFn so that Proxy.revocable can steal it.\n // The caller might get the wrong revoke function if a user replaces or wraps scope.Proxy\n // to call itself, but that seems unlikely especially when using the polyfill.\n let throwRevoked = function () {};\n lastRevokeFn = function () {\n throwRevoked = function (trap) {\n throw new TypeError(`Cannot perform '${trap}' on a proxy that has been revoked`);\n };\n };\n\n // Fail on unsupported traps: Chrome doesn't do this, but ensure that users of the polyfill\n // are a bit more careful. Copy the internal parts of handler to prevent user changes.\n const unsafeHandler = handler;\n handler = { get: null, set: null, apply: null, construct: null };\n for (const k in unsafeHandler) {\n if (!(k in handler)) ; else {\n handler[k] = unsafeHandler[k];\n }\n }\n if (typeof unsafeHandler === 'function') {\n // Allow handler to be a function (which has an 'apply' method). This matches what is\n // probably a bug in native versions. It treats the apply call as a trap to be configured.\n handler.apply = unsafeHandler.apply.bind(unsafeHandler);\n }\n\n // Define proxy as this, or a Function (if either it's callable, or apply is set).\n // TODO(samthor): Closure compiler doesn't know about 'construct', attempts to rename it.\n let proxy = this;\n let isMethod = false;\n let isArray = false;\n if (typeof target === 'function') {\n proxy = function ProxyPolyfill () {\n const usingNew = (this && this.constructor === proxy);\n const args = Array.prototype.slice.call(arguments);\n throwRevoked(usingNew ? 'construct' : 'apply');\n\n if (usingNew && handler.construct) {\n return handler.construct.call(this, target, args);\n } else if (!usingNew && handler.apply) {\n return handler.apply(target, this, args);\n }\n\n // since the target was a function, fallback to calling it directly.\n if (usingNew) {\n // inspired by answers to https://stackoverflow.com/q/1606797\n args.unshift(target); // pass class as first arg to constructor, although irrelevant\n // nb. cast to convince Closure compiler that this is a constructor\n const f = /** @type {!Function} */ (target.bind.apply(target, args));\n /* eslint new-cap: \"off\" */\n return new f();\n }\n return target.apply(this, args);\n };\n isMethod = true;\n } else if (target instanceof Array) {\n proxy = [];\n isArray = true;\n }\n\n // Create default getters/setters. Create different code paths as handler.get/handler.set can't\n // change after creation.\n const getter = handler.get ? function (prop) {\n throwRevoked('get');\n return handler.get(this, prop, proxy);\n } : function (prop) {\n throwRevoked('get');\n return this[prop];\n };\n const setter = handler.set ? function (prop, value) {\n throwRevoked('set');\n handler.set(this, prop, value, proxy);\n } : function (prop, value) {\n throwRevoked('set');\n this[prop] = value;\n };\n\n // Clone direct properties (i.e., not part of a prototype).\n const propertyNames = Object.getOwnPropertyNames(target);\n const propertyMap = {};\n propertyNames.forEach(function (prop) {\n if ((isMethod || isArray) && prop in proxy) {\n return; // ignore properties already here, e.g. 'bind', 'prototype' etc\n }\n const real = Object.getOwnPropertyDescriptor(target, prop);\n const desc = {\n enumerable: !!real.enumerable,\n get: getter.bind(target, prop),\n set: setter.bind(target, prop)\n };\n Object.defineProperty(proxy, prop, desc);\n propertyMap[prop] = true;\n });\n\n // Set the prototype, or clone all prototype methods (always required if a getter is provided).\n // TODO(samthor): We don't allow prototype methods to be set. It's (even more) awkward.\n // An alternative here would be to _just_ clone methods to keep behavior consistent.\n let prototypeOk = true;\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(proxy, Object.getPrototypeOf(target));\n /* eslint no-proto: \"off\" */\n } else if (proxy.__proto__) {\n proxy.__proto__ = target.__proto__;\n } else {\n prototypeOk = false;\n }\n if (handler.get || !prototypeOk) {\n for (const k in target) {\n if (propertyMap[k]) {\n continue;\n }\n Object.defineProperty(proxy, k, { get: getter.bind(target, k) });\n }\n }\n\n // The Proxy polyfill cannot handle adding new properties. Seal the target and proxy.\n Object.seal(target);\n Object.seal(proxy);\n\n return proxy; // nb. if isMethod is true, proxy != this\n };\n\n ProxyPolyfill.revocable = function (target, handler) {\n const p = new ProxyPolyfill(target, handler);\n return { proxy: p, revoke: lastRevokeFn };\n };\n\n return ProxyPolyfill;\n }", "constructor() {\n\t\tproperties.set(this, Object.setPrototypeOf({}, null));\n\t}", "function __extends(e,t){function __(){this.constructor=e}ke(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}", "function protoAugment(target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n }", "function protoAugment(target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n }", "function $__jsx_merge_interface(target, source) {\n\tfor (var k in source.prototype)\n\t\tif (source.prototype.hasOwnProperty(k))\n\t\t\ttarget.prototype[k] = source.prototype[k];\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n }", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n }", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n }", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n }", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}", "function protoAugment (target, src) {\n /* eslint-disable no-proto */\n target.__proto__ = src;\n /* eslint-enable no-proto */\n}" ]
[ "0.7480632", "0.60050184", "0.593067", "0.593067", "0.5929975", "0.5866176", "0.57591146", "0.57198894", "0.57176834", "0.57176834", "0.5714905", "0.57093805", "0.5675581", "0.5675581", "0.56480455", "0.5617525", "0.5595397", "0.5575881", "0.5573729", "0.55423886", "0.55423886", "0.55411935", "0.5534893", "0.5534893", "0.5534893", "0.5534893", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708", "0.5531708" ]
0.0
-1
Creates a new Dsn component
function Dsn(from) { if (typeof from === 'string') { this._fromString(from); } else { this._fromComponents(from); } this._validate(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function Dsn(from) {\n if (typeof from === 'string') {\n this.fromString(from);\n }\n else {\n this.fromComponents(from);\n }\n this.validate();\n }", "function Dsn(from) {\r\n if (typeof from === 'string') {\r\n this._fromString(from);\r\n } else {\r\n this._fromComponents(from);\r\n }\r\n this._validate();\r\n }", "function makeDsn(from) {\n\t const components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from);\n\t validateDsn(components);\n\t return components;\n\t}", "function makeDsn(from) {\n const components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from);\n validateDsn(components);\n return components;\n }", "function makeDsn(from) {\n const components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from);\n validateDsn(components);\n return components;\n}", "function dsnFromString(str) {\n const match = DSN_REGEX.exec(str);\n\n if (!match) {\n throw new SentryError(`Invalid Sentry Dsn: ${str}`);\n }\n\n const [protocol, publicKey, pass = '', host, port = '', lastPath] = match.slice(1);\n let path = '';\n let projectId = lastPath;\n\n const split = projectId.split('/');\n if (split.length > 1) {\n path = split.slice(0, -1).join('/');\n projectId = split.pop() ;\n }\n\n if (projectId) {\n const projectMatch = projectId.match(/^\\d+/);\n if (projectMatch) {\n projectId = projectMatch[0];\n }\n }\n\n return dsnFromComponents({ host, pass, path, projectId, port, protocol: protocol , publicKey });\n }", "function dsnFromString(str) {\n\t const match = DSN_REGEX.exec(str);\n\n\t if (!match) {\n\t throw new SentryError(`Invalid Sentry Dsn: ${str}`);\n\t }\n\n\t const [protocol, publicKey, pass = '', host, port = '', lastPath] = match.slice(1);\n\t let path = '';\n\t let projectId = lastPath;\n\n\t const split = projectId.split('/');\n\t if (split.length > 1) {\n\t path = split.slice(0, -1).join('/');\n\t projectId = split.pop() ;\n\t }\n\n\t if (projectId) {\n\t const projectMatch = projectId.match(/^\\d+/);\n\t if (projectMatch) {\n\t projectId = projectMatch[0];\n\t }\n\t }\n\n\t return dsnFromComponents({ host, pass, path, projectId, port, protocol: protocol , publicKey });\n\t}", "function dsnFromString(str) {\n const match = DSN_REGEX.exec(str);\n\n if (!match) {\n throw new error.SentryError(`Invalid Sentry Dsn: ${str}`);\n }\n\n const [protocol, publicKey, pass = '', host, port = '', lastPath] = match.slice(1);\n let path = '';\n let projectId = lastPath;\n\n const split = projectId.split('/');\n if (split.length > 1) {\n path = split.slice(0, -1).join('/');\n projectId = split.pop() ;\n }\n\n if (projectId) {\n const projectMatch = projectId.match(/^\\d+/);\n if (projectMatch) {\n projectId = projectMatch[0];\n }\n }\n\n return dsnFromComponents({ host, pass, path, projectId, port, protocol: protocol , publicKey });\n}", "function makeDsn(from) {\n const components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from);\n if (!components || !validateDsn(components)) {\n return undefined;\n }\n return components;\n}", "function dsnFromString(str) {\n const match = DSN_REGEX.exec(str);\n\n if (!match) {\n // This should be logged to the console\n // eslint-disable-next-line no-console\n console.error(`Invalid Sentry Dsn: ${str}`);\n return undefined;\n }\n\n const [protocol, publicKey, pass = '', host, port = '', lastPath] = match.slice(1);\n let path = '';\n let projectId = lastPath;\n\n const split = projectId.split('/');\n if (split.length > 1) {\n path = split.slice(0, -1).join('/');\n projectId = split.pop() ;\n }\n\n if (projectId) {\n const projectMatch = projectId.match(/^\\d+/);\n if (projectMatch) {\n projectId = projectMatch[0];\n }\n }\n\n return dsnFromComponents({ host, pass, path, projectId, port, protocol: protocol , publicKey });\n}", "function dsnToString(dsn, withPassword = false) {\n const { host, path, pass, port, projectId, protocol, publicKey } = dsn;\n return (\n `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ''}` +\n `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}`\n );\n }", "function dsnToString(dsn, withPassword = false) {\n\t const { host, path, pass, port, projectId, protocol, publicKey } = dsn;\n\t return (\n\t `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ''}` +\n\t `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}`\n\t );\n\t}", "function dsnToString(dsn, withPassword = false) {\n const { host, path, pass, port, projectId, protocol, publicKey } = dsn;\n return (\n `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ''}` +\n `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}`\n );\n}", "function dsnToString(dsn, withPassword = false) {\n const { host, path, pass, port, projectId, protocol, publicKey } = dsn;\n return (\n `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ''}` +\n `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}`\n );\n}", "function API(dsn) {\n this.dsn = dsn;\n this.dsnObject = new dsn_1.Dsn(dsn);\n }", "function API(dsn) {\n this.dsn = dsn;\n this._dsnObject = new dsn_Dsn(dsn);\n }", "function API(dsn) {\r\n this.dsn = dsn;\r\n this._dsnObject = new _dsn__WEBPACK_IMPORTED_MODULE_0__[\"Dsn\"](dsn);\r\n }", "function dashDBNode(n) {\n RED.nodes.createNode(this, n);\n this.name = n.name;\n this.hostname = n.hostname;\n this.db = n.db;\n this.port = n.port;\n\n var credentials = this.credentials;\n if ((credentials) && (credentials.hasOwnProperty(\"username\"))) { this.username = credentials.username; }\n if ((credentials) && (credentials.hasOwnProperty(\"password\"))) { this.password = credentials.password; }\n }", "function _new() {\n var request = new service.datasource();\n request.date = new Date();\n request.details = [{}];\n request.attachments = [];\n return request;\n }", "constructor(networkNodeDb) {\n this.addressBook = new AddressBook(networkNodeDb);\n this.addressBookEntry = new AddressBookEntry(networkNodeDb);\n this.addressBookServiceEndpoints = networkNodeDb.service_endpoints.map((x) => new AddressBookServiceEndpoint(x));\n this.nodeStake = new NodeStake(networkNodeDb);\n }", "function createAddressNode() {\n return jsonldUtils.createBlankNode({ '@type': TYPE.Address });\n}", "create() {}", "create() {}", "create () {}", "create () {}", "constructor(scope, id, props) {\n super(scope, id, { type: CfnDataSource.CFN_RESOURCE_TYPE_NAME, properties: props });\n try {\n jsiiDeprecationWarnings.aws_cdk_lib_aws_kendra_CfnDataSourceProps(props);\n }\n catch (error) {\n if (process.env.JSII_DEBUG !== \"1\" && error.name === \"DeprecationError\") {\n Error.captureStackTrace(error, CfnDataSource);\n }\n throw error;\n }\n cdk.requireProperty(props, 'indexId', this);\n cdk.requireProperty(props, 'name', this);\n cdk.requireProperty(props, 'type', this);\n this.attrArn = cdk.Token.asString(this.getAtt('Arn', cdk.ResolutionTypeHint.STRING));\n this.attrId = cdk.Token.asString(this.getAtt('Id', cdk.ResolutionTypeHint.STRING));\n this.indexId = props.indexId;\n this.name = props.name;\n this.type = props.type;\n this.customDocumentEnrichmentConfiguration = props.customDocumentEnrichmentConfiguration;\n this.dataSourceConfiguration = props.dataSourceConfiguration;\n this.description = props.description;\n this.roleArn = props.roleArn;\n this.schedule = props.schedule;\n this.tags = new cdk.TagManager(cdk.TagType.STANDARD, \"AWS::Kendra::DataSource\", props.tags, { tagPropertyName: 'tags' });\n }", "createInstance(type, props, internalInstanceHandle) {\n // 'internalInstanceHandle' is not transparent here. So use host context methods\n // to get data from roots\n return createElement(type, props)\n }", "createComponent(componentTid, entityUid, entityRepository) {\n const thisClass = ComponentRepository;\n const componentClass = thisClass.__componentClasses.get(componentTid);\n if (componentClass != null) {\n let component_sid_count = this.__component_sid_count_map.get(componentTid);\n if (!_misc_IsUtil__WEBPACK_IMPORTED_MODULE_1__[\"default\"].exist(component_sid_count)) {\n this.__component_sid_count_map.set(componentTid, 0);\n component_sid_count = _Component__WEBPACK_IMPORTED_MODULE_0__[\"default\"].invalidComponentSID;\n }\n this.__component_sid_count_map.set(componentTid, ++component_sid_count);\n const component = new componentClass(entityUid, component_sid_count, entityRepository);\n if (!this.__components.has(componentTid)) {\n this.__components.set(componentTid, []);\n }\n const array = this.__components.get(componentTid);\n if (array != null) {\n array[component.componentSID] = component;\n return component;\n }\n }\n return null;\n }", "constructor(scope, id, props) {\n super(scope, id, { type: CfnInstance.CFN_RESOURCE_TYPE_NAME, properties: props });\n try {\n jsiiDeprecationWarnings.aws_cdk_lib_aws_connect_CfnInstanceProps(props);\n }\n catch (error) {\n if (process.env.JSII_DEBUG !== \"1\" && error.name === \"DeprecationError\") {\n Error.captureStackTrace(error, CfnInstance);\n }\n throw error;\n }\n cdk.requireProperty(props, 'attributes', this);\n cdk.requireProperty(props, 'identityManagementType', this);\n this.attrArn = cdk.Token.asString(this.getAtt('Arn', cdk.ResolutionTypeHint.STRING));\n this.attrCreatedTime = cdk.Token.asString(this.getAtt('CreatedTime', cdk.ResolutionTypeHint.STRING));\n this.attrId = cdk.Token.asString(this.getAtt('Id', cdk.ResolutionTypeHint.STRING));\n this.attrInstanceStatus = cdk.Token.asString(this.getAtt('InstanceStatus', cdk.ResolutionTypeHint.STRING));\n this.attrServiceRole = cdk.Token.asString(this.getAtt('ServiceRole', cdk.ResolutionTypeHint.STRING));\n this.attributes = props.attributes;\n this.identityManagementType = props.identityManagementType;\n this.directoryId = props.directoryId;\n this.instanceAlias = props.instanceAlias;\n }", "createCID(){\n //Simulate adding two in64s, a > b\n const split = this.sid.split(\":\");\n const partial = Number(split[1]) + Number(split[2]) * 2;\n this.cid = addstring(\"76561197960265728\", String(partial));\n }", "create_dodag() {\n this.version = RPL_LOLLIPOP_INCREMENT(this.version);\n this.dtsn_out = RPL_LOLLIPOP_INIT;\n this.state = DAG_INITIALIZED;\n\n this.rank = RPL_INFINITE_RANK;\n this.last_advertised_rank = RPL_INFINITE_RANK;\n this.lowest_rank = RPL_INFINITE_RANK;\n this.dao_last_seqno = RPL_LOLLIPOP_INIT;\n this.dao_last_acked_seqno = RPL_LOLLIPOP_INIT;\n this.dao_last_seqno = RPL_LOLLIPOP_INIT;\n }", "createNewComponent(componentType) {\n if (!this._componentTypeOnNodeIndexCounter.has(componentType.id)) {\n this._componentTypeOnNodeIndexCounter.set(componentType.id, 0);\n }\n let componentTypeOnNodeIndex = this._componentTypeOnNodeIndexCounter.get(componentType.id) + 1;\n this._componentTypeOnNodeIndexCounter.set(componentType.id, componentTypeOnNodeIndex);\n let s = 'Creating component fork. Component type: ' + componentType.name + '. Component type on node index: ' + componentTypeOnNodeIndex + '.';\n let opts = new ForkOptions();\n opts.stdio = [\n 'pipe',\n 'pipe',\n 'pipe',\n 'ipc'\n ];\n if (this._targetComponentTypeToDebugList.indexOf(componentType) >= 0) {\n this._debugInspectorPortCounter++;\n // Recommended to not use debug/inspect args. Manually start the module to debug it.\n opts.execArgv = [\n /*'--inspect'/*,\n /*'--inspect=' + this._debugInspectorPortCounter/*,\n '--debug',\n '--debug-brk'*/\n ];\n s += 'Debug inspector port: ' + this._debugInspectorPortCounter + '.';\n }\n else {\n opts.execArgv = [];\n }\n this.getApp().getLog().info(s);\n let args = [\n componentType.name,\n String(componentTypeOnNodeIndex)\n ];\n let child = child_process.fork('./bin/main', args, opts);\n let forkObject = new ForkProcessChild_1.ForkProcessChild(this.getApp(), child, componentType, componentTypeOnNodeIndex);\n forkObject.create();\n this._componentProcessesList.push(forkObject);\n return true;\n }", "createNode() {\n this.createNode();\n }", "static createFromHexString(hexString) {\n // Throw an error if it's not a valid setup\n if (typeof hexString === 'undefined' || (hexString != null && hexString.length !== 24)) {\n throw new TypeError('Argument passed in must be a single String of 12 bytes or a string of 24 hex characters');\n }\n return new ObjectId(buffer__WEBPACK_IMPORTED_MODULE_0___default.a.Buffer.from(hexString, 'hex'));\n }", "async function createNewContract() {\n var deploy = await LANDMARK.new()\n LANDMARK_instance = LANDMARK.at(deploy.address);\n}", "create(path, attrs) {\n return this.network.run`\n ${this.model}.find_by(uuid: '${this.information.uuid}').\n ${path}.\n create!(JSON.parse('${JSON.stringify(attrs)}'))\n `\n }", "function createPool(config, index) {\n // Oracle Pool\n oracledb.createPool(config.db[index], function(err, pool) {\n if (err) {\n console.error('error in creating oracle pool.');\n console.dir(err);\n return;\n }\n \n logger.info('Pool for oracle database [' + config.db[index].name + '] created.');\n \n pool.execute = execute;\n pool.checkGetConnectionError = checkGetConnectionError;\n pool.executeSql = executeSql;\n pool.checkSqlError = checkSqlError;\n\n database_oracle.pool = pool;\n });\n \n}", "function _createInstance(instance) {\n return Object.assign({\n id: app.id('i'),\n name: 'New',\n active: true,\n pending: 0,\n original: null,\n code: '',\n dirty: false,\n connections: [],\n connection: null,\n created: new Date().getTime()\n }, instance);\n }", "function API(dsn, metadata, tunnel) {\n if (metadata === void 0) { metadata = {}; }\n this.dsn = dsn;\n this._dsnObject = new utils_1.Dsn(dsn);\n this.metadata = metadata;\n this._tunnel = tunnel;\n }", "function createInstance(param)\n{\n //<DatiFatturaHeader>\n var xbrlDatiFatturaHeader = createInstance_DatiFatturaHeader(param);\n\n var xbrlContent = '';\n if (param.blocco == \"DTE\")\n xbrlContent = createInstance_DTE(param);\n else if (param.blocco == \"DTR\")\n xbrlContent = createInstance_DTR(param);\n\n //<DatiFattura> root element\n xbrlContent = xbrlDatiFatturaHeader + xbrlContent;\n var attrsNamespaces = {};\n attrsNamespaces[\"versione\"] = \"DAT20\";\n for (var j in param.namespaces) {\n var prefix = param.namespaces[j]['prefix'];\n var namespace = param.namespaces[j]['namespace'];\n if (prefix.length > 0)\n attrsNamespaces[prefix] = namespace;\n }\n for (var j in param.schemaRefs) {\n var schema = param.schemaRefs[j];\n if (schema.length > 0) {\n if (!attrsNamespaces[\"xsi:schemaLocation\"])\n attrsNamespaces[\"xsi:schemaLocation\"] = \"\";\n else if (attrsNamespaces[\"xsi:schemaLocation\"].length>0)\n attrsNamespaces[\"xsi:schemaLocation\"] += \" \";\n attrsNamespaces[\"xsi:schemaLocation\"] = attrsNamespaces[\"xsi:schemaLocation\"] + schema;\n }\n }\n xbrlContent = xml_createElement(\"ns2:DatiFattura\", xbrlContent, attrsNamespaces);\n\n //Output\n var results = [];\n results.push(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"yes\\\"?>\");\n results.push(xbrlContent);\n return results.join ('');\n\n}", "function FakeDN (rdns) {\n this.rdns = [rdns]\n}", "createInstance(type, props, rootContainerInstance, hostContext) {\n return createInstance(type, props, rootContainerInstance, hostContext);\n }", "function create(uri) {\n return {\n uri: uri\n };\n }", "function create(uri) {\n return {\n uri: uri\n };\n }", "function create(uri) {\n return {\n uri: uri\n };\n }", "function createSnapshot(ds, sn, excl) {\n \"use strict\";\n\n function destroyExcludes(snaps, excl) {\n var toDestroy = snaps.filter(function (s) {\n var fields = s.name.split('@');\n var createdNow = fields[1] === sn;\n var inExclude = _.contains(excl, fields[0]);\n return createdNow && inExclude;\n });\n\n async.forEachSeries(toDestroy, function (snap, cb) {\n util.log('Destroy snapshot ' + snap.name + ' (excluded)');\n zfs.destroy({ name: snap.name, recursive: true }, cb);\n });\n }\n\n util.log('Create snapshot ' + ds + '@' + sn);\n zfs.snapshot({ dataset: ds, name: sn, recursive: true }, function (err) {\n if (err) {\n util.log(err);\n } else {\n zfs.list({ type: 'snapshot' }, function (err, snaps) {\n if (err) {\n util.log(err);\n } else {\n destroyExcludes(snaps, excl);\n }\n });\n }\n });\n}", "create() {\n\t}", "constructor(scope, id, props = {}) {\n super(scope, id, { type: CfnDedicatedIpPool.CFN_RESOURCE_TYPE_NAME, properties: props });\n try {\n jsiiDeprecationWarnings.aws_cdk_lib_aws_ses_CfnDedicatedIpPoolProps(props);\n }\n catch (error) {\n if (process.env.JSII_DEBUG !== \"1\" && error.name === \"DeprecationError\") {\n Error.captureStackTrace(error, CfnDedicatedIpPool);\n }\n throw error;\n }\n this.poolName = props.poolName;\n this.scalingMode = props.scalingMode;\n }", "constructor(scope, id, props) {\n super(scope, id, { type: CfnDevicePool.CFN_RESOURCE_TYPE_NAME, properties: props });\n try {\n jsiiDeprecationWarnings.aws_cdk_lib_aws_devicefarm_CfnDevicePoolProps(props);\n }\n catch (error) {\n if (process.env.JSII_DEBUG !== \"1\" && error.name === \"DeprecationError\") {\n Error.captureStackTrace(error, CfnDevicePool);\n }\n throw error;\n }\n cdk.requireProperty(props, 'name', this);\n cdk.requireProperty(props, 'projectArn', this);\n cdk.requireProperty(props, 'rules', this);\n this.attrArn = cdk.Token.asString(this.getAtt('Arn', cdk.ResolutionTypeHint.STRING));\n this.name = props.name;\n this.projectArn = props.projectArn;\n this.rules = props.rules;\n this.description = props.description;\n this.maxDevices = props.maxDevices;\n this.tags = new cdk.TagManager(cdk.TagType.STANDARD, \"AWS::DeviceFarm::DevicePool\", props.tags, { tagPropertyName: 'tags' });\n }", "function createAddress(lifetime) {\n var request = mapper_1.default.toPayload('create_address', { 'lifetime': lifetime });\n return JSON.stringify(request);\n}", "static createInstance(dnaContractAttributes) {\n return new DnaContract(dnaContractAttributes);\n }", "constructor(name, ID, location, description, capacity, start, end, type) {\n super(name, ID, location, description, capacity, start, end, type);\n this._host = null;\n }", "static from(escrowCreate, xrplNetwork) {\n var _a, _b, _c, _d, _e, _f, _g;\n // amount is a required field\n const amountCurrencyAmountProto = (_a = escrowCreate.getAmount()) === null || _a === void 0 ? void 0 : _a.getValue();\n if (!amountCurrencyAmountProto) {\n throw new __1.XrpError(__1.XrpErrorType.MalformedProtobuf, 'EscrowCreate protobuf is missing required `amount` field.');\n }\n const amount = xrp_currency_amount_1.default.from(amountCurrencyAmountProto);\n if (amount.drops == undefined) {\n throw new __1.XrpError(__1.XrpErrorType.MalformedProtobuf, 'EscrowCreate protobuf `amount` field does not represent XRP.');\n }\n const destination = (_c = (_b = escrowCreate.getDestination()) === null || _b === void 0 ? void 0 : _b.getValue()) === null || _c === void 0 ? void 0 : _c.getAddress();\n if (!destination) {\n throw new __1.XrpError(__1.XrpErrorType.MalformedProtobuf, 'EscrowCreate protobuf is missing required `destination` field.');\n }\n const destinationTag = (_d = escrowCreate.getDestinationTag()) === null || _d === void 0 ? void 0 : _d.getValue();\n const destinationXAddress = xrp_utils_1.default.encodeXAddress(destination, destinationTag, xrplNetwork == xpring_common_js_1.XrplNetwork.Test || xrplNetwork == xpring_common_js_1.XrplNetwork.Dev);\n // destinationXAddress is a required field\n if (!destinationXAddress) {\n throw new __1.XrpError(__1.XrpErrorType.MalformedProtobuf, 'Cannot construct XAddress from EscrowCreate protobuf `destination` and `destinationTag` fields.');\n }\n const cancelAfter = (_e = escrowCreate.getCancelAfter()) === null || _e === void 0 ? void 0 : _e.getValue();\n const finishAfter = (_f = escrowCreate.getFinishAfter()) === null || _f === void 0 ? void 0 : _f.getValue();\n if (cancelAfter == undefined && finishAfter == undefined) {\n throw new __1.XrpError(__1.XrpErrorType.MalformedProtobuf, 'EscrowCreate protobuf is missing at least one of the `cancelAfter` and `finishAfter` fields.');\n }\n if (cancelAfter != undefined &&\n finishAfter != undefined &&\n cancelAfter <= finishAfter) {\n throw new __1.XrpError(__1.XrpErrorType.MalformedProtobuf, 'EscrowCreate protobuf `finishAfter` field is not before `cancelAfter` field.');\n }\n const condition = (_g = escrowCreate.getCondition()) === null || _g === void 0 ? void 0 : _g.getValue_asB64();\n if (finishAfter == undefined && condition == undefined) {\n throw new __1.XrpError(__1.XrpErrorType.MalformedProtobuf, 'EscrowCreate protobuf is missing at least one of the `finishAfter` and `condition` fields.');\n }\n return new XrpEscrowCreate(amount, destinationXAddress, cancelAfter, finishAfter, condition);\n }", "function create(options) {\n return new component_Component(options);\n}", "function allocateDeviceNode() {\n let s = syscall.vatstoreGet(nextDeviceNodeIDKey);\n if (!s) {\n s = '1';\n }\n const id = BigInt(s);\n syscall.vatstoreSet(nextDeviceNodeIDKey, `${id + 1n}`);\n return `d+${id}`;\n }", "_construct() {\r\n\tLog.info('Dtag: Enter Diagnostic Component ')\r\n }", "constructor(args) {\n super();\n args = args || {}\n this.CONSTRUCTOR_ID = 0x75588b3f;\n this.SUBCLASS_OF_ID = 0x91a4346;\n\n this.address = args.address;\n this.port = args.port;\n }", "async instantiate ({ codeId, initMsg = {}, label = '' }) {\n const initTx = await this.API.instantiate(codeId, initMsg, label)\n const codeHash = await this.API.getCodeHashByContractAddr(initTx.contractAddress)\n return { ...initTx, codeId, label, codeHash }\n }", "create(dn, entry, callback) {\n this.ldapClient.add(dn, entry, callback);\n }", "function CreateIdentityPoolCommand(input) {\n var _this = \n // Start section: command_constructor\n _super.call(this) || this;\n _this.input = input;\n return _this;\n // End section: command_constructor\n }", "function CreateIdentityPoolCommand(input) {\n var _this = \n // Start section: command_constructor\n _super.call(this) || this;\n _this.input = input;\n return _this;\n // End section: command_constructor\n }", "create (props) {\n const { clone, dynamic } = props || {}\n Schema.prototype.create.call(this, props)\n setKeyAndName(this, clone, dynamic)\n }", "function createInstance() {\n var postgresDatabase = new Object(\"Database instance initialized!\");\n return postgresDatabase;\n }", "function create(library, node) {\n return Tools.instance({\n text: node.text,\n domNode: null\n }, {\n renderToString,\n renderToDom,\n mount,\n update,\n unmount\n });\n}", "function createAddress(street, city, zipCode) {\n return {\n street,\n city,\n zipCode\n };\n}", "function Nuid () {\n this.buf = Buffer.alloc(totalLen)\n this.init()\n}", "create() {\n const source = internal(this).source;\n const target = internal(this).target;\n // Make sure source and target both exist.\n source.create();\n target.create();\n // Add connection to the model.\n const model = internal(source).model;\n internal(model).connections.add(this);\n }", "function create(name, kind, range, uri, containerName) {\n var result = {\n name: name,\n kind: kind,\n location: {\n uri: uri,\n range: range\n }\n };\n\n if (containerName) {\n result.containerName = containerName;\n }\n\n return result;\n }", "function create(name, kind, range, uri, containerName) {\n var result = {\n name: name,\n kind: kind,\n location: {\n uri: uri,\n range: range\n }\n };\n\n if (containerName) {\n result.containerName = containerName;\n }\n\n return result;\n }", "function create(name, kind, range, uri, containerName) {\n var result = {\n name: name,\n kind: kind,\n location: {\n uri: uri,\n range: range\n }\n };\n\n if (containerName) {\n result.containerName = containerName;\n }\n\n return result;\n }", "static fromConfig(config) {\n var descriptor = pip_services_commons_node_1.Descriptor.fromString(config.getAsNullableString(\"descriptor\"));\n var type = pip_services_commons_node_2.TypeDescriptor.fromString(config.getAsNullableString(\"type\"));\n if (descriptor == null && type == null)\n throw new pip_services_commons_node_3.ConfigException(null, \"BAD_CONFIG\", \"Component configuration must have descriptor or type\");\n return new ComponentConfig(descriptor, type, config);\n }", "constructor(address, name) {\n this.address = address;\n this.name = name;\n }", "function createAddress(street, city, zipCode) {\n return {\n street,\n city,\n zipCode\n };\n}", "function create(name, kind, range, uri, containerName) {\r\n var result = {\r\n name: name,\r\n kind: kind,\r\n location: { uri: uri, range: range }\r\n };\r\n if (containerName) {\r\n result.containerName = containerName;\r\n }\r\n return result;\r\n }", "function create(name, kind, range, uri, containerName) {\r\n var result = {\r\n name: name,\r\n kind: kind,\r\n location: { uri: uri, range: range }\r\n };\r\n if (containerName) {\r\n result.containerName = containerName;\r\n }\r\n return result;\r\n }", "function CreateDhcpOptionsCommand(input) {\n var _this = \n // Start section: command_constructor\n _super.call(this) || this;\n _this.input = input;\n return _this;\n // End section: command_constructor\n }", "function create(name, kind, range, uri, containerName) {\r\n var result = {\r\n name: name,\r\n kind: kind,\r\n location: { uri: uri, range: range }\r\n };\r\n if (containerName) {\r\n result.containerName = containerName;\r\n }\r\n return result;\r\n }", "function create(name, kind, range, uri, containerName) {\r\n var result = {\r\n name: name,\r\n kind: kind,\r\n location: { uri: uri, range: range }\r\n };\r\n if (containerName) {\r\n result.containerName = containerName;\r\n }\r\n return result;\r\n }", "function create(name, kind, range, uri, containerName) {\r\n var result = {\r\n name: name,\r\n kind: kind,\r\n location: { uri: uri, range: range }\r\n };\r\n if (containerName) {\r\n result.containerName = containerName;\r\n }\r\n return result;\r\n }", "function create(name, kind, range, uri, containerName) {\r\n var result = {\r\n name: name,\r\n kind: kind,\r\n location: { uri: uri, range: range }\r\n };\r\n if (containerName) {\r\n result.containerName = containerName;\r\n }\r\n return result;\r\n }", "function create(name, kind, range, uri, containerName) {\n var result = {\n name: name,\n kind: kind,\n location: { uri: uri, range: range }\n };\n if (containerName) {\n result.containerName = containerName;\n }\n return result;\n }", "create() {\n // add data to Component from dataObject\n this.initData()\n // add data to Component from computedObject\n this.initComputed()\n // add method before created\n this.initMethod()\n\n this.created()\n }", "function buildCreate2Address(creatorAddress, saltHex, byteCode) {\n return `0x${web3.utils.sha3(`0x${[\n 'ff',\n creatorAddress,\n saltHex,\n web3.utils.sha3(byteCode)\n ].map(x => x.replace(/0x/, ''))\n .join('')}`).slice(-40)}`.toLowerCase()\n}", "function create(uri) {\n return { uri: uri };\n }", "constructor(config) {\n this.config = config;\n this.name = config.isSingle ? `${config.name}.${nanoid()}` : config.name;\n this.connection = null;\n this.channel = null;\n this.options = config.isSingle ? {exclusive: true, autoDelete: true} : {};\n this.logger = config.logger;\n }", "function Oracle(properties) {\n this.username = properties.username || \"maintain\";\n this.password = properties.password || \"my5tery\";\n this.server = properties.server || \"localhost:5050\";\n this.version = properties.version || \"19c\";\n}", "constructor(name, address) {\n this.name = name;\n this.address = address;\n }", "create_node(id) {\n let new_node = {\n id : id,\n parent_node : undefined,\n child_list : [],\n type : \"Node\",\n };\n return new_node;\n }", "function createConnection (protocol,net, number , remoteAddr) {\r\n\tvar ipAddress = \"10.100.\" + net + \".\" + number;\r\n\t\r\n\tvar InetSocketAddress = Java.type('java.net.InetSocketAddress');\r\n\tvar localSockAddr = new InetSocketAddress( Java.type('java.net.InetAddress').getByName(ipAddress) , protocol.port );\r\n\tvar remoteSockAddr = new InetSocketAddress( Java.type('java.net.InetAddress').getByName(remoteAddr) , protocol.port );\r\n\t\r\n\tprint(\"Connecting to \" + remoteSockAddr + \" from \"+ localSockAddr);\r\n\tvar AssociationWrapper = Java.type('airspan.lte_ipg.AssociationWrapper');\r\n\t\r\n\treturn new AssociationWrapper(ipAddress , protocol , remoteSockAddr , localSockAddr, 3,3,ConnectionEventHandler);\r\n}", "constructor({secretKey, publicKey, chainCode, hdNodeString}) {\n if (hdNodeString) {\n this.secretKey = Buffer.from(hdNodeString.substr(0, 128), 'hex')\n this.publicKey = Buffer.from(hdNodeString.substr(128, 64), 'hex')\n this.chainCode = Buffer.from(hdNodeString.substr(192, 64), 'hex')\n } else {\n this.secretKey = secretKey\n this.publicKey = publicKey\n this.chainCode = chainCode\n }\n this.extendedPublicKey = Buffer.concat([this.publicKey, this.chainCode], 64)\n }", "async create(attrs){\n\n attrs.id = this.randomId();\n\n // salt + hashing password\n const salt = crypto.randomBytes(8).toString('hex');\n const buf = await scrypt(attrs.password, salt, 64);\n\n\n const records = await this.getAll();\n const record = {\n ...attrs,\n password:`${buf.toString('hex')}.${salt}`\n }\n records.push(record);\n\n await this.writeAll(records);\n\n return record;\n\n }", "constructor (options = {}, idField) {\n // TODO: add assertions\n options = Object.assign({\n autoload: true\n }, options)\n if (options.filename) {\n options.filename = path.resolve(path.join(__dirname, '..', '..', '..', `${options.filename}-${options.name}.nedb`))\n }\n super({ name: options.name })\n this._db = new Nedb(options)\n this.idField = idField\n }", "function createNode(n){\n this.val = n;\n}", "function create(uri) {\r\n return { uri: uri };\r\n }", "function create(uri) {\r\n return { uri: uri };\r\n }", "function create(uri) {\r\n return { uri: uri };\r\n }", "function create(uri) {\r\n return { uri: uri };\r\n }" ]
[ "0.6758191", "0.6643711", "0.643302", "0.63854474", "0.629212", "0.6085284", "0.60542715", "0.6041203", "0.59722", "0.5910879", "0.5284657", "0.5239071", "0.5231323", "0.5231323", "0.52269995", "0.5089904", "0.4980365", "0.4978365", "0.49351105", "0.49004158", "0.47064644", "0.46923545", "0.46923545", "0.46744388", "0.46744388", "0.46733513", "0.46616155", "0.46491373", "0.46246853", "0.46206442", "0.46156982", "0.4606172", "0.45800537", "0.45756716", "0.4560492", "0.4529662", "0.45263094", "0.45216954", "0.4511132", "0.45060715", "0.44999695", "0.4498738", "0.44972056", "0.44972056", "0.44972056", "0.4497014", "0.4493072", "0.4491369", "0.44898215", "0.4488887", "0.44878337", "0.4477719", "0.44676262", "0.4464914", "0.44575796", "0.44550785", "0.44505614", "0.44503117", "0.44491124", "0.44393694", "0.44393694", "0.44300306", "0.44285834", "0.44262677", "0.44229478", "0.43979815", "0.43942392", "0.43933862", "0.43933862", "0.43933862", "0.43887222", "0.43855536", "0.43836966", "0.43809795", "0.43809795", "0.43809694", "0.43753234", "0.43753234", "0.43753234", "0.43753234", "0.43726605", "0.43719923", "0.43719628", "0.43714482", "0.43710694", "0.4369547", "0.43672627", "0.4349756", "0.4346785", "0.43455145", "0.43432814", "0.43421963", "0.43406639", "0.43393508", "0.43393508", "0.43393508", "0.43393508" ]
0.66448975
4
Gets integration to install
function getIntegrationsToSetup(options) { var defaultIntegrations = (options.defaultIntegrations && Object(tslib_es6["e" /* __spread */])(options.defaultIntegrations)) || []; var userIntegrations = options.integrations; var integrations = []; if (Array.isArray(userIntegrations)) { var userIntegrationsNames_1 = userIntegrations.map(function (i) { return i.name; }); var pickedIntegrationsNames_1 = []; // Leave only unique default integrations, that were not overridden with provided user integrations defaultIntegrations.forEach(function (defaultIntegration) { if (userIntegrationsNames_1.indexOf(defaultIntegration.name) === -1 && pickedIntegrationsNames_1.indexOf(defaultIntegration.name) === -1) { integrations.push(defaultIntegration); pickedIntegrationsNames_1.push(defaultIntegration.name); } }); // Don't add same user integration twice userIntegrations.forEach(function (userIntegration) { if (pickedIntegrationsNames_1.indexOf(userIntegration.name) === -1) { integrations.push(userIntegration); pickedIntegrationsNames_1.push(userIntegration.name); } }); } else if (typeof userIntegrations === 'function') { integrations = userIntegrations(defaultIntegrations); integrations = Array.isArray(integrations) ? integrations : [integrations]; } else { integrations = Object(tslib_es6["e" /* __spread */])(defaultIntegrations); } // Make sure that if present, `Debug` integration will always run last var integrationsNames = integrations.map(function (i) { return i.name; }); var alwaysLastToRun = 'Debug'; if (integrationsNames.indexOf(alwaysLastToRun) !== -1) { integrations.push.apply(integrations, Object(tslib_es6["e" /* __spread */])(integrations.splice(integrationsNames.indexOf(alwaysLastToRun), 1))); } return integrations; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getIntegrationsToSetup(options) {\n var defaultIntegrations = (options.defaultIntegrations && tslib__WEBPACK_IMPORTED_MODULE_0__[\"__spread\"](options.defaultIntegrations)) || [];\n var userIntegrations = options.integrations;\n var integrations = [];\n if (Array.isArray(userIntegrations)) {\n var userIntegrationsNames_1 = userIntegrations.map(function (i) { return i.name; });\n var pickedIntegrationsNames_1 = [];\n // Leave only unique default integrations, that were not overridden with provided user integrations\n defaultIntegrations.forEach(function (defaultIntegration) {\n if (userIntegrationsNames_1.indexOf(defaultIntegration.name) === -1 &&\n pickedIntegrationsNames_1.indexOf(defaultIntegration.name) === -1) {\n integrations.push(defaultIntegration);\n pickedIntegrationsNames_1.push(defaultIntegration.name);\n }\n });\n // Don't add same user integration twice\n userIntegrations.forEach(function (userIntegration) {\n if (pickedIntegrationsNames_1.indexOf(userIntegration.name) === -1) {\n integrations.push(userIntegration);\n pickedIntegrationsNames_1.push(userIntegration.name);\n }\n });\n }\n else if (typeof userIntegrations === 'function') {\n integrations = userIntegrations(defaultIntegrations);\n integrations = Array.isArray(integrations) ? integrations : [integrations];\n }\n else {\n integrations = tslib__WEBPACK_IMPORTED_MODULE_0__[\"__spread\"](defaultIntegrations);\n }\n // Make sure that if present, `Debug` integration will always run last\n var integrationsNames = integrations.map(function (i) { return i.name; });\n var alwaysLastToRun = 'Debug';\n if (integrationsNames.indexOf(alwaysLastToRun) !== -1) {\n integrations.push.apply(integrations, tslib__WEBPACK_IMPORTED_MODULE_0__[\"__spread\"](integrations.splice(integrationsNames.indexOf(alwaysLastToRun), 1)));\n }\n return integrations;\n}", "getIntegrationById(integrationId) {\n return this._integrations[integrationId];\n }", "getIntegrationById(integrationId) {\n\t return this._integrations[integrationId];\n\t }", "setupIntegrations() {\n if (this._isEnabled() && !this._integrationsInitialized) {\n this._integrations = integration.setupIntegrations(this._options.integrations);\n this._integrationsInitialized = true;\n }\n }", "getIntegrationById(integrationId) {\n return this._integrations[integrationId];\n }", "function getIntegrationsToSetup(options) {\r\n var defaultIntegrations = options.defaultIntegrations && Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__spread\"])(options.defaultIntegrations) || [];\r\n var userIntegrations = options.integrations;\r\n var integrations = [];\r\n if (Array.isArray(userIntegrations)) {\r\n var userIntegrationsNames_1 = userIntegrations.map(function (i) {\r\n return i.name;\r\n });\r\n var pickedIntegrationsNames_1 = [];\r\n // Leave only unique default integrations, that were not overridden with provided user integrations\r\n defaultIntegrations.forEach(function (defaultIntegration) {\r\n if (userIntegrationsNames_1.indexOf(defaultIntegration.name) === -1 && pickedIntegrationsNames_1.indexOf(defaultIntegration.name) === -1) {\r\n integrations.push(defaultIntegration);\r\n pickedIntegrationsNames_1.push(defaultIntegration.name);\r\n }\r\n });\r\n // Don't add same user integration twice\r\n userIntegrations.forEach(function (userIntegration) {\r\n if (pickedIntegrationsNames_1.indexOf(userIntegration.name) === -1) {\r\n integrations.push(userIntegration);\r\n pickedIntegrationsNames_1.push(userIntegration.name);\r\n }\r\n });\r\n } else if (typeof userIntegrations === 'function') {\r\n integrations = userIntegrations(defaultIntegrations);\r\n integrations = Array.isArray(integrations) ? integrations : [integrations];\r\n } else {\r\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__spread\"])(defaultIntegrations);\r\n }\r\n return integrations;\r\n}", "install() {\n\n }", "function setupIntegrations(integrations) {\n\t const integrationIndex = {};\n\n\t integrations.forEach(integration => {\n\t integrationIndex[integration.name] = integration;\n\n\t if (installedIntegrations.indexOf(integration.name) === -1) {\n\t integration.setupOnce(addGlobalEventProcessor, getCurrentHub);\n\t installedIntegrations.push(integration.name);\n\t (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`Integration installed: ${integration.name}`);\n\t }\n\t });\n\n\t return integrationIndex;\n\t}", "function setupIntegrations(integrations) {\n const integrationIndex = {};\n\n integrations.forEach(integration => {\n integrationIndex[integration.name] = integration;\n\n if (installedIntegrations.indexOf(integration.name) === -1) {\n integration.setupOnce(scope.addGlobalEventProcessor, hub.getCurrentHub);\n installedIntegrations.push(integration.name);\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && utils.logger.log(`Integration installed: ${integration.name}`);\n }\n });\n\n return integrationIndex;\n}", "function install() {}", "function install() {}", "function install() {}", "function install() {}", "function getIntegrationsToSetup(options) {\n var defaultIntegrations = (options.defaultIntegrations && tslib_1.__spread(options.defaultIntegrations)) || [];\n var userIntegrations = options.integrations;\n var integrations = tslib_1.__spread(filterDuplicates(defaultIntegrations));\n if (Array.isArray(userIntegrations)) {\n // Filter out integrations that are also included in user options\n integrations = tslib_1.__spread(integrations.filter(function (integrations) {\n return userIntegrations.every(function (userIntegration) { return userIntegration.name !== integrations.name; });\n }), filterDuplicates(userIntegrations));\n }\n else if (typeof userIntegrations === 'function') {\n integrations = userIntegrations(integrations);\n integrations = Array.isArray(integrations) ? integrations : [integrations];\n }\n // Make sure that if present, `Debug` integration will always run last\n var integrationsNames = integrations.map(function (i) { return i.name; });\n var alwaysLastToRun = 'Debug';\n if (integrationsNames.indexOf(alwaysLastToRun) !== -1) {\n integrations.push.apply(integrations, tslib_1.__spread(integrations.splice(integrationsNames.indexOf(alwaysLastToRun), 1)));\n }\n return integrations;\n}", "function install() {\n}", "function setupIntegration(integration, integrationIndex) {\n integrationIndex[integration.name] = integration;\n\n if (installedIntegrations.indexOf(integration.name) === -1) {\n integration.setupOnce(addGlobalEventProcessor, getCurrentHub);\n installedIntegrations.push(integration.name);\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`Integration installed: ${integration.name}`);\n }\n }", "getPluginLicenseInfo() {\n return axios.get(Craft.getActionUrl('app/get-plugin-license-info'))\n }", "get invoking() {\n return this.installer.invoking;\n }", "install() {\r\n return this.clone(App, \"Install\").postCore();\r\n }", "setupIntegrations() {\n if (this._isEnabled() && !this._integrationsInitialized) {\n this._integrations = setupIntegrations(this._options.integrations);\n this._integrationsInitialized = true;\n }\n }", "setupIntegrations() {\n\t if (this._isEnabled() && !this._integrationsInitialized) {\n\t this._integrations = setupIntegrations(this._options.integrations);\n\t this._integrationsInitialized = true;\n\t }\n\t }", "function install_plugin(){\n if ( ! $('.et_plugin-nonce').length ) {\n return;\n }\n var data = {\n action : 'envato_setup_plugins',\n slug : 'et-core-plugin',\n wpnonce : $(document).find( '.et_plugin-nonce' ).attr( 'data-plugin-nonce' ),\n },\n current_item_hash = '',\n installing = $('.et_installing-base-plugin'),\n installed = $('.et_installed-base-plugin');\n\n $.ajax({\n method: \"POST\",\n url: ajaxurl,\n data: data,\n success: function(response){\n if ( response.hash != current_item_hash ) {\n $.ajax({\n method: \"POST\",\n url: response.url,\n data :response,\n success: function(response){\n installing.addClass('et_installed hidden');\n installed.removeClass('hidden');\n $('.mtips').removeClass( 'inactive' );\n $('.mt-mes').remove();\n },\n error : function(){\n installing.addClass('et_error');\n }, \n complete : function(){\n }\n });\n } else {\n installing.addClass('et_error');\n }\n },\n error: function(response){\n installing.addClass('et_error');\n },\n complete: function(response){\n }\n });\n }", "function getIntegrationsToSetup(options) {\n const defaultIntegrations = options.defaultIntegrations || [];\n const userIntegrations = options.integrations;\n\n // We flag default instances, so that later we can tell them apart from any user-created instances of the same class\n defaultIntegrations.forEach(integration => {\n integration.isDefaultInstance = true;\n });\n\n let integrations;\n\n if (Array.isArray(userIntegrations)) {\n integrations = [...defaultIntegrations, ...userIntegrations];\n } else if (typeof userIntegrations === 'function') {\n integrations = arrayify(userIntegrations(defaultIntegrations));\n } else {\n integrations = defaultIntegrations;\n }\n\n const finalIntegrations = filterDuplicates(integrations);\n\n // The `Debug` integration prints copies of the `event` and `hint` which will be passed to `beforeSend` or\n // `beforeSendTransaction`. It therefore has to run after all other integrations, so that the changes of all event\n // processors will be reflected in the printed values. For lack of a more elegant way to guarantee that, we therefore\n // locate it and, assuming it exists, pop it out of its current spot and shove it onto the end of the array.\n const debugIndex = finalIntegrations.findIndex(integration => integration.name === 'Debug');\n if (debugIndex !== -1) {\n const [debugInstance] = finalIntegrations.splice(debugIndex, 1);\n finalIntegrations.push(debugInstance);\n }\n\n return finalIntegrations;\n }", "function setupIntegrations(options) {\r\n var integrations = {};\r\n getIntegrationsToSetup(options).forEach(function (integration) {\r\n integrations[integration.name] = integration;\r\n setupIntegration(integration);\r\n });\r\n return integrations;\r\n}", "function getIntegrationsToSetup(options) {\n const defaultIntegrations = options.defaultIntegrations || [];\n const userIntegrations = options.integrations;\n\n // We flag default instances, so that later we can tell them apart from any user-created instances of the same class\n defaultIntegrations.forEach(integration => {\n integration.isDefaultInstance = true;\n });\n\n let integrations;\n\n if (Array.isArray(userIntegrations)) {\n integrations = [...defaultIntegrations, ...userIntegrations];\n } else if (typeof userIntegrations === 'function') {\n integrations = utils.arrayify(userIntegrations(defaultIntegrations));\n } else {\n integrations = defaultIntegrations;\n }\n\n const finalIntegrations = filterDuplicates(integrations);\n\n // The `Debug` integration prints copies of the `event` and `hint` which will be passed to `beforeSend` or\n // `beforeSendTransaction`. It therefore has to run after all other integrations, so that the changes of all event\n // processors will be reflected in the printed values. For lack of a more elegant way to guarantee that, we therefore\n // locate it and, assuming it exists, pop it out of its current spot and shove it onto the end of the array.\n const debugIndex = finalIntegrations.findIndex(integration => integration.name === 'Debug');\n if (debugIndex !== -1) {\n const [debugInstance] = finalIntegrations.splice(debugIndex, 1);\n finalIntegrations.push(debugInstance);\n }\n\n return finalIntegrations;\n}", "function getIntegrationsToSetup(options) {\n var e_1, _a, e_2, _b;\n var defaultIntegrations = (options.defaultIntegrations && tslib_1.__spread(options.defaultIntegrations)) || [];\n var userIntegrations = options.integrations;\n var integrations = [];\n if (Array.isArray(userIntegrations)) {\n var userIntegrationsNames = userIntegrations.map(function (i) { return i.name; });\n var pickedIntegrationsNames = [];\n try {\n // Leave only unique default integrations, that were not overridden with provided user integrations\n for (var defaultIntegrations_1 = tslib_1.__values(defaultIntegrations), defaultIntegrations_1_1 = defaultIntegrations_1.next(); !defaultIntegrations_1_1.done; defaultIntegrations_1_1 = defaultIntegrations_1.next()) {\n var defaultIntegration = defaultIntegrations_1_1.value;\n if (userIntegrationsNames.indexOf(getIntegrationName(defaultIntegration)) === -1 &&\n pickedIntegrationsNames.indexOf(getIntegrationName(defaultIntegration)) === -1) {\n integrations.push(defaultIntegration);\n pickedIntegrationsNames.push(getIntegrationName(defaultIntegration));\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (defaultIntegrations_1_1 && !defaultIntegrations_1_1.done && (_a = defaultIntegrations_1.return)) _a.call(defaultIntegrations_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n try {\n // Don't add same user integration twice\n for (var userIntegrations_1 = tslib_1.__values(userIntegrations), userIntegrations_1_1 = userIntegrations_1.next(); !userIntegrations_1_1.done; userIntegrations_1_1 = userIntegrations_1.next()) {\n var userIntegration = userIntegrations_1_1.value;\n if (pickedIntegrationsNames.indexOf(getIntegrationName(userIntegration)) === -1) {\n integrations.push(userIntegration);\n pickedIntegrationsNames.push(getIntegrationName(userIntegration));\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (userIntegrations_1_1 && !userIntegrations_1_1.done && (_b = userIntegrations_1.return)) _b.call(userIntegrations_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n }\n else if (typeof userIntegrations === 'function') {\n integrations = userIntegrations(defaultIntegrations);\n integrations = Array.isArray(integrations) ? integrations : [integrations];\n }\n else {\n return tslib_1.__spread(defaultIntegrations);\n }\n return integrations;\n}", "get InviteStore() {return WebpackModules.getByProps(\"getInvites\");}", "function setupIntegrations(options) {\n var integrations = {};\n getIntegrationsToSetup(options).forEach(function (integration) {\n integrations[getIntegrationName(integration)] = integration;\n setupIntegration(integration, options);\n });\n return integrations;\n}", "async formConnect(root, args) {\n const brand = await Brands.findOne({ code: args.brandCode });\n const form = await Forms.findOne({ code: args.formCode });\n\n if (!brand || !form) {\n throw new Error('Invalid configuration');\n }\n\n // find integration by brandId & formId\n const integ = await Integrations.findOne({\n brandId: brand._id,\n formId: form._id,\n });\n\n if (!integ) {\n throw new Error('Integration not found');\n }\n\n if (integ.formLoadType === 'embedded') {\n await Forms.increaseViewCount(form._id);\n }\n\n // return integration details\n return {\n integrationId: integ._id,\n integrationName: integ.name,\n languageCode: integ.languageCode,\n formId: integ.formId,\n formData: {\n ...integ.formData,\n title: form.title,\n description: form.description,\n buttonText: form.buttonText,\n themeColor: form.themeColor,\n callout: form.callout,\n },\n };\n }", "function setupIntegrations(options) {\n var integrations = {};\n getIntegrationsToSetup(options).forEach(function (integration) {\n integrations[integration.name] = integration;\n setupIntegration(integration);\n });\n return integrations;\n}", "function setupIntegrations(options) {\n var integrations = {};\n getIntegrationsToSetup(options).forEach(function (integration) {\n integrations[integration.name] = integration;\n setupIntegration(integration);\n });\n return integrations;\n}", "function getIntegrationsToSetup(options) {\n\t const defaultIntegrations = options.defaultIntegrations || [];\n\t const userIntegrations = options.integrations;\n\n\t // We flag default instances, so that later we can tell them apart from any user-created instances of the same class\n\t defaultIntegrations.forEach(integration => {\n\t integration.isDefaultInstance = true;\n\t });\n\n\t let integrations;\n\n\t if (Array.isArray(userIntegrations)) {\n\t integrations = [...defaultIntegrations, ...userIntegrations];\n\t } else if (typeof userIntegrations === 'function') {\n\t integrations = arrayify(userIntegrations(defaultIntegrations));\n\t } else {\n\t integrations = defaultIntegrations;\n\t }\n\n\t const finalIntegrations = filterDuplicates(integrations);\n\n\t // The `Debug` integration prints copies of the `event` and `hint` which will be passed to `beforeSend` or\n\t // `beforeSendTransaction`. It therefore has to run after all other integrations, so that the changes of all event\n\t // processors will be reflected in the printed values. For lack of a more elegant way to guarantee that, we therefore\n\t // locate it and, assuming it exists, pop it out of its current spot and shove it onto the end of the array.\n\t const debugIndex = finalIntegrations.findIndex(integration => integration.name === 'Debug');\n\t if (debugIndex !== -1) {\n\t const [debugInstance] = finalIntegrations.splice(debugIndex, 1);\n\t finalIntegrations.push(debugInstance);\n\t }\n\n\t return finalIntegrations;\n\t}", "getOrganizationsEmbeddedintegration() { \n\n\t\treturn this.apiClient.callApi(\n\t\t\t'/api/v2/organizations/embeddedintegration', \n\t\t\t'GET', \n\t\t\t{ },\n\t\t\t{ },\n\t\t\t{ },\n\t\t\t{ },\n\t\t\tnull, \n\t\t\t['PureCloud OAuth'], \n\t\t\t['application/json'],\n\t\t\t['application/json']\n\t\t);\n\t}", "get installCommand() {\n return this.renderInstallCommand(true);\n }", "install() {\n installed = true;\n }", "function getSteps() {\n return ['Marketplace Integration', 'Shipping Profile', 'Product Import','Product Sync','Import Customers'];\n }", "get product() {\n return this._launcher.product;\n }", "get product() {\n return this._launcher.product;\n }", "getInstallationSourceCode(installationP) {\n return E.resolve(installationP).then(installation =>\n installationSources.get(installation),\n );\n }", "function getUserSubscription() {\n //wait for service worker installation to be ready, and then\n return registerServiceWorker().then(async function(){\n let deferredPrompt;\n const addBtn = document.querySelector('.add-button');\n const addD = document.querySelector('.install-dialog')\n const cancel = document.querySelector('.cancel')\n\n addBtn.style.display = 'none';\n \n window.addEventListener('beforeinstallprompt', (e) => {\n // Prevent Chrome 67 and earlier from automatically showing the prompt\n e.preventDefault();\n // Stash the event so it can be triggered later.\n deferredPrompt = e;\n // Update UI to notify the user they can add to home screen\n addBtn.style.display = 'block';\n addD.style.display = 'block';\n cancel.addEventListener('click',(e)=>{\n e.preventDefault();\n addD.style.display = 'none';\n })\n addBtn.addEventListener('click', (e) => {\n // hide our user interface that shows our A2HS button\n addBtn.style.display = 'none';\n // Show the prompt\n deferredPrompt.prompt();\n // Wait for the user to respond to the prompt\n deferredPrompt.userChoice.then((choiceResult) => {\n if (choiceResult.outcome === 'accepted') {\n console.log('User accepted the A2HS prompt');\n } else {\n console.log('User dismissed the A2HS prompt');\n }\n deferredPrompt = null;\n });\n });\n });\n return await navigator.serviceWorker.ready.then(function(serviceWorker) {\n return serviceWorker.pushManager.getSubscription();\n })\n .then(function(pushSubscription) {\n localStorage.setItem(\"subs\", JSON.stringify(pushSubscription))\n return pushSubscription;\n });\n })\n \n }", "function getInstalledPlugins(){\n return getCacheData('/xapi/plugins');\n }", "getSingleTenantShippingIntegration(tenantId) {\n return this.request.get(`/${tenantId}`);\n }", "function getIntegrationName(integration) {\n /**\n * @depracted\n */\n // tslint:disable-next-line:no-unsafe-any\n return integration.constructor.id || integration.name;\n}", "function getSetup_i18n() {\n return request([{\n \"name\": \"setup_i18n\",\n \"src\": \"js-test-files/i18next.js\",\n \"shim\": true\n }]);\n }", "install() {\n this.installDependencies();\n }", "installSmartContract() {\n // TODO\n return Promise.resolve();\n }", "async function getIntegrationFieldProducts() {\n return getRepeatableType(\"if_games\").then(documents => ({\n status: \"ok\",\n products: documents.results.map(product => product.data.game)\n }));\n}", "function setupIntegrations(options) {\n var integrations = {};\n getIntegrationsToSetup(options).forEach(function (integration) {\n integrations[integration.name] = integration;\n setupIntegration(integration);\n });\n // set the `initialized` flag so we don't run through the process again unecessarily; use `Object.defineProperty`\n // because by default it creates a property which is nonenumerable, which we want since `initialized` shouldn't be\n // considered a member of the index the way the actual integrations are\n Object.defineProperty(integrations, 'initialized', { value: true });\n return integrations;\n}", "async function getDeployment() {\n const result = await gql(\n process.env.SUBGRAPH_ENDPOINT\n ).currentReleaseContracts();\n return result;\n}", "static get WOPI_DISCOVERY_ENDPOINT() { return 'https://onenote.officeapps-df.live.com/hosting/discovery'; }", "get api() {\n\t\treturn this.tool.twitchapi\n\t}", "function getSteps() {\n return [\n \"Marketplace Integration\",\n \"Shipping Profile\",\n \"Product Import\",\n \"Product Sync\",\n \"Import Customers\",\n ];\n}", "function getActiveSites() {\n developer.Api('/plugins/' + FS__API_PLUGIN_ID + '/installs.json', 'GET', [], [], function (sites) {\n // list active sites\n console.log(JSON.parse(sites));\n\n // list just the active site URLs\n JSON.parse(sites).installs.forEach(function(site) {\n console.log(site.url);\n });\n });\n}", "function getTheiaPlugins() {\n if (!fs.existsSync(`${theiaRoot}/package.json`)) {\n return {};\n }\n const theiaPackageJson = require(`${theiaRoot}/package.json`);\n return theiaPackageJson['dependencies'] || {};\n}", "function _getSdk() {\n if (_comapiSDK) {\n return Promise.resolve(_comapiSDK);\n } else {\n return COMAPI.Foundation.initialise(comapiConfig)\n .then(function (result) {\n _comapiSDK = result;\n _subscribe();\n return _comapiSDK.startSession();\n })\n .then(function (result) {\n return _comapiSDK;\n });\n }\n }", "installBchApi () {\n shell.cd(`${__dirname.toString()}/../uut`)\n shell.exec('git clone https://github.com/Permissionless-Software-Foundation/bch-api')\n shell.cd('bch-api')\n shell.exec(`npm install > ${__dirname.toString()}/../html/logs/bch-api/install.txt`)\n }", "get api() {\n return getEnv(self).api;\n }", "function getSDK() {\n return analytics;\n }", "function getPlugoutWire() { return plugoutWire;\t}", "async run() {\n const cachedValue = this._isInvokedByGlobalInstallation;\n // Temporary patch as local fallback triggers re-resolution of CLI input\n // which originally is pre-generated by `runServerless`, therefore breaking test setup\n this._isInvokedByGlobalInstallation = false;\n const promise = super.run();\n this._isInvokedByGlobalInstallation = cachedValue;\n return promise;\n }", "function onInstall() {\n onOpen();\n}", "function onInstall() {\n onOpen();\n}", "function onInstall() {\n onOpen();\n}", "function onInstall() {\n onOpen();\n}", "constructor() { \n \n IntegrationType.initialize(this);\n }", "function onInstall(event) {\n Plugins.init();\n \n onOpen(event);\n}", "gatherProjectInfo() {\n const generatorTitle = `${_consts.GENERATOR_NAME} v${_package.version}`;\n this.log(\n _yosay(\n `AWS Microservice Generator.\\n${_chalk.red(generatorTitle)} `\n )\n );\n\n this.config.set('_projectType', _consts.SUB_GEN_MICROSERVICE);\n return _prompts\n .getProjectInfo(this, true)\n .then(() => {\n return _prompts.getAuthorInfo(this, true);\n })\n .then(() => {\n return _prompts.getAwsInfo(this, true);\n });\n }", "function IsIntegration(){\n var pModeProd = PropertiesService.getScriptProperties().getProperty('MODE_PROD');\n if (pModeProd == null) {\n Log_Severe(\"IsIntegration\", \"Property [MODE_PROD] not defined.\"); \n return true;\n }\n if (pModeProd == \"true\") {\n return false;\n }\n return true\n}", "static isAvailable() {\n\n // Check if we have an install lock present.\n if (process.env.TALK_INSTALL_LOCK === 'TRUE') {\n return Promise.reject(errors.ErrInstallLock);\n }\n\n // Get the current settings, we are expecing an error here.\n return SettingsService\n .retrieve()\n .then(() => {\n\n // We should NOT have gotten a settings object, this means that the\n // application is already setup. Error out here.\n return Promise.reject(errors.ErrSettingsInit);\n\n })\n .catch((err) => {\n\n // If the error is `not init`, then we're good, otherwise, it's something\n // else.\n if (err !== errors.ErrSettingsNotInit) {\n return Promise.reject(err);\n }\n\n // Allow the request to keep going here.\n return;\n });\n }", "onFirstInstalled() {\n\n }", "function getProductAsin() {\n return privateGetProductAsin();\n }", "installRls() {\r\n return __awaiter(this, void 0, void 0, function* () {\r\n const logger = this.logger.createChildLogger('installRls: ');\r\n const nightlyToolchain = this.getUserNightlyToolchain();\r\n if (!nightlyToolchain) {\r\n logger.error('no nightly toolchain');\r\n return false;\r\n }\r\n const isComponentInstalled = yield this.installComponent(nightlyToolchain, Rustup.getRlsComponentName());\r\n return isComponentInstalled;\r\n });\r\n }", "function getRegisterAddIns() {\n return __awaiter(this, void 0, void 0, function* () {\n switch (process.platform) {\n case \"darwin\":\n return devSettingsMac.getRegisteredAddIns();\n case \"win32\":\n return devSettingsWindows.getRegisteredAddIns();\n default:\n throw new office_addin_usage_data_1.ExpectedError(`Platform not supported: ${process.platform}.`);\n }\n });\n}", "function getPlugin(host, user, pass) {\n return new Promise(resolve => {\n require('request')({\n method: 'get',\n uri: `https://${host}/ledger`,\n json: true,\n }, (err, sendRes, body) => {\n console.log('prefix', host, body.ilp_prefix);\n resolve(new Plugin({\n prefix: body.ilp_prefix,\n account: `https://${host}/ledger/accounts/${user}`,\n password: pass,\n }));\n });\n });\n}", "get additiveProductName() {\n\t\treturn this.__additiveProductName;\n\t}", "install() {\n let logMsg = `To install your dependencies manually, run: ${chalk.yellow.bold(`${this.clientPackageManager} install`)}`;\n\n if (this.clientFramework === 'angular1') {\n logMsg = `To install your dependencies manually, run: ${chalk.yellow.bold(`${this.clientPackageManager} install & bower install`)}`;\n }\n\n const injectDependenciesAndConstants = (err) => {\n if (err) {\n this.log('Install of dependencies failed!');\n this.log(logMsg);\n } else if (this.clientFramework === 'angular1') {\n this.spawnCommand('gulp', ['install']);\n }\n };\n\n const installConfig = {\n bower: this.clientFramework === 'angular1',\n npm: this.clientPackageManager !== 'yarn',\n yarn: this.clientPackageManager === 'yarn',\n callback: injectDependenciesAndConstants\n };\n\n this.installDependencies(installConfig);\n }", "install() {\n if (!this.options.runNpmInstall)\n return;\n\n //Install domain\n //this.npmInstall(['ptz-core-domain'], { 'save': true });\n }", "function getDeviceCapability()\r\n{\r\n\txrxDeviceConfigGetDeviceCapabilities( \"http://127.0.0.1\", getDeviceCapabilities_success, getDeviceCapatilities_failure, null);\r\n}", "getRenderContext() {\n const integrationID = this.model.get('integrationID');\n const integration =\n this.model.collection.options.integrationsMap[integrationID];\n\n return {\n iconSrc: integration.iconSrc,\n iconSrcSet: integration.iconSrcSet,\n integrationName: integration.name,\n };\n }", "function getInstalledApps() {\n\treturn data.installed;\n}", "function getPlugoutComp() { return plugoutComp; }", "function getImplementation( cb ){\n\n }", "function setupIntegrations(integrations) {\n const integrationIndex = {};\n\n integrations.forEach(integration => {\n // guard against empty provided integrations\n if (integration) {\n setupIntegration(integration, integrationIndex);\n }\n });\n\n return integrationIndex;\n }", "findSimulatorAddons() {\n let deferred = promise.defer();\n AddonManager.getAllAddons(all => {\n let addons = [];\n for (let addon of all) {\n if (Simulators.isSimulatorAddon(addon)) {\n addons.push(addon);\n }\n }\n // Sort simulator addons by name.\n addons.sort(LocaleCompare);\n deferred.resolve(addons);\n });\n return deferred.promise;\n }", "function suggestCliInstallation() {\n console.log('');\n console.log('To make the development process easier for you - we developed a CLI client for our plugin.');\n console.log('To install it, please, use command:');\n console.log('npm install -g ' + chcpCliPackageName);\n console.log('For more information please visit https://github.com/nordnet/cordova-hot-code-push-cli');\n}", "get ChannelStore() {return WebpackModules.getByProps(\"getChannel\", \"getDMFromUserId\");}", "function getSettings() {\n\t\tlog.debug( 'getSettings()' );\n\t\tvar getApiURLDeferredObj = $.Deferred();\n\t\tchrome.storage.local.get('ldengine_api_url', function(items) {\n\n\t\t\t// If there's nothing in there, default to the default production version.\n\t\t\tAPI_URL = items.ldengine_api_url || \"https://apps.ldengine.com\";\n\n\t\t\t// If there's no protocol specified, use https by default.\n\t\t\tif( API_URL.indexOf( \"http\" ) < 0 )\n\t\t\t\tAPI_URL = \"https://\" + API_URL;\n\n\t\t\tgetApiURLDeferredObj.resolve();\n\t\t});\n\t\treturn getApiURLDeferredObj.promise();\n\t}", "function getAmtUuidEx() {\r\n var transport = require('amt-wsman-duk');\r\n var wsman = require('amt-wsman');\r\n var amt = require('amt');\r\n wsstack = new wsman(transport, settings.hostname, settings.tls ? 16993 : 16992, settings.username, settings.password, settings.tls);\r\n amtstack = new amt(wsstack);\r\n amtstack.Get(\"CIM_ComputerSystemPackage\", function (obj, name, response, xstatus, tag) {\r\n if (xstatus == 200) { console.log(\"GUID: \" + guidToStr(response.Body.PlatformGUID.toLowerCase())); } else { console.log(\"Intel AMT is not available or not activated.\"); } exit(1);\r\n });\r\n}", "function getConcept() {\n sendCommand('get_concept');\n}", "function initInlineInstalls()\n{\n $(\"link[rel=chrome-webstore-item]\").attr(\"href\", getWebStoreInstallUrl());\n}", "function initInlineInstalls()\n{\n $(\"link[rel=chrome-webstore-item]\").attr(\"href\", getWebStoreInstallUrl());\n}", "function showInstallFrame() {\n log_d(\"Plugin not installed. Use install plugin button. Refresh the page when complete\");\n CDO.getInstallerURL(CDO.createResponder(function (url) {\n $('#installButton').\n attr('href', url).\n show().\n click(pollForPlugin);\n }));\n}", "function add_to_install(val) {\n $('#package-name').val(\"\");\n $('#package-name').blur();\n var a = val.split(' - ');\n var pkg = {\n 'name': a[0],\n 'version': a[1],\n 'staus': ''\n };\n var data = [];\n data.push(pkg);\n var output = views.to_install(data);\n $('#to-install').append(output);\n var toInstall = common.get_to_install();\n views.select_to_install(toInstall);\n $('#to-install-main').css(\"display\", \"initial\");\n }", "function asInstallation(installationId) {\n return createToken(installationId).then(res => {\n const github = new GitHubApi({ debug });\n github.authenticate({ type: 'token', token: res.data.token });\n return github;\n });\n }", "runInstall(\n {},\n 'install-should-be-idempotent',\n async (config, reporter) => {\n expect(await getPackageVersion(config, 'dep-a')).toEqual('1.0.0');\n },\n null,\n );\n\n return runInstall({}", "function getProductList() {\n console.log(\"google.payments.inapp.getSkuDetails\");\n statusDiv.text(\"Retreiving list of available products...\");\n google.payments.inapp.getSkuDetails({\n 'parameters': {env: \"prod\"},\n 'success': onSkuDetails,\n 'failure': onSkuDetailsFailed\n });\n}", "getUserNightlyToolchain() {\r\n return this._userNightlyToolchain;\r\n }", "function startInstall(xpi, exclusive)\n{\n if (!browserOK(exclusive))\n return;\n\n gxpi = xpi;\n for (i in xpi) {\n numxpi++;\n }\n\n InstallTrigger.install(xpi,statusCallback);\n}", "async install(level=\"local\") { throw new NotImplementedError(); }", "get() {\r\n //搜集依赖\r\n dep.depend()\r\n return val\r\n }" ]
[ "0.58456784", "0.577011", "0.5744434", "0.56826746", "0.56745726", "0.56258136", "0.5584304", "0.5555171", "0.5551602", "0.5527821", "0.5527821", "0.5527821", "0.5527821", "0.5462406", "0.5461859", "0.5407472", "0.5372545", "0.537067", "0.53462315", "0.53372186", "0.5322694", "0.5293568", "0.526113", "0.5259332", "0.522665", "0.5220623", "0.5213936", "0.5209763", "0.5204726", "0.519915", "0.519915", "0.51875335", "0.5170546", "0.51565075", "0.514585", "0.5142935", "0.51411897", "0.51411897", "0.5097759", "0.5080146", "0.5063081", "0.50591093", "0.5023511", "0.5015851", "0.5009983", "0.5002658", "0.4996813", "0.49796748", "0.49794257", "0.49679446", "0.4954131", "0.49361357", "0.49265003", "0.48939008", "0.48774666", "0.48755065", "0.4870102", "0.4867112", "0.4862759", "0.485825", "0.4846555", "0.4846555", "0.4846555", "0.48140112", "0.48124635", "0.48094973", "0.48068383", "0.48052928", "0.47991312", "0.47725844", "0.47677478", "0.47524068", "0.47216937", "0.47216752", "0.4718984", "0.47078517", "0.46923444", "0.46876925", "0.46741593", "0.46717146", "0.46697912", "0.4662076", "0.4658497", "0.46565637", "0.4643639", "0.46423423", "0.46391842", "0.4635768", "0.46140227", "0.46105748", "0.46105748", "0.46011424", "0.4600038", "0.45881468", "0.4582474", "0.45808348", "0.45728627", "0.45717388", "0.45712572", "0.4569484" ]
0.5784636
1
Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default integrations are added unless they were already provided before.
function setupIntegrations(options) { var integrations = {}; getIntegrationsToSetup(options).forEach(function (integration) { integrations[integration.name] = integration; setupIntegration(integration); }); return integrations; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getIntegrationsToSetup(options) {\r\n var defaultIntegrations = options.defaultIntegrations && Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__spread\"])(options.defaultIntegrations) || [];\r\n var userIntegrations = options.integrations;\r\n var integrations = [];\r\n if (Array.isArray(userIntegrations)) {\r\n var userIntegrationsNames_1 = userIntegrations.map(function (i) {\r\n return i.name;\r\n });\r\n var pickedIntegrationsNames_1 = [];\r\n // Leave only unique default integrations, that were not overridden with provided user integrations\r\n defaultIntegrations.forEach(function (defaultIntegration) {\r\n if (userIntegrationsNames_1.indexOf(defaultIntegration.name) === -1 && pickedIntegrationsNames_1.indexOf(defaultIntegration.name) === -1) {\r\n integrations.push(defaultIntegration);\r\n pickedIntegrationsNames_1.push(defaultIntegration.name);\r\n }\r\n });\r\n // Don't add same user integration twice\r\n userIntegrations.forEach(function (userIntegration) {\r\n if (pickedIntegrationsNames_1.indexOf(userIntegration.name) === -1) {\r\n integrations.push(userIntegration);\r\n pickedIntegrationsNames_1.push(userIntegration.name);\r\n }\r\n });\r\n } else if (typeof userIntegrations === 'function') {\r\n integrations = userIntegrations(defaultIntegrations);\r\n integrations = Array.isArray(integrations) ? integrations : [integrations];\r\n } else {\r\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__spread\"])(defaultIntegrations);\r\n }\r\n return integrations;\r\n}", "function getIntegrationsToSetup(options) {\n const defaultIntegrations = options.defaultIntegrations || [];\n const userIntegrations = options.integrations;\n\n // We flag default instances, so that later we can tell them apart from any user-created instances of the same class\n defaultIntegrations.forEach(integration => {\n integration.isDefaultInstance = true;\n });\n\n let integrations;\n\n if (Array.isArray(userIntegrations)) {\n integrations = [...defaultIntegrations, ...userIntegrations];\n } else if (typeof userIntegrations === 'function') {\n integrations = arrayify(userIntegrations(defaultIntegrations));\n } else {\n integrations = defaultIntegrations;\n }\n\n const finalIntegrations = filterDuplicates(integrations);\n\n // The `Debug` integration prints copies of the `event` and `hint` which will be passed to `beforeSend` or\n // `beforeSendTransaction`. It therefore has to run after all other integrations, so that the changes of all event\n // processors will be reflected in the printed values. For lack of a more elegant way to guarantee that, we therefore\n // locate it and, assuming it exists, pop it out of its current spot and shove it onto the end of the array.\n const debugIndex = finalIntegrations.findIndex(integration => integration.name === 'Debug');\n if (debugIndex !== -1) {\n const [debugInstance] = finalIntegrations.splice(debugIndex, 1);\n finalIntegrations.push(debugInstance);\n }\n\n return finalIntegrations;\n }", "function getIntegrationsToSetup(options) {\n var defaultIntegrations = (options.defaultIntegrations && Object(tslib_es6[\"e\" /* __spread */])(options.defaultIntegrations)) || [];\n var userIntegrations = options.integrations;\n var integrations = [];\n if (Array.isArray(userIntegrations)) {\n var userIntegrationsNames_1 = userIntegrations.map(function (i) { return i.name; });\n var pickedIntegrationsNames_1 = [];\n // Leave only unique default integrations, that were not overridden with provided user integrations\n defaultIntegrations.forEach(function (defaultIntegration) {\n if (userIntegrationsNames_1.indexOf(defaultIntegration.name) === -1 &&\n pickedIntegrationsNames_1.indexOf(defaultIntegration.name) === -1) {\n integrations.push(defaultIntegration);\n pickedIntegrationsNames_1.push(defaultIntegration.name);\n }\n });\n // Don't add same user integration twice\n userIntegrations.forEach(function (userIntegration) {\n if (pickedIntegrationsNames_1.indexOf(userIntegration.name) === -1) {\n integrations.push(userIntegration);\n pickedIntegrationsNames_1.push(userIntegration.name);\n }\n });\n }\n else if (typeof userIntegrations === 'function') {\n integrations = userIntegrations(defaultIntegrations);\n integrations = Array.isArray(integrations) ? integrations : [integrations];\n }\n else {\n integrations = Object(tslib_es6[\"e\" /* __spread */])(defaultIntegrations);\n }\n // Make sure that if present, `Debug` integration will always run last\n var integrationsNames = integrations.map(function (i) { return i.name; });\n var alwaysLastToRun = 'Debug';\n if (integrationsNames.indexOf(alwaysLastToRun) !== -1) {\n integrations.push.apply(integrations, Object(tslib_es6[\"e\" /* __spread */])(integrations.splice(integrationsNames.indexOf(alwaysLastToRun), 1)));\n }\n return integrations;\n}", "function getIntegrationsToSetup(options) {\n const defaultIntegrations = options.defaultIntegrations || [];\n const userIntegrations = options.integrations;\n\n // We flag default instances, so that later we can tell them apart from any user-created instances of the same class\n defaultIntegrations.forEach(integration => {\n integration.isDefaultInstance = true;\n });\n\n let integrations;\n\n if (Array.isArray(userIntegrations)) {\n integrations = [...defaultIntegrations, ...userIntegrations];\n } else if (typeof userIntegrations === 'function') {\n integrations = utils.arrayify(userIntegrations(defaultIntegrations));\n } else {\n integrations = defaultIntegrations;\n }\n\n const finalIntegrations = filterDuplicates(integrations);\n\n // The `Debug` integration prints copies of the `event` and `hint` which will be passed to `beforeSend` or\n // `beforeSendTransaction`. It therefore has to run after all other integrations, so that the changes of all event\n // processors will be reflected in the printed values. For lack of a more elegant way to guarantee that, we therefore\n // locate it and, assuming it exists, pop it out of its current spot and shove it onto the end of the array.\n const debugIndex = finalIntegrations.findIndex(integration => integration.name === 'Debug');\n if (debugIndex !== -1) {\n const [debugInstance] = finalIntegrations.splice(debugIndex, 1);\n finalIntegrations.push(debugInstance);\n }\n\n return finalIntegrations;\n}", "function getIntegrationsToSetup(options) {\n\t const defaultIntegrations = options.defaultIntegrations || [];\n\t const userIntegrations = options.integrations;\n\n\t // We flag default instances, so that later we can tell them apart from any user-created instances of the same class\n\t defaultIntegrations.forEach(integration => {\n\t integration.isDefaultInstance = true;\n\t });\n\n\t let integrations;\n\n\t if (Array.isArray(userIntegrations)) {\n\t integrations = [...defaultIntegrations, ...userIntegrations];\n\t } else if (typeof userIntegrations === 'function') {\n\t integrations = arrayify(userIntegrations(defaultIntegrations));\n\t } else {\n\t integrations = defaultIntegrations;\n\t }\n\n\t const finalIntegrations = filterDuplicates(integrations);\n\n\t // The `Debug` integration prints copies of the `event` and `hint` which will be passed to `beforeSend` or\n\t // `beforeSendTransaction`. It therefore has to run after all other integrations, so that the changes of all event\n\t // processors will be reflected in the printed values. For lack of a more elegant way to guarantee that, we therefore\n\t // locate it and, assuming it exists, pop it out of its current spot and shove it onto the end of the array.\n\t const debugIndex = finalIntegrations.findIndex(integration => integration.name === 'Debug');\n\t if (debugIndex !== -1) {\n\t const [debugInstance] = finalIntegrations.splice(debugIndex, 1);\n\t finalIntegrations.push(debugInstance);\n\t }\n\n\t return finalIntegrations;\n\t}", "function getIntegrationsToSetup(options) {\n var e_1, _a, e_2, _b;\n var defaultIntegrations = (options.defaultIntegrations && tslib_1.__spread(options.defaultIntegrations)) || [];\n var userIntegrations = options.integrations;\n var integrations = [];\n if (Array.isArray(userIntegrations)) {\n var userIntegrationsNames = userIntegrations.map(function (i) { return i.name; });\n var pickedIntegrationsNames = [];\n try {\n // Leave only unique default integrations, that were not overridden with provided user integrations\n for (var defaultIntegrations_1 = tslib_1.__values(defaultIntegrations), defaultIntegrations_1_1 = defaultIntegrations_1.next(); !defaultIntegrations_1_1.done; defaultIntegrations_1_1 = defaultIntegrations_1.next()) {\n var defaultIntegration = defaultIntegrations_1_1.value;\n if (userIntegrationsNames.indexOf(getIntegrationName(defaultIntegration)) === -1 &&\n pickedIntegrationsNames.indexOf(getIntegrationName(defaultIntegration)) === -1) {\n integrations.push(defaultIntegration);\n pickedIntegrationsNames.push(getIntegrationName(defaultIntegration));\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (defaultIntegrations_1_1 && !defaultIntegrations_1_1.done && (_a = defaultIntegrations_1.return)) _a.call(defaultIntegrations_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n try {\n // Don't add same user integration twice\n for (var userIntegrations_1 = tslib_1.__values(userIntegrations), userIntegrations_1_1 = userIntegrations_1.next(); !userIntegrations_1_1.done; userIntegrations_1_1 = userIntegrations_1.next()) {\n var userIntegration = userIntegrations_1_1.value;\n if (pickedIntegrationsNames.indexOf(getIntegrationName(userIntegration)) === -1) {\n integrations.push(userIntegration);\n pickedIntegrationsNames.push(getIntegrationName(userIntegration));\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (userIntegrations_1_1 && !userIntegrations_1_1.done && (_b = userIntegrations_1.return)) _b.call(userIntegrations_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n }\n else if (typeof userIntegrations === 'function') {\n integrations = userIntegrations(defaultIntegrations);\n integrations = Array.isArray(integrations) ? integrations : [integrations];\n }\n else {\n return tslib_1.__spread(defaultIntegrations);\n }\n return integrations;\n}", "function getIntegrationsToSetup(options) {\n var defaultIntegrations = (options.defaultIntegrations && tslib__WEBPACK_IMPORTED_MODULE_0__[\"__spread\"](options.defaultIntegrations)) || [];\n var userIntegrations = options.integrations;\n var integrations = [];\n if (Array.isArray(userIntegrations)) {\n var userIntegrationsNames_1 = userIntegrations.map(function (i) { return i.name; });\n var pickedIntegrationsNames_1 = [];\n // Leave only unique default integrations, that were not overridden with provided user integrations\n defaultIntegrations.forEach(function (defaultIntegration) {\n if (userIntegrationsNames_1.indexOf(defaultIntegration.name) === -1 &&\n pickedIntegrationsNames_1.indexOf(defaultIntegration.name) === -1) {\n integrations.push(defaultIntegration);\n pickedIntegrationsNames_1.push(defaultIntegration.name);\n }\n });\n // Don't add same user integration twice\n userIntegrations.forEach(function (userIntegration) {\n if (pickedIntegrationsNames_1.indexOf(userIntegration.name) === -1) {\n integrations.push(userIntegration);\n pickedIntegrationsNames_1.push(userIntegration.name);\n }\n });\n }\n else if (typeof userIntegrations === 'function') {\n integrations = userIntegrations(defaultIntegrations);\n integrations = Array.isArray(integrations) ? integrations : [integrations];\n }\n else {\n integrations = tslib__WEBPACK_IMPORTED_MODULE_0__[\"__spread\"](defaultIntegrations);\n }\n // Make sure that if present, `Debug` integration will always run last\n var integrationsNames = integrations.map(function (i) { return i.name; });\n var alwaysLastToRun = 'Debug';\n if (integrationsNames.indexOf(alwaysLastToRun) !== -1) {\n integrations.push.apply(integrations, tslib__WEBPACK_IMPORTED_MODULE_0__[\"__spread\"](integrations.splice(integrationsNames.indexOf(alwaysLastToRun), 1)));\n }\n return integrations;\n}", "function setupIntegrations(options) {\n var integrations = {};\n getIntegrationsToSetup(options).forEach(function (integration) {\n integrations[integration.name] = integration;\n setupIntegration(integration);\n });\n // set the `initialized` flag so we don't run through the process again unecessarily; use `Object.defineProperty`\n // because by default it creates a property which is nonenumerable, which we want since `initialized` shouldn't be\n // considered a member of the index the way the actual integrations are\n Object.defineProperty(integrations, 'initialized', { value: true });\n return integrations;\n}", "function setupIntegrations(integrations) {\n const integrationIndex = {};\n\n integrations.forEach(integration => {\n integrationIndex[integration.name] = integration;\n\n if (installedIntegrations.indexOf(integration.name) === -1) {\n integration.setupOnce(scope.addGlobalEventProcessor, hub.getCurrentHub);\n installedIntegrations.push(integration.name);\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && utils.logger.log(`Integration installed: ${integration.name}`);\n }\n });\n\n return integrationIndex;\n}", "function getIntegrationsToSetup(options) {\n var defaultIntegrations = (options.defaultIntegrations && tslib_1.__spread(options.defaultIntegrations)) || [];\n var userIntegrations = options.integrations;\n var integrations = tslib_1.__spread(filterDuplicates(defaultIntegrations));\n if (Array.isArray(userIntegrations)) {\n // Filter out integrations that are also included in user options\n integrations = tslib_1.__spread(integrations.filter(function (integrations) {\n return userIntegrations.every(function (userIntegration) { return userIntegration.name !== integrations.name; });\n }), filterDuplicates(userIntegrations));\n }\n else if (typeof userIntegrations === 'function') {\n integrations = userIntegrations(integrations);\n integrations = Array.isArray(integrations) ? integrations : [integrations];\n }\n // Make sure that if present, `Debug` integration will always run last\n var integrationsNames = integrations.map(function (i) { return i.name; });\n var alwaysLastToRun = 'Debug';\n if (integrationsNames.indexOf(alwaysLastToRun) !== -1) {\n integrations.push.apply(integrations, tslib_1.__spread(integrations.splice(integrationsNames.indexOf(alwaysLastToRun), 1)));\n }\n return integrations;\n}", "function setupIntegrations(integrations) {\n\t const integrationIndex = {};\n\n\t integrations.forEach(integration => {\n\t integrationIndex[integration.name] = integration;\n\n\t if (installedIntegrations.indexOf(integration.name) === -1) {\n\t integration.setupOnce(addGlobalEventProcessor, getCurrentHub);\n\t installedIntegrations.push(integration.name);\n\t (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`Integration installed: ${integration.name}`);\n\t }\n\t });\n\n\t return integrationIndex;\n\t}", "function setupIntegrations(options) {\r\n var integrations = {};\r\n getIntegrationsToSetup(options).forEach(function (integration) {\r\n integrations[integration.name] = integration;\r\n setupIntegration(integration);\r\n });\r\n return integrations;\r\n}", "setupIntegrations() {\n if (this._isEnabled() && !this._integrationsInitialized) {\n this._integrations = integration.setupIntegrations(this._options.integrations);\n this._integrationsInitialized = true;\n }\n }", "function setupIntegrations(options) {\n var integrations = {};\n getIntegrationsToSetup(options).forEach(function (integration) {\n integrations[getIntegrationName(integration)] = integration;\n setupIntegration(integration, options);\n });\n return integrations;\n}", "setupIntegrations() {\n if (this._isEnabled() && !this._integrationsInitialized) {\n this._integrations = setupIntegrations(this._options.integrations);\n this._integrationsInitialized = true;\n }\n }", "function setupIntegration(integration, integrationIndex) {\n integrationIndex[integration.name] = integration;\n\n if (installedIntegrations.indexOf(integration.name) === -1) {\n integration.setupOnce(addGlobalEventProcessor, getCurrentHub);\n installedIntegrations.push(integration.name);\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`Integration installed: ${integration.name}`);\n }\n }", "setupIntegrations() {\n\t if (this._isEnabled() && !this._integrationsInitialized) {\n\t this._integrations = setupIntegrations(this._options.integrations);\n\t this._integrationsInitialized = true;\n\t }\n\t }", "function setupIntegrations(integrations) {\n const integrationIndex = {};\n\n integrations.forEach(integration => {\n // guard against empty provided integrations\n if (integration) {\n setupIntegration(integration, integrationIndex);\n }\n });\n\n return integrationIndex;\n }", "function filterDuplicates(integrations) {\n const integrationsByName = {};\n\n integrations.forEach(currentInstance => {\n const { name } = currentInstance;\n\n const existingInstance = integrationsByName[name];\n\n // We want integrations later in the array to overwrite earlier ones of the same type, except that we never want a\n // default instance to overwrite an existing user instance\n if (existingInstance && !existingInstance.isDefaultInstance && currentInstance.isDefaultInstance) {\n return;\n }\n\n integrationsByName[name] = currentInstance;\n });\n\n return Object.values(integrationsByName);\n}", "function filterDuplicates(integrations) {\n const integrationsByName = {};\n\n integrations.forEach(currentInstance => {\n const { name } = currentInstance;\n\n const existingInstance = integrationsByName[name];\n\n // We want integrations later in the array to overwrite earlier ones of the same type, except that we never want a\n // default instance to overwrite an existing user instance\n if (existingInstance && !existingInstance.isDefaultInstance && currentInstance.isDefaultInstance) {\n return;\n }\n\n integrationsByName[name] = currentInstance;\n });\n\n return Object.values(integrationsByName);\n }", "function filterDuplicates(integrations) {\n\t const integrationsByName = {};\n\n\t integrations.forEach(currentInstance => {\n\t const { name } = currentInstance;\n\n\t const existingInstance = integrationsByName[name];\n\n\t // We want integrations later in the array to overwrite earlier ones of the same type, except that we never want a\n\t // default instance to overwrite an existing user instance\n\t if (existingInstance && !existingInstance.isDefaultInstance && currentInstance.isDefaultInstance) {\n\t return;\n\t }\n\n\t integrationsByName[name] = currentInstance;\n\t });\n\n\t return Object.values(integrationsByName);\n\t}", "install(Vue, options) {\n if (typeof options === 'undefined') {\n for (let c of components) {\n Vue.component(c.default.name, c.default);\n }\n } else {\n if (!(options instanceof Array)) {\n throw new TypeError('options must be an array');\n }\n\n for (let c of components) {\n // register only components specified in the options\n if (options.includes(c.default.name)) {\n Vue.component(c.default.name, c.default);\n }\n }\n }\n }", "addPlugins(...plugins) {\n InstancePlugin.initPlugins(this, ...plugins);\n }", "static inject(defaults, options) {\n let results = {};\n for (let key in defaults) {\n if ('undefined' !== typeof options[key]) results[key] = options[key];\n else results[key] = defaults[key];\n }\n return results;\n }", "static inject(defaults, options) {\n let results = {};\n for (let key in defaults) {\n if ('undefined' !== typeof options[key]) results[key] = options[key];\n else results[key] = defaults[key];\n }\n return results;\n }", "function installPluginsOnInst(app){\n pluginsHelper.plugins.map(function(plugin){\n if(plugin.realtime && plugin.realtime.onAppInstance){\n plugin.realtime.onAppInstance(app);\n }\n });\n}", "addAutofixes(...ars) {\n this.autofixRegistrations.push(...ars);\n return this;\n }", "addPlugins(...plugins) {\n InstancePlugin.initPlugins(this, ...plugins);\n }", "registerPlugins() {\r\n _(this.plugins)\r\n .pickBy(plugin => {\r\n return plugin.register;\r\n })\r\n .forEach(plugin => {\r\n this.slickGrid.registerPlugin(plugin.plugin);\r\n });\r\n }", "static mergeRegistries() {\n return client.Registry.merge([\n listenerMetricRegistry,\n clusterMetricRegistry,\n endpointMetricRegistry,\n metricClusterMetricRegistry,\n client.register\n ]);\n }", "function install(VueInstance) {\n if (nuxtContext.$jss && nuxtContext.$jss.trackingApi) {\n console.log('JSS Tracking API plugin already installed.', nuxtContext.$jss.trackingApi);\n return;\n }\n\n VueInstance.prototype.$jss = {\n // there may be other JSS plugins installed, merge existing properties\n ...VueInstance.prototype.$jss,\n trackingApi: createTrackingApiClient(jssConfig, nuxtContext.$jss.dataFetcher),\n };\n }", "function extendConfigWithDefaults({\n options,\n config\n}) {\n config = { ...config\n };\n\n for (let [key, value] of Object.entries(defaultConfig)) {\n value = getValue(options, key) || getValue(config, key) || value;\n setValue(config, key, value);\n }\n\n return config;\n}", "function generateProjectIntegrationsRecords(project){\n models.Integration.findAll().then(function(integrations){\n if(integrations === null || integrations === undefined){\n return;\n }\n\n for(var x in integrations){\n project.addIntegration(integrations[x], { active: false });\n }\n });\n}", "function initPlugins() {\n\t\tFs.readdir(plugPath, function (err, pluginNames) {\n\t\t\tif (err) {\n\t\t\t\tconsole.log(err);\n\t\t\t}\n\n\t\t\t// Determine default plugin\n\t\t\tsetOrder(pluginNames);\n\t\t\t\n\t\t\t// Initialize each plugin according to config\n\t\t\tpluginNames.forEach(addPlugin);\n\t\t});\n\t}", "registerDefaultAssets () {\n const numAssets = DefaultAssets.length;\n for (let assetIndex = 0; assetIndex < numAssets; ++assetIndex) {\n const assetRecord = DefaultAssets[assetIndex];\n this.parent.setDefaultAssetId(assetRecord.type, assetRecord.id);\n }\n }", "initAll(...data) {\n return (0, checkAbsoluteDirectory_1.default)(\"initAll/directory\", this.directory).then(() => {\n return (0, checkAbsoluteDirectory_1.default)(\"initAll/externalRessourcesDirectory\", this.externalRessourcesDirectory);\n }).then(() => {\n // execute _beforeInitAll\n return \"function\" !== typeof this._beforeInitAll ? Promise.resolve() : new Promise((resolve, reject) => {\n const fn = this._beforeInitAll(...data);\n if (!(fn instanceof Promise)) {\n resolve();\n }\n else {\n fn.then(resolve).catch(reject);\n }\n });\n // init plugins\n }).then(() => {\n return (0, initSortedPlugins_1.default)(this.plugins, this._orderedPluginsNames, this.emit.bind(this), ...data);\n // end\n }).then(() => {\n this.emit(\"allinitialized\", ...data);\n return Promise.resolve();\n });\n }", "function grid_install_install(registers) {\n use(installSimple_install);\n use(axisPointer_install_install);\n}", "function defaults(opts) {\n\t if (opts === void 0) { opts = {}; }\n\t var defaultsList = [];\n\t for (var _i = 1; _i < arguments.length; _i++) {\n\t defaultsList[_i - 1] = arguments[_i];\n\t }\n\t var defaults = merge.apply(null, [{}].concat(defaultsList));\n\t return exports.extend({}, defaults, pick(opts || {}, Object.keys(defaults)));\n\t}", "async addAll(functions, options) {\n return Promise.all(functions.map(async function_ => this.add(function_, options)));\n }", "function OctokitWithPluginsAndDefaultsMock(args) {\n assert.deepStrictEqual(args.auth, expectedAuth)\n\n this.obj = {\n fun: callStub,\n listSomething: {\n endpoint: {\n merge: function (args) {\n return args\n }\n }\n }\n }\n this.authenticate = authenticateStub\n this.paginate = callStub\n this.apps = {\n getUserInstallation: getUserInstallationStub,\n createInstallationAccessToken: createInstallationAccessTokenStub\n }\n }", "registerPackageActivator(activator, types) {\n this.packageActivators.push([activator, types]);\n }", "defaults( include = ['paging', 'filter', 'sort'] ) {\n \n // Reset all features to their defaults.\n include.forEach((feature) => {\n \n // Ignore invalid features and features that don't have a default.\n if( this.hasOwnProperty(feature) && defaults.hasOwnProperty(feature) ) {\n \n // Reset features with complex data.\n if( Object.isObject(this[feature]) || Array.isArray(this[feature]) ) {\n \n this.$set(this, feature, $.extend({}, defaults[feature]));\n \n }\n \n // Otherwise, reset features with simple data.\n else this[feature] = defaults[feature];\n \n }\n \n });\n \n }", "function startAllServices(itineraries, callback) {\r\n stopAllServices(function () {\r\n loadItineraries(settingsHelper.settings.organizationId, itineraries, function () {\r\n callback();\r\n });\r\n });\r\n }", "function defaults(opts) {\n\t var defaultsList = [];\n\t for (var _i = 1; _i < arguments.length; _i++) {\n\t defaultsList[_i - 1] = arguments[_i];\n\t }\n\t var _defaultsList = defaultsList.concat({}).reverse();\n\t var defaultVals = exports.extend.apply(null, _defaultsList);\n\t return exports.extend({}, defaultVals, pick(opts || {}, Object.keys(defaultVals)));\n\t}", "async function registerInitialKeypairs() {\n var starttime = Date.now();\n var allkp = SetupLib.userKeypairs().slice(0);\n allkp.push(issuerKeypair);\n allkp.push(distributorKeypair);\n allkp.push(redeemKeypair);\n const totalCount = allkp.length;\n\n await SetupLib.registerAllKeypairs(allkp);\n\n console.log('all', totalCount, 'keypairs registered in', Date.now()-starttime, 'msec');\n}", "function getRegisterAddIns() {\n return __awaiter(this, void 0, void 0, function* () {\n switch (process.platform) {\n case \"darwin\":\n return devSettingsMac.getRegisteredAddIns();\n case \"win32\":\n return devSettingsWindows.getRegisteredAddIns();\n default:\n throw new office_addin_usage_data_1.ExpectedError(`Platform not supported: ${process.platform}.`);\n }\n });\n}", "function installPluginsOnInst(cls){\n pluginsHelper.plugins.map(function(plugin){\n if(plugin.realtime && plugin.realtime.onClassInstance){\n plugin.realtime.onClassInstance(cls);\n }\n });\n}", "function addApps(){\n for (var i=0; i<apps.length; i++){\n addApp(apps[i]);\n }\n}", "function defaults(opts) {\n var defaultsList = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n defaultsList[_i - 1] = arguments[_i];\n }\n var _defaultsList = defaultsList.concat({}).reverse();\n var defaultVals = exports.extend.apply(null, _defaultsList);\n return exports.extend({}, defaultVals, pick(opts || {}, Object.keys(defaultVals)));\n}", "function defaults(opts) {\n var defaultsList = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n defaultsList[_i - 1] = arguments[_i];\n }\n var _defaultsList = defaultsList.concat({}).reverse();\n var defaultVals = exports.extend.apply(null, _defaultsList);\n return exports.extend({}, defaultVals, pick(opts || {}, Object.keys(defaultVals)));\n}", "function initInlineInstalls(options) {\n if ($('link[rel=chrome-webstore-item]').length === 0) {\n $('head').append('<link rel=\"chrome-webstore-item\">');\n }\n $('link[rel=chrome-webstore-item]').attr('href',\n getWebStoreInstallUrl(options));\n}", "insertExtraWidgetsIntoDefaultWidgets(editorConfig) {\n const me = this;\n\n if (!me.extraItems || !me.extraItems.length) {\n return;\n }\n\n // Find default extra widgets position\n let index = editorConfig.items.findIndex((widget) => widget.type === 'extraItems'),\n tail;\n\n // If extra widgets placeholder exists\n if (index > -1) {\n // Remove extra widgets placeholder from its position\n editorConfig.items.splice(index, 1);\n\n // Backup everything that goes after extra widgets placeholder, like Save/Delete/Cancel buttons\n tail = editorConfig.items.splice(index);\n }\n\n // Split extra widgets on 2 parts: those which have index and those which haven't\n let withIndex = me.extraItems.filter((widget) => widget.index >= 0),\n withoutIndex = me.extraItems.filter((widget) => !(widget.index >= 0));\n\n // Add those without index to the end of the default widgets\n editorConfig.items = editorConfig.items.concat(withoutIndex);\n\n // Sort those which have index in ASC order, so we insert fields in series\n withIndex.sort((widgetA, widgetB) => widgetA.index - widgetB.index);\n\n // And now insert extra widgets at their individually specified index\n withIndex.forEach((widget) => editorConfig.items.splice(widget.index, 0, widget));\n\n if (tail && tail.length) {\n // Return backuped fields to the end of the widgets\n editorConfig.items = editorConfig.items.concat(tail);\n }\n }", "function applyIntegrationsMetadata(event, integrationNames) {\n if (integrationNames.length > 0) {\n event.sdk = event.sdk || {};\n event.sdk.integrations = [...(event.sdk.integrations || []), ...integrationNames];\n }\n }", "function autoDiscoverNodePerformanceMonitoringIntegrations() {\n const loadedIntegrations = tracing.lazyLoadedNodePerformanceMonitoringIntegrations\n .map(tryLoad => {\n try {\n return tryLoad();\n } catch (_) {\n return undefined;\n }\n })\n .filter(integration => !!integration) ;\n\n if (loadedIntegrations.length === 0) {\n utils.logger.warn('Performance monitoring integrations could not be automatically loaded.');\n }\n\n // Only return integrations where their dependencies loaded successfully.\n return loadedIntegrations.filter(integration => !!integration.loadDependency());\n}", "async addAll(functions, options) {\n return Promise.all(functions.map(async (function_) => this.add(function_, options)));\n }", "async addAll(functions, options) {\n return Promise.all(functions.map(async (function_) => this.add(function_, options)));\n }", "_setPlugins() {\n\t\tvar currentIndex = this._browserifyPlugins.length - 1;\n\n\t\twhile (currentIndex >= 0) {\n\t\t\tconst currentPlugin = this._browserifyPlugins[currentIndex];\n\t\t\tcurrentIndex--;\n\t\t\tif (!currentPlugin ||\n\t\t\t\ttypeof (currentPlugin) !== 'object' ||\n\t\t\t\ttypeof (currentPlugin.plugin) !== 'function') {\n\t\t\t\tthis._eventBus.emit('warn', 'The browserify plugin has an incorrect interface, skipping...');\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthis._appBundler.plugin(\n\t\t\t\tcurrentPlugin.plugin, currentPlugin.options\n\t\t\t);\n\t\t}\n\t}", "function initInlineInstalls(options) {\n if ($('link[rel=chrome-webstore-item]').length === 0) {\n $('head').append('<link rel=\"chrome-webstore-item\">');\n }\n\n $('link[rel=chrome-webstore-item]').attr('href', getWebStoreInstallUrl(options));\n}", "function wrapAll(toWrap, wrapper) {\n wrap(toWrap, wrapper, true);\n }", "_applyIntegrationsMetadata(event) {\n const integrationsArray = Object.keys(this._integrations);\n if (integrationsArray.length > 0) {\n event.sdk = event.sdk || {};\n event.sdk.integrations = [...(event.sdk.integrations || []), ...integrationsArray];\n }\n }", "function registerDefaultModules () {\n debug('registering default modules');\n if (this.sdk.defaultModuleRegistry) {\n const defaultModules = this.sdk.defaultModuleRegistry.call(this);\n if (defaultModules && defaultModules.length > 0) {\n defaultModules.forEach(mod => {\n this.moduleManager.addModule(mod);\n });\n this.moduleManager.save();\n }\n }\n debug('registerDefaultModules() finished');\n}", "_setPlugins() {\n\t\tvar currentIndex = this._browserifyPlugins.length - 1;\n\n\t\twhile (currentIndex >= 0) {\n\t\t\tconst currentPlugin = this._browserifyPlugins[currentIndex];\n\t\t\tcurrentIndex--;\n\t\t\tif (!currentPlugin ||\n\t\t\t\ttypeof (currentPlugin) !== 'object' ||\n\t\t\t\ttypeof (currentPlugin.plugin) !== 'function') {\n\t\t\t\tthis._eventBus.emit('warn', 'The browserify plugin has an incorrect interface, skipping...');\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthis._bundler.plugin(\n\t\t\t\tcurrentPlugin.plugin, currentPlugin.options\n\t\t\t);\n\t\t}\n\t}", "function handlePlugins$1(inputs, calendar) {\n calendar.addPluginInputs(inputs); // will gracefully handle duplicates\n }", "function startInstall(xpi, exclusive)\n{\n if (!browserOK(exclusive))\n return;\n\n gxpi = xpi;\n for (i in xpi) {\n numxpi++;\n }\n\n InstallTrigger.install(xpi,statusCallback);\n}", "configure () {\n return Promise.all([\n lib.ProxyCart.configure(this.app),\n lib.ProxyCart.addPolicies(this.app),\n lib.ProxyCart.addRoutes(this.app),\n lib.ProxyCart.resolveGenerics(this.app),\n lib.ProxyCart.copyDefaults(this.app),\n lib.ProxyCart.addCrons(this.app),\n lib.ProxyCart.addEvents(this.app),\n lib.ProxyCart.addTasks(this.app)\n ])\n }", "_initServices() {\n this._config.initServicesIma(ns, this._oc, this._config.services);\n\n this._config.plugins\n .filter(plugin => typeof plugin.module.initServices === 'function')\n .forEach(plugin => {\n plugin.module.initServices(ns, this._oc, this._config.services);\n });\n\n this._config.initServicesApp(ns, this._oc, this._config.services);\n }", "function default_1(app) {\n app.configure(users_service_1.default);\n app.configure(questions_service_1.default);\n app.configure(answers_service_1.default);\n}", "function fillPreferredServices(f) {\n if ((!f || this.f) && userServices.length) return;\n else if (f) this.f = 1;\n\n var svc;\n for (var i = 0; i < serviceList.length; i++) {\n var k = serviceList[i],\n svc = serviceHash[k];\n if (svc) {\n svc.code = urlToCode(k);\n if (!svc.xrd) svc.xrd = k;\n svc.url = svc.offer;\n serviceExport[svc.code] = {name: svc, code: svc.code, icon: svc.icon, icon32: svc.icon32, url: svc.url};\n userServices.push(svc);\n }\n }\n }", "function handlePlugins(inputs, calendar) {\n calendar.addPluginInputs(inputs); // will gracefully handle duplicates\n }", "function handlePlugins(inputs, calendar) {\n calendar.addPluginInputs(inputs); // will gracefully handle duplicates\n }", "function handlePlugins(inputs, calendar) {\n calendar.addPluginInputs(inputs); // will gracefully handle duplicates\n }", "function setup (instance, data) {\n for (let i = 0; i < setupFunctions.length; i++) {\n setupFunctions[i](instance, data)\n }\n }", "function funnel_install_install(registers) {\n registers.registerChartView(funnel_FunnelView);\n registers.registerSeriesModel(FunnelSeries);\n registers.registerLayout(funnelLayout);\n registers.registerProcessor(dataFilter('funnel'));\n}", "function setAllScenariosToDefault() {\n var deferred = protractor.promise.defer();\n var response = request('PUT', baseUrl + '/mocks/defaults', {\n headers: {\n 'Content-Type': 'application/json',\n 'ngapimockid': ngapimockid\n }\n });\n\n if (response.statusCode !== 200) {\n deferred.reject('Could not set scenarios to default');\n } else {\n deferred.fulfill();\n }\n return deferred.promise;\n }", "function wrapAll(toWrap, wrapper) {\n wrap(toWrap, wrapper, true);\n }", "function wrapAll(toWrap, wrapper) {\n wrap(toWrap, wrapper, true);\n }", "function wrapAll(toWrap, wrapper) {\n wrap(toWrap, wrapper, true);\n }", "function addAll() {}", "static initializeInstances() {\n [\n () => EventManager.getInstance(),\n () => AppDispatcher.getInstance(),\n () => DialogStore.getInstance(),\n () => GameStore.getInstance(),\n () => ScreenStore.getInstance(),\n () => AppInput.getInstance()\n ].forEach(task => task());\n }", "function addBuiltIns(_ref) {\n var PfeIcon = _ref.PfeIcon,\n config = _ref.config;\n\n // If the user wants to completely opt out of default icon sets,\n // allow them to.\n if (config.IconSets && config.IconSets.length === 0) {\n return;\n }\n\n // If the user provides their own icon sets, use them. If not, use our defaults.\n // @TODO: Switch from access.redhat.com to another icon set.\n var iconSets = config.IconSets || [{\n name: \"web\",\n path: \"https://access.redhat.com/webassets/avalon/j/lib/rh-iconfont-svgs\"\n }, {\n name: \"rh\",\n path: \"https://access.redhat.com/webassets/avalon/j/lib/rh-iconfont-svgs\"\n }];\n\n var resolveDefaultIconName = function resolveDefaultIconName(name, iconSetName, iconSetPath) {\n var regex = new RegExp(\"^\" + iconSetName + \"(-icon)?-(.*)\");\n\n var _regex$exec = regex.exec(name),\n _regex$exec2 = slicedToArray(_regex$exec, 3),\n iconName = _regex$exec2[2];\n\n var iconId = iconSetName + \"-icon-\" + iconName;\n var iconPath = iconSetPath + \"/\" + iconId + \".svg\";\n\n return iconPath;\n };\n\n // Register the icon sets.\n iconSets.forEach(function (set) {\n // If there's a `resolveIconName` function provided, use it. If not, fall back\n // to the `resolveDefaultIconName` function.\n if (set.resolveIconName && typeof set.resolveIconName === \"function\") {\n resolveDefaultIconName = set.resolveIconName;\n }\n\n PfeIcon.addIconSet(set.name, set.path, resolveDefaultIconName);\n });\n }", "__init() {this._integrations = {};}", "__init() {this._integrations = {};}", "__init() {this._integrations = {};}", "function applyDefaultSlots (app, defaults) {\n if (!defaults) {\n return;\n }\n\n const appliedDefaults = Object.keys(defaults)\n .filter(defaultSlotName => !query.hasSlot(app, defaultSlotName))\n .map(defaultSlotName => {\n const value = defaults[defaultSlotName];\n if (value.skip) {\n query.skipSlot(app, defaultSlotName);\n } else {\n query.setSlot(\n app,\n defaultSlotName,\n defaults[defaultSlotName]\n );\n }\n\n return defaultSlotName;\n });\n\n debug('We have used defaults:', appliedDefaults);\n}", "function apply_all_configs() {\n for (var name in all_configs) {\n if (audio_graph) {\n audio_graph.config(name.split('.'), all_configs[name]);\n }\n if (audio_ui) {\n audio_ui.config(name.split('.'), all_configs[name]);\n }\n }\n}", "updateDefaults(defaults, oldDefaults) {\n if (!this.isConfiguring) {\n const entries = Object.entries(defaults);\n this.eachWidget(widget => {\n entries.forEach(([prop, value]) => {\n // Apply defaults only if current value matches the old default\n if (widget[prop] === oldDefaults[prop]) {\n widget[prop] = value;\n }\n });\n }, false);\n }\n }", "function _registerAll() {\n if (!registerAllCalled) {\n registerAllCalled = true;\n Object.keys(ComponentsHash)\n .filter(tagName => typeof ComponentsHash[tagName] !== 'function')\n .forEach(tagName => _registerComponent(tagName));\n }\n}", "function injectAllScript()\n{\n // add in the lists\n injectScript( chrome.extension.getURL( '/src/lib/lists/gamejournopros.js' ), 'body' );\n injectScript( chrome.extension.getURL( '/src/lib/lists/journolist.js' ), 'body' );\n injectScript( chrome.extension.getURL( '/src/lib/lists/gamechanger-salon.js' ), 'body' );\n injectScript( chrome.extension.getURL( '/src/lib/lists/gawker.js' ), 'body' );\n\n injectScript( chrome.extension.getURL( '/src/lib/inject.js' ), 'body' );\n // site rules\n injectScript( chrome.extension.getURL( '/src/lib/sites.js' ), 'body' );\n}", "function initializeIds(app, dynamicConfigPromisesList, measurementIdToAppId, installations, gtagCore, dataLayerName) {\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__awaiter\"])(this, void 0, void 0, function () {\n var dynamicConfigPromise, fidPromise, _a, dynamicConfig, fid, configProperties;\n var _b;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__generator\"])(this, function (_c) {\n switch (_c.label) {\n case 0:\n dynamicConfigPromise = fetchDynamicConfigWithRetry(app);\n // Once fetched, map measurementIds to appId, for ease of lookup in wrapped gtag function.\n dynamicConfigPromise\n .then(function (config) {\n measurementIdToAppId[config.measurementId] = config.appId;\n if (app.options.measurementId &&\n config.measurementId !== app.options.measurementId) {\n logger.warn(\"The measurement ID in the local Firebase config (\" + app.options.measurementId + \")\" +\n (\" does not match the measurement ID fetched from the server (\" + config.measurementId + \").\") +\n \" To ensure analytics events are always sent to the correct Analytics property,\" +\n \" update the\" +\n \" measurement ID field in the local config or remove it from the local config.\");\n }\n })\n .catch(function (e) { return logger.error(e); });\n // Add to list to track state of all dynamic config promises.\n dynamicConfigPromisesList.push(dynamicConfigPromise);\n fidPromise = validateIndexedDB().then(function (envIsValid) {\n if (envIsValid) {\n return installations.getId();\n }\n else {\n return undefined;\n }\n });\n return [4 /*yield*/, Promise.all([\n dynamicConfigPromise,\n fidPromise\n ])];\n case 1:\n _a = _c.sent(), dynamicConfig = _a[0], fid = _a[1];\n // Detect if user has already put the gtag <script> tag on this page.\n if (!findGtagScriptOnPage()) {\n insertScriptTag(dataLayerName, dynamicConfig.measurementId);\n }\n // This command initializes gtag.js and only needs to be called once for the entire web app,\n // but since it is idempotent, we can call it multiple times.\n // We keep it together with other initialization logic for better code structure.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n gtagCore('js', new Date());\n configProperties = (_b = {},\n // guard against developers accidentally setting properties with prefix `firebase_`\n _b[ORIGIN_KEY] = 'firebase',\n _b.update = true,\n _b);\n if (fid != null) {\n configProperties[GA_FID_KEY] = fid;\n }\n // It should be the first config command called on this GA-ID\n // Initialize this GA-ID and set FID on it using the gtag config API.\n // Note: This will trigger a page_view event unless 'send_page_view' is set to false in\n // `configProperties`.\n gtagCore(GtagCommand.CONFIG, dynamicConfig.measurementId, configProperties);\n return [2 /*return*/, dynamicConfig.measurementId];\n }\n });\n });\n}", "function handlePlugins(inputs, calendar) {\n calendar.addPluginInputs(inputs); // will gracefully handle duplicates\n}", "function wrapAll(toWrap, wrapper) {\r\n wrap(toWrap, wrapper, true);\r\n }", "function wrapAll(toWrap, wrapper) {\r\n wrap(toWrap, wrapper, true);\r\n }", "async function _initializeAnalytics(app, dynamicConfigPromisesList, measurementIdToAppId, installations, gtagCore, dataLayerName, options) {\r\n var _a;\r\n const dynamicConfigPromise = fetchDynamicConfigWithRetry(app);\r\n // Once fetched, map measurementIds to appId, for ease of lookup in wrapped gtag function.\r\n dynamicConfigPromise\r\n .then(config => {\r\n measurementIdToAppId[config.measurementId] = config.appId;\r\n if (app.options.measurementId &&\r\n config.measurementId !== app.options.measurementId) {\r\n logger.warn(`The measurement ID in the local Firebase config (${app.options.measurementId})` +\r\n ` does not match the measurement ID fetched from the server (${config.measurementId}).` +\r\n ` To ensure analytics events are always sent to the correct Analytics property,` +\r\n ` update the` +\r\n ` measurement ID field in the local config or remove it from the local config.`);\r\n }\r\n })\r\n .catch(e => logger.error(e));\r\n // Add to list to track state of all dynamic config promises.\r\n dynamicConfigPromisesList.push(dynamicConfigPromise);\r\n const fidPromise = validateIndexedDB().then(envIsValid => {\r\n if (envIsValid) {\r\n return installations.getId();\r\n }\r\n else {\r\n return undefined;\r\n }\r\n });\r\n const [dynamicConfig, fid] = await Promise.all([\r\n dynamicConfigPromise,\r\n fidPromise\r\n ]);\r\n // Detect if user has already put the gtag <script> tag on this page.\r\n if (!findGtagScriptOnPage()) {\r\n insertScriptTag(dataLayerName, dynamicConfig.measurementId);\r\n }\r\n // Detects if there are consent settings that need to be configured.\r\n if (defaultConsentSettingsForInit) {\r\n gtagCore(\"consent\" /* CONSENT */, 'default', defaultConsentSettingsForInit);\r\n _setConsentDefaultForInit(undefined);\r\n }\r\n // This command initializes gtag.js and only needs to be called once for the entire web app,\r\n // but since it is idempotent, we can call it multiple times.\r\n // We keep it together with other initialization logic for better code structure.\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n gtagCore('js', new Date());\r\n // User config added first. We don't want users to accidentally overwrite\r\n // base Firebase config properties.\r\n const configProperties = (_a = options === null || options === void 0 ? void 0 : options.config) !== null && _a !== void 0 ? _a : {};\r\n // guard against developers accidentally setting properties with prefix `firebase_`\r\n configProperties[ORIGIN_KEY] = 'firebase';\r\n configProperties.update = true;\r\n if (fid != null) {\r\n configProperties[GA_FID_KEY] = fid;\r\n }\r\n // It should be the first config command called on this GA-ID\r\n // Initialize this GA-ID and set FID on it using the gtag config API.\r\n // Note: This will trigger a page_view event unless 'send_page_view' is set to false in\r\n // `configProperties`.\r\n gtagCore(\"config\" /* CONFIG */, dynamicConfig.measurementId, configProperties);\r\n // Detects if there is data that will be set on every event logged from the SDK.\r\n if (defaultEventParametersForInit) {\r\n gtagCore(\"set\" /* SET */, defaultEventParametersForInit);\r\n _setDefaultEventParametersForInit(undefined);\r\n }\r\n return dynamicConfig.measurementId;\r\n}", "function registerInstallation(appConfig, installationEntry) {\n return Object(tslib__WEBPACK_IMPORTED_MODULE_2__[\"__awaiter\"])(this, void 0, void 0, function () {\n var registeredInstallationEntry, e_1;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_2__[\"__generator\"])(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 2, , 7]);\n return [4 /*yield*/, createInstallationRequest(appConfig, installationEntry)];\n case 1:\n registeredInstallationEntry = _a.sent();\n return [2 /*return*/, set(appConfig, registeredInstallationEntry)];\n case 2:\n e_1 = _a.sent();\n if (!(isServerError(e_1) && e_1.customData.serverCode === 409)) return [3 /*break*/, 4];\n // Server returned a \"FID can not be used\" error.\n // Generate a new ID next time.\n return [4 /*yield*/, remove(appConfig)];\n case 3:\n // Server returned a \"FID can not be used\" error.\n // Generate a new ID next time.\n _a.sent();\n return [3 /*break*/, 6];\n case 4: \n // Registration failed. Set FID as not registered.\n return [4 /*yield*/, set(appConfig, {\n fid: installationEntry.fid,\n registrationStatus: 0 /* NOT_STARTED */\n })];\n case 5:\n // Registration failed. Set FID as not registered.\n _a.sent();\n _a.label = 6;\n case 6: throw e_1;\n case 7: return [2 /*return*/];\n }\n });\n });\n}", "_applyIntegrationsMetadata(event) {\n\t const integrationsArray = Object.keys(this._integrations);\n\t if (integrationsArray.length > 0) {\n\t event.sdk = event.sdk || {};\n\t event.sdk.integrations = [...(event.sdk.integrations || []), ...integrationsArray];\n\t }\n\t }", "function registerInstallation(appConfig, installationEntry) {\n return Object(tslib__WEBPACK_IMPORTED_MODULE_1__[\"__awaiter\"])(this, void 0, void 0, function () {\n var registeredInstallationEntry, e_1;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_1__[\"__generator\"])(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 3,, 8]);\n\n return [4\n /*yield*/\n , createInstallation(appConfig, installationEntry)];\n\n case 1:\n registeredInstallationEntry = _a.sent();\n return [4\n /*yield*/\n , set(appConfig, registeredInstallationEntry)];\n\n case 2:\n _a.sent();\n\n return [3\n /*break*/\n , 8];\n\n case 3:\n e_1 = _a.sent();\n if (!(isServerError(e_1) && e_1.serverCode === 409)) return [3\n /*break*/\n , 5]; // Server returned a \"FID can not be used\" error.\n // Generate a new ID next time.\n\n return [4\n /*yield*/\n , remove(appConfig)];\n\n case 4:\n // Server returned a \"FID can not be used\" error.\n // Generate a new ID next time.\n _a.sent();\n\n return [3\n /*break*/\n , 7];\n\n case 5:\n // Registration failed. Set FID as not registered.\n return [4\n /*yield*/\n , set(appConfig, {\n fid: installationEntry.fid,\n registrationStatus: 0\n /* NOT_STARTED */\n\n })];\n\n case 6:\n // Registration failed. Set FID as not registered.\n _a.sent();\n\n _a.label = 7;\n\n case 7:\n throw e_1;\n\n case 8:\n return [2\n /*return*/\n ];\n }\n });\n });\n}", "function applyIntegrationsMetadata(event, integrationNames) {\n if (integrationNames.length > 0) {\n event.sdk = event.sdk || {};\n event.sdk.integrations = [...(event.sdk.integrations || []), ...integrationNames];\n }\n}", "function applyPluginOnInputs(inputs) {\n inputs.each(function () {\n // for each input in the form\n var self = $(this);\n self.data(PLUGIN_UPLOADER, new AutoUploader(self));\n })\n }", "function default_1() {\n return (0, workspace_1.updateWorkspace)((workspace) => {\n // workspace level\n replaceDefaultCollection(workspace.extensions['cli']);\n // Project level\n for (const project of workspace.projects.values()) {\n replaceDefaultCollection(project.extensions['cli']);\n }\n });\n}" ]
[ "0.65488416", "0.6424719", "0.64099234", "0.63836944", "0.63200176", "0.6270846", "0.62562954", "0.59606075", "0.59166867", "0.59155667", "0.58585286", "0.5792332", "0.571574", "0.56650954", "0.559362", "0.5535905", "0.543521", "0.5353165", "0.51303846", "0.50496966", "0.5035505", "0.47623858", "0.4743922", "0.472121", "0.472121", "0.47125977", "0.47101143", "0.4706203", "0.45863646", "0.45860267", "0.44255787", "0.4380042", "0.4323155", "0.43222752", "0.4290985", "0.42797726", "0.42783096", "0.4277726", "0.42732275", "0.42667532", "0.42529655", "0.42451558", "0.423801", "0.42142615", "0.42134273", "0.41943842", "0.41940168", "0.41906852", "0.41777903", "0.41777903", "0.4174647", "0.41730693", "0.41724178", "0.4170384", "0.41699225", "0.41699225", "0.41499084", "0.4149072", "0.41448453", "0.41436982", "0.4142615", "0.41412404", "0.4133948", "0.4131878", "0.4131109", "0.4122526", "0.4116145", "0.41152358", "0.41136253", "0.41136253", "0.41136253", "0.41065156", "0.4104641", "0.40943736", "0.40934354", "0.40934354", "0.40934354", "0.40930635", "0.40894735", "0.40852892", "0.4079187", "0.4079187", "0.4079187", "0.4077769", "0.4064747", "0.4058368", "0.40569106", "0.40539807", "0.40538722", "0.40481904", "0.40429124", "0.40429124", "0.4042551", "0.40415066", "0.4041193", "0.40263245", "0.4021703", "0.40103045", "0.4008164" ]
0.5750167
13
Initializes this client instance.
function BaseClient(backendClass, options) { /** Array of used integrations. */ this._integrations = {}; /** Number of call being processed */ this._processing = 0; this._backend = new backendClass(options); this._options = options; if (options.dsn) { this._dsn = new dsn_Dsn(options.dsn); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "init() {\n if (this.initialized) {\n throw Error('Client has already been initialized.');\n }\n this.api = this.setUpApi(this.token, this.apiOptions);\n this.selfAssignHandlerFunctions();\n this.initialized = true;\n }", "function initialize() {\n configureClientsGrid();\n getClientsForSetup();\n }", "function initialize() {\n configureClientsGrid();\n getClientsForSetup();\n }", "constructor() {\n this._initialize();\n }", "constructor() {\n super();\n this._init();\n }", "async init(){}", "constructor() {\n this.init();\n }", "initClient() {\n gapi.client.init({\n apiKey: this.API_KEY,\n clientId: this.CLIENT_ID,\n scope: this.SCOPES,\n }).then(() => {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(this.updateSigninStatus.bind(this));\n this.setSignInListeners();\n // Handle the initial sign-in state.\n this.updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n });\n }", "init() {\n this._checkOptions();\n this._sendErrors();\n }", "onInit() {\n this._client.subscribe(\"connect\", this.onConnect.bind(this));\n this._client.subscribe(\"message\", this.onMessage.bind(this));\n this._client.subscribe(\"error\", this.onError.bind(this));\n }", "function initClient() {\n\tgapi.client\n\t\t.init({\n\t\t\tapiKey: API_KEY,\n\t\t\tclientId: CLIENT_ID,\n\t\t\tdiscoveryDocs: DISCOVERY_DOCS,\n\t\t\tscope: SCOPES,\n\t\t})\n\t\t.then(\n\t\t\tfunction () {\n\t\t\t\t// Listen for sign-in state changes.\n\t\t\t\tgapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n\t\t\t\t// Handle the initial sign-in state.\n\t\t\t\tupdateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n\t\t\t\tauthorizeButton.onclick = handleAuthClick;\n\t\t\t\tsignoutButton.onclick = handleSignoutClick;\n\t\t\t},\n\t\t\tfunction (error) {\n\t\t\t\tappendPre(JSON.stringify(error, null, 2));\n\t\t\t}\n\t\t);\n}", "initialize() {\n this._saveInstanceProperties();\n // ensures first update will be caught by an early access of\n // `updateComplete`\n this._requestUpdate();\n }", "initialize() {\n this._saveInstanceProperties();\n // ensures first update will be caught by an early access of\n // `updateComplete`\n this._requestUpdate();\n }", "constructor() {\r\n super()\r\n this.init()\r\n }", "constructor()\n {\n this.init();\n }", "constructor() {\n this._Initialize();\n }", "constructor() {\n super()\n self = this\n self.init()\n }", "init() {\n // Setup event handlers for the socket\n this._setListeners(() => {\n // Check that connection limit is not exceeded\n if (this._server.options.maxClients && this._server.connections.size > this._server.options.maxClients) {\n return this.send(421, this.name + ' Too many connected clients, try again in a moment');\n }\n\n // Keep a small delay for detecting early talkers\n setTimeout(() => this.connectionReady(), 100);\n });\n }", "function initialize () {\n\t\t// getting the credential through calling getKeys()\n\t\t// which is available in Global scope because of keys.js\n\t\tvar keys = getKeys() || {}\n\n\t\tvar clientId = keys[\"CLARIFAI_CLIENT_ID\"]\n\t\tvar clientSecret = keys[\"CLARIFAI_CLIENT_SECRET\"]\n\n\t\tif (!clientId || !clientSecret) {\n\t\t\tapp.html(\"Enter your Clarifai's Client ID and Client Secret in order to successfully run this demo. Go to developer.clarifai.com, sign up and create your application if you haven't already. You'll have to edit keys.js file to enter your credentials\")\n\t\t}\n\t\telse {\n\t\t\tappClarifai = new Clarifai.App({apiKey: '7fe98b11f3ef4db58d52e092c1349f8a'});\t\t\n\t\t}\n\n\n\t}", "function initClient() {\n gapi.client\n .init({\n clientId: CLIENT_ID,\n discoveryDocs: DISCOVERY_DOCS,\n scope: SCOPES\n })\n .then(\n function() {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n\n bindEvents();\n },\n function(error) {\n document.querySelector('.api-message').textContent =\n 'An error occurred. Please try again later';\n }\n );\n }", "function initClient() {\n gapi.client.init({\n discoveryDocs: DISCOVERY_DOCS,\n clientId: CLIENT_ID,\n scope: SCOPES\n }).then(function () {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n });\n }", "function initClient() {\n gapi.client.init({\n apiKey: API_KEY,\n clientId: CLIENT_ID,\n discoveryDocs: DISCOVERY_DOCS,\n scope: SCOPES\n }).then(function () {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n \n \n }, function(error) {\n appendPre(JSON.stringify(error, null, 2));\n });\n }", "async init () {}", "function initClient() {\n console.log(\"initClient\")\n gapi.client.init({\n apiKey: apiKey,\n discoveryDocs: discoveryDocs,\n clientId: clientId,\n scope: scopes\n }).then(function () {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n loadContents()\n initDiv()\n });\n}", "async initialize() {\n super.initialize();\n this.spatialFormat = this.parameters.SPATIAL_FORMAT ? this.parameters.SPATIAL_FORMAT : super.SPATIAL_FORMAT\n this.pgClient = await this.getClient()\n }", "initialise() {\n cLogger('Initialising data state');\n // listen for socket events\n socketManager.setListener(this);\n // load the users\n this.getAllUsers();\n // load the entries\n this.getAllEntries();\n }", "function _init() {\n }", "function initClient() {\n gapi.client.init({\n apiKey: API_KEY,\n clientId: CLIENT_ID,\n discoveryDocs: DISCOVERY_DOCS,\n scope: SCOPES\n }).then(function () {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n \n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n }, function(error) {\n appendPre(JSON.stringify(error, null, 2));\n });\n }", "function init() {\n\n }", "function init() {\n\n }", "function init() {\n }", "constructor(client) {\n this._client = client;\n }", "async init(options) {\n if (options === null || options === void 0 ? void 0 : options.abortSignal) {\n options.abortSignal.addEventListener(\"abort\", () => {\n // This will abort any pending request in the IdentityClient,\n // based on the received or generated correlationId\n this.identityClient.abortRequests(options.correlationId);\n });\n }\n if (this.publicApp || this.confidentialApp) {\n return;\n }\n if (this.createCachePlugin !== undefined) {\n this.msalConfig.cache = {\n cachePlugin: await this.createCachePlugin(),\n };\n }\n this.publicApp = new msalNode__namespace.PublicClientApplication(this.msalConfig);\n if (this.getAssertion) {\n this.msalConfig.auth.clientAssertion = await this.getAssertion();\n }\n // The confidential client requires either a secret, assertion or certificate.\n if (this.msalConfig.auth.clientSecret ||\n this.msalConfig.auth.clientAssertion ||\n this.msalConfig.auth.clientCertificate) {\n this.confidentialApp = new msalNode__namespace.ConfidentialClientApplication(this.msalConfig);\n }\n else {\n if (this.requiresConfidential) {\n throw new Error(\"Unable to generate the MSAL confidential client. Missing either the client's secret, certificate or assertion.\");\n }\n }\n }", "async init() {}", "async init() {}", "async init() {\n return await this._init();\n }", "initialize() {\n //\n }", "async init() {\n if ( this._inited ) {\n return this;\n }\n\n this._inited = true;\n\n\n await this.broadcast(\"onInit\");\n console.log(\"-init->onStart\");\n await this.broadcast('onStart');\n\n this._started = true;\n\n if ( this.canUpdate ) {\n await this.update();\n }\n \n await this.broadcast('onLateStart', this.canUpdate);\n\n return this;\n }", "function initClient() {\n gapi.client.init({\n discoveryDocs: DISCOVERY_DOCS\n , clientId: CLIENT_ID\n , scope: SCOPES\n }).then(function () {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n sendEmailButton.onclick = handleSendEmailClick;\n console.log(\"Client initialized...\");\n });\n}", "function initClient() {\n window.gapi.client.init({\n discoveryDocs: DISCOVERY_DOCS,\n clientId: CLIENT_ID,\n scope: SCOPES\n }).then(function () {\n // Listen for sign-in state changes.\n window.gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n // Handle the initial sign-in state.\n updateSigninStatus(window.gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n });\n }", "function initClient() {\n console.log(\"INIT\");\n gapi.client.init({\n clientId: CLIENT_ID,\n discoveryDocs: DISCOVERY_DOCS,\n scope: SCOPES\n }).then(function () {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n });\n }", "async initialize() {\n \n super.initialize(); \n if (this.status.sqlTrace) {\n this.status.sqlTrace.write(`mongoURL ${this.getMongoURL()}\\n`) \n }\n this.client = new MongoClient(this.getMongoURL(),typeof this.connectionProperties.options === 'object' ? this.connectionProperties.options : {});\n await this.client.connect();\n if (this.status.sqlTrace) {\n this.status.sqlTrace.write(`use ${this.connectionProperties.database}\\n`) \n }\n this.db = this.client.db(this.connectionProperties.database);\n \n }", "constructor() {\n this.init();\n }", "constructor() {\n this.init();\n }", "function initClient() {\n gapi.client\n .init({\n apiKey: API_KEY,\n clientId: CLIENT_ID,\n discoveryDocs: DISCOVERY_DOCS,\n scope: SCOPES,\n })\n .then(\n function () {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n },\n function (error) {\n appendPre(JSON.stringify(error, null, 2));\n }\n );\n}", "function initClient() {\n gapi.client\n .init({\n apiKey: API_KEY,\n clientId: CLIENT_ID,\n discoveryDocs: DISCOVERY_DOCS,\n scope: SCOPES\n })\n .then(\n function() {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n },\n function(error) {\n appendPre(JSON.stringify(error, null, 2));\n }\n );\n}", "function init () {\n // Here below all inits you need\n }", "constructor() {\n super();\n this._logger = new pip_services3_components_node_3.CompositeLogger();\n this._connectionResolver = new connect_1.AwsConnectionResolver();\n this._connectTimeout = 30000;\n this._client = null; //AmazonCloudWatchClient\n this._opened = false;\n }", "async init () {\n if (this.buttonMap == null) {\n // Setup an HTTP client for API v2.\n const client = new HttpClient({\n headers: {\n 'hue-application-key': this.options.client.username\n },\n host: this.options.client.host,\n https: true,\n json: true,\n path: '/clip/v2',\n selfSignedCertificate: true,\n timeout: defaultTimeout\n })\n client\n .on('error', (error) => { this.emit('error', error) })\n .on('request', (request) => { this.emit('request', request) })\n .on('response', (response) => { this.emit('response', response) })\n .on('timeout', (timeout) => { this.emit('timeout', timeout) })\n\n // Get the API v2 button IDs\n const response = await client.get('/resource/button')\n\n // Build a map to convert ID to buttonevent.\n this.buttonMap = {}\n for (const button of response.body.data) {\n this.buttonMap[button.id] = button.metadata.control_id * 1000\n }\n this.requestId = 1\n }\n }", "function initClient() {\n gapi.client.init({\n apiKey: process.env.REACT_APP_GOOGLE_API_KEY,\n clientId: process.env.REACT_APP_GOOGLE_CLIENT,\n discoveryDocs: CAL_DISCOVERY_DOCS,\n scope: CAL_SCOPES\n }).then(function () {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n // authorizeButton.onclick = handleAuthClick;\n // signoutButton.onclick = handleSignoutClick;\n }, function(error) {\n appendPre(JSON.stringify(error, null, 2));\n });\n }", "function initClient() {\n gapi.client.init({\n apiKey: API_KEY,\n clientId: CLIENT_ID,\n discoveryDocs: DISCOVERY_DOCS,\n scope: SCOPES\n }).then(function () {\n // Listen for sign-in state changes.\n GoogleAuth = gapi.auth2.getAuthInstance();\n \n GoogleAuth.isSignedIn.listen(updateSigninStatus);\n\n // Handle the initial sign-in state.\n updateSigninStatus(GoogleAuth.isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n });\n }", "function initClient() {\n gapi.client.init({\n apiKey: API_KEY,\n clientId: CLIENT_ID,\n discoveryDocs: DISCOVERY_DOCS,\n scope: SCOPES\n }).then(function () {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n }, function(error) {\n appendPre(JSON.stringify(error, null, 2));\n });\n}", "function initClient() {\n gapi.client.init({\n apiKey: API_KEY,\n clientId: CLIENT_ID,\n discoveryDocs: DISCOVERY_DOCS,\n scope: SCOPES\n }).then(function () {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n }, function(error) {\n appendPre(JSON.stringify(error, null, 2));\n });\n}", "function initClient() {\n\n gapi.client.init({\n apiKey: API_KEY,\n clientId: CLIENT_ID,\n discoveryDocs: DISCOVERY_DOCS,\n scope: SCOPES\n }).then(function() {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n });\n}", "static initialize() {\r\n return tslib_1.__awaiter(this, void 0, void 0, function* () {\r\n if (!PAL._isInitialized) {\r\n PAL._isInitialized = true;\r\n networkClientFactory_1.NetworkClientFactory.instance().register(\"default\", (networkEndpoint, logger, timeoutMs) => new networkClient_1.NetworkClient(networkEndpoint, logger, timeoutMs));\r\n rngServiceFactory_1.RngServiceFactory.instance().register(\"default\", () => new rngService_1.RngService());\r\n platformCryptoFactory_1.PlatformCryptoFactory.instance().register(\"default\", () => new platformCrypto_1.PlatformCrypto());\r\n }\r\n return Promise.resolve();\r\n });\r\n }", "function initClient() {\n gapi.client.init({\n apiKey: API_KEY,\n clientId: CLIENT_ID,\n discoveryDocs: DISCOVERY_DOCS,\n scope: SCOPES\n }).then(function (response) {\n console.log(response);\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n }, function(error) {\n appendPre(JSON.stringify(error, null, 2));\n });\n}", "function init() {\r\n\r\n }", "function init() {\n return getAccessToken()\n .then(data => data.access_token)\n .then(token => {\n const audience = `https://${process.env.CLIENT_DOMAIN}/api/v2/`;\n this.managementClient= new ManagementClient({\n domain: DOMAIN,\n audience,\n token\n });\n })\n .catch(err => err);\n }", "init () {\n // Load application configuration\n this.config = require('./config').init(this)\n\n // Axios Http client\n this.http = require('./http').init(this)\n\n // TigoPesa API client\n this.api = require('./api').init(this)\n\n // Init express app instance\n this.express = require('./express').init(this)\n\n // Init job queue\n this.jobs = require('./jobs').init(this)\n }", "function initClient() {\r\n gapi.client\r\n .init({\r\n apiKey: API_KEY,\r\n clientId: CLIENT_ID,\r\n discoveryDocs: DISCOVERY_DOCS,\r\n scope: SCOPES,\r\n })\r\n .then(\r\n function () {\r\n // Listen for sign-in state changes.\r\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\r\n\r\n // Handle the initial sign-in state.\r\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\r\n authorizeButton.onclick = handleAuthClick;\r\n signoutButton.onclick = handleSignoutClick;\r\n },\r\n function (error) {\r\n appendPre(JSON.stringify(error, null, 2));\r\n }\r\n );\r\n}", "function init() {\r\n }", "function initClient () {\n\tvar io = socket.connect( Config.kSERVER_URL );\n\n\tio.sockets.on( 'connect', function handleConnect ( socket ) {\n\t\tconsole.log( 'client connected' );\n\n\t\tsocket.on( 'control', function handleControl ( data ) {\n\t\t\tconsole.log( 'client received control event' );\n\n\t\t\tsegments = data[ 'segmentCount' ];\n\t\t\tsegmentSet = data[ 'segmentSet' ];\n\n\t\t\tsegmentHighlight( segments );\n\t\t} );\n\n\t} );\n\n\tconsole.log( 'client initialized' );\n}", "function initClient() {\n gapi.client.init({\n apiKey: API_KEY,\n clientId: CLIENT_ID,\n discoveryDocs: DISCOVERY_DOCS,\n scope: SCOPES\n }).then(function () {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n }, function(error) {\n appendPre(JSON.stringify(error, null, 2));\n });\n}", "function initClient() {\n gapi.client.init({\n apiKey: API_KEY,\n clientId: CLIENT_ID,\n discoveryDocs: DISCOVERY_DOCS,\n scope: SCOPES\n }).then(function () {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n });\n}", "function initClient() {\n gapi.client.init({\n apiKey: API_KEY,\n clientId: CLIENT_ID,\n discoveryDocs: DISCOVERY_DOCS,\n scope: SCOPES\n }).then(function () {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n }, function (error) {\n appendPre(JSON.stringify(error, null, 2));\n });\n}", "init() {\n // Make sure we've got an exchange client for the request handling.\n this.router.use(this.initialiseExchangeClient.bind(this));\n this.router.get('/', this.query);\n this.router.post('/', this.create);\n this.router.get('/:id', this.get);\n this.router.delete('/:id', this.delete);\n }", "function initClient() {\n\tgapi.client.init({\n\t\tapiKey: GOOGLE_API_KEY,\n\t\tclientId: GOOGLE_CLIENT_ID,\n\t\tdiscoveryDocs: GOOGLE_DISCOVERY_DOCS,\n\t\tscope: GOOGLE_SCOPES\n\t}).then(function () {\n\t\t// listen for sign-in state changes.\n\t\tgapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\t\t\n\t\t// handle the initial sign-in state.\n\t\tupdateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n\t\tauthorizeButton.on('click', handleAuthClick);\n\t\tsignoutButton.on('click', handleSignoutClick);\n\t});\n}", "async initialize() {\n\n this.config = config;\n this.sketches = this.config.sketches;\n this._start();\n }", "async init(options) {\n if (this.certificatePath) {\n try {\n const parts = await parseCertificate({ certificatePath: this.certificatePath }, this.sendCertificateChain);\n this.msalConfig.auth.clientCertificate = {\n thumbprint: parts.thumbprint,\n privateKey: parts.certificateContents,\n x5c: parts.x5c,\n };\n }\n catch (error) {\n this.logger.info(formatError(\"\", error));\n throw error;\n }\n }\n else {\n this.msalConfig.auth.clientSecret = this.clientSecret;\n }\n return super.init(options);\n }", "function initClient() {\n gapi.client.init({\n discoveryDocs: DISCOVERY_DOCS,\n clientId: CLIENT_ID,\n scope: SCOPES\n })\n .then(() => {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n });\n}", "function init() {\n // Enable debug mode for translations\n gettextCatalog.debug = config.debug;\n\n vm.setLanguage();\n\n // Set REST server configuration\n restService.setServer(config.server);\n }", "function initClient() {\r\n gapi.client.init({\r\n discoveryDocs: DISCOVERY_DOCS,\r\n clientId: CLIENT_ID,\r\n scope: SCOPES\r\n });\r\n}", "async init () {\n this.bridge = await this._getBridge()\n this.lamps = await this._getLamps()\n this.modules = await this._loadModules()\n }", "init() {\n\t\tDebug.success(`${this.name} initialized`);\n\t}", "function initClient() {\n gapi.client.init({\n apiKey: API_KEY,\n clientId: CLIENT_ID,\n discoveryDocs: DISCOVERY_DOCS,\n scope: SCOPES\n }).then(function() {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus)\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get())\n authorizeButton.onclick = handleAuthClick\n signoutButton.onclick = handleSignoutClick\n }, function(error) {\n appendPre(JSON.stringify(error, null, 2))\n })\n}", "function initClient() {\n window.g_finished = false; // for selenium testing.\n\n // Runs the sample in V8. Comment out this line to run it in the browser\n // JavaScript engine, for example if you want to debug it.\n // TODO(kbr): we need to investigate why turning this on is\n // significantly slower than leaving it disabled.\n // o3djs.util.setMainEngine(o3djs.util.Engine.V8);\n\n o3djs.util.makeClients(main);\n}", "constructor() {\n\n V1IO.initialize(this);\n }", "function initClient() {\n gapi.client.init({\n apiKey: API_KEY,\n clientId: CLIENT_ID,\n discoveryDocs: DISCOVERY_DOCS,\n scope: SCOPES\n }).then(function () {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus);\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get());\n authorizeButton.onclick = handleAuthClick;\n signoutButton.onclick = handleSignoutClick;\n }, function(error) {\n console.log('ERROR', error);\n });\n }", "function Constructor() {\n // All construction is actually done in the init method\n if ( this.initialize )\n this.initialize.apply(this, arguments);\n }", "constructor(client) {\n this.client = client;\n }", "constructor(client) {\n this.client = client;\n }", "constructor(client) {\n this.client = client;\n }", "constructor(client) {\n this.client = client;\n }", "constructor(client) {\n this.client = client;\n }", "constructor(client) {\n this.client = client;\n }", "constructor(client) {\n this.client = client;\n }", "constructor(client) {\n this.client = client;\n }", "constructor(client) {\n this.client = client;\n }", "constructor(client) {\n this.client = client;\n }", "constructor(client) {\n this.client = client;\n }", "constructor(client) {\n this.client = client;\n }", "constructor(client) {\n this.client = client;\n }", "constructor(client) {\n this.client = client;\n }", "constructor(client) {\n this.client = client;\n }", "constructor(client) {\n this.client = client;\n }", "constructor(client) {\n this.client = client;\n }", "constructor(client) {\n this.client = client;\n }", "constructor(client) {\n this.client = client;\n }", "constructor(client) {\n this.client = client;\n }", "constructor(client) {\n this.client = client;\n }", "function initClient () {\n gapi.client.init({\n discoveryDocs: DISCOVERY_DOCS,\n clientId: CLIENT_ID,\n scope: SCOPES\n }).then(function () {\n // Listen for sign-in state changes.\n gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus)\n\n // Handle the initial sign-in state.\n updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get())\n // authorizeButton.onclick = handleAuthClick;\n // signoutButton.onclick = handleSignoutClick;\n })\n}" ]
[ "0.7728512", "0.72298175", "0.72298175", "0.7159167", "0.7102546", "0.69305867", "0.68409735", "0.67760646", "0.67720985", "0.674226", "0.6667395", "0.6666901", "0.6666901", "0.66615283", "0.66316485", "0.66124", "0.6612362", "0.6598454", "0.658352", "0.65832764", "0.65738475", "0.65693504", "0.65627754", "0.655368", "0.6551287", "0.65457755", "0.65371656", "0.6512398", "0.65077966", "0.65077966", "0.65036416", "0.6498937", "0.64701873", "0.64688385", "0.64688385", "0.6466854", "0.64550847", "0.6450354", "0.6449511", "0.6445721", "0.64409393", "0.64399034", "0.64310056", "0.64310056", "0.6421287", "0.64192784", "0.6415002", "0.640062", "0.6390573", "0.6387727", "0.6377948", "0.6370446", "0.6370446", "0.6367196", "0.6361643", "0.6356769", "0.6355665", "0.63491696", "0.63438976", "0.63403195", "0.6337374", "0.6331581", "0.63299954", "0.63286096", "0.63273454", "0.63254976", "0.63254344", "0.63225055", "0.63212734", "0.6320807", "0.6317266", "0.6315671", "0.63155884", "0.6313221", "0.6311269", "0.6310285", "0.63087666", "0.63031584", "0.6298633", "0.6294809", "0.6294809", "0.6294809", "0.6294809", "0.6294809", "0.6294809", "0.6294809", "0.6294809", "0.6294809", "0.6294809", "0.6294809", "0.6294809", "0.6294809", "0.6294809", "0.6294809", "0.6294809", "0.6294809", "0.6294809", "0.6294809", "0.6294809", "0.6294809", "0.6292833" ]
0.0
-1
Creates a new backend instance.
function BaseBackend(options) { this._options = options; if (!this._options.dsn) { logger.warn('No DSN provided, backend will not do anything.'); } this._transport = this._setupTransport(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function inMemoryBackendServiceFactory(injector, dbService, options) {\n var backend = new InMemoryBackendService(injector, dbService, options);\n return backend;\n}", "function _createInstance(instance) {\n return Object.assign({\n id: app.id('i'),\n name: 'New',\n active: true,\n pending: 0,\n original: null,\n code: '',\n dirty: false,\n connections: [],\n connection: null,\n created: new Date().getTime()\n }, instance);\n }", "async createNewInstance() {\n const adapters = this.processAdapters();\n const datastores = this.api.config.models.datastores;\n const models = await this.loadModels();\n\n const ormStart = promisify(Waterline.start);\n\n this.waterline = await ormStart({\n adapters,\n datastores,\n models,\n });\n }", "function createInstance() {\n var postgresDatabase = new Object(\"Database instance initialized!\");\n return postgresDatabase;\n }", "function createInstance() {\n return axios.create(getInstanceOptions());\n }", "static create () {}", "registerStorageBackend(name, storageBackend) {\n this.storageBackends[name] = storageBackend;\n }", "function create(initialState, native) {\n const httpLink = new HttpLink({\n uri: 'https://api.graph.cool/simple/v1/cjh2g1fxn6gsw0108o6ud01ms', // Server URL (must be absolute)\n credentials: 'same-origin', // Additional fetch() options like `credentials` or `headers`\n });\n const wsLink =\n (process.browser || native) &&\n new WebSocketLink({\n uri: 'wss://subscriptions.graph.cool/v1/cjh2g1fxn6gsw0108o6ud01ms',\n options: {\n reconnect: true,\n },\n });\n const link =\n !process.browser && !native\n ? httpLink\n : split(\n ({ query }) => {\n const { kind, operation } = getMainDefinition(query);\n return (\n kind === 'OperationDefinition' && operation === 'subscription'\n );\n },\n wsLink,\n httpLink,\n );\n return new ApolloClient({\n connectToDevTools: process.browser,\n ssrMode: !process.browser && !native, // Disables forceFetch on the server (so queries are only run once)\n link,\n cache: new InMemoryCache().restore(initialState || {}),\n });\n}", "function setDefaultBackend(newBackend) {\n backend = newBackend\n}", "setBackend(name, value) {\n config_1.default.get('backends')[name] = value;\n return this;\n }", "function findBackendFactory(name) {\n return engine_1.ENGINE.findBackendFactory(name);\n}", "create() {\n return this.new();\n }", "static create(params) {\n return {type: `${this.prefix}${this.name}`, _instance: new this(params)}; //eslint-disable-line\n }", "create () {}", "create () {}", "static async createInstance(db = \"test\") {\n const clazz = new DatabaseConnection();\n await clazz.initialize(db);\n return clazz;\n }", "initializeBackend(backendName) {\n const registryFactoryEntry = this.registryFactory[backendName];\n if (registryFactoryEntry == null) {\n throw new Error(`Cannot initialize backend ${backendName}, no registration found.`);\n }\n try {\n const backend = registryFactoryEntry.factory();\n /* Test if the factory returns a promise.\n Done in a more liberal way than\n previous 'Promise.resolve(backend)===backend'\n as we needed to account for custom Promise\n implementations (e.g. Angular) */\n if (backend && !(backend instanceof _backends_backend__WEBPACK_IMPORTED_MODULE_0__[\"KernelBackend\"]) &&\n typeof backend.then === 'function') {\n const promiseId = ++this.pendingBackendInitId;\n const success = backend\n .then(backendInstance => {\n // Outdated promise. Another backend was set in the meantime.\n if (promiseId < this.pendingBackendInitId) {\n return false;\n }\n this.registry[backendName] = backendInstance;\n this.pendingBackendInit = null;\n return true;\n })\n .catch(err => {\n // Outdated promise. Another backend was set in the meantime.\n if (promiseId < this.pendingBackendInitId) {\n return false;\n }\n this.pendingBackendInit = null;\n console.warn(`Initialization of backend ${backendName} failed`);\n console.warn(err.stack || err.message);\n return false;\n });\n this.pendingBackendInit = success;\n return { success, asyncInit: true };\n }\n else {\n this.registry[backendName] = backend;\n return { success: true, asyncInit: false };\n }\n }\n catch (err) {\n console.warn(`Initialization of backend ${backendName} failed`);\n console.warn(err.stack || err.message);\n return { success: false, asyncInit: false };\n }\n }", "create() {}", "create() {}", "static Create(opts = {}, cb) {\n IndexedDBStore.Create(opts.storeName ? opts.storeName : 'browserfs', (e, store) => {\n if (store) {\n const idbfs = new IndexedDBFileSystem(typeof (opts.cacheSize) === 'number' ? opts.cacheSize : 100);\n idbfs.init(store, (e) => {\n if (e) {\n cb(e);\n }\n else {\n cb(null, idbfs);\n }\n });\n }\n else {\n cb(e);\n }\n });\n }", "create(schemaName, callable){\n const blueprint = new CreateBlueprint(schemaName);\n callable(blueprint);\n\n this.blueprints.push(blueprint);\n }", "function create() {\n var ariConfig = config.getAppConfig().ari;\n\n ari.getClient(ariConfig, ariConfig.applicationName)\n .then(function(client) {\n logger.debug({\n ari: {\n url: ariConfig.url,\n username: ariConfig.username\n }\n }, 'Connected to ARI');\n\n client.on('StasisStart', fsm.create);\n\n logger.info('Voicemail Main application started');\n })\n .catch(function(err) {\n logger.error({err: err}, 'Error connecting to ARI');\n throw err;\n });\n}", "function BaseBackend(options) {\n this._options = options;\n if (!this._options.dsn) {\n flags_1.IS_DEBUG_BUILD && utils_1.logger.warn('No DSN provided, backend will not do anything.');\n }\n this._transport = this._setupTransport();\n }", "create() {\n\t}", "static create (url, o = {}, existing) {\n\t\tlet Backend;\n\n\t\tif (o.type) {\n\t\t\t// Using get() for case-insensitive property lookup\n\t\t\tBackend = Mavo.Functions.get(_, o.type);\n\t\t}\n\n\t\tif (url && !Backend) {\n\t\t\tBackend = _.types.find(Backend => Backend.test(url, o)) || _.Remote;\n\t\t}\n\n\t\t// Can we re-use the existing object perhaps?\n\t\tif (Backend && existing?.constructor === Backend && existing.constructor.prototype.hasOwnProperty(\"update\")) {\n\t\t\texisting.update(url, o);\n\t\t\treturn existing;\n\t\t}\n\n\t\treturn Backend? new Backend(url, o) : null;\n\t}", "static createInstance(){\n if(this.instance == null){\n this.instance = new ClientLayer();\n }\n }", "function BaseBackend(options) {\n this._options = options;\n if (!this._options.dsn) {\n utils_1.logger.warn('No DSN provided, backend will not do anything.');\n }\n this._transport = this._setupTransport();\n }", "create() {\n const entity = internal(this).entity;\n entity.create(); // Make sure the entity exists.\n const model = entity.model();\n internal(model).components.add(this);\n return this;\n }", "function Backend(username, callback) {\n var self = this;\n self.init(username, callback);\n}", "function BackendService(http) {\n\t this.http = http;\n\t this.backendUrl = \"https://nuricks.herokuapp.com/api\";\n\t }", "function findBackendFactory(name) {\n return _engine__WEBPACK_IMPORTED_MODULE_0__[\"ENGINE\"].findBackendFactory(name);\n}", "async initBackends() {\n const backends = await this.getBackends();\n const missingbackends = Object.entries(backends)\n .filter(([_key, value]) => value.created_at === undefined)\n .map(([_key, value]) => value);\n const existing = Object.entries(backends).length - missingbackends.length;\n this.tick(existing, `Skipping ${existing} existing backends`);\n if (missingbackends.length > 0) {\n const baseopts = await this.version('/backend');\n return Promise.all(missingbackends.map(async (backend) => {\n const opts = Object.assign({\n method: 'POST',\n form: backend,\n }, baseopts);\n try {\n this.tick(0, `Creating backend ${backend.name}`, true);\n const r = await request(opts);\n this.tick(1, `Created backend ${backend.name}`, true);\n return r;\n } catch (e) {\n const message = `Backend ${backend.name} could not be created`;\n this.log.error(`${message}`, e);\n throw new Error(message, e);\n }\n }));\n }\n return Promise.resolve();\n }", "constructor(handleCreate) {\n this.query = this.query.bind(this);\n this.handleSuccess = this.handleSuccess.bind(this);\n this.pengine = new window.Pengine({\n server: \"http://localhost:3030/pengine\",\n application: \"proylcc\",\n oncreate: handleCreate,\n onsuccess: this.handleSuccess,\n onfailure: this.handleFailure,\n onerror: this.handleError,\n destroy: false\n });\n }", "static async crearGuion(payload){\n\n\t\tlet bot = new BotService()\n\t\tObject.assign(bot,payload)\n\t\tawait bot.save()\n\t\treturn bot\n\n\t}", "function init(options) {\n if (typeof options === 'string') {\n options = {actorId: options}\n } else if (typeof options === 'undefined') {\n options = {}\n } else if (!isObject(options)) {\n throw new TypeError(`Unsupported options for init(): ${options}`)\n }\n return Frontend.init(Object.assign({backend}, options))\n}", "create () {\n this.server = https.createServer(\n Object.assign({\n IncomingMessage: CherryIncomingMessage,\n ServerResponse: CherryServerResponse\n }, this.options.httpsOptions),\n (req, res) => {\n this.bootstrap(req, res)\n }\n )\n }", "function create() {\n var hb = new base.HandlebarsEnvironment();\n\n Utils.extend(hb, base);\n hb.SafeString = _SafeString2['default'];\n hb.Exception = _Exception2['default'];\n hb.Utils = Utils;\n hb.escapeExpression = Utils.escapeExpression;\n\n hb.VM = runtime;\n hb.template = function (spec) {\n return runtime.template(spec, hb);\n };\n\n return hb;\n}", "function create() {\r\n return new BulkRegistrationImpl();\r\n }", "function create() {\r\n return new BulkRegistrationImpl();\r\n }", "createInstance(type, props, rootContainerInstance, hostContext) {\n return createInstance(type, props, rootContainerInstance, hostContext);\n }", "newInstance() {\n if (typeof FastBoot !== 'undefined') {\n const Rollbar = FastBoot.require('rollbar');\n return new Rollbar(this.serverConfig);\n } else {\n /* global Rollbar */\n return Rollbar;\n }\n }", "create() {\n super.create()\n\n this.instanceCreate(Platform, 350, 450)\n\n this.instanceCreate(Apple)\n this.instanceCreate(Apple)\n this.instanceCreate(Apple)\n this.instanceCreate(Apple)\n this.instanceCreate(Apple)\n\n this.instanceCreate(Solid)\n this.instanceCreate(RainbowDash)\n\n this.instanceCreate(Player, 200, 600)\n }", "function create() {\n\t var hb = new base.HandlebarsEnvironment();\n\n\t Utils.extend(hb, base);\n\t hb.SafeString = _SafeString2['default'];\n\t hb.Exception = _Exception2['default'];\n\t hb.Utils = Utils;\n\t hb.escapeExpression = Utils.escapeExpression;\n\n\t hb.VM = runtime;\n\t hb.template = function (spec) {\n\t return runtime.template(spec, hb);\n\t };\n\n\t return hb;\n\t}", "function create() {\n\t var hb = new base.HandlebarsEnvironment();\n\n\t Utils.extend(hb, base);\n\t hb.SafeString = _SafeString2['default'];\n\t hb.Exception = _Exception2['default'];\n\t hb.Utils = Utils;\n\t hb.escapeExpression = Utils.escapeExpression;\n\n\t hb.VM = runtime;\n\t hb.template = function (spec) {\n\t return runtime.template(spec, hb);\n\t };\n\n\t return hb;\n\t}", "function create() {\n\t var hb = new base.HandlebarsEnvironment();\n\n\t Utils.extend(hb, base);\n\t hb.SafeString = _SafeString2['default'];\n\t hb.Exception = _Exception2['default'];\n\t hb.Utils = Utils;\n\t hb.escapeExpression = Utils.escapeExpression;\n\n\t hb.VM = runtime;\n\t hb.template = function (spec) {\n\t return runtime.template(spec, hb);\n\t };\n\n\t return hb;\n\t}", "createNew(languagePreference, modelDB, isInitialized) {\n const contentFactory = this.contentFactory;\n return new NotebookModel({\n languagePreference,\n contentFactory,\n modelDB,\n isInitialized\n });\n }", "function BaseBackend(options) {\n /** A simple buffer holding all requests. */\n this.buffer = new requestbuffer_1.RequestBuffer();\n this.options = options;\n if (!this.options.dsn) {\n logger_1.logger.warn('No DSN provided, backend will not do anything.');\n }\n }", "createEntity() {\n var entity = new bb.Entity(this);\n this.addEntity(entity);\n return entity;\n }", "function createInstance(baseURL){\n return axios.create({\n baseURL,\n headers: {\n 'Content-Type': 'application/json',\n }\n });\n}", "function httpServiceFactory(backend, options) {\n return new __WEBPACK_IMPORTED_MODULE_11__providers_http_service_service__[\"a\" /* HttpService */](backend, options);\n}", "function BaseBackend(options) {\r\n this._options = options;\r\n if (!this._options.dsn) {\r\n _sentry_utils__WEBPACK_IMPORTED_MODULE_0__[\"logger\"].warn('No DSN provided, backend will not do anything.');\r\n }\r\n this._transport = this._setupTransport();\r\n }", "function create() {\n var hb = new base.HandlebarsEnvironment();\n Utils.extend(hb, base);\n hb.SafeString = _handlebarsSafeString2['default'];\n hb.Exception = _handlebarsException2['default'];\n hb.Utils = Utils;\n hb.escapeExpression = Utils.escapeExpression;\n hb.VM = runtime;\n\n hb.template = function (spec) {\n return runtime.template(spec, hb);\n };\n\n return hb;\n}", "function create() {\n var hb = new base.HandlebarsEnvironment();\n\n Utils.extend(hb, base);\n hb.SafeString = _handlebarsSafeString2['default'];\n hb.Exception = _handlebarsException2['default'];\n hb.Utils = Utils;\n hb.escapeExpression = Utils.escapeExpression;\n\n hb.VM = runtime;\n hb.template = function (spec) {\n return runtime.template(spec, hb);\n };\n\n return hb;\n }", "function create() {\n var hb = new base.HandlebarsEnvironment();\n\n Utils.extend(hb, base);\n hb.SafeString = _handlebarsSafeString2['default'];\n hb.Exception = _handlebarsException2['default'];\n hb.Utils = Utils;\n hb.escapeExpression = Utils.escapeExpression;\n\n hb.VM = runtime;\n hb.template = function (spec) {\n return runtime.template(spec, hb);\n };\n\n return hb;\n }", "create() {\n\n }", "create() {\n\n }", "create() {\n\n }", "function create() {\n var hb = new base.HandlebarsEnvironment();\n\n Utils.extend(hb, base);\n hb.SafeString = _handlebarsSafeString2['default'];\n hb.Exception = _handlebarsException2['default'];\n hb.Utils = Utils;\n hb.escapeExpression = Utils.escapeExpression;\n\n hb.VM = runtime;\n hb.template = function (spec) {\n return runtime.template(spec, hb);\n };\n\n return hb;\n}", "function create() {\n var hb = new base.HandlebarsEnvironment();\n\n Utils.extend(hb, base);\n hb.SafeString = _handlebarsSafeString2['default'];\n hb.Exception = _handlebarsException2['default'];\n hb.Utils = Utils;\n hb.escapeExpression = Utils.escapeExpression;\n\n hb.VM = runtime;\n hb.template = function (spec) {\n return runtime.template(spec, hb);\n };\n\n return hb;\n}", "function create() {\n var hb = new base.HandlebarsEnvironment();\n\n Utils.extend(hb, base);\n hb.SafeString = _handlebarsSafeString2['default'];\n hb.Exception = _handlebarsException2['default'];\n hb.Utils = Utils;\n hb.escapeExpression = Utils.escapeExpression;\n\n hb.VM = runtime;\n hb.template = function (spec) {\n return runtime.template(spec, hb);\n };\n\n return hb;\n}", "function create() {\n var hb = new base.HandlebarsEnvironment();\n\n Utils.extend(hb, base);\n hb.SafeString = _handlebarsSafeString2['default'];\n hb.Exception = _handlebarsException2['default'];\n hb.Utils = Utils;\n hb.escapeExpression = Utils.escapeExpression;\n\n hb.VM = runtime;\n hb.template = function (spec) {\n return runtime.template(spec, hb);\n };\n\n return hb;\n}", "function create() {\n var hb = new base.HandlebarsEnvironment();\n\n Utils.extend(hb, base);\n hb.SafeString = _handlebarsSafeString2['default'];\n hb.Exception = _handlebarsException2['default'];\n hb.Utils = Utils;\n hb.escapeExpression = Utils.escapeExpression;\n\n hb.VM = runtime;\n hb.template = function (spec) {\n return runtime.template(spec, hb);\n };\n\n return hb;\n}", "function create() {\n var hb = new base.HandlebarsEnvironment();\n\n Utils.extend(hb, base);\n hb.SafeString = _handlebarsSafeString2['default'];\n hb.Exception = _handlebarsException2['default'];\n hb.Utils = Utils;\n hb.escapeExpression = Utils.escapeExpression;\n\n hb.VM = runtime;\n hb.template = function (spec) {\n return runtime.template(spec, hb);\n };\n\n return hb;\n}", "function create() {\n var hb = new base.HandlebarsEnvironment();\n\n Utils.extend(hb, base);\n hb.SafeString = _handlebarsSafeString2['default'];\n hb.Exception = _handlebarsException2['default'];\n hb.Utils = Utils;\n hb.escapeExpression = Utils.escapeExpression;\n\n hb.VM = runtime;\n hb.template = function (spec) {\n return runtime.template(spec, hb);\n };\n\n return hb;\n}", "function create() {\n var hb = new base.HandlebarsEnvironment();\n\n Utils.extend(hb, base);\n hb.SafeString = _handlebarsSafeString2['default'];\n hb.Exception = _handlebarsException2['default'];\n hb.Utils = Utils;\n hb.escapeExpression = Utils.escapeExpression;\n\n hb.VM = runtime;\n hb.template = function (spec) {\n return runtime.template(spec, hb);\n };\n\n return hb;\n}", "function create() {\n var hb = new base.HandlebarsEnvironment();\n\n Utils.extend(hb, base);\n hb.SafeString = _handlebarsSafeString2['default'];\n hb.Exception = _handlebarsException2['default'];\n hb.Utils = Utils;\n hb.escapeExpression = Utils.escapeExpression;\n\n hb.VM = runtime;\n hb.template = function (spec) {\n return runtime.template(spec, hb);\n };\n\n return hb;\n}", "function create() {\n var hb = new base.HandlebarsEnvironment();\n\n Utils.extend(hb, base);\n hb.SafeString = _handlebarsSafeString2['default'];\n hb.Exception = _handlebarsException2['default'];\n hb.Utils = Utils;\n hb.escapeExpression = Utils.escapeExpression;\n\n hb.VM = runtime;\n hb.template = function (spec) {\n return runtime.template(spec, hb);\n };\n\n return hb;\n}", "function create() {\n var hb = new base.HandlebarsEnvironment();\n\n Utils.extend(hb, base);\n hb.SafeString = _handlebarsSafeString2['default'];\n hb.Exception = _handlebarsException2['default'];\n hb.Utils = Utils;\n hb.escapeExpression = Utils.escapeExpression;\n\n hb.VM = runtime;\n hb.template = function (spec) {\n return runtime.template(spec, hb);\n };\n\n return hb;\n}", "function create() {\n var hb = new base.HandlebarsEnvironment();\n\n Utils.extend(hb, base);\n hb.SafeString = _handlebarsSafeString2['default'];\n hb.Exception = _handlebarsException2['default'];\n hb.Utils = Utils;\n hb.escapeExpression = Utils.escapeExpression;\n\n hb.VM = runtime;\n hb.template = function (spec) {\n return runtime.template(spec, hb);\n };\n\n return hb;\n}", "function create() {\n var hb = new base.HandlebarsEnvironment();\n\n Utils.extend(hb, base);\n hb.SafeString = _handlebarsSafeString2['default'];\n hb.Exception = _handlebarsException2['default'];\n hb.Utils = Utils;\n hb.escapeExpression = Utils.escapeExpression;\n\n hb.VM = runtime;\n hb.template = function (spec) {\n return runtime.template(spec, hb);\n };\n\n return hb;\n}", "function create() {\n var hb = new base.HandlebarsEnvironment();\n\n Utils.extend(hb, base);\n hb.SafeString = _handlebarsSafeString2['default'];\n hb.Exception = _handlebarsException2['default'];\n hb.Utils = Utils;\n hb.escapeExpression = Utils.escapeExpression;\n\n hb.VM = runtime;\n hb.template = function (spec) {\n return runtime.template(spec, hb);\n };\n\n return hb;\n}", "function create() {\n var hb = new base.HandlebarsEnvironment();\n\n Utils.extend(hb, base);\n hb.SafeString = _handlebarsSafeString2['default'];\n hb.Exception = _handlebarsException2['default'];\n hb.Utils = Utils;\n hb.escapeExpression = Utils.escapeExpression;\n\n hb.VM = runtime;\n hb.template = function (spec) {\n return runtime.template(spec, hb);\n };\n\n return hb;\n}", "function create() {\n var hb = new base.HandlebarsEnvironment();\n\n Utils.extend(hb, base);\n hb.SafeString = _handlebarsSafeString2['default'];\n hb.Exception = _handlebarsException2['default'];\n hb.Utils = Utils;\n hb.escapeExpression = Utils.escapeExpression;\n\n hb.VM = runtime;\n hb.template = function (spec) {\n return runtime.template(spec, hb);\n };\n\n return hb;\n}", "function create() {\n var hb = new base.HandlebarsEnvironment();\n\n Utils.extend(hb, base);\n hb.SafeString = _handlebarsSafeString2['default'];\n hb.Exception = _handlebarsException2['default'];\n hb.Utils = Utils;\n hb.escapeExpression = Utils.escapeExpression;\n\n hb.VM = runtime;\n hb.template = function (spec) {\n return runtime.template(spec, hb);\n };\n\n return hb;\n}", "function create() {\n var hb = new base.HandlebarsEnvironment();\n\n Utils.extend(hb, base);\n hb.SafeString = _handlebarsSafeString2['default'];\n hb.Exception = _handlebarsException2['default'];\n hb.Utils = Utils;\n hb.escapeExpression = Utils.escapeExpression;\n\n hb.VM = runtime;\n hb.template = function (spec) {\n return runtime.template(spec, hb);\n };\n\n return hb;\n}", "function create() {\n var hb = new base$$1.HandlebarsEnvironment();\n\n Utils.extend(hb, base$$1);\n hb.SafeString = _handlebarsSafeString2['default'];\n hb.Exception = _handlebarsException2['default'];\n hb.Utils = Utils;\n hb.escapeExpression = Utils.escapeExpression;\n\n hb.VM = runtime$$1;\n hb.template = function (spec) {\n return runtime$$1.template(spec, hb);\n };\n\n return hb;\n}", "async function createTestInstance() {\n instance = bigtable.instance(instanceId);\n const [, operation] = await instance.create({\n clusters: [\n {\n id: clusterId,\n location: 'us-central1-c',\n nodes: 3,\n },\n ],\n labels: {\n time_created: Date.now(),\n },\n });\n await operation.promise();\n return instance;\n}", "function create() {\n\t\t\t\tvar hb = new base.HandlebarsEnvironment();\n\n\t\t\t\tUtils.extend(hb, base);\n\t\t\t\thb.SafeString = _handlebarsSafeString2['default'];\n\t\t\t\thb.Exception = _handlebarsException2['default'];\n\t\t\t\thb.Utils = Utils;\n\t\t\t\thb.escapeExpression = Utils.escapeExpression;\n\n\t\t\t\thb.VM = runtime;\n\t\t\t\thb.template = function (spec) {\n\t\t\t\t\treturn runtime.template(spec, hb);\n\t\t\t\t};\n\n\t\t\t\treturn hb;\n\t\t\t}", "function BaseBackend(options) {\n this._options = options;\n if (!this._options.dsn) {\n _sentry_utils__WEBPACK_IMPORTED_MODULE_0__[\"logger\"].warn('No DSN provided, backend will not do anything.');\n }\n this._transport = this._setupTransport();\n }", "function create() {\n var hb = new base.HandlebarsEnvironment();\n\n Utils.extend(hb, base);\n hb.SafeString = _handlebarsSafeString2['default'];\n hb.Exception = _handlebarsException2['default'];\n hb.Utils = Utils;\n hb.escapeExpression = Utils.escapeExpression;\n\n hb.VM = runtime;\n hb.template = function(spec) {\n return runtime.template(spec, hb);\n };\n\n return hb;\n }", "function create() {\n\t var hb = new base.HandlebarsEnvironment();\n\n\t Utils.extend(hb, base);\n\t hb.SafeString = _handlebarsSafeString2['default'];\n\t hb.Exception = _handlebarsException2['default'];\n\t hb.Utils = Utils;\n\t hb.escapeExpression = Utils.escapeExpression;\n\n\t hb.VM = runtime;\n\t hb.template = function (spec) {\n\t return runtime.template(spec, hb);\n\t };\n\n\t return hb;\n\t}", "function create() {\n\t var hb = new base.HandlebarsEnvironment();\n\n\t Utils.extend(hb, base);\n\t hb.SafeString = _handlebarsSafeString2['default'];\n\t hb.Exception = _handlebarsException2['default'];\n\t hb.Utils = Utils;\n\t hb.escapeExpression = Utils.escapeExpression;\n\n\t hb.VM = runtime;\n\t hb.template = function (spec) {\n\t return runtime.template(spec, hb);\n\t };\n\n\t return hb;\n\t}", "function create() {\n\t var hb = new base.HandlebarsEnvironment();\n\n\t Utils.extend(hb, base);\n\t hb.SafeString = _handlebarsSafeString2['default'];\n\t hb.Exception = _handlebarsException2['default'];\n\t hb.Utils = Utils;\n\t hb.escapeExpression = Utils.escapeExpression;\n\n\t hb.VM = runtime;\n\t hb.template = function (spec) {\n\t return runtime.template(spec, hb);\n\t };\n\n\t return hb;\n\t}", "function create() {\n\t var hb = new base.HandlebarsEnvironment();\n\n\t Utils.extend(hb, base);\n\t hb.SafeString = _handlebarsSafeString2['default'];\n\t hb.Exception = _handlebarsException2['default'];\n\t hb.Utils = Utils;\n\t hb.escapeExpression = Utils.escapeExpression;\n\n\t hb.VM = runtime;\n\t hb.template = function (spec) {\n\t return runtime.template(spec, hb);\n\t };\n\n\t return hb;\n\t}", "function create() {\n\t var hb = new base.HandlebarsEnvironment();\n\n\t Utils.extend(hb, base);\n\t hb.SafeString = _handlebarsSafeString2['default'];\n\t hb.Exception = _handlebarsException2['default'];\n\t hb.Utils = Utils;\n\t hb.escapeExpression = Utils.escapeExpression;\n\n\t hb.VM = runtime;\n\t hb.template = function (spec) {\n\t return runtime.template(spec, hb);\n\t };\n\n\t return hb;\n\t}", "function create() {\n\t var hb = new base.HandlebarsEnvironment();\n\n\t Utils.extend(hb, base);\n\t hb.SafeString = _handlebarsSafeString2['default'];\n\t hb.Exception = _handlebarsException2['default'];\n\t hb.Utils = Utils;\n\t hb.escapeExpression = Utils.escapeExpression;\n\n\t hb.VM = runtime;\n\t hb.template = function (spec) {\n\t return runtime.template(spec, hb);\n\t };\n\n\t return hb;\n\t}", "function create() {\n\t var hb = new base.HandlebarsEnvironment();\n\n\t Utils.extend(hb, base);\n\t hb.SafeString = _handlebarsSafeString2['default'];\n\t hb.Exception = _handlebarsException2['default'];\n\t hb.Utils = Utils;\n\t hb.escapeExpression = Utils.escapeExpression;\n\n\t hb.VM = runtime;\n\t hb.template = function (spec) {\n\t return runtime.template(spec, hb);\n\t };\n\n\t return hb;\n\t}", "function create() {\n\t var hb = new base.HandlebarsEnvironment();\n\n\t Utils.extend(hb, base);\n\t hb.SafeString = _handlebarsSafeString2['default'];\n\t hb.Exception = _handlebarsException2['default'];\n\t hb.Utils = Utils;\n\t hb.escapeExpression = Utils.escapeExpression;\n\n\t hb.VM = runtime;\n\t hb.template = function (spec) {\n\t return runtime.template(spec, hb);\n\t };\n\n\t return hb;\n\t}", "function create() {\n\t var hb = new base.HandlebarsEnvironment();\n\n\t Utils.extend(hb, base);\n\t hb.SafeString = _handlebarsSafeString2['default'];\n\t hb.Exception = _handlebarsException2['default'];\n\t hb.Utils = Utils;\n\t hb.escapeExpression = Utils.escapeExpression;\n\n\t hb.VM = runtime;\n\t hb.template = function (spec) {\n\t return runtime.template(spec, hb);\n\t };\n\n\t return hb;\n\t}", "function create() {\n\t var hb = new base.HandlebarsEnvironment();\n\n\t Utils.extend(hb, base);\n\t hb.SafeString = _handlebarsSafeString2['default'];\n\t hb.Exception = _handlebarsException2['default'];\n\t hb.Utils = Utils;\n\t hb.escapeExpression = Utils.escapeExpression;\n\n\t hb.VM = runtime;\n\t hb.template = function (spec) {\n\t return runtime.template(spec, hb);\n\t };\n\n\t return hb;\n\t}", "function create() {\n\t var hb = new base.HandlebarsEnvironment();\n\n\t Utils.extend(hb, base);\n\t hb.SafeString = _handlebarsSafeString2['default'];\n\t hb.Exception = _handlebarsException2['default'];\n\t hb.Utils = Utils;\n\t hb.escapeExpression = Utils.escapeExpression;\n\n\t hb.VM = runtime;\n\t hb.template = function (spec) {\n\t return runtime.template(spec, hb);\n\t };\n\n\t return hb;\n\t}", "function createInstance(module, args) {\n\t\t\t// We'll either use the module directly, or we need\n\t\t\t// to instantiate/invoke it.\n\t\t\treturn typeof module == 'function'\n\t\t\t\t? instantiate(module, args, isConstructor)\n\t\t\t\t: Object.create(module);\n\t\t}", "async createDb (localConfig = {}) {\n try {\n let { dbName, bchjs } = localConfig\n\n if (!bchjs) {\n throw new Error('Instance of bchjs required when called createDb()')\n }\n\n // By default, use the DB name in the config file.\n if (!dbName) {\n dbName = this.config.orbitDbName\n }\n\n const orbitdb = await this.OrbitDB.createInstance(this.ipfs, {\n // directory: \"./orbitdb/examples/eventlog\",\n directory: './.ipfsdata/p2wdb/dbs/keyvalue',\n AccessControllers: AccessControllers\n })\n\n const options = {\n accessController: {\n type: 'payToWrite',\n write: ['*']\n }\n }\n\n // console.log('dbName: ', dbName)\n\n // Create the key-value store.\n this.db = await orbitdb.keyvalue(dbName, options)\n\n // Overwrite the default bchjs instance used by the pay-to-write access\n // controller.\n this.db.options.accessController.bchjs = bchjs\n this.db.access.bchjs = bchjs\n this.db.access._this = this.db.access\n // console.log('this.db: ', this.db)\n\n console.log('OrbitDB ID: ', this.db.id)\n\n // Load data persisted to the hard drive.\n // await this.db.load()\n this.db.load()\n\n // Signal that the OrbitDB is ready to use.\n this.isReady = true\n\n return this.db\n } catch (err) {\n console.error('Error in createDb(): ', err)\n throw err\n }\n }", "function create(label) {\n return {\n label: label\n };\n }", "function create(label) {\n return {\n label: label\n };\n }", "function create(label) {\n return {\n label: label\n };\n }", "static create() {\n switch (adapterConfig) {\n case ADAPTER.MS: // MSAdapter\n return new MSAdapter();\n case ADAPTER.MOCK: // MSAdapter\n return new MOCKAdapter();\n default:\n throw new Error(`cannot create ${adapterConfig} adapter, please check.`);\n }\n }", "static create() {\n return new ExampleBuilder();\n }", "createInstance(type, props, internalInstanceHandle) {\n // 'internalInstanceHandle' is not transparent here. So use host context methods\n // to get data from roots\n return createElement(type, props)\n }", "function createServerBehaviorObj()\r\n\r\n{\r\n\r\n return new SBRecordsetPHP();\r\n\r\n}" ]
[ "0.5948592", "0.5888448", "0.5738683", "0.5719487", "0.5687194", "0.5664829", "0.5615115", "0.55130094", "0.54893446", "0.5475631", "0.5469122", "0.54378015", "0.5437504", "0.5422579", "0.5422579", "0.54196054", "0.54155123", "0.5395348", "0.5395348", "0.53461933", "0.5314405", "0.5284873", "0.52724034", "0.52687246", "0.5263132", "0.5259828", "0.5250214", "0.52459544", "0.52405113", "0.52150697", "0.51998025", "0.5190245", "0.5178293", "0.5163753", "0.51408297", "0.5134593", "0.51101154", "0.5097171", "0.5097171", "0.50914234", "0.507433", "0.50695175", "0.50676066", "0.50676066", "0.50676066", "0.5064823", "0.5055188", "0.5037224", "0.5031959", "0.5031902", "0.50247747", "0.50230515", "0.50198656", "0.5002935", "0.5002307", "0.5002307", "0.5002307", "0.49989948", "0.49989948", "0.49989948", "0.49989948", "0.49989948", "0.49989948", "0.49989948", "0.49989948", "0.49989948", "0.49989948", "0.49989948", "0.49989948", "0.49989948", "0.49989948", "0.49989948", "0.49989948", "0.49989948", "0.49989948", "0.49960425", "0.49945793", "0.499442", "0.49884796", "0.49869934", "0.49743298", "0.49743298", "0.49743298", "0.49743298", "0.49743298", "0.49743298", "0.49743298", "0.49743298", "0.49743298", "0.49743298", "0.49743298", "0.49676442", "0.4966132", "0.49647236", "0.49647236", "0.49647236", "0.4957588", "0.49541214", "0.49488682", "0.49472436" ]
0.5222477
29
isNativeFetch checks if the given function is a native implementation of fetch()
function isNativeFetch(func) { return func && /^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(func.toString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isNativeFetch(func) {\n return func && /^function fetch\\(\\)\\s+\\{\\s+\\[native code\\]\\s+\\}$/.test(func.toString());\n }", "function isNativeFetch(func) {\n return func && /^function fetch\\(\\)\\s+\\{\\s+\\[native code\\]\\s+\\}$/.test(func.toString());\n}", "function isNativeFetch(func) {\n\t return func && /^function fetch\\(\\)\\s+\\{\\s+\\[native code\\]\\s+\\}$/.test(func.toString());\n\t}", "function isFunctionNative(func) {\n\n return (\n typeof func === \"function\"\n && func.toString().indexOf(\"native\") > -1\n );\n\n }", "function checkFetchResource(fn) {\n\t if (typeof fn !== 'function') throw new TypeError('Expected `fetchResource` to be a `function`, get a ' + ('`' + (typeof fetchResource === 'undefined' ? 'undefined' : _typeof(fetchResource)) + '`. Check what has been passed to ') + '`buildresourceConnector` or to `setFetchResource`');\n\t }", "get isNative() {\n return !!this.func;\n }", "function convertFetch(fn: FetchFunction): ExecuteFunction {\n return function fetch(operation, variables, cacheConfig, uploadables) {\n const result = fn(operation, variables, cacheConfig, uploadables);\n // Note: We allow FetchFunction to directly return Error to indicate\n // a failure to fetch. To avoid handling this special case throughout the\n // Relay codebase, it is explicitly handled here.\n if (result instanceof Error) {\n return new RelayObservable(sink => sink.error(result));\n }\n return RelayObservable.from(result).map(value =>\n convertToExecutePayload(operation, variables, value),\n );\n };\n}", "function hasFetch(vm) {\n return vm.$options && typeof vm.$options.fetch === \"function\";\n}", "static isFetchableUri(uri) {\r\n return (\r\n C.RECOG_RGX.PROTOCOL.test(uri)\r\n );\r\n }", "function isNativeFunction(f) {\n if ((typeof f) !== 'function') {\n return false;\n }\n var exp = /^function\\s+\\w*\\s*\\(\\s*\\)\\s*{\\s+\\[native code\\]\\s+}$/i;\n return exp.exec(Function.prototype.toString.call(f)) != null;\n}", "function isNativeFunction(f) {\n if ((typeof f) !== 'function') {\n return false;\n }\n var exp = /^function\\s+\\w*\\s*\\(\\s*\\)\\s*{\\s+\\[native code\\]\\s+}$/i;\n return exp.exec(Function.prototype.toString.call(f)) != null;\n}", "function browserSupportsAllFeatures() {\n return window.Promise && window.fetch;\n}", "getPromiseNative() {\n return (\n typeof window.Promise !== \"undefined\" &&\n window.Promise.toString().indexOf(\"[native code]\") !== -1\n );\n }", "function instrumentFetch() {\n\t\tif (!impl.monitorFetch ||\n\t\t // we don't check that fetch is a native function in case it was already wrapped\n\t\t // by another vendor\n\t\t typeof w.fetch !== \"function\" ||\n\t\t // native fetch support will define these, some polyfills like `unfetch` will not\n\t\t typeof w.Request !== \"function\" ||\n\t\t typeof w.Response !== \"function\" ||\n\t\t // native fetch needs Promise support\n\t\t typeof w.Promise !== \"function\" ||\n\t\t // if our window doesn't have fetch then it was probably polyfilled in the top window\n\t\t typeof window.fetch !== \"function\" ||\n\t\t // Github's `whatwg-fetch` polyfill sets this flag\n\t\t w.fetch.polyfill) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (BOOMR.proxy_fetch &&\n\t\t BOOMR.proxy_fetch === w.fetch) {\n\t\t\t// already instrumented\n\t\t\treturn;\n\t\t}\n\n\t\tif (BOOMR.proxy_fetch &&\n\t\t BOOMR.orig_fetch &&\n\t\t BOOMR.orig_fetch === w.fetch) {\n\n\t\t\t// was once instrumented and then uninstrumented, so just reapply the old instrumented object\n\t\t\tw.fetch = BOOMR.proxy_fetch;\n\n\t\t\treturn;\n\t\t}\n\n\t\t// if there's a orig_fetch on the window, use that first (if another lib is overwriting fetch)\n\t\tBOOMR.orig_fetch = w.orig_fetch || w.fetch;\n\n\t\tBOOMR.proxy_fetch = function(input, init) {\n\t\t\tvar url, method, payload,\n\t\t\t // we want to keep initiator type as `xhr` for backwards compatibility.\n\t\t\t // We'll differentiate fetch by `http.type=f` beacon param\n\t\t\t resource = { timing: {}, initiator: \"xhr\" };\n\n\t\t\t// case where fetch() is called with a Request object\n\t\t\tif (typeof input === \"object\" && input instanceof w.Request) {\n\t\t\t\turl = input.url;\n\n\t\t\t\t// init overrides input\n\t\t\t\tmethod = (init && init.method) || input.method || \"GET\";\n\t\t\t\tif (impl.captureXhrRequestResponse) {\n\t\t\t\t\tpayload = (init && init.body) || input.body || undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// case where fetch() is called with a string url (or anything else)\n\t\t\telse {\n\t\t\t\turl = input;\n\t\t\t\tmethod = (init && init.method) || \"GET\";\n\t\t\t\tif (impl.captureXhrRequestResponse) {\n\t\t\t\t\tpayload = (init && init.body) || undefined;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ta.href = url;\n\t\t\tif (impl.excludeFilter(a)) {\n\t\t\t\t// this fetch should be excluded from instrumentation\n\t\t\t\t\n\t\t\t\t// call the original open method\n\t\t\t\treturn BOOMR.orig_fetch.apply(w, arguments);\n\t\t\t}\n\t\t\tBOOMR.fireEvent(\"xhr_init\", \"fetch\");\n\n\t\t\tresource.url = a.href;\n\t\t\tresource.method = method;\n\t\t\tresource.type = \"fetch\"; // pending event type will still be \"xhr\"\n\t\t\tif (payload) {\n\t\t\t\tresource.requestPayload = payload;\n\t\t\t}\n\n\t\t\tBOOMR.fireEvent(\"xhr_send\", {resource: resource});\n\n\t\t\thandler.addEvent(resource);\n\n\t\t\ttry {\n\t\t\t\tresource.timing.requestStart = BOOMR.now();\n\t\t\t\tvar promise = BOOMR.orig_fetch.apply(this, arguments);\n\n\t\t\t\t/**\n\t\t\t\t * wraps a onFulfilled or onRejection function that is passed to\n\t\t\t\t * a promise's `.then` method. Will attempt to detect when there\n\t\t\t\t * are no other promises in the chain that need to be executed and\n\t\t\t\t * then mark the resource as finished. For simplicity, we only track\n\t\t\t\t * the first `.then` call of each promise.\n\t\t\t\t *\n\t\t\t\t * @param {Promise} Promise that the callback is attached to\n\t\t\t\t * @param {function} onFulfilled or onRejection callback function\n\t\t\t\t * @param {Object} Fetch resource that we're handling in this promise\n\t\t\t\t *\n\t\t\t\t * @returns {function} Wrapped callback function\n\t\t\t\t */\n\t\t\t\tfunction wrapCallback(_promise, _fn, _resource) {\n\t\t\t\t\tfunction done() {\n\t\t\t\t\t\tvar now;\n\t\t\t\t\t\t// check if the response body was used, if not then we'll\n\t\t\t\t\t\t// wait a little bit longer. Hopefully it is a short response\n\t\t\t\t\t\t// (posibly only containing headers and status) and the entry\n\t\t\t\t\t\t// will be available in RT if we wait.\n\t\t\t\t\t\t// We don't detect if the response was consumed from a cloned object\n\t\t\t\t\t\tif (_resource.fetchResponse && !_resource.fetchResponse.bodyUsed && impl.fetchBodyUsedWait) {\n\t\t\t\t\t\t\tnow = BOOMR.now();\n\t\t\t\t\t\t\t_resource.responseBodyNotUsed = true;\n\t\t\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\t\t\timpl.loadFinished(_resource, now);\n\t\t\t\t\t\t\t}, impl.fetchBodyUsedWait);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\timpl.loadFinished(_resource);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t/**\n\t\t\t\t\t * @returns {Promise} Promise result of callback or rethrows exception from callback\n\t\t\t\t\t */\n\t\t\t\t\treturn function() {\n\t\t\t\t\t\tvar p, np = _promise._bmrNextP;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tp = _fn.apply((this === window ? w : this), arguments);\n\n\t\t\t\t\t\t\t// no exception thrown, check if there's a onFulfilled\n\t\t\t\t\t\t\t// callback in the chain\n\t\t\t\t\t\t\twhile (np && !np._bmrHasOnFulfilled) {\n\t\t\t\t\t\t\t\tnp = np._bmrNextP; // next promise in the chain\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (!np) {\n\t\t\t\t\t\t\t\t// we didn't find one, if the callback result is a promise\n\t\t\t\t\t\t\t\t// then we'll wait for it to complete, if not mark this\n\t\t\t\t\t\t\t\t// resource as finished now\n\t\t\t\t\t\t\t\tif (p instanceof w.Promise) {\n\t\t\t\t\t\t\t\t\tp.then = wrapThen(p, p.then, _resource);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tdone();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn p;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch (e) {\n\t\t\t\t\t\t\t// exception thrown, check if there's a onRejected\n\t\t\t\t\t\t\t// callback in the chain\n\t\t\t\t\t\t\twhile (np && !np._bmrHasOnRejected) {\n\t\t\t\t\t\t\t\tnp = np._bmrNextP; // next promise in the chain\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (!np) {\n\t\t\t\t\t\t\t\t// we didn't find one, mark the resource as complete\n\t\t\t\t\t\t\t\tdone();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tthrow e; // rethrow exception\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t};\n\n\t\t\t\t/**\n\t\t\t\t * wraps `.then` so that we can in turn wrap onFulfilled or onRejection that\n\t\t\t\t * are passed to it. Wrapping `.then` will also trap calls from `.catch` and `.finally`\n\t\t\t\t *\n\t\t\t\t * @param {Promise} Promise that we're wrapping `.then` method for\n\t\t\t\t * @param {function} `.then` function that will be wrapped\n\t\t\t\t * @param {Object} Fetch resource that we're handling in this promise\n\t\t\t\t *\n\t\t\t\t * @returns {function} Wrapped `.then` function or original `.then` function\n\t\t\t\t * if `.then` was already called on this promise\n\t\t\t\t */\n\t\t\t\tfunction wrapThen(_promise, _then, _resource) {\n\t\t\t\t\t// only track the first `.then` call\n\t\t\t\t\tif (_promise._bmrNextP) {\n\t\t\t\t\t\treturn _then; // return unwrapped `.then`\n\t\t\t\t\t}\n\t\t\t\t\t/**\n\t\t\t\t\t * @returns {Promise} Result of `.then` call\n\t\t\t\t\t */\n\t\t\t\t\treturn function(/* onFulfilled, onRejection */) {\n\t\t\t\t\t\tvar args = Array.prototype.slice.call(arguments);\n\t\t\t\t\t\tif (args.length > 0) {\n\t\t\t\t\t\t\tif (typeof args[0] === \"function\") {\n\t\t\t\t\t\t\t\targs[0] = wrapCallback(_promise, args[0], _resource);\n\t\t\t\t\t\t\t\t_promise._bmrHasOnFulfilled = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (args.length > 1) {\n\t\t\t\t\t\t\t\tif (typeof args[1] === \"function\") {\n\t\t\t\t\t\t\t\t\targs[1] = wrapCallback(_promise, args[1], _resource);\n\t\t\t\t\t\t\t\t\t_promise._bmrHasOnRejected = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar p = _then.apply(_promise, args);\n\t\t\t\t\t\t_promise._bmrNextP = p; // next promise in the chain\n\t\t\t\t\t\t// p should always be a Promise\n\t\t\t\t\t\tp.then = wrapThen(p, p.then, _resource);\n\t\t\t\t\t\treturn p;\n\t\t\t\t\t};\n\t\t\t\t};\n\n\t\t\t\t// we can't just wrap functions that read the response (e.g.`.text`, `json`, etc.) or\n\t\t\t\t// instrument `.body.getReader`'s stream because they might never be called.\n\t\t\t\t// We'll wrap `.then` and all the callback handlers to figure out which\n\t\t\t\t// is the last handler to execute. Once the last handler runs, we'll mark the resource\n\t\t\t\t// as finished. For simplicity, we only track the first `.then` call of each promise\n\t\t\t\tpromise.then = wrapThen(promise, promise.then, resource);\n\n\t\t\t\treturn promise.then(function(response) {\n\t\t\t\t\tvar i, res, ct, parseJson = false, parseXML = false;\n\n\t\t\t\t\tif (response.status < 200 || response.status >= 400) {\n\t\t\t\t\t\t// put the HTTP error code on the resource if it's not a success\n\t\t\t\t\t\tresource.status = response.status;\n\t\t\t\t\t}\n\n\t\t\t\t\tresource.fetchResponse = response;\n\n\t\t\t\t\tif (resource.index >= 0) {\n\t\t\t\t\t\t// response is starting to come in, we'll start monitoring for\n\t\t\t\t\t\t// DOM mutations\n\t\t\t\t\t\thandler.monitorMO(resource.index);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (impl.captureXhrRequestResponse) {\n\t\t\t\t\t\t// clone not supported in Safari yet\n\t\t\t\t\t\tif (typeof response.clone === \"function\") {\n\t\t\t\t\t\t\t// content-type detection to determine if we should parse json or xml\n\t\t\t\t\t\t\tct = response.headers.get(\"content-type\");\n\t\t\t\t\t\t\tif (ct) {\n\t\t\t\t\t\t\t\tparseJson = ct.indexOf(\"json\") !== -1;\n\t\t\t\t\t\t\t\tparseXML = ct.indexOf(\"xml\") !== -1;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tresource.response = {};\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tres = response.clone();\n\t\t\t\t\t\t\t\tres.text().then(function(text) {\n\t\t\t\t\t\t\t\t\tresource.response.text = text;\n\t\t\t\t\t\t\t\t\tresource.response.raw = text; // for fetch, we'll set raw to text value\n\t\t\t\t\t\t\t\t\tif (parseXML && typeof w.DOMParser === \"function\") {\n\t\t\t\t\t\t\t\t\t\tresource.response.xml = (new w.DOMParser()).parseFromString(text, \"text/xml\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}).then(null, function(reason) { // `.catch` will cause parse errors in old browsers\n\t\t\t\t\t\t\t\t\t// empty (avoid unhandled rejection)\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcatch (e) {\n\t\t\t\t\t\t\t\t// empty\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (parseJson) {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tres = response.clone();\n\t\t\t\t\t\t\t\t\tres.json().then(function(json) {\n\t\t\t\t\t\t\t\t\t\tresource.response.json = json;\n\t\t\t\t\t\t\t\t\t}).then(null, function(reason) { // `.catch` will cause parse errors in old browsers\n\t\t\t\t\t\t\t\t\t\t// empty (avoid unhandled rejection)\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcatch (e) {\n\t\t\t\t\t\t\t\t\t// empty\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn response;\n\t\t\t\t}, function(reason) {\n\t\t\t\t\t// fetch() request failed (eg. cross-origin error, aborted, connection dropped, etc.)\n\t\t\t\t\t// we'll let the `.then` wrapper call finished for this resource\n\n\t\t\t\t\t// check if the fetch was aborted otherwise mark it as an error\n\t\t\t\t\tif (reason && (reason.name === \"AbortError\" || reason.code === 20)) {\n\t\t\t\t\t\tresource.status = XHR_STATUS_ABORT;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tresource.status = XHR_STATUS_ERROR;\n\t\t\t\t\t}\n\n\t\t\t\t\t// rethrow the native method's exception\n\t\t\t\t\tthrow reason;\n\t\t\t\t});\n\t\t\t}\n\t\t\tcatch (e) {\n\t\t\t\t// there was an exception during fetch()\n\t\t\t\tresource.status = XHR_STATUS_OPEN_EXCEPTION;\n\t\t\t\timpl.loadFinished(resource);\n\n\t\t\t\t// rethrow the native method's exception\n\t\t\t\tthrow e;\n\t\t\t}\n\t\t};\n\n\t\t// Overwrite window.fetch, ensuring the original is swapped back in\n\t\t// if the Boomerang IFRAME is unloaded. uninstrumentFetch() may also\n\t\t// be used to swap the original back in.\n\t\tBOOMR.utils.overwriteNative(w, \"fetch\", BOOMR.proxy_fetch);\n\t}", "function wrappedFetch() {\n\t var wrappedPromise = {};\n\t\n\t var promise = new PouchPromise(function (resolve, reject) {\n\t wrappedPromise.resolve = resolve;\n\t wrappedPromise.reject = reject;\n\t });\n\t\n\t var args = new Array(arguments.length);\n\t\n\t for (var i = 0; i < args.length; i++) {\n\t args[i] = arguments[i];\n\t }\n\t\n\t wrappedPromise.promise = promise;\n\t\n\t PouchPromise.resolve().then(function () {\n\t return fetch.apply(null, args);\n\t }).then(function (response) {\n\t wrappedPromise.resolve(response);\n\t }).catch(function (error) {\n\t wrappedPromise.reject(error);\n\t });\n\t\n\t return wrappedPromise;\n\t}", "function wrappedFetch() {\n var wrappedPromise = {};\n\n var promise = new PouchPromise$1(function (resolve, reject) {\n wrappedPromise.resolve = resolve;\n wrappedPromise.reject = reject;\n });\n\n var args = new Array(arguments.length);\n\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n\n wrappedPromise.promise = promise;\n\n PouchPromise$1.resolve().then(function () {\n return fetch.apply(null, args);\n }).then(function (response) {\n wrappedPromise.resolve(response);\n }).catch(function (error) {\n wrappedPromise.reject(error);\n });\n\n return wrappedPromise;\n}", "function wrappedFetch() {\n var wrappedPromise = {};\n\n var promise = new PouchPromise$1(function (resolve, reject) {\n wrappedPromise.resolve = resolve;\n wrappedPromise.reject = reject;\n });\n\n var args = new Array(arguments.length);\n\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n\n wrappedPromise.promise = promise;\n\n PouchPromise$1.resolve().then(function () {\n return fetch.apply(null, args);\n }).then(function (response) {\n wrappedPromise.resolve(response);\n }).catch(function (error) {\n wrappedPromise.reject(error);\n });\n\n return wrappedPromise;\n}", "function wrappedFetch() {\n var wrappedPromise = {};\n\n var promise = new PouchPromise(function (resolve, reject) {\n wrappedPromise.resolve = resolve;\n wrappedPromise.reject = reject;\n });\n\n var args = new Array(arguments.length);\n\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n\n wrappedPromise.promise = promise;\n\n PouchPromise.resolve().then(function () {\n return fetch.apply(null, args);\n }).then(function (response) {\n wrappedPromise.resolve(response);\n }).catch(function (error) {\n wrappedPromise.reject(error);\n });\n\n return wrappedPromise;\n}", "function wrappedFetch() {\n var wrappedPromise = {};\n\n var promise = new PouchPromise$1(function (resolve, reject) {\n wrappedPromise.resolve = resolve;\n wrappedPromise.reject = reject;\n });\n\n var args = new Array(arguments.length);\n\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n\n wrappedPromise.promise = promise;\n\n PouchPromise$1.resolve().then(function () {\n return fetch.apply(null, args);\n }).then(function (response) {\n wrappedPromise.resolve(response);\n })[\"catch\"](function (error) {\n wrappedPromise.reject(error);\n });\n\n return wrappedPromise;\n}", "function getFetchMethod(fetchArgs) {\n if (fetchArgs === void 0) { fetchArgs = []; }\n if ('Request' in global && Object(_is__WEBPACK_IMPORTED_MODULE_1__[\"isInstanceOf\"])(fetchArgs[0], Request) && fetchArgs[0].method) {\n return String(fetchArgs[0].method).toUpperCase();\n }\n if (fetchArgs[1] && fetchArgs[1].method) {\n return String(fetchArgs[1].method).toUpperCase();\n }\n return 'GET';\n}", "function isNative (Ctor) {\n return typeof Ctor === 'function' && /native code/.test(Ctor.toString())\n}", "function isNative (Ctor) {\n return typeof Ctor === 'function' && /native code/.test(Ctor.toString())\n}", "cacheNatives() {\n return this.evaluateScriptOnLoad(`window.__nativePromise = Promise;\n window.__nativeError = Error;`);\n }", "function wrappedFetch() {\n var wrappedPromise = {};\n\n var promise = new Promise(function (resolve, reject) {\n wrappedPromise.resolve = resolve;\n wrappedPromise.reject = reject;\n });\n\n var args = new Array(arguments.length);\n\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n\n wrappedPromise.promise = promise;\n\n Promise.resolve().then(function () {\n return fetch.apply(null, args);\n }).then(function (response) {\n wrappedPromise.resolve(response);\n }).catch(function (error) {\n wrappedPromise.reject(error);\n });\n\n return wrappedPromise;\n }", "function isFetching(state = true, { type }) {\n switch (type) {\n case 'FETCH_REQUEST':\n return true;\n case 'FETCH_SUCCESS':\n case 'FETCH_FAILURE':\n return false;\n default:\n return state;\n }\n}", "_canFetch() {\n let now = Date.now();\n let elapsed = Math.floor( ( now - this.last ) / 1000 );\n let delay = this._options.fetchDelay | 0;\n\n if ( this.fetching || this.last >= now ) return false; // busy, wait\n if ( delay && elapsed < delay ) return false; // too soon, wait\n return true; // looks good\n }", "function _detectNodeCrypto(fn) {\n\t return forge.util.isNodejs && typeof _crypto[fn] === 'function';\n\t}", "function _detectNodeCrypto(fn) {\n return forge.util.isNodejs && typeof _crypto[fn] === 'function';\n}", "function _detectNodeCrypto(fn) {\n return forge.util.isNodejs && typeof _crypto[fn] === 'function';\n}", "function browserSupportsAllFeatures() {\n return window.Promise && window.fetch && window.Symbol;\n}", "async function fetchAsync(func) { // eslint-disable-line no-unused-vars\r\n const response = await func();\r\n return response;\r\n}", "shouldFetch(state) {\n return true\n }", "shouldFetch(state) {\n return true\n }", "async fetch() {\n return await ping()\n }", "fetch(url, callback, method = 'GET', postData = null) {\n fetch(this.baseUrl+url, {\n method: method,\n headers: {\n 'Content-Type': 'application/json',\n 'Authorization': 'Bearer ' + this.jwt\n },\n body: postData?JSON.stringify(postData):null\n })\n .then((response) => {\n return response.json();\n })\n .then((json) => {\n if (json.result === false) {\n console.log('Api error for \\''+url+'\\': '+json.message);\n return callback(json.message, null);\n }\n return callback(null, json);\n })\n .catch((exception) => {\n console.log('Api exception for \\''+url+'\\': '+exception);\n return callback(exception, null);\n });\n }", "async function schemeFetch (fetchParams) {\n // Note: since the connection is destroyed on redirect, which sets fetchParams to a\n // cancelled state, we do not want this condition to trigger *unless* there have been\n // no redirects. See https://github.com/nodejs/undici/issues/1776\n // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams.\n if (isCancelled(fetchParams) && fetchParams.request.redirectCount === 0) {\n return makeAppropriateNetworkError(fetchParams)\n }\n\n // 2. Let request be fetchParams’s request.\n const { request } = fetchParams\n\n const { protocol: scheme } = requestCurrentURL(request)\n\n // 3. Switch on request’s current URL’s scheme and run the associated steps:\n switch (scheme) {\n case 'about:': {\n // If request’s current URL’s path is the string \"blank\", then return a new response\n // whose status message is `OK`, header list is « (`Content-Type`, `text/html;charset=utf-8`) »,\n // and body is the empty byte sequence as a body.\n\n // Otherwise, return a network error.\n return makeNetworkError('about scheme is not supported')\n }\n case 'blob:': {\n if (!resolveObjectURL) {\n resolveObjectURL = require('buffer').resolveObjectURL\n }\n\n // 1. Let blobURLEntry be request’s current URL’s blob URL entry.\n const blobURLEntry = requestCurrentURL(request)\n\n // https://github.com/web-platform-tests/wpt/blob/7b0ebaccc62b566a1965396e5be7bb2bc06f841f/FileAPI/url/resources/fetch-tests.js#L52-L56\n // Buffer.resolveObjectURL does not ignore URL queries.\n if (blobURLEntry.search.length !== 0) {\n return makeNetworkError('NetworkError when attempting to fetch resource.')\n }\n\n const blobURLEntryObject = resolveObjectURL(blobURLEntry.toString())\n\n // 2. If request’s method is not `GET`, blobURLEntry is null, or blobURLEntry’s\n // object is not a Blob object, then return a network error.\n if (request.method !== 'GET' || !isBlobLike(blobURLEntryObject)) {\n return makeNetworkError('invalid method')\n }\n\n // 3. Let bodyWithType be the result of safely extracting blobURLEntry’s object.\n const bodyWithType = safelyExtractBody(blobURLEntryObject)\n\n // 4. Let body be bodyWithType’s body.\n const body = bodyWithType[0]\n\n // 5. Let length be body’s length, serialized and isomorphic encoded.\n const length = isomorphicEncode(`${body.length}`)\n\n // 6. Let type be bodyWithType’s type if it is non-null; otherwise the empty byte sequence.\n const type = bodyWithType[1] ?? ''\n\n // 7. Return a new response whose status message is `OK`, header list is\n // « (`Content-Length`, length), (`Content-Type`, type) », and body is body.\n const response = makeResponse({\n statusText: 'OK',\n headersList: [\n ['content-length', { name: 'Content-Length', value: length }],\n ['content-type', { name: 'Content-Type', value: type }]\n ]\n })\n\n response.body = body\n\n return response\n }\n case 'data:': {\n // 1. Let dataURLStruct be the result of running the\n // data: URL processor on request’s current URL.\n const currentURL = requestCurrentURL(request)\n const dataURLStruct = dataURLProcessor(currentURL)\n\n // 2. If dataURLStruct is failure, then return a\n // network error.\n if (dataURLStruct === 'failure') {\n return makeNetworkError('failed to fetch the data URL')\n }\n\n // 3. Let mimeType be dataURLStruct’s MIME type, serialized.\n const mimeType = serializeAMimeType(dataURLStruct.mimeType)\n\n // 4. Return a response whose status message is `OK`,\n // header list is « (`Content-Type`, mimeType) »,\n // and body is dataURLStruct’s body as a body.\n return makeResponse({\n statusText: 'OK',\n headersList: [\n ['content-type', { name: 'Content-Type', value: mimeType }]\n ],\n body: safelyExtractBody(dataURLStruct.body)[0]\n })\n }\n case 'file:': {\n // For now, unfortunate as it is, file URLs are left as an exercise for the reader.\n // When in doubt, return a network error.\n return makeNetworkError('not implemented... yet...')\n }\n case 'http:':\n case 'https:': {\n // Return the result of running HTTP fetch given fetchParams.\n\n return await httpFetch(fetchParams)\n .catch((err) => makeNetworkError(err))\n }\n default: {\n return makeNetworkError('unknown scheme')\n }\n }\n}", "function MakeClosure_CallFetch(loader, load) {\n return function (address) {\n //> 1. Let loader be F.[[Loader]].\n //> 2. Let load be F.[[Load]].\n\n //> 3. If load.[[LinkSets]] is an empty List, return undefined.\n if (callFunction(std_Set_get_size, load.linkSets) === 0)\n return;\n\n //> 4. Set the [[Address]] field of load to address.\n load.address = address;\n\n //> 5. Let hook be the result of Get(loader, `\"fetch\"`).\n //> 6. ReturnIfAbrupt(hook).\n //> 7. If IsCallable(hook) is false, throw a TypeError exception.\n //> 8. Let obj be the result of calling\n //> ObjectCreate(%ObjectPrototype%, ()).\n //> 9. Call SimpleDefine(obj, `\"name\"`, load.[[Name]]).\n //> 10. Call SimpleDefine(obj, `\"metadata\"`, load.[[Metadata]]).\n //> 11. Call SimpleDefine(obj, `\"address\"`, address).\n //> 12. Return the result of calling the [[Call]] internal method of\n //> hook with loader and (obj) as arguments.\n return loader.fetch({\n name: load.name,\n metadata: load.metadata,\n address: address\n });\n };\n}", "simpleFetch(url, method = \"GET\", queryParams = null) {\n const urlObject = new URL(url);\n if (queryParams)\n urlObject.search = new URLSearchParams(queryParams).toString();\n let headers = new Headers({\n credentials: \"same-origin\",\n \"X-Requested-With\": \"XMLHttpRequest\",\n });\n return fetch(urlObject, { headers, method });\n }", "function detectEval() {\n // Don't test for eval if we're running in a Chrome App environment.\n // We check for APIs set that only exist in a Chrome App context.\n if (typeof chrome !== 'undefined' && chrome.app && chrome.app.runtime) {\n return false;\n }\n\n // Firefox OS Apps do not allow eval. This feature detection is very hacky\n // but even if some other platform adds support for this function this code\n // will continue to work.\n if (typeof navigator != 'undefined' && navigator.getDeviceStorage) {\n return false;\n }\n\n try {\n var f = new Function('', 'return true;');\n return f();\n } catch (ex) {\n return false;\n }\n}", "_fetchRequest(url, options) {\n return fetch(url, options);\n }", "async function test(url) {\n let allowed = true;\n try {\n await fetch(url);\n } catch (e) {\n allowed = false;\n }\n return allowed;\n}", "async function fetchExchangeRateInNativeAsset(type, dst_network, claimed_asset, src_network, src_asset, cached) {\n\tconst nativeSymbol = nativeSymbols[dst_network];\n\tif (!nativeSymbol)\n\t\tthrow Error(`native symbol for network ${dst_network} unknown`);\n\tif (type === 'repatriation')\n\t\treturn await tryGetTokenPrice(dst_network, claimed_asset, nativeSymbol, cached);\n\tlet rate = await tryGetTokenPrice(src_network, src_asset, nativeSymbol, cached);\n\tif (rate)\n\t\treturn rate;\n\tif (src_network === 'Obyte') {\n\t\tif (src_asset === 'base')\n\t\t\trate = await fetchCryptocompareExchangeRateCached('GBYTE', nativeSymbol, cached)\n\t\telse {\n\t\t\tconst prices = await fetchObyteTokenPricesCached(cached);\n\t\t\tconst price_in_usd = prices[toMainnetObyteAsset(src_asset)];\n\t\t\tif (!price_in_usd)\n\t\t\t\treturn null;\n\t\t\tconst native_price_in_usd = await fetchCryptocompareExchangeRateCached(nativeSymbol, 'USD', cached)\n\t\t\trate = price_in_usd / native_price_in_usd\n\t\t}\n\t}\n\treturn rate;\n}", "static fetch(name, callback, onlyFresh=false) {\n if (typeof fetch !== 'undefined' && typeof caches !== 'undefined' && (window.location.protocol === \"https:\" || window.location.hostname === \"localhost\")) {\n caches.open(\"board/agenda\").then((cache) => {\n let fetched = undefined;\n Store.dispatch(Actions.clockIncrement());\n\n // construct request\n let request = new Request(`../api/${name}`, {\n method: \"get\",\n credentials: \"include\",\n headers: { Accept: \"application/json\" }\n });\n\n // dispatch request\n fetch(request).then((response) => {\n if (!response.ok) throw response.statusText;\n cache.put(request, response.clone());\n\n response.json().then(json => {\n if (fetched === undefined || JSON.stringify(fetched) !== JSON.stringify(json)) {\n if (fetched === undefined) Store.dispatch(Actions.clockDecrement());\n fetched = json;\n callback(null, json, true)\n }\n })\n .catch(error => {\n console.error(`fetch ${request.url}:\\n${error}`)\n })\n .finally(() => {\n if (fetched === undefined) Store.dispatch(Actions.clockDecrement());\n })\n });\n\n // check cache\n if (!onlyFresh) {\n cache.match(`../api/${name}`).then(response => {\n if (response && fetched === undefined) {\n try {\n response.json().then(json => {\n if (fetched === undefined) Store.dispatch(Actions.clockDecrement());\n if (json) {\n callback(null, json, false)\n fetched = json;\n }\n })\n } catch (error) {\n if (error.name !== 'SyntaxError') callback(error);\n }\n }\n })\n }\n })\n } else if (typeof XMLHttpRequest !== 'undefined') {\n // retrieve from the network only\n retrieve(name, \"json\", data => callback(null, data, true))\n }\n }", "async function schemeFetch (fetchParams) {\n\t // 1. If fetchParams is canceled, then return the appropriate network error for fetchParams.\n\t if (isCancelled(fetchParams)) {\n\t return makeAppropriateNetworkError(fetchParams)\n\t }\n\n\t // 2. Let request be fetchParams’s request.\n\t const { request } = fetchParams;\n\n\t const { protocol: scheme } = requestCurrentURL(request);\n\n\t // 3. Switch on request’s current URL’s scheme and run the associated steps:\n\t switch (scheme) {\n\t case 'about:': {\n\t // If request’s current URL’s path is the string \"blank\", then return a new response\n\t // whose status message is `OK`, header list is « (`Content-Type`, `text/html;charset=utf-8`) »,\n\t // and body is the empty byte sequence as a body.\n\n\t // Otherwise, return a network error.\n\t return makeNetworkError('about scheme is not supported')\n\t }\n\t case 'blob:': {\n\t if (!resolveObjectURL) {\n\t resolveObjectURL = require$$7.resolveObjectURL;\n\t }\n\n\t // 1. Let blobURLEntry be request’s current URL’s blob URL entry.\n\t const blobURLEntry = requestCurrentURL(request);\n\n\t // https://github.com/web-platform-tests/wpt/blob/7b0ebaccc62b566a1965396e5be7bb2bc06f841f/FileAPI/url/resources/fetch-tests.js#L52-L56\n\t // Buffer.resolveObjectURL does not ignore URL queries.\n\t if (blobURLEntry.search.length !== 0) {\n\t return makeNetworkError('NetworkError when attempting to fetch resource.')\n\t }\n\n\t const blobURLEntryObject = resolveObjectURL(blobURLEntry.toString());\n\n\t // 2. If request’s method is not `GET`, blobURLEntry is null, or blobURLEntry’s\n\t // object is not a Blob object, then return a network error.\n\t if (request.method !== 'GET' || !isBlobLike(blobURLEntryObject)) {\n\t return makeNetworkError('invalid method')\n\t }\n\n\t // 3. Let bodyWithType be the result of safely extracting blobURLEntry’s object.\n\t const bodyWithType = safelyExtractBody(blobURLEntryObject);\n\n\t // 4. Let body be bodyWithType’s body.\n\t const body = bodyWithType[0];\n\n\t // 5. Let length be body’s length, serialized and isomorphic encoded.\n\t const length = `${body.length}`;\n\n\t // 6. Let type be bodyWithType’s type if it is non-null; otherwise the empty byte sequence.\n\t const type = bodyWithType[1] ?? '';\n\n\t // 7. Return a new response whose status message is `OK`, header list is\n\t // « (`Content-Length`, length), (`Content-Type`, type) », and body is body.\n\t const response = makeResponse({\n\t statusText: 'OK',\n\t headersList: [\n\t ['content-length', length],\n\t ['content-type', type]\n\t ]\n\t });\n\n\t response.body = body;\n\n\t return response\n\t }\n\t case 'data:': {\n\t // 1. Let dataURLStruct be the result of running the\n\t // data: URL processor on request’s current URL.\n\t const currentURL = requestCurrentURL(request);\n\t const dataURLStruct = dataURLProcessor(currentURL);\n\n\t // 2. If dataURLStruct is failure, then return a\n\t // network error.\n\t if (dataURLStruct === 'failure') {\n\t return makeNetworkError('failed to fetch the data URL')\n\t }\n\n\t // 3. Let mimeType be dataURLStruct’s MIME type, serialized.\n\t const mimeType = serializeAMimeType(dataURLStruct.mimeType);\n\n\t // 4. Return a response whose status message is `OK`,\n\t // header list is « (`Content-Type`, mimeType) »,\n\t // and body is dataURLStruct’s body as a body.\n\t return makeResponse({\n\t statusText: 'OK',\n\t headersList: [\n\t ['content-type', mimeType]\n\t ],\n\t body: safelyExtractBody(dataURLStruct.body)[0]\n\t })\n\t }\n\t case 'file:': {\n\t // For now, unfortunate as it is, file URLs are left as an exercise for the reader.\n\t // When in doubt, return a network error.\n\t return makeNetworkError('not implemented... yet...')\n\t }\n\t case 'http:':\n\t case 'https:': {\n\t // Return the result of running HTTP fetch given fetchParams.\n\n\t return await httpFetch(fetchParams)\n\t .catch((err) => makeNetworkError(err))\n\t }\n\t default: {\n\t return makeNetworkError('unknown scheme')\n\t }\n\t }\n\t}", "async fetch(input, init) {\n return node_fetch__default[\"default\"](input, init);\n }", "async fetch(input, init) {\n return node_fetch__default[\"default\"](input, init);\n }", "executeFetch(url, data, req){\n\t\tlet callId = this.generateCallId(url, data)\n\t\tthis.stageCall(url, data, fetch(url, req))\n\t\treturn this.makeCall(callId)\n\t}", "function _checkBlobSupportWithoutCaching(idb) {\n\t return new Promise(function (resolve, reject) {\n\t var blob = _createBlob([''], { type: 'image/png' });\n\t var txn = idb.transaction([DETECT_BLOB_SUPPORT_STORE], 'readwrite');\n\t txn.objectStore(DETECT_BLOB_SUPPORT_STORE).put(blob, 'key');\n\t txn.oncomplete = function () {\n\t // have to do it in a separate transaction, else the correct\n\t // content type is always returned\n\t var blobTxn = idb.transaction([DETECT_BLOB_SUPPORT_STORE], 'readwrite');\n\t var getBlobReq = blobTxn.objectStore(DETECT_BLOB_SUPPORT_STORE).get('key');\n\t getBlobReq.onerror = reject;\n\t getBlobReq.onsuccess = function (e) {\n\n\t var storedBlob = e.target.result;\n\t var url = URL.createObjectURL(storedBlob);\n\n\t _blobAjax(url).then(function (res) {\n\t resolve(!!(res && res.type === 'image/png'));\n\t }, function () {\n\t resolve(false);\n\t }).then(function () {\n\t URL.revokeObjectURL(url);\n\t });\n\t };\n\t };\n\t txn.onerror = txn.onabort = reject;\n\t })['catch'](function () {\n\t return false; // error, so assume unsupported\n\t });\n\t }", "function ProceedToFetch(loader, load, p) {\n //> 1. Let F be a new anonymous function object as defined in\n //> CallFetch.\n //> 1. Set F.[[Loader]] to loader.\n //> 1. Set F.[[Load]] to load.\n //> 1. Set F.[[AddressPromise]] to p.\n //> 1. Let p be the result of calling PromiseThen(p, F).\n p = callFunction(std_Promise_then, p,\n MakeClosure_CallFetch(loader, load));\n //> 1. Return ProceedToTranslate(loader, load, p).\n return ProceedToTranslate(loader, load, p);\n}", "function _checkBlobSupportWithoutCaching(idb) {\n\t return new Promise(function (resolve, reject) {\n\t var blob = _createBlob([''], { type: 'image/png' });\n\t var txn = idb.transaction([DETECT_BLOB_SUPPORT_STORE], 'readwrite');\n\t txn.objectStore(DETECT_BLOB_SUPPORT_STORE).put(blob, 'key');\n\t txn.oncomplete = function () {\n\t // have to do it in a separate transaction, else the correct\n\t // content type is always returned\n\t var blobTxn = idb.transaction([DETECT_BLOB_SUPPORT_STORE], 'readwrite');\n\t var getBlobReq = blobTxn.objectStore(DETECT_BLOB_SUPPORT_STORE).get('key');\n\t getBlobReq.onerror = reject;\n\t getBlobReq.onsuccess = function (e) {\n\n\t var storedBlob = e.target.result;\n\t var url = URL.createObjectURL(storedBlob);\n\n\t _blobAjax(url).then(function (res) {\n\t resolve(!!(res && res.type === 'image/png'));\n\t }, function () {\n\t resolve(false);\n\t }).then(function () {\n\t URL.revokeObjectURL(url);\n\t });\n\t };\n\t };\n\t })['catch'](function () {\n\t return false; // error, so assume unsupported\n\t });\n\t }", "function _checkBlobSupportWithoutCaching(idb) {\n\t return new Promise(function (resolve, reject) {\n\t var blob = _createBlob([''], { type: 'image/png' });\n\t var txn = idb.transaction([DETECT_BLOB_SUPPORT_STORE], 'readwrite');\n\t txn.objectStore(DETECT_BLOB_SUPPORT_STORE).put(blob, 'key');\n\t txn.oncomplete = function () {\n\t // have to do it in a separate transaction, else the correct\n\t // content type is always returned\n\t var blobTxn = idb.transaction([DETECT_BLOB_SUPPORT_STORE], 'readwrite');\n\t var getBlobReq = blobTxn.objectStore(DETECT_BLOB_SUPPORT_STORE).get('key');\n\t getBlobReq.onerror = reject;\n\t getBlobReq.onsuccess = function (e) {\n\n\t var storedBlob = e.target.result;\n\t var url = URL.createObjectURL(storedBlob);\n\n\t _blobAjax(url).then(function (res) {\n\t resolve(!!(res && res.type === 'image/png'));\n\t }, function () {\n\t resolve(false);\n\t }).then(function () {\n\t URL.revokeObjectURL(url);\n\t });\n\t };\n\t };\n\t })['catch'](function () {\n\t return false; // error, so assume unsupported\n\t });\n\t }", "async function fetchWrapper(url, method, extra = {}) {\n let { body, headers, ...other } = extra;\n\n if(body) body = JSON.stringify(body);\n if(!headers) headers = {};\n\n let res = await fetch(url, {\n method,\n body,\n headers: body ? {\n ...headers,\n 'Content-Type': 'application/json',\n } : undefined,\n ...other\n });\n\n let data = await res.json();\n\n return data;\n}", "function windowFetch() {\n window.fetch = whatwg_fetch__WEBPACK_IMPORTED_MODULE_0__[\"fetch\"];\n }", "function parseFetch(out) {\n out = out.shift().trim().replace(/^Fetching origin\\s*/, '')\n return !!out\n}", "function _checkBlobSupportWithoutCaching(txn) {\n\t return new Promise$1(function (resolve) {\n\t var blob = createBlob(['']);\n\t txn.objectStore(DETECT_BLOB_SUPPORT_STORE).put(blob, 'key');\n\n\t txn.onabort = function (e) {\n\t // If the transaction aborts now its due to not being able to\n\t // write to the database, likely due to the disk being full\n\t e.preventDefault();\n\t e.stopPropagation();\n\t resolve(false);\n\t };\n\n\t txn.oncomplete = function () {\n\t var matchedChrome = navigator.userAgent.match(/Chrome\\/(\\d+)/);\n\t var matchedEdge = navigator.userAgent.match(/Edge\\//);\n\t // MS Edge pretends to be Chrome 42:\n\t // https://msdn.microsoft.com/en-us/library/hh869301%28v=vs.85%29.aspx\n\t resolve(matchedEdge || !matchedChrome || parseInt(matchedChrome[1], 10) >= 43);\n\t };\n\t })[\"catch\"](function () {\n\t return false; // error, so assume unsupported\n\t });\n\t}", "function snuFetch(options, callback) {\n var hdrs = {\n 'Cache-Control': 'no-cache',\n 'Accept': 'application/json',\n 'Content-Type': 'application/json'\n };\n if (options.token) //only for instances with high security plugin enabled\n hdrs['X-UserToken'] = options.token; \n\n var requestInfo = {\n method : 'get',\n headers : hdrs\n }\n\n if (options.post){\n requestInfo.method = 'PUT';\n requestInfo.body = options.post;\n }\n\n fetch(options.url, requestInfo)\n .then(response => response.json())\n .then(data => { \n callback(data);\n });\n\n}", "function _checkBlobSupportWithoutCaching(idb) {\n return new Promise(function(resolve, reject) {\n var blob = _createBlob([''], {type: 'image/png'});\n var txn = idb.transaction([DETECT_BLOB_SUPPORT_STORE], 'readwrite');\n txn.objectStore(DETECT_BLOB_SUPPORT_STORE).put(blob, 'key');\n txn.oncomplete = function() {\n // have to do it in a separate transaction, else the correct\n // content type is always returned\n var blobTxn = idb.transaction([DETECT_BLOB_SUPPORT_STORE],\n 'readwrite');\n var getBlobReq = blobTxn.objectStore(\n DETECT_BLOB_SUPPORT_STORE).get('key');\n getBlobReq.onerror = reject;\n getBlobReq.onsuccess = function(e) {\n\n var storedBlob = e.target.result;\n var url = URL.createObjectURL(storedBlob);\n\n _blobAjax(url).then(function(res) {\n resolve(!!(res && res.type === 'image/png'));\n }, function() {\n resolve(false);\n }).then(function() {\n URL.revokeObjectURL(url);\n });\n };\n };\n })[\"catch\"](function() {\n return false; // error, so assume unsupported\n });\n }", "function isLazyCall(literal) {\n return literal != null && typeof literal === \"object\" && LAZY_CALL_FLAG in literal;\n}", "function _checkBlobSupportWithoutCaching(txn) {\n return new Promise$1(function (resolve) {\n var blob = createBlob(['']);\n txn.objectStore(DETECT_BLOB_SUPPORT_STORE).put(blob, 'key');\n\n txn.onabort = function (e) {\n // If the transaction aborts now its due to not being able to\n // write to the database, likely due to the disk being full\n e.preventDefault();\n e.stopPropagation();\n resolve(false);\n };\n\n txn.oncomplete = function () {\n var matchedChrome = navigator.userAgent.match(/Chrome\\/(\\d+)/);\n var matchedEdge = navigator.userAgent.match(/Edge\\//);\n // MS Edge pretends to be Chrome 42:\n // https://msdn.microsoft.com/en-us/library/hh869301%28v=vs.85%29.aspx\n resolve(matchedEdge || !matchedChrome || parseInt(matchedChrome[1], 10) >= 43);\n };\n })[\"catch\"](function () {\n return false; // error, so assume unsupported\n });\n }", "function func(value) {\r\n return typeof value === RAW_FUNCTION;\r\n }", "function makeFetch({url, method, data = {}}){\n return new Promise((resolve, reject) => {\n method = method.toUpperCase();\n // For GET requests with data. Adds params to url\n if(method === 'GET' && !jQuery.isEmptyObject(data)){\n let params = new URLSearchParams(data);\n url += '?' + params.toString();\n }\n fetch(url, {\n method: method,\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRFToken': getCookie('csrftoken'),\n },\n body: ['GET', 'HEAD'].includes(method) ? null : JSON.stringify(data),\n })\n .then(response => {\n let contentType = response.headers.get('content-type');\n let isJSON = contentType && contentType.includes('application/json');\n\n if(!response.ok){ // Unsuccessful response is handled in catch\n throw response;\n }\n\n return isJSON ? response.json() : response.text(); // Returns either a object or plain text\n })\n .then(data => {\n resolve(data);\n })\n .catch((error) => {\n // Handles unsuccessful fetch request\n if(error instanceof Response){\n let contentType = error.headers.get('content-type');\n let isJSON = contentType && contentType.includes('application/json');\n\n // Handles backend errors\n if(error.status >= 500){\n reject({\n detail: 'Internal server error',\n status: error.status,\n });\n }\n else{\n // Handles JSON error response\n if(isJSON){\n error.json().then((json) => {\n reject({\n detail: json.detail || json,\n status: error.status,\n })\n });\n }\n // Handles text error response\n else{\n error.text().then((text) => {\n reject({\n detail: text,\n status: error.status,\n })\n });\n }\n }\n }\n // Shows errors with fetch function itself\n else{\n reject({\n detail: error,\n status: '',\n });\n }\n });\n });\n}", "function performFetch(fetchOperation, requestAction, successAction, errorAction) {\n\n // Return the new Dispatch\n return dispatch => {\n\n // Dispatch off the request Action if necessary\n if (requestAction) dispatch(requestAction());\n \n // Set a flag to show an error condition below - this is \n // necessary because the error closure is used on fetch, \n // but a .then on the Promise. The flag can be used in the\n // .then to check for an error.\n let errorOccurred = false;\n\n // Return the fetch method for the GET with the specified URL\n return fetchOperation()\n .then(\n // Get the Response as JSON\n response => response.json(),\n\n // If an error occurs, use the error Action if necessary\n error => {\n \n // Dispatch the error if necessary\n if (errorAction) dispatch(errorAction(error)); \n\n // Set the errorOccurred flag \n errorOccurred = true;\n }\n )\n .then(\n // Dispatch the results to the success Action if successful\n // and if the action is defined\n json => { if (errorOccurred === false && successAction) dispatch(successAction(json)); }\n );\n }\n}", "function _checkBlobSupportWithoutCaching(txn) {\n return new Promise$1(function (resolve) {\n var blob = createBlob(['']);\n txn.objectStore(DETECT_BLOB_SUPPORT_STORE).put(blob, 'key');\n\n txn.onabort = function (e) {\n // If the transaction aborts now its due to not being able to\n // write to the database, likely due to the disk being full\n e.preventDefault();\n e.stopPropagation();\n resolve(false);\n };\n\n txn.oncomplete = function () {\n var matchedChrome = navigator.userAgent.match(/Chrome\\/(\\d+)/);\n var matchedEdge = navigator.userAgent.match(/Edge\\//);\n // MS Edge pretends to be Chrome 42:\n // https://msdn.microsoft.com/en-us/library/hh869301%28v=vs.85%29.aspx\n resolve(matchedEdge || !matchedChrome || parseInt(matchedChrome[1], 10) >= 43);\n };\n })[\"catch\"](function () {\n return false; // error, so assume unsupported\n });\n}", "function wrappedFetch() {\n var wrappedPromise = {};\n\n var promise = new index_es(function (resolve, reject) {\n wrappedPromise.resolve = resolve;\n wrappedPromise.reject = reject;\n });\n\n var args = new Array(arguments.length);\n\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n\n wrappedPromise.promise = promise;\n\n index_es.resolve().then(function () {\n return fetch.apply(null, args);\n }).then(function (response) {\n wrappedPromise.resolve(response);\n }).catch(function (error) {\n wrappedPromise.reject(error);\n });\n\n return wrappedPromise;\n}", "function makeFetchTransport(\n options,\n nativeFetch = getNativeFetchImplementation(),\n ) {\n function makeRequest(request) {\n const requestOptions = {\n body: request.body,\n method: 'POST',\n referrerPolicy: 'origin',\n headers: options.headers,\n // Outgoing requests are usually cancelled when navigating to a different page, causing a \"TypeError: Failed to\n // fetch\" error and sending a \"network_error\" client-outcome - in Chrome, the request status shows \"(cancelled)\".\n // The `keepalive` flag keeps outgoing requests alive, even when switching pages. We want this since we're\n // frequently sending events right before the user is switching pages (eg. whenfinishing navigation transactions).\n // Gotchas:\n // - `keepalive` isn't supported by Firefox\n // - As per spec (https://fetch.spec.whatwg.org/#http-network-or-cache-fetch), a request with `keepalive: true`\n // and a content length of > 64 kibibytes returns a network error. We will therefore only activate the flag when\n // we're below that limit.\n keepalive: request.body.length <= 65536,\n ...options.fetchOptions,\n };\n\n try {\n return nativeFetch(options.url, requestOptions).then(response => ({\n statusCode: response.status,\n headers: {\n 'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'),\n 'retry-after': response.headers.get('Retry-After'),\n },\n }));\n } catch (e) {\n clearCachedFetchImplementation();\n return rejectedSyncPromise(e);\n }\n }\n\n return createTransport(options, makeRequest);\n }", "function rollupPluginCatchFetch() {\n return {\n name: 'snowpack:fetch-handler',\n\n resolveId(id) {\n if (id !== 'node-fetch' && id !== 'whatwg-fetch') {\n return null;\n }\n\n return id;\n },\n\n load(id) {\n if (id !== 'node-fetch' && id !== 'whatwg-fetch') {\n return null;\n }\n\n return FETCH_POLYFILL;\n }\n\n };\n}", "function isNativeClass(component) {\n return typeof component === 'function' && /^\\s*class\\s+/.test(component.toString());\n}", "function isNativeClass(component) {\n return typeof component === 'function' && /^\\s*class\\s+/.test(component.toString());\n}", "function isNativeClass(component) {\n return typeof component === 'function' && /^\\s*class\\s+/.test(component.toString());\n}", "function isBuiltinType(fn) {\n return (\n // scalars\n fn === Number ||\n fn === Boolean ||\n fn === String ||\n // objects\n fn === Object ||\n fn === Array ||\n fn === Date ||\n fn === RegExp ||\n fn === Buffer ||\n fn === Null ||\n // function as a type\n fn === Function);\n}", "function makeFetchTransport(\n options,\n nativeFetch = utils.getNativeFetchImplementation(),\n) {\n function makeRequest(request) {\n const requestOptions = {\n body: request.body,\n method: 'POST',\n referrerPolicy: 'origin',\n headers: options.headers,\n // Outgoing requests are usually cancelled when navigating to a different page, causing a \"TypeError: Failed to\n // fetch\" error and sending a \"network_error\" client-outcome - in Chrome, the request status shows \"(cancelled)\".\n // The `keepalive` flag keeps outgoing requests alive, even when switching pages. We want this since we're\n // frequently sending events right before the user is switching pages (eg. whenfinishing navigation transactions).\n // Gotchas:\n // - `keepalive` isn't supported by Firefox\n // - As per spec (https://fetch.spec.whatwg.org/#http-network-or-cache-fetch), a request with `keepalive: true`\n // and a content length of > 64 kibibytes returns a network error. We will therefore only activate the flag when\n // we're below that limit.\n keepalive: request.body.length <= 65536,\n ...options.fetchOptions,\n };\n\n try {\n return nativeFetch(options.url, requestOptions).then(response => ({\n statusCode: response.status,\n headers: {\n 'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'),\n 'retry-after': response.headers.get('Retry-After'),\n },\n }));\n } catch (e) {\n utils.clearCachedFetchImplementation();\n return utils$1.rejectedSyncPromise(e);\n }\n }\n\n return core.createTransport(options, makeRequest);\n}", "function makeFetchTransport(\n\t options,\n\t nativeFetch = getNativeFetchImplementation(),\n\t) {\n\t function makeRequest(request) {\n\t const requestOptions = {\n\t body: request.body,\n\t method: 'POST',\n\t referrerPolicy: 'origin',\n\t headers: options.headers,\n\t // Outgoing requests are usually cancelled when navigating to a different page, causing a \"TypeError: Failed to\n\t // fetch\" error and sending a \"network_error\" client-outcome - in Chrome, the request status shows \"(cancelled)\".\n\t // The `keepalive` flag keeps outgoing requests alive, even when switching pages. We want this since we're\n\t // frequently sending events right before the user is switching pages (eg. whenfinishing navigation transactions).\n\t // Gotchas:\n\t // - `keepalive` isn't supported by Firefox\n\t // - As per spec (https://fetch.spec.whatwg.org/#http-network-or-cache-fetch), a request with `keepalive: true`\n\t // and a content length of > 64 kibibytes returns a network error. We will therefore only activate the flag when\n\t // we're below that limit.\n\t keepalive: request.body.length <= 65536,\n\t ...options.fetchOptions,\n\t };\n\n\t try {\n\t return nativeFetch(options.url, requestOptions).then(response => ({\n\t statusCode: response.status,\n\t headers: {\n\t 'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'),\n\t 'retry-after': response.headers.get('Retry-After'),\n\t },\n\t }));\n\t } catch (e) {\n\t clearCachedFetchImplementation();\n\t return rejectedSyncPromise(e);\n\t }\n\t }\n\n\t return createTransport(options, makeRequest);\n\t}", "isPreFetchMode() {\n\t\treturn this._preFetchMode;\n\t}", "async function fetchByURL(url) {\n return await fetch(url, { mode: 'no-cors' });\n}", "function MY_FETCH(URL, REQ) {\n return fetch(URL, REQ)\n .then(response => {\n if(!response.ok) {\n throw(\"HTTP: \" + response.status)\n }\n\n return response.json()\n })\n}", "function callNativeResolution(request, issuer) {\n if (issuer.endsWith(`/`)) issuer = fslib_2.ppath.join(issuer, fslib_2.toFilename(`internal.js`)); // Since we would need to create a fake module anyway (to call _resolveLookupPath that\n // would give us the paths to give to _resolveFilename), we can as well not use\n // the {paths} option at all, since it internally makes _resolveFilename create another\n // fake module anyway.\n\n return module_1.Module._resolveFilename(request, makeFakeModule(fslib_1.npath.fromPortablePath(issuer)), false, {\n plugnplay: false\n });\n }", "async eval(fn, ...args) {\n let fnbody = fn.toString();\n\n // we might have a function shorthand if this fails\n /* eslint-disable-next-line no-new, no-new-func */\n try { new Function(`(${fnbody})`); } catch (error) {\n fnbody = fnbody.startsWith('async ')\n ? fnbody.replace(/^async/, 'async function')\n : `function ${fnbody}`;\n\n /* eslint-disable-next-line no-new, no-new-func */\n try { new Function(`(${fnbody})`); } catch (error) {\n throw new Error('The provided function is not serializable');\n }\n }\n\n // wrap the function body with percy helpers\n fnbody = 'function withPercyHelpers() {' + (\n `return (${fnbody})({` + (\n `waitFor: ${waitFor}`\n ) + '}, ...arguments)'\n ) + '}';\n\n // send the call function command\n let { result, exceptionDetails } = await this.send('Runtime.callFunctionOn', {\n functionDeclaration: fnbody,\n arguments: args.map(value => ({ value })),\n executionContextId: this.contextId,\n returnByValue: true,\n awaitPromise: true,\n userGesture: true\n });\n\n if (exceptionDetails) {\n throw exceptionDetails.exception.description;\n } else {\n return result.value;\n }\n }", "doFetch({ url, body=null, options={ METHOD: 'GET' }, headers={}}) {\n const baseheaders = {\n 'Content-Type': 'application/json',\n mode: 'cors'\n };\n\n options.headers = { ...baseheaders, ...headers };\n\n\n if(body) options.body = JSON.stringify(body);\n\n // Do the actual fetch() call\n return new Promise((resolve, reject) => fetch(this.base + url + '?api_key=' + apikey, options)\n .then((response) => {\n if(!response) {\n reject(response);\n }\n // Check for status and response\n let status = Promise.resolve(response.status);\n let json = response.json();\n return Promise.all([json, status]);\n }).then(([json={}, statusCode=500]) => {\n // Check for validity in the response\n if(statusCode !== 200) {\n let { error } = json;\n reject({ error, statusCode });\n }\n // Resolve with the final json if no errors.\n Array.isArray(json) ? resolve(json) : resolve({ ...json });\n })\n .catch(reject)\n .catch(reject))\n }", "function adaptFetchPromise(promise) {\n\t\t\tvar adaptedPromise = Object.create(promise);\n\n\t\t\tadaptedPromise.success = function (fn) {\n\t\t\t\tpromise.success(function (data, status, headers, options) {\n\t\t\t\t\tfn(data, status);\n\t\t\t\t});\n\t\t\t\treturn this;\n\t\t\t};\n\n\t\t\tadaptedPromise.error = function (fn) {\n\t\t\t\tpromise.error(function (data, status, headers, options) {\n\t\t\t\t\tfn(status);\n\t\t\t\t});\n\t\t\t\treturn this;\n\t\t\t};\n\n\t\t\treturn adaptedPromise;\n\t\t}", "function fetchHelper(dispatch, uri) {\n dispatch(dataLoading());\n return fetch(`${serviceHost}${uri}`)\n .then(r => r.json())\n .then(json => {\n dispatch(doneLoading());\n return json;\n })\n .catch(err => {\n dispatch(doneLoading());\n dispatch(dataError(err));\n });\n}", "function isPromiseLike(value) {\r\n return !!value && typeof value.then === 'function';\r\n}", "function detect$1() {\n // Don't apply polyfill when ProxyCompat is enabled.\n if ('getKey' in Proxy) {\n return false;\n }\n\n const proxy = new Proxy([3, 4], {});\n const res = [1, 2].concat(proxy);\n return res.length !== 4;\n }", "async function fetchData(override) {\n\t\t\n\t\tif(override || (status !== 'Pending')){\n\t\t\tsetStatus('Pending')\n\t\t\t\n\t\t\ttry {\n\t\t\t\tconst newData = await fetchFunction()\n\t\t\t\tsetData(newData)\n\t\t\t\tselectRecord(activeRecord[options.primaryKey], newData)\n\n\t\t\t\tsetStatus('Resolved')\n\t\t\t\tsetLastResolved(new Date().toISOString())\n\t\t\t\treturn 'Resolved'\n\n\t\t\t} catch (e) {\n\t\t\t\tsetStatus('Rejected')\n\t\t\t\tconsole.error(e)\n\t\t\t\treturn 'Rejected'\n\t\t\t}\n\t\t}\n\t}", "function setSystemJsFetch(db) {\n window.systemjs_fetch = function(url, opts) {\n return new Promise(function(resolve, reject) {\n db.getItem(url).then(function(item) {\n if (item) {\n resolve(responsify(item))\n } else {\n window.fetch(url, opts).then(function(res) {\n if (res.ok) {\n return res.text()\n } else {\n throw new Error('Fetch error: ' + res.status + ' ' + res.statusText)\n }\n }).then(function(txt) {\n db.setItem(url, txt).then(function() {\n resolve(responsify(txt))\n }).catch(reject)\n }).catch(function(err) {\n reject(err)\n })\n }\n }).catch(reject)\n })\n }\n}", "function runFallback<ParamsType, ResultType>(fn: WorkerFunctionType<ParamsType, ResultType>, params: ParamsType): Promise<ResultType> {\n return new Promise((resolve, reject) => {\n let result;\n try {\n // If `fn` is not pure, then calling it here in the fallback will\n // allow it to have access to closure/global vars not available when\n // called via Worker. This means potentially inconsistent results.\n // Non-pure function behavior is undefined though so this should be fine.\n // A remedy for inconsistency (albeit a shitty one) would be to isolate\n // the function by stringifying it and evaling it.\n // $FlowFixMe property `@@iterator` of $Iterable not found...\n result = fn.apply(null, params);\n } catch(e) {\n reject(e);\n return;\n }\n\n if (result && result.then && typeof result.then === 'function') {\n result.then(val => {\n resolve(val);\n }, err => {\n reject(err);\n });\n } else {\n resolve(result);\n }\n });\n}", "_fetchIt(pictureUrl, errCb) {\n let url;\n try {\n url = new URL(pictureUrl);\n } catch(err) {\n errCb(err);\n return null;\n }\n return fetch(url).then(response => {\n return response.arrayBuffer()\n }, err => {\n toast.mostrar(\"Seems like I can't fetch that 😕\", {color: '#fff', fondo: '#fe4440'});\n })\n }", "function simpleFetch2(url) {\n return new Promise(function (resolve, reject) {\n var req = new XMLHttpRequest();\n req.addEventListener(\"load\", function () {\n let htData = JSON.parse(req.responseText);\n if (typeof htData !== \"object\") reject(\"wrong data\");else resolve(htData);\n });\n req.open(\"GET\", url);\n req.send();\n });\n}", "function fetchData(url,fn){\n fetch(url)\n .then(res=>res.json())\n .then(data=>{\n fn(data)\n })\n}", "function executarQualquerCoisa(fn) {\n if (typeof fn === 'function') {\n fn();\n }\n}", "function checkPromise() {\n /* istanbul ignore if */\n if (!Promise) {\n throw new Error('No native promise implementation found! This ' +\n 'module extends native promise functionality');\n }\n }", "async function hasNativeFindSupport(forceNodeFilesystemAPI) {\n if (forceNodeFilesystemAPI) {\n return false;\n }\n try {\n return await new Promise(resolve => {\n // Check the find binary supports the non-POSIX -iname parameter wrapped in parens.\n const args = [\n '.',\n '-type',\n 'f',\n '(',\n '-iname',\n '*.ts',\n '-o',\n '-iname',\n '*.js',\n ')'\n ];\n const child = (0, _child_process().spawn)('find', args, {\n cwd: __dirname\n });\n child.on('error', () => {\n resolve(false);\n });\n child.on('exit', code => {\n resolve(code === 0);\n });\n });\n } catch {\n return false;\n }\n}", "async fetchCall(arg) {\n console.log(\"Does the fetch even happen?\")\n await fetch(`http://127.0.0.1:8000/api/${arg}/?search=${this.state.djangoArgument}`)\n .then(response => {\n console.log(\"Does the fetch 33333 even happen?\")\n if (response.status !== 200) {\n console.log(`Failed to load ${arg} from our server`);\n } else {\n console.log(`${arg} success`);\n return response.json();\n }\n })\n .then(data => {this.setState({[arg] : data})\n },\n fail => {return(\"Fail!\")}\n )\n }", "function isAdaptorFunctionSupported(fnName,fields)\n{\n//#console.log(\"isAdaptorFunctionSupported:\",fnName,\"f:\",fields);\n\tvar serverType = getServerType(fields);\n//#console.log(\"st:\"+serverType);\n\tif(!serverType || !config.adaptors[serverType])\n\t\treturn false;\n\tif(!config.adaptors[serverType].isLocal && !fields['server.host'])\n\t\treturn false;\n\tvar fn = config.adaptors[serverType].prototype[fnName];\n\treturn fn ? true : false;\n}", "function fetchData(url){\n return fetch(url)\n .then(checkStatus)\n .then(res =>res.json()) \n .catch(error =>console.log('Error:',error))\n }", "function detect() {\n // Don't apply polyfill when ProxyCompat is enabled.\n if ('getKey' in Proxy) {\n return false;\n }\n\n const proxy = new Proxy([3, 4], {});\n const res = [1, 2].concat(proxy);\n return res.length !== 4;\n }", "function call(fn) {\n return typeof fn === 'function'\n ? fn()\n : false;\n}", "function isEvalSupported() {\n try {\n /* jshint evil: true */\n new Function('');\n return true;\n } catch (e) {\n return false;\n }\n }", "fetchNextPage() {\n\n // if fetch function has been passed in,\n // fetch data\n if (this.props.fetchNextPage) {\n this.props.fetchNextPage();\n }\n }" ]
[ "0.867265", "0.8631987", "0.8612553", "0.6030184", "0.5826882", "0.5728299", "0.56666386", "0.56459254", "0.55390865", "0.5495411", "0.5495411", "0.5432554", "0.5370357", "0.5356145", "0.52731", "0.524098", "0.524098", "0.52383417", "0.52346426", "0.51461214", "0.51111764", "0.51111764", "0.50864005", "0.5056357", "0.50274277", "0.4997657", "0.4920203", "0.49113736", "0.49113736", "0.4899328", "0.4898072", "0.4885249", "0.4885249", "0.4865869", "0.48592007", "0.48452604", "0.48438993", "0.48009023", "0.47952965", "0.4779926", "0.4779875", "0.47740898", "0.47610462", "0.47532794", "0.47479868", "0.47479868", "0.47117737", "0.4695508", "0.46950433", "0.46904042", "0.46904042", "0.46822995", "0.4674995", "0.46555576", "0.46401572", "0.4636916", "0.46312943", "0.4602041", "0.45993233", "0.4593057", "0.45828387", "0.4565101", "0.4557314", "0.45569354", "0.45511854", "0.45451096", "0.45432764", "0.45432764", "0.45432764", "0.45365742", "0.4527032", "0.45210332", "0.4511694", "0.4506457", "0.45059025", "0.4500468", "0.45004505", "0.44812176", "0.44777614", "0.44711953", "0.44711384", "0.44656888", "0.44655", "0.44586262", "0.4458398", "0.44561636", "0.44530782", "0.445235", "0.44520804", "0.4450148", "0.44439644", "0.44423735", "0.44403803", "0.4440339", "0.4438431", "0.44283164", "0.44266653", "0.44245997" ]
0.8614689
4
Remove N number of frames from the stack
function popFrames(stacktrace, popSize) { try { return Object(tslib_es6["a" /* __assign */])(Object(tslib_es6["a" /* __assign */])({}, stacktrace), { stack: stacktrace.stack.slice(popSize) }); } catch (e) { return stacktrace; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "remove(n) {\n if (!this.slots) return;\n if (n instanceof Frame) {\n let slots = this.slots;\n let i = 0;\n let l = slots.length;\n while (i < l && slots[i] != n) i += 2;\n if (i != l) {\n let j = i;\n while (i < l) {\n if (slots[i] == n) {\n i += 2;\n } else {\n slots[j++] = slots[i++];\n slots[j++] = slots[i++];\n }\n }\n slots.length = j;\n }\n } else {\n this.slots.splice(n * 2, 2);\n }\n }", "function trimCacheStack(stack, length) {\n while (stack.length > length) {\n delete cacheMapping[stack.shift()];\n }\n }", "function remove(){\n stack.splice(0,stack.length);\n calcScreen= \"0\";\n display();\n }", "function trimCacheStack(stack, length) {\n while (stack.length > length)\n delete cacheMapping[stack.shift()]\n }", "function trimCacheStack(stack, length) {\n while (stack.length > length)\n delete cacheMapping[stack.shift()]\n}", "function trimCacheStack(stack, length) {\n while (stack.length > length)\n delete cacheMapping[stack.shift()]\n}", "function trimCacheStack(stack, length) {\n while (stack.length > length)\n delete cacheMapping[stack.shift()]\n}", "function trimCacheStack(stack, length) {\n\t\t\twhile (stack.length > length)\n\t\t\t\tdelete cacheMapping[stack.shift()];\n\t\t}", "function popFrames(stacktrace, popSize) {\n try {\n return tslib__WEBPACK_IMPORTED_MODULE_0__[\"__assign\"]({}, stacktrace, { stack: stacktrace.stack.slice(popSize) });\n }\n catch (e) {\n return stacktrace;\n }\n}", "function popStack() {\n var f = callStack.pop();\n --callStackDepth;\n }", "popFrame() {\n this.registers[$sp] = this.registers[$fp] - 1;\n this.registers[$ra] = this.stack.get(0);\n this.registers[$fp] = this.stack.get(1);\n }", "popFrame() {\n this.registers[_glimmer_vm__WEBPACK_IMPORTED_MODULE_1__[\"$sp\"]] = this.registers[_glimmer_vm__WEBPACK_IMPORTED_MODULE_1__[\"$fp\"]] - 1;\n this.registers[_glimmer_vm__WEBPACK_IMPORTED_MODULE_1__[\"$ra\"]] = this.stack.get(0);\n this.registers[_glimmer_vm__WEBPACK_IMPORTED_MODULE_1__[\"$fp\"]] = this.stack.get(1);\n }", "popFrame() {\n this.registers[_glimmer_vm__WEBPACK_IMPORTED_MODULE_1__[\"$sp\"]] = this.registers[_glimmer_vm__WEBPACK_IMPORTED_MODULE_1__[\"$fp\"]] - 1;\n this.registers[_glimmer_vm__WEBPACK_IMPORTED_MODULE_1__[\"$ra\"]] = this.stack.get(0);\n this.registers[_glimmer_vm__WEBPACK_IMPORTED_MODULE_1__[\"$fp\"]] = this.stack.get(1);\n }", "function stackDraw(n) {\n\n var card;\n\n if (n >= 0 && n < this.cards.length) {\n card = this.cards[n];\n this.cards.splice(n, 1);\n }\n else\n card = null;\n\n return card;\n}", "function trim(frames, sff) {\n var fn, name = sff.name;\n if (!frames) {\n global.console && console.warn('[Failure] error capturing frames');\n return [];\n }\n for (var i=0; i < frames.length; i++) {\n fn = frames[i].getFunction();\n if (fn && fn === sff || name && name === frames[i].getFunctionName()) {\n return frames.slice(i + 1);\n }\n }\n return frames;\n}", "skip(frames) {\n this.currentFrame = (this.currentFrame + frames) % this.sprites.length;\n }", "function dropFirstFrame(arr) {\n arr.shift();\n return arr;\n}", "function dropFirstFrame(arr) {\n arr.shift();\n return arr;\n}", "function dropping(n) {\n return new DroppingBuffer(ring(n), n);\n}", "function stackClear(){this.__data__=new ListCache();this.size=0;}", "function stackClear(){this.__data__=new ListCache();this.size=0;}", "function stackClear(){this.__data__=new ListCache();this.size=0;}", "function stackClear(){this.__data__=new ListCache();this.size=0;}", "function stackClear(){this.__data__=new ListCache();this.size=0;}", "function stackClear(){this.__data__=new ListCache();this.size=0;}", "function stackClear(){this.__data__=new ListCache();this.size=0;}", "function stackClear(){this.__data__=new ListCache();this.size=0;}", "function stackClear(){this.__data__=new ListCache();this.size=0;}", "function stackClear(){this.__data__=new ListCache();this.size=0;}", "function AckCallStack() {}", "function stackClear(){this.__data__=new ListCache;this.size=0}", "function stackClear(){this.__data__=new ListCache;this.size=0}", "drop2(array, n) {\n if (!n) {\n n = 1;\n }\n const droppedArray = array.slice(n);\n return droppedArray;\n }", "popFrame() {\n this[_symbols__WEBPACK_IMPORTED_MODULE_7__[\"INNER_VM\"]].popFrame();\n }", "popFrame() {\n this[_symbols__WEBPACK_IMPORTED_MODULE_7__[\"INNER_VM\"]].popFrame();\n }", "unregister(frame) {\n if (frame.isanonymous()) return;\n let slots = frame.slots;\n for (let n = 0; n < slots.length; n += 2) {\n if (slots[n] === this.id) this.frames.delete(slots[n + 1]);\n }\n frame.remove(this.id);\n frame.state = ANONYMOUS;\n }", "function ani_clear() {\n while(ani_stack.length > 0) {\n ani_stack.pop();\n }\n}", "function stackClear () {\n this.__data__ = new ListCache()\n this.size = 0\n}", "function stackClear() {\n this.__data__ = new _ListCache();\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new _ListCache();\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache();\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache();\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache();\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache();\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache();\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache();\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache();\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache();\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache();\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache();\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache();\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache();\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache();\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache();\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache();\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache();\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache();\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache();\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache();\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}", "function stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}" ]
[ "0.6408339", "0.6365177", "0.6308712", "0.6286131", "0.6283798", "0.6283798", "0.6283798", "0.62659955", "0.62512827", "0.62246364", "0.60567504", "0.5993962", "0.5993962", "0.58804226", "0.5800008", "0.57910925", "0.5774843", "0.5774843", "0.57720023", "0.5749112", "0.5749112", "0.5749112", "0.5749112", "0.5749112", "0.5749112", "0.5749112", "0.5749112", "0.5749112", "0.5749112", "0.5730172", "0.5728409", "0.5728409", "0.57048446", "0.5641479", "0.5641479", "0.5631676", "0.55952436", "0.55634266", "0.5562038", "0.5562038", "0.5561013", "0.5561013", "0.5561013", "0.5561013", "0.5561013", "0.5561013", "0.5561013", "0.5561013", "0.5561013", "0.5561013", "0.5561013", "0.5561013", "0.5561013", "0.5561013", "0.5561013", "0.5561013", "0.5561013", "0.5561013", "0.5561013", "0.55585015", "0.55585015", "0.55585015", "0.55585015", "0.55585015", "0.55585015", "0.55585015", "0.55585015", "0.55585015", "0.55585015", "0.55585015", "0.55585015", "0.55585015", "0.55585015", "0.55585015", "0.55585015", "0.55585015", "0.55585015", "0.55585015", "0.55585015", "0.55585015", "0.55585015", "0.55585015", "0.55585015", "0.55585015", "0.55585015", "0.55585015", "0.55585015", "0.55585015", "0.55585015", "0.55585015", "0.55585015", "0.55585015", "0.55585015", "0.55585015", "0.55585015", "0.55585015", "0.55585015", "0.55585015", "0.55585015", "0.55585015" ]
0.60560906
11
There are cases where stacktrace.message is an Event object In this specific case we try to extract stacktrace.message.error.message
function extractMessage(ex) { var message = ex && ex.message; if (!message) { return 'No error message'; } if (message.error && typeof message.error.message === 'string') { return message.error.message; } return message; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function extractMessage(sourceError) {\n const { error, body, message } = sourceError;\n let errMessage = null;\n if (error) {\n // prefer HttpErrorResponse.error to its message property\n errMessage = typeof error === 'string' ? error : error.message;\n }\n else if (message) {\n errMessage = message;\n }\n else if (body) {\n // try the body if no error or message property\n errMessage = typeof body === 'string' ? body : body.error;\n }\n return typeof errMessage === 'string'\n ? errMessage\n : errMessage\n ? JSON.stringify(errMessage)\n : null;\n}", "function ExtractTheFuckingError(e) {\n var obj = e.error;\n if (obj['.tag']) {\n // Everything is OK.\n return obj;\n }\n else if (obj['error']) {\n // Terrible nested object bug.\n var obj2 = obj.error;\n if (obj2['.tag']) {\n return obj2;\n }\n else if (obj2['reason'] && obj2['reason']['.tag']) {\n return obj2.reason;\n }\n else {\n return obj2;\n }\n }\n else if (typeof (obj) === 'string') {\n // Might be a fucking JSON object error.\n try {\n var obj2 = JSON.parse(obj);\n if (obj2['error'] && obj2['error']['reason'] && obj2['error']['reason']['.tag']) {\n return obj2.error.reason;\n }\n }\n catch (e) {\n // Nope. Give up.\n }\n }\n return obj;\n}", "function ExtractTheFuckingError(e) {\n var obj = e.error;\n if (obj['.tag']) {\n // Everything is OK.\n return obj;\n }\n else if (obj['error']) {\n // Terrible nested object bug.\n var obj2 = obj.error;\n if (obj2['.tag']) {\n return obj2;\n }\n else if (obj2['reason'] && obj2['reason']['.tag']) {\n return obj2.reason;\n }\n else {\n return obj2;\n }\n }\n else if (typeof (obj) === 'string') {\n // Might be a fucking JSON object error.\n try {\n var obj2$1 = JSON.parse(obj);\n if (obj2$1['error'] && obj2$1['error']['reason'] && obj2$1['error']['reason']['.tag']) {\n return obj2$1.error.reason;\n }\n }\n catch (e) {\n // Nope. Give up.\n }\n }\n return obj;\n}", "function exceptionFromStacktrace(stacktrace) {\n var frames = prepareFramesForEvent(stacktrace.stack);\n var exception = {\n type: stacktrace.name,\n value: stacktrace.message,\n };\n if (frames && frames.length) {\n exception.stacktrace = { frames: frames };\n }\n // tslint:disable-next-line:strict-type-predicates\n if (exception.type === undefined && exception.value === '') {\n exception.value = 'Unrecoverable error caught';\n }\n return exception;\n}", "function exceptionFromStacktrace(stacktrace) {\r\n var frames = prepareFramesForEvent(stacktrace.stack);\r\n var exception = {\r\n type: stacktrace.name,\r\n value: stacktrace.message\r\n };\r\n if (frames && frames.length) {\r\n exception.stacktrace = { frames: frames };\r\n }\r\n // tslint:disable-next-line:strict-type-predicates\r\n if (exception.type === undefined && exception.value === '') {\r\n exception.value = 'Unrecoverable error caught';\r\n }\r\n return exception;\r\n}", "function getOriginalErrorStack (e) {\n while (e.error != null) {\n e = e.error\n }\n\n return e.stack\n ? ErrorStackParser.parse(e)\n : []\n}", "function extractMessage(ex) {\n const message = ex && ex.message;\n if (!message) {\n return 'No error message';\n }\n if (message.error && typeof message.error.message === 'string') {\n return message.error.message;\n }\n return message;\n }", "function extractMessage(ex) {\n\t const message = ex && ex.message;\n\t if (!message) {\n\t return 'No error message';\n\t }\n\t if (message.error && typeof message.error.message === 'string') {\n\t return message.error.message;\n\t }\n\t return message;\n\t}", "function extractMessage(ex) {\n const message = ex && ex.message;\n if (!message) {\n return 'No error message';\n }\n if (message.error && typeof message.error.message === 'string') {\n return message.error.message;\n }\n return message;\n}", "function exceptionFromStacktrace(stacktrace) {\n var frames = prepareFramesForEvent(stacktrace.stack);\n var exception = {\n type: stacktrace.name,\n value: stacktrace.message,\n };\n if (frames && frames.length) {\n exception.stacktrace = { frames: frames };\n }\n if (exception.type === undefined && exception.value === '') {\n exception.value = 'Unrecoverable error caught';\n }\n return exception;\n}", "function getEventDescription(event) {\n if (event.message) {\n return event.message;\n }\n if (event.exception && event.exception.values && event.exception.values[0]) {\n var exception = event.exception.values[0];\n if (exception.type && exception.value) {\n return exception.type + \": \" + exception.value;\n }\n return exception.type || exception.value || event.event_id || '<unknown>';\n }\n return event.event_id || '<unknown>';\n}", "function getEventDescription(event) {\n if (event.message) {\n return event.message;\n }\n if (event.exception && event.exception.values && event.exception.values[0]) {\n var exception = event.exception.values[0];\n if (exception.type && exception.value) {\n return exception.type + \": \" + exception.value;\n }\n return exception.type || exception.value || event.event_id || '<unknown>';\n }\n return event.event_id || '<unknown>';\n}", "function getEventDescription(event) {\n if (event.message) {\n return event.message;\n }\n if (event.exception && event.exception.values && event.exception.values[0]) {\n var exception = event.exception.values[0];\n if (exception.type && exception.value) {\n return exception.type + \": \" + exception.value;\n }\n return exception.type || exception.value || event.event_id || '<unknown>';\n }\n return event.event_id || '<unknown>';\n}", "function getEventDescription(event) {\n if (event.message) {\n return event.message;\n }\n else if (event.exception && event.exception.values && event.exception.values[0]) {\n var exception = event.exception.values[0];\n if (exception.type && exception.value) {\n return exception.type + \": \" + exception.value;\n }\n else {\n return exception.type || exception.value || event.event_id || '<unknown>';\n }\n }\n else {\n return event.event_id || '<unknown>';\n }\n}", "function getEventDescription(event) {\r\n if (event.message) {\r\n return event.message;\r\n }\r\n if (event.exception && event.exception.values && event.exception.values[0]) {\r\n var exception = event.exception.values[0];\r\n if (exception.type && exception.value) {\r\n return exception.type + \": \" + exception.value;\r\n }\r\n return exception.type || exception.value || event.event_id || '<unknown>';\r\n }\r\n return event.event_id || '<unknown>';\r\n}", "_processMessage(message)\n{\n try\n {\n let data = JSON.parse(message);\n if (undefined === data.e)\n {\n return;\n }\n switch (data.e)\n {\n case 'depthUpdate':\n this._processOrderBookUpdate(data);\n return;\n case 'aggTrade':\n this._processTrades(data);\n return;\n case '24hrTicker':\n this._processTicker(data);\n return;\n case 'kline':\n this._processKline(data);\n return;\n }\n }\n catch (e)\n {\n logger.error(e.stack);\n return;\n }\n}", "function getEventDescription(event) {\n const { message, event_id: eventId } = event;\n if (message) {\n return message;\n }\n\n const firstException = getFirstException(event);\n if (firstException) {\n if (firstException.type && firstException.value) {\n return `${firstException.type}: ${firstException.value}`;\n }\n return firstException.type || firstException.value || eventId || '<unknown>';\n }\n return eventId || '<unknown>';\n }", "function extractErrorMessage(error) {\n return error.response.data.error.message;\n}", "function getEventDescription(event) {\n const { message, event_id: eventId } = event;\n if (message) {\n return message;\n }\n\n const firstException = getFirstException(event);\n if (firstException) {\n if (firstException.type && firstException.value) {\n return `${firstException.type}: ${firstException.value}`;\n }\n return firstException.type || firstException.value || eventId || '<unknown>';\n }\n return eventId || '<unknown>';\n}", "function sourceFromStacktrace() {\n\ttry {\n\t\tthrow new Error();\n\t} catch ( e ) {\n\t\tif (e.stacktrace) {\n\t\t\t// Opera\n\t\t\treturn e.stacktrace.split(\"\\n\")[6];\n\t\t} else if (e.stack) {\n\t\t\t// Firefox, Chrome\n\t\t\treturn e.stack.split(\"\\n\")[4];\n\t\t}\n\t}\n}", "function sourceFromStacktrace() {\n\ttry {\n\t\tthrow new Error();\n\t} catch ( e ) {\n\t\tif (e.stacktrace) {\n\t\t\t// Opera\n\t\t\treturn e.stacktrace.split(\"\\n\")[6];\n\t\t} else if (e.stack) {\n\t\t\t// Firefox, Chrome\n\t\t\treturn e.stack.split(\"\\n\")[4];\n\t\t}\n\t}\n}", "function getEventDescription(event) {\n\t const { message, event_id: eventId } = event;\n\t if (message) {\n\t return message;\n\t }\n\n\t const firstException = getFirstException(event);\n\t if (firstException) {\n\t if (firstException.type && firstException.value) {\n\t return `${firstException.type}: ${firstException.value}`;\n\t }\n\t return firstException.type || firstException.value || eventId || '<unknown>';\n\t }\n\t return eventId || '<unknown>';\n\t}", "function extractImportantStackFromNodeError(error) {\n if (isSyntaxError(error)) {\n var _error$stack;\n const traces = (_error$stack = error.stack) === null || _error$stack === void 0 ? void 0 : _error$stack.split('\\n').filter(line => !line.startsWith(' at '));\n if (!traces) return null;\n\n // Remove redundant line\n if (traces[traces.length - 1].startsWith('SyntaxError:')) {\n traces.pop();\n }\n return traces.join('\\n');\n }\n return null;\n}", "function stackTraceFromErrStackString(log, err) {\n const stacktrace = [];\n\n // graphqljs adds the `originalError` property which represents the original\n // error thrown within the resolver\n err = err.originalError || err;\n\n if (err.stack === null) {\n return [];\n }\n\n // frames is an array of StackFrame (https://github.com/stacktracejs/stackframe).\n let frames = null;\n try {\n frames = errorStackParser.parse(err);\n } catch (parseErr) {\n log.debug('could not parse err.stack string: %s', parseErr);\n }\n\n if (frames) {\n const cwd = getCwd(log);\n for (var i = 0; i < frames.length; i++) {\n const frame = frames[i];\n const filename = frame.getFileName() || '';\n stacktrace.push({\n filename: getRelativeFileName(filename, cwd),\n function: frame.getFunctionName(),\n lineno: frame.getLineNumber(),\n library_frame: !isStackFrameApp(frame),\n abs_path: filename,\n });\n }\n }\n\n return stacktrace;\n}", "function _formatStackTrace1(exception) {\n function comesFromFramework(call) {\n return (call.match(/@chrome:\\/\\/mozunit\\/content\\/lib\\/fsm\\.js:/) ||\n call.match(/@chrome:\\/\\/mozunit\\/content\\/test_case\\.js:/) ||\n // Following is VERY kludgy\n call.match(/\\(function \\(exitResult\\) \\{if \\(eventHandlers/))\n }\n\n var trace = '';\n if(exception.stack) {\n var calls = exception.stack.split('\\n');\n for each(var call in calls) {\n if(call.length > 0 && !comesFromFramework(call)) {\n call = call.replace(/\\\\n/g, '\\n');\n\n if(call.length > 200)\n call =\n call.substr(0, 100) + ' [...] ' +\n call.substr(call.length - 100) + '\\n';\n\n trace += call + '\\n';\n }\n }\n }\n return trace;\n}", "get eventMessage() {\n var _a;\n return (_a = this._eventData.event_data.message) !== null && _a !== void 0 ? _a : '';\n }", "function formatError(e) {\n if (!e.err) {\n return e.message;\n }\n\n // PluginError\n if (typeof e.err.showStack === 'boolean') {\n return e.err.toString();\n }\n\n // Normal error\n if (e.err.stack) {\n return e.err.stack;\n }\n\n // Unknown (string, number, etc.)\n return new Error(String(e.err)).stack;\n}", "function massageError(error) {\n if (!error.message) {\n return error;\n }\n const message = error.message.replace(/^JSON.parse: /, '').replace(/of the JSON data/, '');\n const parts = /line (\\d+) column (\\d+)/.exec(message);\n if (!parts || parts.length !== 3) {\n return error;\n }\n return {\n message: htmlEncode(message),\n line: Number(parts[1]),\n column: Number(parts[2])\n };\n }", "function exceptions_getErrorMessage(errorObject) {\n var str = exceptionMessages_namespaceObject[errorObject.type];\n if (!str) return;\n var keys = Object.keys(errorObject);\n keys.forEach(function (prop) {\n var re = new RegExp('(#' + prop + '#)', 'g');\n str = str.replace(re, errorObject[prop]);\n });\n return str;\n}", "convertStack(err) {\n let frames;\n\n if (type.array(err.stack)) {\n frames = err.stack.map((frame) => {\n if (type.string(frame)) return frame;\n else return frame.toString();\n });\n } else if (type.string(err.stack)) {\n frames = err.stack.split(/\\n/g);\n }\n\n return frames;\n }", "function getSafeCause (errorObj) {\n var cause = errorObj.cause || errorObj\n if (cause instanceof Error) {\n var safeCopy = {}\n Object.getOwnPropertyNames(cause).forEach(function (prop) {\n safeCopy[prop] =\n prop === 'stack' || prop === 'rhinoException'\n ? cause[prop].toString()\n : cause[prop]\n })\n cause = safeCopy\n }\n return cause\n }", "parse(message: string): ?string {\n message = GO_ERROR_PREFIX.exec(message)[MESSAGE_GROUP];\n return this.filter(message);\n }", "get message(): ?Message {\n return this._rawEvent.message;\n }", "parseError(error) {\n if (error.code === 400 && (error.details && error.details.length)) {\n return {\n code: error.code,\n msg: get(error, 'details')[0] || 'Error',\n };\n }\n return error;\n }", "function s(e){return Object.prototype.toString.call(e).indexOf(\"Error\")>-1}", "function Uo(e){return Object.prototype.toString.call(e).indexOf(\"Error\")>-1}", "function Vr(e){return Object.prototype.toString.call(e).indexOf(\"Error\")>-1}", "function eventFromMessage(\n stackParser,\n message,\n // eslint-disable-next-line deprecation/deprecation\n level = 'info',\n hint,\n attachStacktrace,\n) {\n const syntheticException = (hint && hint.syntheticException) || undefined;\n const event = eventFromString(stackParser, message, syntheticException, attachStacktrace);\n event.level = level;\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return utils.resolvedSyncPromise(event);\n}", "function r(e){return Object.prototype.toString.call(e).indexOf(\"Error\")>-1}", "function r(e){return Object.prototype.toString.call(e).indexOf(\"Error\")>-1}", "function r(e){return Object.prototype.toString.call(e).indexOf(\"Error\")>-1}", "function r(e){return Object.prototype.toString.call(e).indexOf(\"Error\")>-1}", "function r(e){return Object.prototype.toString.call(e).indexOf(\"Error\")>-1}", "function r(e){return Object.prototype.toString.call(e).indexOf(\"Error\")>-1}", "function r(e){return Object.prototype.toString.call(e).indexOf(\"Error\")>-1}", "function GetErrorMessage(err) {\n if (err['user_message']) {\n return err.user_message.text;\n }\n else if (err['error_summary']) {\n return err.error_summary;\n }\n else if (typeof (err.error) === \"string\") {\n return err.error;\n }\n else if (typeof (err.error) === \"object\") {\n // DROPBOX BUG: Sometimes, error is a nested error.\n return GetErrorMessage(err.error);\n }\n else {\n throw new Error((\"Dropbox's servers gave us a garbage error message: \" + (JSON.stringify(err))));\n }\n}", "function GetErrorMessage(err) {\n if (err['user_message']) {\n return err.user_message.text;\n }\n else if (err['error_summary']) {\n return err.error_summary;\n }\n else if (typeof (err.error) === \"string\") {\n return err.error;\n }\n else if (typeof (err.error) === \"object\") {\n // DROPBOX BUG: Sometimes, error is a nested error.\n return GetErrorMessage(err.error);\n }\n else {\n throw new Error(\"Dropbox's servers gave us a garbage error message: \" + JSON.stringify(err));\n }\n}", "function _eventFromIncompleteOnError(msg, url, line, column) {\n\t const ERROR_TYPES_RE =\n\t /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;\n\n\t // If 'message' is ErrorEvent, get real message from inside\n\t let message = isErrorEvent(msg) ? msg.message : msg;\n\t let name = 'Error';\n\n\t const groups = message.match(ERROR_TYPES_RE);\n\t if (groups) {\n\t name = groups[1];\n\t message = groups[2];\n\t }\n\n\t const event = {\n\t exception: {\n\t values: [\n\t {\n\t type: name,\n\t value: message,\n\t },\n\t ],\n\t },\n\t };\n\n\t return _enhanceEventWithInitialFrame(event, url, line, column);\n\t}", "function Fl(e){return Object.prototype.toString.call(e).indexOf(\"Error\")>-1}", "function serialize_Error(obj) {\r\n\treturn [obj.message, obj.name || '', obj.stack || ''];\r\n}", "function eventFromMessage(\n stackParser,\n message,\n // eslint-disable-next-line deprecation/deprecation\n level = 'info',\n hint,\n attachStacktrace,\n ) {\n const syntheticException = (hint && hint.syntheticException) || undefined;\n const event = eventFromString(stackParser, message, syntheticException, attachStacktrace);\n event.level = level;\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return resolvedSyncPromise(event);\n }", "static extractContextFromMessage(carrier, extractOptions = {}) {\n let traceContext;\n let { path } = extractOptions; // type not implemented yet\n if (carrier instanceof EventMessage_1.EventMessage || (('metadata' in carrier) && 'trace' in carrier.metadata)) {\n path = 'metadata.trace';\n }\n else if ('trace' in carrier) {\n path = 'trace';\n }\n traceContext = createTraceMetadataFromContext(util_1.getNestedObject(carrier, path));\n return traceContext;\n }", "function Mi(e){return Object.prototype.toString.call(e).indexOf(\"Error\")>-1}", "function eventFromMessage(\n\t stackParser,\n\t message,\n\t // eslint-disable-next-line deprecation/deprecation\n\t level = 'info',\n\t hint,\n\t attachStacktrace,\n\t) {\n\t const syntheticException = (hint && hint.syntheticException) || undefined;\n\t const event = eventFromString(stackParser, message, syntheticException, attachStacktrace);\n\t event.level = level;\n\t if (hint && hint.event_id) {\n\t event.event_id = hint.event_id;\n\t }\n\t return resolvedSyncPromise(event);\n\t}", "function _eventFromIncompleteOnError(msg, url, line, column) {\n const ERROR_TYPES_RE =\n /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;\n\n // If 'message' is ErrorEvent, get real message from inside\n let message = isErrorEvent$1(msg) ? msg.message : msg;\n let name = 'Error';\n\n const groups = message.match(ERROR_TYPES_RE);\n if (groups) {\n name = groups[1];\n message = groups[2];\n }\n\n const event = {\n exception: {\n values: [\n {\n type: name,\n value: message,\n },\n ],\n },\n };\n\n return _enhanceEventWithInitialFrame(event, url, line, column);\n }", "function getErrorMessage(e) {\n if (isError(e)) {\n return e.message;\n }\n else {\n let stringified;\n try {\n if (typeof e === \"object\" && e) {\n stringified = JSON.stringify(e);\n }\n else {\n stringified = String(e);\n }\n }\n catch (err) {\n stringified = \"[unable to stringify input]\";\n }\n return `Unknown error ${stringified}`;\n }\n}", "function getErrorMessage(e) {\n if (isError(e)) {\n return e.message;\n }\n else {\n let stringified;\n try {\n if (typeof e === \"object\" && e) {\n stringified = JSON.stringify(e);\n }\n else {\n stringified = String(e);\n }\n }\n catch (err) {\n stringified = \"[unable to stringify input]\";\n }\n return `Unknown error ${stringified}`;\n }\n}", "function getExceptionDesc(e)\n{\n try\n {\n if(e.description)\n return e.description;\n else\n return e;\n }\n catch(x)\n {\n return e;\n }\n}", "function convertException(exception) {\n if (!!exception) {\n return {\n \"message\": exception.message\n , \"stack\": exception.stack\n };\n }\n }", "function stackTrace( e ) {\n var r = '';\n for (var p in e) {\n r += p + ': ' + e[p] + '\\n';\n }\n alert(r);\n //console.log, console.debug, console.info, console.warn, and console.error.\n}", "function l(e){return Object.prototype.toString.call(e).indexOf(\"Error\")>-1}", "function extractExceptionKeysForMessage(exception, maxLength) {\n if (maxLength === void 0) { maxLength = 40; }\n var keys = Object.keys(getWalkSource(exception));\n keys.sort();\n if (!keys.length) {\n return '[object has no keys]';\n }\n if (keys[0].length >= maxLength) {\n return Object(_string__WEBPACK_IMPORTED_MODULE_5__[/* truncate */ \"d\"])(keys[0], maxLength);\n }\n for (var includedKeys = keys.length; includedKeys > 0; includedKeys--) {\n var serialized = keys.slice(0, includedKeys).join(', ');\n if (serialized.length > maxLength) {\n continue;\n }\n if (includedKeys === keys.length) {\n return serialized;\n }\n return Object(_string__WEBPACK_IMPORTED_MODULE_5__[/* truncate */ \"d\"])(serialized, maxLength);\n }\n return '';\n}", "function errorStackTracerFormatter(logEntry) {\n if (logEntry.error) {\n logEntry.error = logEntry.error.stack;\n }\n return logEntry;\n}", "if (Array.isArray(originalError.path)) {\n return (originalError: any);\n }", "function extractExceptionKeysForMessage(exception, maxLength) {\n if (maxLength === void 0) { maxLength = 40; }\n // tslint:disable:strict-type-predicates\n var keys = Object.keys(getWalkSource(exception));\n keys.sort();\n if (!keys.length) {\n return '[object has no keys]';\n }\n if (keys[0].length >= maxLength) {\n return Object(_string__WEBPACK_IMPORTED_MODULE_4__[\"truncate\"])(keys[0], maxLength);\n }\n for (var includedKeys = keys.length; includedKeys > 0; includedKeys--) {\n var serialized = keys.slice(0, includedKeys).join(', ');\n if (serialized.length > maxLength) {\n continue;\n }\n if (includedKeys === keys.length) {\n return serialized;\n }\n return Object(_string__WEBPACK_IMPORTED_MODULE_4__[\"truncate\"])(serialized, maxLength);\n }\n return '';\n}", "function Bo(e){return Object.prototype.toString.call(e).indexOf(\"Error\")>-1}", "function handleCustomMessage(error) {\n return [{\n message: error.customMessage,\n field: error.path,\n type: error.type,\n }];\n}", "function eventFromMessage(options, message, level, hint) {\n if (level === void 0) { level = Severity.Info; }\n var syntheticException = (hint && hint.syntheticException) || undefined;\n var event = eventFromString(message, syntheticException, {\n attachStacktrace: options.attachStacktrace,\n });\n event.level = level;\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return syncpromise_SyncPromise.resolve(event);\n}", "decodeEventLog(eventName: string, log: Object) {\n const abi = this.abi.find(abi => {\n return abi.type === 'event' && abi.name === eventName\n })\n if (!abi) {\n throw new Error(`Event '${eventName}' not found in ABI`)\n }\n const inputs = [\n {\n indexed: true,\n name: 'signature',\n type: 'string',\n },\n ...abi.inputs,\n ]\n // Remove event sig topic as expected by decodeLog\n const topics = log.topics.slice(1)\n return Web3EthAbi.decodeLog(inputs, log.data, topics)\n }", "function Ho(e){return Object.prototype.toString.call(e).indexOf(\"Error\")>-1}", "function inspect() {\n if (!isObject(params) || Array.isArray(params) || params === null) {\n params = { value: params }\n }\n if (typeof params.error !== 'undefined') {\n params = { error: params.error } // discard all fields but the error field\n state = undefined // abort unless there is a handler in the stack\n while (stack.length > 0) {\n if (state = stack.shift().catch) break\n }\n }\n }", "function parseEvent(logEvent, logGroupName, logStreamName) {\n console.log(\"logEvent: \" + JSON.stringify(logEvent));\n return {\n // remove '\\n' character at the end of the event\n message: logEvent.message.trim(),\n logGroupName: logGroupName,\n logStreamName: logStreamName,\n timestamp: new Date(logEvent.timestamp).toISOString()\n };\n }", "function Ti(e){return Object.prototype.toString.call(e).indexOf(\"Error\")>-1}", "function captureStack() {\n var stack = {}\n Error.captureStackTrace(stack, captureStack)\n return stack.stack.split('\\n').slice(1)\n}", "function n(e){return Object.prototype.toString.call(e).indexOf(\"Error\")>-1}", "function Nr(e){return Object.prototype.toString.call(e).indexOf(\"Error\")>-1}", "function stacktrace() {\r\n function st2(f) {\r\n return !f ? [] :\r\n st2(f.caller).concat([f.toString().split('(')[0].substring(9) + '(' + f.arguments.join(',') + ')']);\r\n }\r\n return st2(arguments.callee.caller);\r\n}", "function u(e){return-1<Object.prototype.toString.call(e).indexOf(\"Error\")}", "function Ui(e){return Object.prototype.toString.call(e).indexOf(\"Error\")>-1}", "function prepareStackTrace(error, stack) {\n if (emptyCacheBetweenOperations) {\n fileContentsCache = {};\n sourceMapCache = {};\n }\n\n var name = error.name || 'Error';\n var message = error.message || '';\n var errorString = name + \": \" + message;\n\n var state = { nextPosition: null, curPosition: null };\n var processedStack = [];\n for (var i = stack.length - 1; i >= 0; i--) {\n processedStack.push('\\n at ' + wrapCallSite(stack[i], state));\n state.nextPosition = state.curPosition;\n }\n state.curPosition = state.nextPosition = null;\n return errorString + processedStack.reverse().join('');\n}", "function captureLine() {\n if (!hasStacks) {\n return;\n }\n\n try {\n throw new Error();\n } catch (e) {\n var lines = e.stack.split(\"\\n\");\n var firstLine = lines[0].indexOf(\"@\") > 0 ? lines[1] : lines[2];\n var fileNameAndLineNumber = getFileNameAndLineNumber(firstLine);\n if (!fileNameAndLineNumber) {\n return;\n }\n\n qFileName = fileNameAndLineNumber[0];\n return fileNameAndLineNumber[1];\n }\n }", "function captureLine() {\n if (!hasStacks) {\n return;\n }\n\n try {\n throw new Error();\n } catch (e) {\n var lines = e.stack.split(\"\\n\");\n var firstLine = lines[0].indexOf(\"@\") > 0 ? lines[1] : lines[2];\n var fileNameAndLineNumber = getFileNameAndLineNumber(firstLine);\n if (!fileNameAndLineNumber) {\n return;\n }\n\n qFileName = fileNameAndLineNumber[0];\n return fileNameAndLineNumber[1];\n }\n }", "function Ni(e){return Object.prototype.toString.call(e).indexOf(\"Error\")>-1}", "function Ni(e){return Object.prototype.toString.call(e).indexOf(\"Error\")>-1}", "function _eventFromIncompleteOnError(msg, url, line, column) {\n const ERROR_TYPES_RE =\n /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;\n\n // If 'message' is ErrorEvent, get real message from inside\n let message = utils.isErrorEvent(msg) ? msg.message : msg;\n let name = 'Error';\n\n const groups = message.match(ERROR_TYPES_RE);\n if (groups) {\n name = groups[1];\n message = groups[2];\n }\n\n const event = {\n exception: {\n values: [\n {\n type: name,\n value: message,\n },\n ],\n },\n };\n\n return _enhanceEventWithInitialFrame(event, url, line, column);\n}", "function a(e){return Object.prototype.toString.call(e).indexOf(\"Error\")>-1}", "function a(e){return Object.prototype.toString.call(e).indexOf(\"Error\")>-1}", "function a(e){return Object.prototype.toString.call(e).indexOf(\"Error\")>-1}", "static message (error) {\n const instance = Instances.get(error)\n if (instance != null) {\n return instance.message\n }\n return coalesce(error.message)\n }", "function getExceptionDetails(objTroubleshoot, callBack) {\n try {\n new sql.Request(db)\n .input('FromDate', sql.VarChar(50), objTroubleshoot.objData.fromDate)\n .input('ToDate', sql.VarChar(50), objTroubleshoot.objData.toDate)\n .input('EmailId', sql.VarChar(50), objTroubleshoot.objData.emailId)\n .input('ElevatorUnitId', sql.VarChar(50), objTroubleshoot.objDataelevatorUnitId)\n .input('IncidentId', sql.Int, objTroubleshoot.objData.incidentId)\n .execute('spRetrieveExceptionDetails', (error, result) => {\n returnResult(error, result, objTroubleshoot.currentUserId, callBack);\n });\n }\n catch (exception) {\n //Exception logging here\n helperLogging.logException({ \"isServer\": 1, \"methodName\": \"getExceptionDetails\", \"exceptionDetails\": exception.message, \"userId\": objTroubleshoot.currentUserI });\n }\n}", "function captureLine() {\n\t\t if (!hasStacks) {\n\t\t return;\n\t\t }\n\t\t\n\t\t try {\n\t\t throw new Error();\n\t\t } catch (e) {\n\t\t var lines = e.stack.split(\"\\n\");\n\t\t var firstLine = lines[0].indexOf(\"@\") > 0 ? lines[1] : lines[2];\n\t\t var fileNameAndLineNumber = getFileNameAndLineNumber(firstLine);\n\t\t if (!fileNameAndLineNumber) {\n\t\t return;\n\t\t }\n\t\t\n\t\t qFileName = fileNameAndLineNumber[0];\n\t\t return fileNameAndLineNumber[1];\n\t\t }\n\t\t}", "function captureLine() {\n if (!hasStacks) {\n return;\n }\n \n try {\n throw new Error();\n } catch (e) {\n var lines = e.stack.split(\"\\n\");\n var firstLine = lines[0].indexOf(\"@\") > 0 ? lines[1] : lines[2];\n var fileNameAndLineNumber = getFileNameAndLineNumber(firstLine);\n if (!fileNameAndLineNumber) {\n return;\n }\n \n qFileName = fileNameAndLineNumber[0];\n return fileNameAndLineNumber[1];\n }\n }", "function getErrorSource(error) {\n var match = /\\n at [^(]+ \\((.*):(\\d+):(\\d+)\\)/.exec(error.stack);\n if (match) {\n var source = match[1];\n var line = +match[2];\n var column = +match[3];\n\n // Support the inline sourceContents inside the source map\n var contents = fileContentsCache[source];\n\n // Support files on disk\n if (!contents && fs && fs.existsSync(source)) {\n contents = fs.readFileSync(source, 'utf8');\n }\n\n // Format the line from the original source code like node does\n if (contents) {\n var code = contents.split(/(?:\\r\\n|\\r|\\n)/)[line - 1];\n if (code) {\n return source + ':' + line + '\\n' + code + '\\n' +\n new Array(column).join(' ') + '^';\n }\n }\n }\n return null;\n}", "function captureLine() {\n\t if (!hasStacks) {\n\t return;\n\t }\n\t\n\t try {\n\t throw new Error();\n\t } catch (e) {\n\t var lines = e.stack.split(\"\\n\");\n\t var firstLine = lines[0].indexOf(\"@\") > 0 ? lines[1] : lines[2];\n\t var fileNameAndLineNumber = getFileNameAndLineNumber(firstLine);\n\t if (!fileNameAndLineNumber) {\n\t return;\n\t }\n\t\n\t qFileName = fileNameAndLineNumber[0];\n\t return fileNameAndLineNumber[1];\n\t }\n\t}", "function captureLine() {\n\t if (!hasStacks) {\n\t return;\n\t }\n\t\n\t try {\n\t throw new Error();\n\t } catch (e) {\n\t var lines = e.stack.split(\"\\n\");\n\t var firstLine = lines[0].indexOf(\"@\") > 0 ? lines[1] : lines[2];\n\t var fileNameAndLineNumber = getFileNameAndLineNumber(firstLine);\n\t if (!fileNameAndLineNumber) {\n\t return;\n\t }\n\t\n\t qFileName = fileNameAndLineNumber[0];\n\t return fileNameAndLineNumber[1];\n\t }\n\t}", "function captureLine() {\n\t if (!hasStacks) {\n\t return;\n\t }\n\t\n\t try {\n\t throw new Error();\n\t } catch (e) {\n\t var lines = e.stack.split(\"\\n\");\n\t var firstLine = lines[0].indexOf(\"@\") > 0 ? lines[1] : lines[2];\n\t var fileNameAndLineNumber = getFileNameAndLineNumber(firstLine);\n\t if (!fileNameAndLineNumber) {\n\t return;\n\t }\n\t\n\t qFileName = fileNameAndLineNumber[0];\n\t return fileNameAndLineNumber[1];\n\t }\n\t}", "function captureLine() {\n\t if (!hasStacks) {\n\t return;\n\t }\n\t\n\t try {\n\t throw new Error();\n\t } catch (e) {\n\t var lines = e.stack.split(\"\\n\");\n\t var firstLine = lines[0].indexOf(\"@\") > 0 ? lines[1] : lines[2];\n\t var fileNameAndLineNumber = getFileNameAndLineNumber(firstLine);\n\t if (!fileNameAndLineNumber) {\n\t return;\n\t }\n\t\n\t qFileName = fileNameAndLineNumber[0];\n\t return fileNameAndLineNumber[1];\n\t }\n\t}", "function getErrorSource(error) {\n var match = /\\n at [^(]+ \\((.*):(\\d+):(\\d+)\\)/.exec(error.stack);\n if (match) {\n var source = match[1];\n var line = +match[2];\n var column = +match[3];\n\n // Support the inline sourceContents inside the source map\n var contents = fileContentsCache[source];\n\n // Support files on disk\n if (!contents && fs && fs.existsSync(source)) {\n try {\n contents = fs.readFileSync(source, 'utf8');\n } catch (er) {\n contents = '';\n }\n }\n\n // Format the line from the original source code like node does\n if (contents) {\n var code = contents.split(/(?:\\r\\n|\\r|\\n)/)[line - 1];\n if (code) {\n return source + ':' + line + '\\n' + code + '\\n' +\n new Array(column).join(' ') + '^';\n }\n }\n }\n return null;\n}", "function getErrorSource(error) {\n var match = /\\n at [^(]+ \\((.*):(\\d+):(\\d+)\\)/.exec(error.stack);\n if (match) {\n var source = match[1];\n var line = +match[2];\n var column = +match[3];\n\n // Support the inline sourceContents inside the source map\n var contents = fileContentsCache[source];\n\n // Support files on disk\n if (!contents && fs && fs.existsSync(source)) {\n try {\n contents = fs.readFileSync(source, 'utf8');\n } catch (er) {\n contents = '';\n }\n }\n\n // Format the line from the original source code like node does\n if (contents) {\n var code = contents.split(/(?:\\r\\n|\\r|\\n)/)[line - 1];\n if (code) {\n return source + ':' + line + '\\n' + code + '\\n' +\n new Array(column).join(' ') + '^';\n }\n }\n }\n return null;\n}" ]
[ "0.69864905", "0.65222126", "0.6521486", "0.63998526", "0.636805", "0.6330979", "0.63055736", "0.6297217", "0.6241387", "0.6206682", "0.61103", "0.61103", "0.61103", "0.6095469", "0.6094333", "0.6010287", "0.59615755", "0.5940371", "0.5939014", "0.5909884", "0.5909884", "0.5884673", "0.58512247", "0.5841037", "0.583019", "0.582503", "0.580904", "0.5808371", "0.5777786", "0.576491", "0.5712536", "0.5699782", "0.5637117", "0.5617036", "0.5603007", "0.5600789", "0.55928916", "0.5548586", "0.55478126", "0.55478126", "0.55478126", "0.55478126", "0.55478126", "0.55478126", "0.55478126", "0.5542902", "0.553084", "0.5526821", "0.5526646", "0.55226433", "0.55163", "0.55053395", "0.5500668", "0.5497071", "0.54913944", "0.5489899", "0.5489899", "0.5471582", "0.5448626", "0.54390675", "0.54385513", "0.5417634", "0.54087174", "0.5408067", "0.54052496", "0.54052", "0.5389464", "0.5388456", "0.5369464", "0.53650784", "0.53627676", "0.5361245", "0.5348796", "0.53455305", "0.53404146", "0.53400517", "0.5337217", "0.5336619", "0.53331107", "0.5331426", "0.53259397", "0.53259397", "0.53259057", "0.53259057", "0.53107554", "0.52816254", "0.52816254", "0.52816254", "0.5281556", "0.5280153", "0.5279368", "0.5266467", "0.5265497", "0.5265384", "0.5265384", "0.5265384", "0.5265384", "0.5259042", "0.5259042" ]
0.63108253
7
This function creates an exception from an TraceKitStackTrace
function exceptionFromStacktrace(stacktrace) { var frames = prepareFramesForEvent(stacktrace.stack); var exception = { type: stacktrace.name, value: stacktrace.message, }; if (frames && frames.length) { exception.stacktrace = { frames: frames }; } if (exception.type === undefined && exception.value === '') { exception.value = 'Unrecoverable error caught'; } return exception; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function exceptionFromStacktrace(stacktrace) {\n var frames = prepareFramesForEvent(stacktrace.stack);\n var exception = {\n type: stacktrace.name,\n value: stacktrace.message,\n };\n if (frames && frames.length) {\n exception.stacktrace = { frames: frames };\n }\n // tslint:disable-next-line:strict-type-predicates\n if (exception.type === undefined && exception.value === '') {\n exception.value = 'Unrecoverable error caught';\n }\n return exception;\n}", "function exceptionFromStacktrace(stacktrace) {\r\n var frames = prepareFramesForEvent(stacktrace.stack);\r\n var exception = {\r\n type: stacktrace.name,\r\n value: stacktrace.message\r\n };\r\n if (frames && frames.length) {\r\n exception.stacktrace = { frames: frames };\r\n }\r\n // tslint:disable-next-line:strict-type-predicates\r\n if (exception.type === undefined && exception.value === '') {\r\n exception.value = 'Unrecoverable error caught';\r\n }\r\n return exception;\r\n}", "function createStackForSend() {\n try {\n throw Error(error);\n }\n catch (ex) {\n error = ex;\n\n // note we generated this stack for later\n error.generatedStack = true;\n\n // set the time when it was created\n error.timestamp = error.timestamp || now;\n\n impl.addError(error, via, source);\n }\n }", "function makeException(error, title, name, callerCls, callFunc, message) {\n var _a;\n return new Error((_a = message + (callerCls !== null && callerCls !== void 0 ? callerCls : nameSpace) + callFunc) !== null && _a !== void 0 ? _a : (Const_1.EMPTY_STR + arguments.caller.toString()));\n }", "function makeError (message) {\n const ret = Error(message);\n const stack = ret.stack.split(/\\n/)\n ret.stack = stack.slice(0, 2).join(\"\\n\");\n return ret;\n}", "reThrow(error, filename, lineNumber) {\n if (error instanceof edge_error_1.EdgeError) {\n throw error;\n }\n const message = error.message.replace(/state\\./, '');\n throw new edge_error_1.EdgeError(message, 'E_RUNTIME_EXCEPTION', {\n filename: filename,\n line: lineNumber,\n col: 0,\n });\n }", "function InternalSiestaError(message, context, ssf) {\n this.message = message;\n this.context = context;\n // capture stack trace\n ssf = ssf || arguments.callee;\n if (ssf && Error.captureStackTrace) {\n Error.captureStackTrace(this, ssf);\n }\n}", "function textExceptionThrow(text, from, message) {\n if ( !optionsGlobal.isProduction ) {\n\n var line = exceptionHeader(that.library);\n\n var startLine = text.lastIndexOf(\"\\n\", from) + 1;\n var endLine = text.indexOf(\"\\n\", from);\n endLine = endLine > -1 ? endLine : text.length;\n\n var row = text.substring(startLine, endLine);\n var rows = text.split(\"\\n\"); // Split each token, string to char array\n\n // Find the rowIndex\n for ( var rowIndex = 0; rowIndex < rows.length; rowIndex++ ) {\n if ( rows[rowIndex] == row ) {\n break;\n }\n }\n\n var tokenIndex = from - startLine; // From start up to the token\n\n rows.splice(rowIndex, 0, line);\n rows.splice(rowIndex+2, 0, line);\n\n throw str(\n \"\\n\", line,\n \"\\nMoCP: Exception on (line, token) : (\", rowIndex + 1, \", \", tokenIndex + 1,\") \\n\",\n \"Message:\\n \", message,\n \"\\n\", line,\n \"\\n\\n\",\n rows.join(\"\\n\")\n );\n }\n\n }", "function stackTrace(_tag) {\n (typeof _tag == \"undefined\")? _tag = \"\" : _tag = \" - \" + _tag;\n return (new Error(\"Stack Trace\" + _tag)).stack;\n}", "function prepareStackTrace(error, stack) {\n if (emptyCacheBetweenOperations) {\n fileContentsCache = {};\n sourceMapCache = {};\n }\n\n var name = error.name || 'Error';\n var message = error.message || '';\n var errorString = name + \": \" + message;\n\n var state = { nextPosition: null, curPosition: null };\n var processedStack = [];\n for (var i = stack.length - 1; i >= 0; i--) {\n processedStack.push('\\n at ' + wrapCallSite(stack[i], state));\n state.nextPosition = state.curPosition;\n }\n state.curPosition = state.nextPosition = null;\n return errorString + processedStack.reverse().join('');\n}", "function prepareStackTrace(error, stack) {\n if (emptyCacheBetweenOperations) {\n fileContentsCache = {};\n sourceMapCache = {};\n }\n\n return error + stack.map(function(frame) {\n return '\\n at ' + wrapCallSite(frame);\n }).join('');\n}", "function prepareStackTrace(error, stack) {\n if (emptyCacheBetweenOperations) {\n fileContentsCache = {};\n sourceMapCache = {};\n }\n\n return error + stack.map(function(frame) {\n return '\\n at ' + wrapCallSite(frame);\n }).join('');\n}", "function prepareStackTrace(error, stack) {\n if (emptyCacheBetweenOperations) {\n fileContentsCache = {};\n sourceMapCache = {};\n }\n\n return error + stack.map(function(frame) {\n return '\\n at ' + wrapCallSite(frame);\n }).join('');\n}", "function prepareStackTrace(error, stack) {\n if (emptyCacheBetweenOperations) {\n fileContentsCache = {};\n sourceMapCache = {};\n }\n\n return error + stack.map(function(frame) {\n return '\\n at ' + wrapCallSite(frame);\n }).join('');\n}", "function Exception(msg, trace) {\n\tthis.name = \"Exception\";\n\tthis.message = msg;\n\tthis.trace = trace;\n\n\tthis.toString = function() {\n\t\treturn this.toTraceString();\n\t};\n\n\tthis.toTraceString = function(indent) {\n\t\tfunction indentString(s, indent) {\n\t\t\tvar prefix = new Array(indent + 1).join(\" \");\n\t\t\treturn s.split(\"\\n\").map(function(x) { return x ? prefix + x : x; }).join(\"\\n\");\n\t\t}\n\t\tindent = indent || 0;\n\t\tvar s = indentString(this.name + \"\\n\" + indentString(this.message, indent), indent) + \"\\n\";\n\t\tif (this.trace) {\n\t\t\tif (this.trace.toTraceString) {\n\t\t\t\ts += ('\\nbecause:\\n' + this.trace.toTraceString(indent + 4));\n\t\t\t} else {\n\t\t\t\ts += indentString(this.trace + '\\n', indent + 4);\n\t\t\t}\n\t\t}\n\t\treturn s;\n\t};\n}", "function _formatStackTrace1(exception) {\n function comesFromFramework(call) {\n return (call.match(/@chrome:\\/\\/mozunit\\/content\\/lib\\/fsm\\.js:/) ||\n call.match(/@chrome:\\/\\/mozunit\\/content\\/test_case\\.js:/) ||\n // Following is VERY kludgy\n call.match(/\\(function \\(exitResult\\) \\{if \\(eventHandlers/))\n }\n\n var trace = '';\n if(exception.stack) {\n var calls = exception.stack.split('\\n');\n for each(var call in calls) {\n if(call.length > 0 && !comesFromFramework(call)) {\n call = call.replace(/\\\\n/g, '\\n');\n\n if(call.length > 200)\n call =\n call.substr(0, 100) + ' [...] ' +\n call.substr(call.length - 100) + '\\n';\n\n trace += call + '\\n';\n }\n }\n }\n return trace;\n}", "function tryCatch(f, onThrow, __trace) {\n return (0, _fromEffect.fromEffect)(T.tryCatch(f, onThrow), __trace);\n}", "function getStackTrace (depth) {\n var origTrace = Error.prepareStackTrace\n , origLimit = Error.stackTraceLimit\n , err\n , trace;\n\n Error.stackTraceLimit = depth;\n Error.prepareStackTrace = function(_, stack){ return stack; };\n\n err = new Error();\n Error.captureStackTrace(err, arguments.callee);\n trace = err.stack;\n\n Error.stackTraceLimit = origLimit;\n Error.prepareStackTrace = origTrace;\n\n return trace;\n}", "ListsNetworkException (msg) {\n let error = new Error(msg);\n error.name = 'ListsNetworkException';\n //error.snappMessage = \"something?\";\n throw error;\n }", "function __hsException(e) {\n e = e.toString();\n var x = new Long(2904464383, 3929545892, true);\n var y = new Long(3027541338, 3270546716, true);\n var t = new T5(0, x, y\n , new T5(0, x, y\n , unCStr(\"haste-prim\")\n , unCStr(\"Haste.Prim.Foreign\")\n , unCStr(\"JSException\")), __Z, __Z);\n var show = function(x) {return unCStr(E(x).a);}\n var dispEx = function(x) {return unCStr(\"JavaScript exception: \" + E(x).a);}\n var showList = function(_, s) {return unAppCStr(e, s);}\n var showsPrec = function(_, _p, s) {return unAppCStr(e, s);}\n var showDict = new T3(0, showsPrec, show, showList);\n var self;\n var fromEx = function(_) {return new T1(1, self);}\n var dict = new T5(0, t, showDict, null /* toException */, fromEx, dispEx);\n self = new T2(0, dict, new T1(0, e));\n return self;\n}", "function stacktrace() {\r\n function st2(f) {\r\n return !f ? [] :\r\n st2(f.caller).concat([f.toString().split('(')[0].substring(9) + '(' + f.arguments.join(',') + ')']);\r\n }\r\n return st2(arguments.callee.caller);\r\n}", "exception (error, context /* , ...rest */) {\n if (this.theme.exception) {\n let actualError = error || new Error(\"vlm.exception called without error object\");\n if (!(error instanceof Error)) {\n actualError = new Error(String((error && error.message) || error || \"error missing\"));\n if (error.stack) actualError.stack = error.stack;\n }\n outputError(actualError, `${this.getContextName()} panics: exception from ${context}`, {\n debug: (msg, ...rest_) => console.error(this.theme.babble(msg), ...rest_),\n info: (msg, ...rest_) => console.error(this.theme.info(msg), ...rest_),\n error: (msg, ...rest_) => console.error(this.theme.error(msg), ...rest_),\n warn: (msg, ...rest_) => console.warn(this.theme.warning(msg), ...rest_),\n log: (msg, ...rest_) => console.log(msg, ...rest_),\n });\n }\n return this;\n }", "function RuntimeException(message) {\n\tthis.name = \"ParseException\";\n\tthis.message = message;\n\tthis.stack = (new Error()).stack;\n}", "function prepareObjectStackTrace (obj, stack) {\n return stack\n}", "function prepareObjectStackTrace (obj, stack) {\n return stack\n}", "function prepareObjectStackTrace (obj, stack) {\n return stack\n}", "function prepareObjectStackTrace (obj, stack) {\n return stack\n}", "function prepareObjectStackTrace (obj, stack) {\n return stack\n}", "function prepareObjectStackTrace (obj, stack) {\n return stack\n}", "function prepareObjectStackTrace (obj, stack) {\n return stack\n}", "function prepareObjectStackTrace (obj, stack) {\n return stack\n}", "function prepareObjectStackTrace (obj, stack) {\n return stack\n}", "function prepareObjectStackTrace (obj, stack) {\n return stack\n}", "function prepareObjectStackTrace (obj, stack) {\n return stack\n}", "function prepareObjectStackTrace (obj, stack) {\n return stack\n}", "function prepareObjectStackTrace (obj, stack) {\n return stack\n}", "function prepareObjectStackTrace (obj, stack) {\n return stack\n}", "function prepareObjectStackTrace (obj, stack) {\n return stack\n}", "function prepareObjectStackTrace (obj, stack) {\n return stack\n}", "function prepareObjectStackTrace (obj, stack) {\n return stack\n}", "function prepareObjectStackTrace (obj, stack) {\n return stack\n}", "function prepareObjectStackTrace (obj, stack) {\n return stack\n}", "function prepareObjectStackTrace (obj, stack) {\n return stack\n}", "function prepareObjectStackTrace (obj, stack) {\n return stack\n}", "function _getStack() {\n const originalFunc = Error.prepareStackTrace;\n let callerfile;\n let stack;\n\n try {\n const err = new Error();\n let currentfile;\n\n Error.prepareStackTrace = function (_, stack) {\n return stack;\n };\n\n stack = err.stack.shift();\n currentfile = stack.getFileName();\n\n while (err.stack.length) {\n stack = err.stack.shift();\n callerfile = stack.getFileName();\n\n if (currentfile !== callerfile) {\n break;\n }\n }\n } catch (e) {\n // dummy\n }\n\n Error.prepareStackTrace = originalFunc; \n return stack;\n}", "function prepareObjectStackTrace(obj, stack) {\n return stack\n}", "function prepareObjectStackTrace(obj, stack) {\n return stack\n}", "function prepareObjectStackTrace(obj, stack) {\n return stack\n}", "function translateJavascriptStackTrace(/*String*/ stack) {\n var re = /(\\w*)(\\(.*\\))@(.*):(\\d+)/g;\n re.lastIndex = 0;\n \n var sb = new StringBuffer();\n while (m = re.exec(stack)) {\n var functionName = m[1];\n var args = m[2];\n var file = m[3];\n var line = m[4];\n\n if (file == \"chrome://chickenfoot/content/chickenscratch.xul\") {\n line -= 16;\n }\n \n if (functionName == \"Error\" || functionName == \"Exception\") {\n continue;\n }\n \n if (!functionName) functionName = \"anonymous\";\n\n sb.append((sb.length == 0) ? \" in \" : \" \"); \n\n // the first chickenscratchEvaluate should be the top of the stack\n if (functionName == \"chickenscratchEvaluate\") {\n sb.append(\"top level line \" + line + \"\\n\");\n break;\n } else {\n sb.append(functionName + \"() line \" + line + \"\\n\");\n }\n }\n return sb.toString();\n }", "function prepareObjectStackTrace(obj, stack) {\n return stack;\n}", "function prepareObjectStackTrace(obj, stack) {\n return stack;\n}", "function MyException(message){exception(this);}", "function Exception() {}", "function someOrFailException(self, __trace) {\n return (0, _someOrFail.someOrFail_)(self, () => new _index.NoSuchElementException(), __trace);\n}", "function bpException() {}", "HTTPNetworkException (msg) {\n let error = new Error(msg);\n error.name = \"HTTPNetworkException\";\n //error.snappMessage = \"something?\";\n throw error;\n }", "function getSafeCause (errorObj) {\n var cause = errorObj.cause || errorObj\n if (cause instanceof Error) {\n var safeCopy = {}\n Object.getOwnPropertyNames(cause).forEach(function (prop) {\n safeCopy[prop] =\n prop === 'stack' || prop === 'rhinoException'\n ? cause[prop].toString()\n : cause[prop]\n })\n cause = safeCopy\n }\n return cause\n }", "function throwException() {\n throwExceptionInner();\n}", "_extend (trace) {\n return new Tracer(this[STACK].concat(trace))\n }", "function getStack(){\n\tvar orig = Error.prepareStackTrace;\n\tError.prepareStackTrace = function(_, stack) {\n\t\treturn stack;\n\t};\n\tvar err = new Error;\n\tError.captureStackTrace(err);\n\tvar stack = err.stack;\n\tError.prepareStackTrace = orig;\n\treturn stack;\n}", "function genStackTrace(err) {\r\n LOG.warn(descCaller());\r\n var e = err;\r\n if (!err)\r\n e = new Error();\r\n var stackTrace = [];\r\n if (!e.stack)\r\n stackTrace.push(\"No stack trace, (Firefox only)\");\r\n else {\r\n var funcCallPattern = /^\\s*[A-Za-z0-9\\-_\\$]+\\(/;\r\n var lines = e.stack.split(\"\\n\");\r\n for (var i=0; i < lines.length; i++) {\r\n if (lines[i].match(funcCallPattern))\r\n stackTrace.push(lines[i]);\r\n }\r\n if (!err)\r\n stackTrace.shift(); // remove the call to genStackTrace() itself\r\n }\r\n return stackTrace;\r\n}", "function Exception() {\n var _this2;\n\n var message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n\n _classCallCheck(this, Exception);\n\n _this2 = _super2.call(this, message);\n _this2.message = message;\n return _this2;\n }", "function createStack() {\n // somewhat nasty trick to get a stack trace in Moz\n var stack = undefined;\n try {notdefined()} catch(e) {stack = e.stack};\n if (stack) {\n stack = stack.split('\\n');\n stack.shift();\n stack.shift();\n };\n return stack ? stack.join('\\n') : '';\n}", "function traceError(msg)\n{\n\ttrace(\"Build-Edge-List >> \" + msg);\n}", "trace(...errors) {\n\n }", "function sourceFromStacktrace() {\n\ttry {\n\t\tthrow new Error();\n\t} catch ( e ) {\n\t\tif (e.stacktrace) {\n\t\t\t// Opera\n\t\t\treturn e.stacktrace.split(\"\\n\")[6];\n\t\t} else if (e.stack) {\n\t\t\t// Firefox, Chrome\n\t\t\treturn e.stack.split(\"\\n\")[4];\n\t\t}\n\t}\n}", "function sourceFromStacktrace() {\n\ttry {\n\t\tthrow new Error();\n\t} catch ( e ) {\n\t\tif (e.stacktrace) {\n\t\t\t// Opera\n\t\t\treturn e.stacktrace.split(\"\\n\")[6];\n\t\t} else if (e.stack) {\n\t\t\t// Firefox, Chrome\n\t\t\treturn e.stack.split(\"\\n\")[4];\n\t\t}\n\t}\n}", "function ThrowingConstructorTest() {\n throw new Error('taco');\n}", "function correct_backtrace(backtrace) {\n var new_bt = [], m;\n\n for (var i = 0; i < backtrace.length; i++) {\n var loc = backtrace[i];\n if (!loc || !loc.$$is_string) {\n /* Do nothing */\n }\n /* Chromium format */\n else if ((m = loc.match(/^ at (.*?) \\((.*?)\\)$/))) {\n new_bt.push(m[2] + \":in `\" + m[1] + \"'\");\n }\n else if ((m = loc.match(/^ at (.*?)$/))) {\n new_bt.push(m[1] + \":in `undefined'\");\n }\n /* Node format */\n else if ((m = loc.match(/^ from (.*?)$/))) {\n new_bt.push(m[1]);\n }\n /* Mozilla/Apple format */\n else if ((m = loc.match(/^(.*?)@(.*?)$/))) {\n new_bt.push(m[2] + ':in `' + m[1] + \"'\");\n }\n }\n\n return new_bt;\n }", "function catchSomeCause(pf, __trace) {\n return self => catchSomeCause_(self, pf, __trace);\n}", "function makeError( code, msg )\n{\n const err = new Error( msg );\n err.code = code;\n return err;\n}", "function errorStackTracerFormatter(logEntry) {\n if (logEntry.error) {\n logEntry.error = logEntry.error.stack;\n }\n return logEntry;\n}", "function JsUnitException(assertionType, causeMessage, nestedException) {\r\n\r\n\tif (arguments.length != 2 && arguments.length != 3) {\r\n\t\tthrow \"JsUnitFailureException must be constructed passing a 2/3 arguments: \"\r\n\t\t\t\t+ \"(assertionType, causeMessage, nestedException)\";\r\n\t}\r\n\r\n\treturn \"[JsUnitException] \"\r\n\t\t\t+ assertionType\r\n\t\t\t+ \" failure: \"\r\n\t\t\t+ causeMessage\r\n\t\t\t+ (nestedException && nestedException.toString ? \"\\n\\tCaused by: \" + nestedException.toString()\r\n\t\t\t\t\t: \"\");\r\n}", "function CCException(name, message) {\n this.name = name;\n this.message = message;\n this.toString = function () {\n return this.name + \": \" + this.message;\n };\n}", "function copyStackTrace(target, source) {\n // eslint-disable-next-line no-param-reassign\n target.stack = source.stack.replace(source.message, target.message);\n}", "function getStack(){\n\tvar orig = Error.prepareStackTrace;\n\tError.prepareStackTrace = function(_, stack){ return stack; };\n\tvar err = new Error;\n\tError.captureStackTrace(err, arguments.callee);\n\tvar stack = err.stack;\n\tError.prepareStackTrace = orig;\n\treturn stack;\n}", "function makeError(pnpCode, message, data = {}) {\n const code = MODULE_NOT_FOUND_ERRORS.has(pnpCode) ? `MODULE_NOT_FOUND` : pnpCode;\n return Object.assign(new Error(message), {\n code,\n pnpCode,\n data\n });\n}", "function catchIt() {\n try {\n throwIt();\n } catch (e) {\n console.log(e.stack); // print stack trace\n }\n}", "makeError(message) {\n var _a;\n let msg = (_a = this.fileName) !== null && _a !== void 0 ? _a : \"\";\n if (this.trackPosition) {\n if (msg.length > 0) {\n msg += \":\";\n }\n msg += `${this.line}:${this.column}`;\n }\n if (msg.length > 0) {\n msg += \": \";\n }\n return new Error(msg + message);\n }", "function rethrow(){\n if(DEBUG){\n var back = new error;\n return function(err){\n if(err){\n back.stack = err.name +':'+ err.message + back.stack.substr(back.name.length);\n err = back;\n throw err ;\n }\n };\n }\n return function(err){\n if(err){\n throw err ;\n }\n };\n}", "createError(rule, code, message) {\n return {\n code,\n message,\n tagName: rule.tagName\n };\n }", "function copyStackTrace(target, source) {\n target.stack = source.stack.replace(source.message, target.message)\n}", "function MyBaseExceptions(){\n}", "function xb(a,b){if(Error.captureStackTrace)Error.captureStackTrace(this,xb);else{var c=Error().stack;c&&(this.stack=c)}a&&(this.message=String(a));void 0!==b&&(this.cause=b)}", "function buildCustomError(...args) {\r\n return Reflect.construct(Error, args, buildCustomError);// 指定new.target为buildCustomError,这样prototype就不是Error.prototype了\r\n}", "function createClientErrorConstructor (HttpError, name, code) {\n\t var className = name.match(/Error$/) ? name : name + 'Error'\n\n\t function ClientError (message) {\n\t // create the error object\n\t var err = new Error(message != null ? message : statuses[code])\n\n\t // capture a stack trace to the construction point\n\t Error.captureStackTrace(err, ClientError)\n\n\t // adjust the [[Prototype]]\n\t setPrototypeOf(err, ClientError.prototype)\n\n\t // redefine the error name\n\t Object.defineProperty(err, 'name', {\n\t enumerable: false,\n\t configurable: true,\n\t value: className,\n\t writable: true\n\t })\n\n\t return err\n\t }\n\n\t inherits(ClientError, HttpError)\n\n\t ClientError.prototype.status = code\n\t ClientError.prototype.statusCode = code\n\t ClientError.prototype.expose = true\n\n\t return ClientError\n\t}", "function generateError(message, code) {\n throw { message: message, errorCode: code };\n}", "function generateError(message, code) {\n throw { message: message, errorCode: code };\n}", "function generateError(message, code) {\n throw { message: message, errorCode: code };\n}", "function getStack(){\n var orig = Error.prepareStackTrace;\n Error.prepareStackTrace = function(_, stack) {\n return stack;\n };\n var err = new Error();\n Error.captureStackTrace(err, arguments.callee);\n var stack = err.stack;\n Error.prepareStackTrace = orig;\n return stack;\n}", "function getStack(){\n var orig = Error.prepareStackTrace;\n Error.prepareStackTrace = function(_, stack) {\n return stack;\n };\n var err = new Error();\n Error.captureStackTrace(err, arguments.callee);\n var stack = err.stack;\n Error.prepareStackTrace = orig;\n return stack;\n}", "function CustomException(message) {\n const error = new Error(message);\n return error;\n}", "function raiseError(error, message, caller, title, name) {\n let finalTitle = title !== null && title !== void 0 ? title : Const_1.MALFORMEDXML;\n let finalName = name !== null && name !== void 0 ? name : Const_1.MALFORMEDXML;\n let finalMessage = message !== null && message !== void 0 ? message : Const_1.EMPTY_STR;\n //TODO clean up the messy makeException, this is a perfect case for encapsulation and sane defaults\n return Lang_1.ExtLang.makeException(error, finalTitle, finalName, \"Response\", caller || ((arguments.caller) ? arguments.caller.toString() : \"_raiseError\"), finalMessage);\n }", "function stackTrace(exception) {\r\n // Internet Explorer\r\n if (userAgent.isInternetExplorer) {\r\n var callstack = [];\r\n \r\n for (var caller = arguments.caller; caller != null; caller = caller.caller) {\r\n var name = caller.name ? caller.name : \"<anonymous>\";\r\n var parameters = [];\r\n var len = caller.length;\r\n \r\n for (var i = 0; i < len; ++i) {\r\n parameters.push(\"?\");\r\n }\r\n \r\n callstack.push(name + \"(\" + parameters.join(\", \") + \")\");\r\n }\r\n }\r\n // Mozilla\r\n else if (userAgent.isMozilla) {\r\n if (!exception || !exception.stack) {\r\n try {\r\n var x; x.y;\r\n }\r\n catch (e) {\r\n exception = e;\r\n }\r\n }\r\n \r\n if (!exception.stack) {\r\n return \"(stack trace not available)\\n\";\r\n }\r\n \r\n var callstack = exception.stack.split(\"\\n\");\r\n var commonPath = null;\r\n \r\n // callstack.shift(); // Get rid of the call to stackTrace().\r\n callstack.pop (); // Remove the last entry, an empty string.\r\n \r\n // Break up the lines into method/file/line components, and figure out the\r\n // common directory all of the source files are in so that it can be removed\r\n // from the file names (to make the alert message easier to read).\r\n for (var i = 0; i < callstack.length; ++i) {\r\n /^(.*?)@(.*?):(\\d+)$/.test(callstack[i]);\r\n \r\n var method = RegExp.$1;\r\n var file = RegExp.$2;\r\n var line = RegExp.$3;\r\n var path = file.replace(/^(.*\\/).*$/, \"$1\");\r\n \r\n callstack[i] = {method: method, file: file, line: line};\r\n \r\n if (file != \"\") {\r\n if (commonPath == null) {\r\n commonPath = path;\r\n }\r\n else {\r\n commonPath = commonPath.substr(0, path .length);\r\n path = path .substr(0, commonPath.length);\r\n \r\n while (commonPath != path) {\r\n commonPath = commonPath.substr(0, commonPath.length - 1);\r\n path = path .substr(0, path .length - 1);\r\n }\r\n }\r\n }\r\n }\r\n \r\n // Create a string for each function call.\r\n for (var i = 0; i < callstack.length; ++i) {\r\n var method = callstack[i].method;\r\n var file = callstack[i].file;\r\n var line = callstack[i].line;\r\n \r\n if (file == \"\" && method == \"\") {\r\n continue;\r\n }\r\n \r\n var call = \"\";\r\n \r\n if (file == \"\") {\r\n call += \"<unknown>\";\r\n }\r\n else {\r\n call += file.substr(commonPath.length) + \"(\" + line + \")\";\r\n }\r\n \r\n if (method != \"\") {\r\n call += \": \";\r\n \r\n if (method.match(/^\\(/)) {\r\n call += \"<anonymous>\";\r\n }\r\n \r\n call += method;\r\n }\r\n \r\n callstack[i] = call;\r\n }\r\n }\r\n else {\r\n var callstack = [];\r\n }\r\n \r\n var string = \"\";\r\n \r\n for (var i = 0; i < callstack.length; ++i) {\r\n string += \"> \" + callstack[i] + \"\\n\";\r\n }\r\n\r\n \r\n return string;\r\n}", "function equalsHookFunction(data)\n{\n // using create_global_class api we have defined a new Exception object , now let's throw it\n throw myExceptionClass;\n}", "function catchTag(k, f, __trace) {\n return self => catchTag_(self, k, f);\n}", "function createClientErrorConstructor(HttpError,name,code){var className=name.match(/Error$/)?name:name+'Error';function ClientError(message){// create the error object\nvar msg=message!=null?message:statuses[code];var err=new Error(msg);// capture a stack trace to the construction point\nError.captureStackTrace(err,ClientError);// adjust the [[Prototype]]\nsetPrototypeOf(err,ClientError.prototype);// redefine the error message\nObject.defineProperty(err,'message',{enumerable:true,configurable:true,value:msg,writable:true});// redefine the error name\nObject.defineProperty(err,'name',{enumerable:false,configurable:true,value:className,writable:true});return err;}inherits(ClientError,HttpError);ClientError.prototype.status=code;ClientError.prototype.statusCode=code;ClientError.prototype.expose=true;return ClientError;}", "function catchTag(k, f, __trace) {\n return self => catchTag_(self, k, f, __trace);\n}", "function withErrorStack(error,stack) {\n\n if (config.enviroment==='development') {\n return {...error,stack};\n }\n\n return error;\n\n}", "couldNotCreateFunc (src) {\n const msg = 'Could not recreate closure from source: \\n' + src;\n console.error(msg);\n return function () { throw new Error(msg); };\n }" ]
[ "0.72436225", "0.72335196", "0.5927451", "0.57460064", "0.57269514", "0.5515385", "0.5425535", "0.5324512", "0.5314851", "0.5221093", "0.5173651", "0.5173651", "0.5173651", "0.5173651", "0.51490754", "0.5124791", "0.51237977", "0.5101845", "0.50725347", "0.50684905", "0.5035161", "0.503459", "0.50327003", "0.5026945", "0.5026945", "0.5026945", "0.5026945", "0.5026945", "0.5026945", "0.5026945", "0.5026945", "0.5026945", "0.5026945", "0.5026945", "0.5026945", "0.5026945", "0.5026945", "0.5026945", "0.5026945", "0.5026945", "0.5026945", "0.5026945", "0.5026945", "0.5026945", "0.50032103", "0.49937233", "0.49937233", "0.49937233", "0.4954404", "0.49482325", "0.49482325", "0.49468166", "0.49425924", "0.4941766", "0.49014848", "0.4891549", "0.48513988", "0.48260525", "0.4815298", "0.4809417", "0.48055327", "0.47832", "0.47777638", "0.47695753", "0.4766996", "0.47623935", "0.47623935", "0.47598925", "0.4752207", "0.47302", "0.4714424", "0.47110873", "0.47060117", "0.4699525", "0.46553078", "0.46531", "0.46440363", "0.46425304", "0.46403483", "0.45962322", "0.45923477", "0.45922664", "0.45867383", "0.4583521", "0.45793286", "0.45777306", "0.45755646", "0.45755646", "0.45755646", "0.457257", "0.457257", "0.45723966", "0.45702302", "0.45606428", "0.45502132", "0.45386553", "0.45375717", "0.45216545", "0.45092887", "0.4508773" ]
0.72524875
0
Builds and Event from a Message
function eventFromMessage(options, message, level, hint) { if (level === void 0) { level = Severity.Info; } var syntheticException = (hint && hint.syntheticException) || undefined; var event = eventFromString(message, syntheticException, { attachStacktrace: options.attachStacktrace, }); event.level = level; if (hint && hint.event_id) { event.event_id = hint.event_id; } return syncpromise_SyncPromise.resolve(event); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createEvent(eventName, value, address) {\n var msg = new builder.Message().address(address);\n msg.data.type = 'event';\n msg.data.name = eventName;\n msg.data.value = value;\n\n console.log('function check', msg);\n return msg;\n}", "function MessageEvent(target_, data_, origin_) {\n return {\n target: target_,\n data: data_,\n origin: origin_,\n bubbles: true,\n cancelable: true,\n type: \"message\",\n lastEventId: \"\"\n }\n}", "function buildMessageEntity(message) {\n let msg = {};\n msg.messageText = message;\n msg.date = Date.now();\n msg.sentTo = sentTo;\n msg.sentBy = userDisplayName;\n\n return msg;\n}", "dispatchMessageEvent(){\n const detail = this.getMessage();\n const event = new CustomEvent('message', {detail});\n this.dispatchEvent(event);\n }", "function parseMessage(message){\n console.log(\"message get\", message);\n\n let header = createMessageHeader();\n header._setBuff(message);\n \n if(header.get(\"versionMajor\") !== EVENT_VERSION){\n console.log(`Cannot parse message, expected event version ${EVENT_VERSION}, but received ${header.get(\"versionMajor\")}`);\n }\n\n let bodyLength = header.get(\"length\"),\n body = Buffer.alloc(bodyLength);\n message.copy(body, 0, HEADER_LENGTH);\n\n return {\n header,\n body\n };\n}", "onClientMessage(message) {\n try {\n // Decode the string to an object\n const { event, payload } = JSON.parse(message);\n\n this.emit(\"message\", event, payload);\n } catch {}\n }", "SOCKET_ONMESSAGE(state, message) {\n state.socket.message = message;\n\n if (message.commandId === undefined || message.commandRes === undefined || message.ok === undefined) {\n console.error('Malformed message', message);\n return;\n }\n\n const stateMessage = state.messages[message.commandId];\n state.messages[message.commandId] = null;\n\n switch (message.commandId) {\n // client -> server events\n case COMMAND_LOGIN:\n case COMMAND_REGISTER:\n case COMMAND_CREATE_ROOM:\n case COMMAND_JOIN_ROOM:\n case COMMAND_MAKE_STAKE:\n case COMMAND_MAKE_MOVE:\n case COMMAND_GET_ROOM:\n console.log('Received message', message);\n\n if (message.ok) {\n stateMessage.resolve(message);\n } else {\n stateMessage.reject(message);\n }\n break;\n // server -> client events\n case 1000:\n case 1001:\n case 1002:\n case 1003:\n case 1004:\n case 1005:\n case 1006:\n case 1007:\n case 1008:\n case 1009:\n case 1010:\n case 1011:\n console.log('Received message', message);\n\n state.roomEvent = message;\n break;\n default:\n console.error('Unknown message commandId', message);\n }\n }", "function SendMessage(message)\n{\n client.sendEvent(new Message(JSON.stringify(message))); //, printResultFor(\"send\"));\n}", "[types.SOCKET_ONMESSAGE] (state, message) {\n let payload = JSON.parse(message.data).payload\n let error = payload.error\n if (error) {\n console.error(error)\n return\n }\n let data = payload.data\n if (data === null) return\n state.message = data.message ? data.message : '-'\n state.eventNumber = data.event_number ? data.event_number : '-'\n state.virtualClockSeed = data.virtual_clock ? moment(data.virtual_clock, moment.ISO_8601) : null\n state.virtualClockRate = data.clock_speed ? data.clock_speed : 0\n state.stateChangeTimestamp = data.created ? moment(data.created, moment.ISO_8601) : null\n }", "function parseTicketMasterEvent(msg) {\n\tvar eventObj = new Object();\n\n\tvar context = jQuery(msg);\n\n\teventObj.start = new Object();\n\teventObj.end = new Object();\n\tstartString = context.find('meta[itemprop=\"startDate\"]').attr(\"content\");\n\tstartString = startString.replace('T', ' ');\n\teventObj.start.dateTime = new Date(startString);\n\n\teventObj.end.dateTime = new Date(eventObj.start.dateTime);\n\teventObj.end.dateTime.setHours( eventObj.end.dateTime.getHours() + 3 );\n\n\teventObj.summary = context.filter('meta[property=\"og:title\"]').attr(\"content\");\n\n\teventObj.description = context.filter('meta[property=\"og:url\"]').attr(\"content\");\n\n\tvar venue = context.find('#artist_venue_name').text();\n\tvar location = context.find('#artist_location').text();\n\t\n\teventObj.location = venue + \" - \" + location;\n\t\t\t\t\t\t\t\n\treturn eventObj;\n}", "_eventHandler(message) {\n // push to web client\n this._io.emit('service:event:' + message.meta.event, message.payload)\n this._io.emit('_bson:service:event:' + message.meta.event,\n this._gateway._connector.encoder.pack(message.payload))\n }", "function onMessageReceived(e) {\n console.log('message received');\n console.log(e);\n var msg = JSON.parse(e.data);\n console.log(msg.event);\n switch (msg.event) {\n case 'ready':\n onReady();\n break;\n case 'finish': \n onFinish();\n break;\n };\n }", "socketMessage(message) {\n\n let msg = JSON.parse(message.data);\n if (!msg.event) throw \"Invalid message format: \" + msg;\n\n switch (msg.event) {\n case 'startApp':\n console.log('Application launched')\n this.viewHandler.onStartApplication();\n break;\n\n case 'appDisconnected':\n console.log('app disconnected');\n\n GlobalVars.reset();\n this.reset();\n break;\n\n case 'bodyJoints':\n this.eventsHandler.onReceiveBodyJoints(msg);\n break;\n }\n }", "function onMessageArrived(message) {\n // console.log(\"onMessageArrived\");\n // console.log(\"onMessageArrived:\" + message.payloadString);\n\n payload = JSON.parse(message.payloadString);\n\n handleMessage( // in updateDom.js\n JSON.stringify(\n payload.state.desired\n )\n );\n\n\n} // close onMessageArrive", "onMessage(event) {\n try {\n const data = JSON.parse(event.data);\n // data.event is used to lookup which registered listener to call\n this.ee.emit(data.event, data);\n } catch (error) {\n this.ee.emit('error', error);\n }\n }", "function onMessageArrived(message) {\n // get the payload string and make it a JSON object:\n let msg = JSON.parse(message.payloadString);\n// iterate over the elements of the JSON object:\n for (var key in msg) {\n // If there is not an HTML element with the same ID:\n if (document.getElementById(key) === null) {\n // create create one and give it this ID:\n let thisDiv = document.createElement('div');\n thisDiv.id = key;\n // create text with the key and value:\n let textNode = document.createTextNode(key + ': ' + msg[key]);\n // add the text to the element and add it to the HTML:\n thisDiv.append(textNode);\n document.body.append(thisDiv);\n } else {\n // if there's already an element with this ID,\n // just update it:\n let thisDiv = document.getElementById(key);\n thisDiv.innerHTML = key + ': ' + msg[key];\n }\n }\n}", "function handleMessage(message_event) {\n appendToEventLog('nexe sez: ' + message_event.data);\n}", "SOCKET_ONMESSAGE(state, message) {\n switch (message.type) {\n case \"message\":\n state.messages.push(message.payload);\n break;\n default:\n state.socket.message = message;\n }\n }", "_createMessageElement(message) {\n const messageElement = this._document.createElement('div');\n this._setMessageId(messageElement);\n messageElement.textContent = message;\n this._createMessagesContainer();\n messagesContainer.appendChild(messageElement);\n messageRegistry.set(message, { messageElement, referenceCount: 0 });\n }", "function onMessageArrived(message) {\n console.log('Message Recieved: Topic: ', message.destinationName, '. Payload: ', message.payloadString, '. QoS: ', message.qos);\n console.log(message);\n var messageTime = new Date().toISOString(); //timestamp primitka pristigle poruke\n var poruka = document.createElement('span'); //kreiranje html elementa sa sadržajem poruke\n poruka.innerHTML = 'Tema: ' + message.destinationName + ' | ' + message.payloadString + '</span><br/>'; \n var messages = document.getElementById(\"messages\"); //dohvaćanje html elementa za prikazivanje poruka\n messages.appendChild(poruka); //dodavanje nove poruke html elementu predviđenom za prikaz pristiglih poruka\n}", "function onMessageArrived(message) {\n try{\n let topic = message.destinationName;\n const data = JSON.parse(message.payloadString);\n addData(charts[topic], lists[topic], data.Id, { x: Date.now(), y: data.Value });\n }catch(e){\n // nothing\n }\n console.log(\"onMessageArrived:\"+message.payloadString);\n}", "messageReceived(message) {\n\t\tMessage.create({\n\t\t\tuser: this.user,\n\t\t\tbody: message\n\t\t}).then((res) => {\n\t\t\tres.user = this.user;\n\t\t\tthis.io.emit('message', res);\n\t\t});\n\t}", "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\"+message.payloadString);\n}", "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\"+message.payloadString);\n}", "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\"+message.payloadString);\n}", "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\"+message.payloadString);\n}", "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\"+message.payloadString);\n}", "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\"+message.payloadString);\n}", "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\" + message.payloadString);\n EventBus.dispatch(message.destinationName, this, message)\n }", "function buildMessageClass(msgSpec) {\n\n function Message(values) {\n if (!(this instanceof Message)) {\n return new Message(values);\n }\n\n var that = this;\n\n if (msgSpec.fields) {\n msgSpec.fields.forEach(function(field) {\n if (!field.isBuiltin) {\n // sub-message class\n // is it an array?\n if (values && typeof values[field.name] != \"undefined\") {\n // values provided\n if (field.isArray) {\n that[field.name] = values[field.name].map(function(value) {\n return new (getMessageFromRegistry(field.baseType, 'msg'))(value);\n });\n } else {\n that[field.name] =\n new (getMessageFromRegistry(field.baseType, 'msg'))(values[field.name]);\n }\n } else {\n // use defaults\n if (field.isArray) {\n // it's an array\n const length = field.arrayLen || 0;\n that[field.name] = new Array(length).fill(new (getMessageFromRegistry(field.baseType, 'msg'))());\n } else {\n that[field.name] = new (getMessageFromRegistry(field.baseType, 'msg'))();\n }\n }\n } else {\n // simple type\n that[field.name] =\n (values && typeof values[field.name] != \"undefined\") ?\n values[field.name] :\n (field.value || fieldsUtil.getDefaultValue(field.type));\n }\n });\n }\n };\n\n Message.messageType = msgSpec.getFullMessageName();\n // TODO: bring these back?\n // Message.packageName = details.packageName;\n // Message.messageName = Message.prototype.messageName = details.messageName;\n // Message.md5 = Message.prototype.md5 = details.md5;\n const md5Sum = msgSpec.getMd5sum();\n Message.md5sum = function() {\n return md5Sum;\n };\n Message.Constants = (() => {\n const ret = {};\n msgSpec.constants.forEach((constant) => {\n ret[constant.name.toUpperCase()] = constant.value;\n });\n return ret;\n })();\n Message.fields = msgSpec.fields;\n Message.serialize = function(obj, buffer, offset) {\n serializeInnerMessage(msgSpec, obj, buffer, offset);\n };\n Message.deserialize = function(buffer) {\n var message = new Message();\n\n message = deserializeInnerMessage(msgSpec, message, buffer, [0]);\n\n return message;\n };\n Message.getMessageSize = function(msg) { return fieldsUtil.getMessageSize(msg, msgSpec); };\n\n const fullMsgDefinition = msgSpec.computeFullText();\n Message.messageDefinition = function() { return fullMsgDefinition; };\n Message.datatype = function() { return msgSpec.getFullMessageName(); };\n\n return Message;\n}", "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\"+message.payloadString);\n }", "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\"+message.payloadString);\n }", "function SendMessage(e) {\r\n\r\n\t\te.preventDefault();\r\n\t\tvar msg = document.getElementById(\"msg\").value.trim();\r\n\r\n\t\tif (msg && window.CustomEvent) {\r\n\t\t\tvar event = new CustomEvent(\"newMessage\", {\r\n\t\t\t\tdetail: {\r\n\t\t\t\t\tmessage: msg,\r\n\t\t\t\t\ttime: new Date(),\r\n\t\t\t\t},\r\n\t\t\t\tbubbles: true,\r\n\t\t\t\tcancelable: true\r\n\t\t\t});\r\n\r\n\t\t\te.currentTarget.dispatchEvent(event);\r\n\t\t}\r\n\r\n\t}", "function onMessageArrived(message) {\r\n console.log(\"onMessageArrived:\" + message.payloadString);\r\n if (message.destinationName == 'State') {\r\n\r\n }\r\n if (message.destinationName == 'Content') {\r\n\r\n }\r\n\r\n }", "function processMessage(event)\n{\n var message;\n try {\n message = JSON.parse(event.data);\n } catch (e) {}\n\n if(!message.type)\n return;\n switch (message.type)\n {\n case \"command\":\n processCommand(message);\n break;\n case \"event\":\n processEvent(message);\n break;\n default:\n console.error(\"Unknown type of the message\");\n return;\n }\n\n}", "function handler(ev) {\n var event = ev || window.event,\n target = event.target || event.srcElement,\n msg;\n\n event.preventDefault();\n msg = $(\"msg\").value.trim();\n\n var newMessageEvent = new CustomEvent(\"newMessage\", {\n detail: {\n message: msg,\n time: new Date()\n }\n });\n\n target.dispatchEvent(newMessageEvent);\n}", "function onMessageArrived(message) {\n dotNetReference.invokeMethodAsync(\"OnMessageArrived\", message.payloadString)\n .then(r => console.log(\"onMessageArrived:\" + message.payloadString));\n ;\n }", "function receiveMessage(event) {\n // Parse the message.\n var msg = JSON.parse(event.data);\n \n switch (msg.messageType) {\n case 1: // Add\n addModel(msg.modelHandle, msg.floatArrayData, msg.stringData);\n break;\n case 2: // Remove\n removeModel(msg.modelHandle);\n onCurrentModelChange();\n break;\n case 3: // Move\n moveModel(msg.modelHandle, msg.floatArrayData);\n break;\n case 4: // Rotate\n rotateModel(msg.modelHandle, msg.floatArrayData);\n break;\n case 5: // Scale\n scaleModel(msg.modelHandle, msg.floatArrayData);\n break;\n default: // Unknown message\n console.log(\"Invalid Message.\");\n }\n}", "function buildEvent (eventName, parent) {\n Ractive.events[eventName] = buildEventHandler(eventName, parent);\n }", "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\" + message.payloadString);\n write(message.payloadString);\n}", "function eventHandler(message){\n bdayHandler(message);\n}", "function onMessageArrived(message) {\n console.log(message.destinationName, ' -- ', message.payloadString);\n\n if (message.destinationName == \"X\"){\n posX = message.payloadString;\n }\n if (message.destinationName == \"Y\"){\n posY = message.payloadString;\n console.log(message.payloadString);\n }\n if (message.destinationName == \"smile\"){\n heartEyes();\n }\n updateEyes(posX, posY);\n\n}", "function processMessage(event) {\n var message;\n try {\n message = JSON.parse(event.data);\n } catch (e) {\n console.error(\"Cannot parse data\", event.data);\n return;\n }\n\n switch (message.type) {\n case \"command\":\n processCommand(message);\n break;\n case \"event\":\n processEvent(message);\n break;\n default:\n console.warn(\"Unknown message type\");\n }\n}", "function receivedMessage(event) {\n var senderID = event.sender.id;\n var recipientID = event.recipient.id;\n var timeOfMessage = event.timestamp;\n var message = event.message;\n\n console.log(\"Received message for user %d and page %d at %d with message:\", \n senderID, recipientID, timeOfMessage);\n console.log(JSON.stringify(message));\n\n var messageId = message.mid;\n var messageText = message.text;\n var messageAttachments = message.attachments;\n var messagePostback = message.payload;\n if (messageText) {\n\n // If we receive a text message, check to see if it matches a keyword\n // and send back the example. Otherwise, just echo the text we received.\n switch (classifier.classify(messageText)) {\n // Be friendly! After all civiility costs nothing except a few\n // lines of code :p\n case 'greet':\n sendTextMessage(senderID, 'Hi! How can I help you today? You can ask me things like \"show me the categories\" or \"what\\'s the weather in Johannesburg\" and I\\'ll try me best to help. So, what will it be?');\n break;\n\n // Lists the categories\n case 'categories':\n sendTextMessage(senderID, 'Okay, let me retrieve them for you.');\n sendCategoriesMessage(senderID);\n break;\n\n // Weather related searches\n case 'weather':\n sendWeatherMessage(senderID, messageText);\n break;\n\n default:\n sendTextMessage(senderID, 'I\\'m sorry but I did not understand your question. You can ask me things like \"show me the categories\" or \"what\\'s the weather in Johannesburg\" and I\\'ll try me best to help. So, what will it be?');\n }\n } else if (messageAttachments) {\n sendTextMessage(senderID, \"Message with attachment received\");\n }\n}", "createNotification(message) {\n const messageEvent = new CustomEvent(\"notify\", {\n bubbles: false,\n detail: {message}\n });\n this.notification_container.dispatchEvent(messageEvent)\n }", "function entityMessageReceiver(event) {\n // validate that this is an entityMessage\n if (-1 === event.data.indexOf('entityMessage')) return\n var message = JSON.parse(event.data)\n var uuid = message.uuid\n var entity = entities[uuid]\n switch (message.type) {\n case 'error':\n var value = message.value\n setEntityState(entity,'error')\n console.log('an entity threw an error -',uuid,value)\n break\n case 'setPosition':\n var value = message.value\n setPosition(entity,value)\n break\n case 'setRotation':\n var value = message.value\n setRotation(entity,value)\n break\n case 'move':\n var value = message.value\n move(entity,value)\n break\n case 'rotate':\n var value = message.value\n rotate(entity,value)\n break\n }\n }", "function buildEvent(eventContent, storylineSlug, eventSlug, storyConfig) {\n if (!frontMatter.test(eventContent)) {\n throw new Error('Event must be a valid FrontMatter file.');\n }\n\n var fm = frontMatter(eventContent);\n var event = fm.attributes;\n event.description = marked(fm.body).trim();\n\n // Do some automatic improvements on text\n event.description = event.description.replace(/---/g, '&mdash;');\n event.description = event.description.replace(/--/g, '&ndash;');\n event.description = event.description.replace(/\\.\\.\\./g, '&hellip;');\n\n if (storyConfig.locale === 'fr_FR') {\n event.description = event.description.replace(/ !/g, '&nbsp;!');\n event.description = event.description.replace(/ \\?/g, '&nbsp;?');\n event.description = event.description.replace(/ :/g, '&nbsp;:');\n event.description = event.description.replace(/ ;/g, '&nbsp;;');\n event.description = event.description.replace(/ »/g, '&nbsp;»');\n event.description = event.description.replace(/« /g, '«&nbsp;');\n }\n\n event.event = eventSlug;\n event.storyline = storylineSlug;\n event.repeatable = event.repeatable || false;\n event.on_display = event.on_display || [];\n return event;\n}", "function Message(message){\n\tthis.username = message.username;\n\tthis.details = message.details;\n}", "function onMessage(data) {\n // EventBridge message from HTML script.\n // Check against EVENT_NAME to ensure we're getting the correct messages from the correct app\n if (!data.type || data.type.indexOf(CONFIG.APP_NAME) === -1) {\n if (DEBUG) {\n print(\"Event type event name index check: \", !data.type, data.type.indexOf(CONFIG.APP_NAME) === -1);\n }\n return;\n }\n data.type = data.type.replace(CONFIG.APP_NAME, \"\");\n\n if (DEBUG) {\n print(\"onMessage: \", data.type);\n print(\"subtype: \", data.subtype);\n }\n\n switch (data.type) {\n case CONFIG.EVENT_BRIDGE_OPEN_MESSAGE:\n onOpened();\n updateUI();\n break;\n case CONFIG.EVENT_UPDATE_AVATAR:\n switch (data.subtype) {\n case CONFIG.EVENT_CHANGE_AVATAR_TO_AVI_AND_SAVE_AVATAR:\n saveAvatarAndChangeToAvi();\n break;\n case CONFIG.EVENT_RESTORE_SAVED_AVATAR:\n restoreAvatar();\n break;\n case CONFIG.EVENT_CHANGE_AVATAR_TO_AVI_WITHOUT_SAVING_AVATAR:\n changeAvatarToAvi();\n break;\n default:\n break;\n }\n updateUI(STRING_STATE);\n break;\n case CONFIG.EVENT_CHANGE_TAB:\n switchTabs(data.value);\n updateUI(STRING_STATE);\n break;\n case CONFIG.EVENT_UPDATE_MATERIAL:\n // delegates the method depending on if \n // event has name property or updates property\n if (DEBUG) {\n print(\"MATERIAL EVENT\" , data.subtype, \" \", data.name, \" \", data.updates);\n }\n switch (data.subtype) {\n case CONFIG.MATERIAL_EVENTS_SUBTYPE.STRING_MODEL_TYPE_SELECTED:\n applyNamedMaterial(CONFIG.STRING_DEFAULT);\n dynamicData[STRING_MATERIAL].selectedTypeIndex = data.updates;\n break;\n case CONFIG.MATERIAL_EVENTS_SUBTYPE.STRING_NAMED_MATERIAL_SELECTED: \n applyNamedMaterial(data.name);\n break;\n case CONFIG.MATERIAL_EVENTS_SUBTYPE.STRING_UPDATE_PROPERTY:\n\n var propertyName = data.updates.propertyName;\n var newMaterialData = data.updates.newMaterialData;\n var componentType = data.updates.componentType;\n var isPBR = data.updates.isPBR;\n\n console.log(\"update Property\" + propertyName + JSON.stringify(newMaterialData));\n updateMaterialProperty(propertyName, newMaterialData, componentType, isPBR);\n break;\n }\n updateUI(STRING_MATERIAL);\n break;\n\n case CONFIG.EVENT_UPDATE_BLENDSHAPE:\n if (data.name) {\n applyNamedBlendshapes(data.name);\n } else {\n updateBlendshapes(data.updates);\n }\n updateUI(STRING_BLENDSHAPES);\n break;\n case CONFIG.EVENT_UPDATE_FLOW:\n switch (data.subtype) {\n case CONFIG.FLOW_EVENTS_SUBTYPE.STRING_DEBUG_TOGGLE:\n if (DEBUG) {\n print(\"TOGGLE DEBUG SPHERES \", data.updates);\n }\n addRemoveFlowDebugSpheres(data.updates, true);\n break;\n case CONFIG.FLOW_EVENTS_SUBTYPE.STRING_COLLISIONS_TOGGLE:\n addRemoveCollisions(data.updates);\n break;\n case CONFIG.FLOW_EVENTS_SUBTYPE.STRING_HAIR: \n updateFlow(data.updates, CONFIG.FLOW_EVENTS_SUBTYPE.STRING_HAIR);\n break;\n case CONFIG.FLOW_EVENTS_SUBTYPE.STRING_JOINTS: \n updateFlow(data.updates, CONFIG.FLOW_EVENTS_SUBTYPE.STRING_JOINTS);\n break;\n default: \n console.error(\"Flow recieved no matching subtype\");\n break;\n }\n updateUI(STRING_FLOW);\n break;\n default:\n break;\n }\n }", "parse(eventObject) {\t\t\t\t\t\t\t\t\t\t\t\t\t\t// method definition\n\t\tlet {name, time} = eventObject;\t\t\t\t\t\t\t\t\t\t\t// let keyword, destructuring\n\t\treturn `Received event ${name} at time ${time}`;\t\t\t\t\t\t// template string\n\t}", "buildMessageObject() {\n let id = document.querySelector(\"#entryId\").value\n let userId = document.querySelector(\"#userMessageId\").value\n userId = parseInt(userId)\n let messageObject = {\n \"userId\": userId,\n \"message\": document.querySelector(\"#message__Field\").value,\n \"date\": new Date()\n }\n //POSTs a new message to JSON\n if (document.querySelector(\"#entryId\").value === \"\") {\n API.PostNewMessage(messageObject)\n .then(() => {\n messaging.getAllMessages()\n shared.clearDataField()\n document.querySelector(\".select__box\").value = 0\n })\n }\n //PUT, updates an existing message in JSON\n else if (document.querySelector(\"#entryId\").value !== \"\") {\n API.editExistingMessage (messageObject, id)\n .then(() => {\n messaging.getAllMessages()\n shared.clearDataField()\n document.querySelector(\".select__box\").value = 0\n })\n }\n }", "function onMessageArrived(message) {\n\tconsole.log(\"onMessageArrived:\"+message.payloadString); \n}", "function addMessageHandler(event) {\n var user, type;\n var messageInput = document.getElementById('message-input');\n var messageContainerEl = document.getElementById('message-container');\n\n //determine message type and set message variables accordingly.\n switch (event.target.id) {\n case 'parent-button':\n user = 'Parent';\n type = messageType.out;\n break;\n case 'babysitter-button':\n user = 'Babysitter';\n type = messageType.in;\n break;\n default:\n user = 'unknown';\n type = messageType.unknown;\n break;\n }\n\n //create new msg\n if (messageInput.value) {\n //construct a message and add it to array\n var message = new Message(type, user, messageInput.value);\n messages.push(message);\n\n //create a message element\n var el = createMessageElement(message);\n\n //add the message element to the DOM\n messageContainerEl.appendChild(el);\n\n // reset input\n messageInput.value = '';\n }\n}", "function eventFromMessage(\n\t stackParser,\n\t message,\n\t // eslint-disable-next-line deprecation/deprecation\n\t level = 'info',\n\t hint,\n\t attachStacktrace,\n\t) {\n\t const syntheticException = (hint && hint.syntheticException) || undefined;\n\t const event = eventFromString(stackParser, message, syntheticException, attachStacktrace);\n\t event.level = level;\n\t if (hint && hint.event_id) {\n\t event.event_id = hint.event_id;\n\t }\n\t return resolvedSyncPromise(event);\n\t}", "function onMessageArrived(message) {\n var data = message.payloadString.split(',');\n var today = new Date();\n var time = today.getHours() + \":\" + today.getMinutes() + \":\" + today.getSeconds();\n var date = today.getFullYear()+'-'+(today.getMonth()+1)+'-'+today.getDate();\n console.log(\"onMessageArrived: \" + data[0] + \" and \" +data[1]);\n document.getElementById(\"messages\").innerHTML = '<h3>'+ data[0] +'</h3>';\n document.getElementById(\"messages1\").innerHTML = '<h3>'+ data[1] +'</h3>';\n document.getElementById(\"waktunow\").innerHTML = '<p>'+ date +' '+ time +'</p>';\n sendData(data[0], data[1]);\n addData(time, data[0]);\n addData1(time, data[1]);\n}", "function receivedMessage(event) {\n messageHandler.handleMessage(event);\n }", "function handleMessage(event) {\n const { data } = event;\n const { type, payload } = data;\n\n switch (type) {\n case 'SANDBOX.DISPATCH.MODIFY':\n dispatch({ type: 'MODIFY', payload });\n break;\n case 'SANDBOX.STATE.REQUEST':\n postUpdate();\n break;\n case 'SANDBOX.DISPATCH.SELECT':\n dispatch({ type: 'SELECT', payload });\n break;\n default:\n console.log('WARNING: Unsupported message.');\n }\n }", "function handleMessage(msgEvent) {\n var ev, h;\n\n try {\n ev = JSON.parse(msgEvent.data);\n } catch (e) {\n $log.error('Message.data is not valid JSON', msgEvent.data, e);\n return null;\n }\n if (fs.debugOn('txrx')) {\n $log.debug(' << *Rx* ', ev.event, ev.payload);\n }\n\n if (h = handlers[ev.event]) {\n try {\n h(ev.payload);\n } catch (e) {\n $log.error('Problem handling event:', ev, e);\n return null;\n }\n } else {\n $log.warn('Unhandled event:', ev);\n }\n\n }", "function createMessageFunction(data) {\n return `(function() {\n window.dispatchEvent(new MessageEvent('message', {data: ${JSON.stringify(\n data,\n )}}));\n })()`;\n}", "function createMessageElement(messageObject){\r\n\r\n const monthNames = [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\",\r\n \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"\r\n ];\r\n \r\n const dayNames = [\r\n \"Mon\", \"Tue\", \"Wed\",\r\n \"Thu\", \"Fri\", \"Sat\", \"Sun\"\r\n ];\r\n \r\n // new expires in variable\r\n var expiresIn = Math.round((messageObject.expiresOn - messageObject.createdOn) / (60*1000) )\r\n\r\n // Temp parts of date to combine to string in datetostring\r\n var dTemp = new Date (messageObject.createdOn); \r\n var weekdayTemp = dTemp.getDay()-1;\r\n var dateTemp = dTemp.getDate();\r\n var monthTemp = dTemp.getMonth();\r\n var hourTemp = dTemp.getHours();\r\n var minutesTemp = dTemp.getMinutes();\r\n\r\n // Combining parts of date top string by looking up values in const array at begging of function\r\n \r\n var dateToString = \r\n dayNames[weekdayTemp]\r\n + ', '+\r\n monthNames[monthTemp]\r\n +' '+\r\n dateTemp\r\n +'th, '+\r\n hourTemp\r\n +':'+\r\n minutesTemp;\r\n\r\n // retruning element that creates div with jQuery and appends all other channel meta\r\n return $('<div>').addClass('message own').append('<h3><a href=\"http://w3w.co/'+messageObject.createdBy+'\" target=\"_blank\"><strong>'+messageObject.createdBy+'</strong></a> '+dateToString+' <em>'+expiresIn+' min. left</em></h3> <p>'+messageObject.text+'</p><button>+5 min.</button>');\r\n}", "pushEvent(self, event, ref, message) {\n firebase.database.ref(ref).child(event[\"key\"]).set({\n name: event[\"name\"],\n startDate: event[\"startDate\"],\n duration: parseInt(event[\"duration\"]),\n location: event[\"location\"],\n organization: event[\"organization\"],\n imgid: event[\"imgid\"],\n description: event[\"description\"],\n webLink: event[\"webLink\"],\n tags: this.state.tags.toString(),\n email: event[\"email\"],\n });\n self.setState({ uploading: false });\n self.displayMessage(self, message);\n this.group.leave(this.token);\n }", "function eventFromMessage(\n stackParser,\n message,\n // eslint-disable-next-line deprecation/deprecation\n level = 'info',\n hint,\n attachStacktrace,\n) {\n const syntheticException = (hint && hint.syntheticException) || undefined;\n const event = eventFromString(stackParser, message, syntheticException, attachStacktrace);\n event.level = level;\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return utils.resolvedSyncPromise(event);\n}", "function CreateMessagesEvent(e, fromName, CodePrefix) {\n\n var target;\n if (e.srcElement) target = e.srcElement;\n e = $.event.fix(e);\n if (e.currentTarget) target = e.currentTarget;\n e.preventDefault();\n //for date in iOs\n var fullDate = new Date();\n var twoDigitMonth = fullDate.getMonth() + 1 + \"\"; if (twoDigitMonth.length == 1) twoDigitMonth = \"0\" + twoDigitMonth;\n var twoDigitDate = fullDate.getDate() + \"\"; if (twoDigitDate.length == 1) twoDigitDate = \"0\" + twoDigitDate;\n var currentDate = twoDigitMonth + \"/\" + twoDigitDate + \"/\" + fullDate.getFullYear();\n\n var h = fullDate.getHours();\n var m = fullDate.getMinutes();\n h = h % 12;\n h = h ? h : 12; // the hour '0' should be '12'\n var ampm = h >= 12 ? 'PM' : 'AM';\n m = m < 10 ? '0' + m : m;\n var currentTime = h + ':' + m + ' ' + ampm;\n //\n $(\"#\" + CodePrefix + \"Timestamp\").val(currentDate + \" \" + currentTime);\n\n var form = \"\";\n\n if (fromName != \"\") {\n form = $(\"#\" + fromName).closest('form');\n }\n else {\n form = $(target).closest('form');\n }\n if (form.valid()) {\n\n var fd = \"\";\n var url = \"\";\n if (fromName != \"\") {\n fd = $(form).closest('form').serialize();\n url = $(form).closest('form').attr(\"action\");\n fd = new FormData(form[0]);\n }\n else {\n fd = $(target).closest('form').serialize();\n url = $(target).closest('form').attr(\"action\");\n fd = new FormData(form[0]);\n }\n\n $.ajax({\n url: url + \"?IsAddPop=\" + true,\n type: \"POST\",\n cache: false,\n data: fd,\n dataType: \"json\",\n processData: false,\n contentType: false,\n success: function (result) {\n if (result == \"FROMPOPUP\") {\n $(\"#\" + CodePrefix + \"Message\").val(\"\");\n if ($('input:hidden[name=\"CamerafileUploadPicture\"]').val() != \"\")\n $('input:hidden[name=\"CamerafileUploadPicture\"]').val('')\n //CallSignalr();\n\n } else {\n //alert(result);\n $(\"#\" + CodePrefix + \"Message\").removeClass();\n $(\"#\" + CodePrefix + \"Message\").addClass(\"form-control input-validation-error\");\n $(\"#\" + CodePrefix + \"Message\").val(\"\");\n }\n }\n });\n }\n}", "function onMessageReceived(e) {\n var data = JSON.parse(e.data);\n \n switch (data.event) {\n case 'ready':\n onReady();\n break;\n \n case 'playProgress':\n onPlayProgress(data.data);\n break;\n \n case 'play':\n onPlay();\n break;\n \n case 'pause':\n onPause();\n break;\n \n case 'finish':\n onFinish();\n break;\n }\n}", "function onMessageReceived(e) {\n var data = JSON.parse(e.data);\n\n switch (data.event) {\n case 'ready':\n onReady();\n break;\n\n case 'playProgress':\n onPlayProgress(data.data);\n break;\n\n case 'pause':\n onPause();\n break;\n\n case 'finish':\n onFinish();\n break;\n }\n }", "function createMessage(myId, name, message, date, status) \n{\n this.myId = myId;\n this.name = name;\n this.message = message;\n this.date = date;\n this.status = status;\n}", "function receivedMessage(event) {\n\n console.log(\"RECEIVED MESSAGE\");\n var senderID = event.sender.id;\n var recipientID = event.recipient.id;\n var timeOfMessage = event.timestamp;\n var message = event.message;\n\n console.log(\"Received message for user %d and page %d at %d with message:\", \n senderID, recipientID, timeOfMessage);\n //console.log(JSON.stringify(message));\n\n var messageId = message.mid;\n\n // You may get a text or attachment but not both\n var messageText = message.text;\n var messageAttachments = message.attachments;\n\n if (messageText) {\n\n // If we receive a text message, check to see if it matches any special\n // keywords and send back the corresponding example. Otherwise, just echo\n // the text we received.\n switch (messageText) {\n case 'personalizado':\n sendPersonalMessage(senderID);\n break;\n\n default:\n sendInitialMessage(senderID);\n }\n } else if (messageAttachments) {\n sendTextMessage(senderID, \"Message with attachment received\");\n }\n}", "function onMessageReceived(e) {\n var data = JSON.parse(e.data);\n \n switch (data.event) {\n case 'ready':\n onReady();\n break;\n \n case 'playProgress':\n onPlayProgress(data.data);\n break;\n \n case 'pause':\n onPause();\n break;\n \n case 'finish':\n onFinish();\n break;\n }\n}", "handleMessage(message) {\r\n console.log('Received message', message.payloadString);\r\n this.callbacks.forEach((callback) => callback(message));\r\n }", "function handleMessage(event) {\r\n\t\t//console.log('Received message: ' + event.data);\r\n\t\tvar data = JSON.parse(event.data);\r\n\t\thandleReceiveData(data);\r\n\t}", "function createMessageEvent(type, data, origin, lastEventId) {\n try {\n return new window.MessageEvent(type, {\n bubbles: false,\n cancelable: false,\n data,\n lastEventId,\n origin,\n source: window,\n });\n }\n catch (_a) {\n // For IE11\n const event = window.document.createEvent(\"MessageEvent\");\n event.initMessageEvent(type, false, false, data, origin, lastEventId, window);\n return event;\n }\n}", "function BrokerMessageReceivedEventArgs(messageTypeId, message, receivingError)\r\n{\r\n /**\r\n * Returns type of the notified event.\r\n */\r\n this.MessageTypeId = messageTypeId;\r\n \r\n /**\r\n * Returns the notified message.\r\n */\r\n this.Message = message;\r\n \r\n /**\r\n * Returns the error detected during receiving of the message.\r\n */\r\n this.ReceivingError = receivingError;\r\n}", "on_message(message) {\r\n }", "on_message(message) {\r\n }", "on_message(message) {\r\n }", "constructor(message){\n\t\tthis.message = message;\n\t}", "constructor(message){\n\t\tthis.message = message;\n\t}", "function handleMessageChange(event) {\n const name = event.target.name\n const value = event.target.value\n\n const data = {\n ...userMessage,\n [name]: value\n }\n updateUserMessage(data)\n }", "function onMessage ( event ) {\n // Parse it as Json\n console.log(event);\n let jsonMsg = JSON.parse(event.data);\n\n switch(jsonMsg.type) {\n // If the websocket is just created it sends a connect. After that we want to ask for the username.\n case TYPE_CONNECT_MSG:\n let setWebsocketSessMsg = {\n \"type\": TYPE_SET_WEBSOCKET_SESS_MSG\n };\n wsservice.send(setWebsocketSessMsg);\n\n let enterroommsg = {\n \"type\": TYPE_ENTER_ROOM,\n \"room\": $scope.room\n };\n wsservice.send(enterroommsg);\n break;\n // If the users of the room were updated, set the names\n case TYPE_USERS_ROOM_UPDATED:\n let names = jsonMsg.namesInRoom.split(' ');\n $scope.users = names;\n $scope.$apply();\n break;\n // If it is a message, push it to the messages.\n case TYPE_MESSAGE:\n $scope.messages.push(jsonMsg);\n $scope.$apply();\n break;\n }\n }", "receiveMessage(message) {\n return new Promise((resolve, reject) => {\n if (message instanceof Message){\n this.messageEventCallbacks.forEach(cb=>{\n cb(message);\n });\n }\n resolve();\n })\n }", "function onMessageArrived(message) {\n console.log(message.destinationName\t+ \" : \"+message.payloadString);\n if(message.destinationName == house.topics.weather){ update_bed_with_msg(\"weather\",JSON.parse(message.payloadString)); }\n else if(message.destinationName == house.topics.heater){ update_bed_with_msg(\"heater\",message.payloadString); }\n else if(message.destinationName == house.topics.heater_status){ update_bed_with_msg(\"status\",message.payloadString); }\n else if(message.destinationName == house.topics.timer){ update_bed_with_msg(\"timer\",message.payloadString); }\n else if(message.destinationName == house.topics.level){ update_bed_with_msg(\"level\",message.payloadString); }\n else if(message.destinationName == house.topics.relay_status){ update_bed_with_msg(\"relay\",message.payloadString); }\n else if(message.destinationName == house.topics.relay_power){ update_bed_with_msg(\"power\",message.payloadString); }\n}", "function createMessage(msg) {\n return {\n \"payload\" : Buffer.from(msg).toString('base64'), // Pulsar requires payload to be hex or base64 encoding\n \"properties\": {\n \"key1\" : \"value1\",\n },\n \"context\" : \"1\"\n };\n}", "function onMessage(event) {\n\n\t\tvar msg = JSON.parse(event.data);\n\n\t\tswitch(msg.type) {\n\n\t\tcase 'chat':\n\t\t\tdisplayChatMessage(event);\n\t\t\tbreak;\n\n\t\tcase 'attendeeCount':\n\t\t\tdisplayAttendeeCount(event);\n\t\t\tbreak;\n\t\t\t\n\t\tcase 'kudosCount':\n\t\t\tdisplayKudosCount(event);\n\t\t\tbreak;\n\t\t\t\n\t\tcase 'fanCount':\n\t\t\tdisplayFanCount(event);\n\t\t\tbreak;\n\n\t\t}\n\t}", "function xcoffee_handle_msg(msg)\r\n{\r\n console.log('xcoffee msg',msg);\r\n\r\n events_div.insertBefore(xcoffee_format_msg(msg),events_div.firstChild);\r\n\r\n switch (msg[\"event_code\"])\r\n {\r\n case \"COFFEE_REMOVED\":\r\n set_state_removed(msg);\r\n break;\r\n\r\n case \"COFFEE_GRINDING\":\r\n case \"COFFEE_BREWING\":\r\n set_state_brewing(msg);\r\n break;\r\n\r\n case \"COFFEE_POURED\":\r\n case \"COFFEE_NEW\":\r\n case \"COFFEE_REPLACED\":\r\n set_state_running(msg);\r\n break;\r\n\r\n case \"COFFEE_STATUS\":\r\n handle_status(msg);\r\n default:\r\n break;\r\n }\r\n}", "newMessageHandler(message) {\n let id = message.id,\n senderId = (message.sender) ? message.sender.id : 0,\n sender = (message.sender) ? message.sender : null,\n dateTimeMoment = moment(message.date_time_created),\n type = message.type\n\n let newDate = dateTimeMoment.format('YYYY-MM-DD')\n if(this.room.firstDate !== newDate || !this.room.firstDate){\n this.room.firstDate = newDate\n this.setDate(newDate, true)\n }\n\n if(this.room.firstSender === senderId && this.room.firstSender !== null){\n let firstMessageEl = $(`.t_message-container[data-message=\"${this.room.firstMessage}\"]`)\n firstMessageEl.removeClass('speaker')\n firstMessageEl.find('.t_message-sender').html('')\n }\n\n let messageTemplate = this.getMessageTemplate({\n id: id,\n type: type,\n message: message.message.message.replace(/\\n/g, '<br />'),\n sender: sender,\n time: dateTimeMoment.format('HH:mm')\n })\n\n this.container.prepend(messageTemplate)\n\n let scrollHeight = $('.t_messages')[0].scrollHeight,\n scrollTop = $('.t_messages')[0].scrollTop\n if((scrollHeight - scrollTop) <= 800)\n $('.t_messages').scrollTop(scrollHeight)\n\n this.room.firstMessage = id\n this.room.firstSender = senderId\n this.room.firstDate = dateTimeMoment.format('YYYY-MM-DD')\n }", "get message(): ?Message {\n return this._rawEvent.message;\n }", "function onMessageReceived(e) {\n var data = JSON.parse(e.data);\n \n switch (data.event) {\n case 'ready':\n onReady();\n break;\n \n case 'playProgress':\n onPlayProgress(data.data);\n break;\n \n case 'finish':\n onFinish();\n break;\n }\n \t}", "async function parseSingleEvent(event) {\n\n\tlet e = {\n\t\tid: null,\n\t\ttype: null,\n\t\tplanned: false,\n\t\tdate: {\n\t\t\tfetched: null,\n\t\t\tstart: null,\n\t\t\tend: null,\n\t\t},\n\t\tsummary: null,\n\t\tdetail: null,\n\t\tline: [],\n\t\teffects: null,\n\t\tseverity: null,\n\t\tsource: null,\n\t};\n\ttry {\n\t\te.id = event.SituationNumber[0].trim();\n\t\te.type = event.ReasonName[0].trim();\n\t\te.planned = (event.Planned[0] === 'true') ? true : false;\n\t\te.summary = event.Summary[0]._;\n\t\te.detail = cleanStatusText(event.LongDescription[0]);\n\t\te.type_detail = event.Consequences[0].Consequence[0].Condition[0];\n\t\te.severity = event.Consequences[0].Consequence[0].Severity[0];\n\n\t\te.date.fetched = event.CreationTime[0];\n\t\te.date.start = event.PublicationWindow[0].StartTime[0];\n\t\te.date.end = (event.PublicationWindow[0].EndTime) ? event.PublicationWindow[0].EndTime[0] : null;\n\n\t\t// Parse out lines.\n\t\tlet k = event.Affects[0].VehicleJourneys[0].AffectedVehicleJourney;\n\t\tfor (let j in k) {\n\t\t\te.line.push({ line: k[j].LineRef[0].trim(), dir: k[j].DirectionRef[0].trim()});\n\t\t}\n\n\t\tif (event.Source[0].SourceType[0] != 'directReport') {\n\t\t\te.source = event.Source[0].SourceType[0];\n\t\t\tconsole.warn('NEW SOURCE TYPE:', event.Source[0].SourceType[0]);\n\t\t}\n\n\t\te.detail = await parseDetailMessage(e.detail, e.summary, e.line, e.id);\n\n\t}\n\tcatch (err) {\n\t\tconsole.error('\\n\\n <!> Error during Message Assembly: ', err ,'\\n\\n');\n\t}\n\n\treturn e;\n}", "function massageEvent(data) {\n // data is an object mapping basefilename: full file path\n // we want to return\n //\n // {\n // start: <start time in ms since epoch>\n // duration: <event duration in s || null if the event is ongoing>,\n // updates: [\n // { when: <comment time in ms since epoch>, msg: <textual comment> },\n // { when: <comment time in ms since epoch>, msg: <textual comment> },\n // { when: <comment time in ms since epoch>, msg: <textual comment> },\n // { when: <comment time in ms since epoch>, msg: <textual comment> }\n // ]\n // }\n\n var o = {};\n \n var updates = [];\n\n // explicitly parse discovery document\n var update = readUpdate(data.discovery);\n o.start = update.when;\n updates.push(update);\n delete data.discovery;\n \n if (data.resolution) {\n update = readUpdate(data.resolution);\n if (update.when < o.start) throw \"event cannot be resolved before it starts\";\n o.duration = update.when - o.start;\n updates.push(update);\n delete data.resolution;\n }\n\n // read and parse all the remaining updates\n Object.keys(data).forEach(function(k) {\n var update = readUpdate(data[k]);\n if (update.when < o.start ||\n (o.duration && update.when > (o.duration + o.start))) {\n throw \"event updates must occur during an event, not before or after.\";\n }\n updates.push(update);\n });\n\n // sort updates and attach them\n o.updates = updates.sort(function(l,r) {\n return l.when < r.when;\n });\n\n return o;\n}", "onMessageChange(event) {\n this.setState({\n message: event.target.value\n })\n }", "function messagereceivedHandler(e) {\n var messageSize = e.detail.length;\n for (var i = 0; i < messageSize; i++) {\n for (var key in e.detail[i].data) {\n switch (key) {\n case Messages.ServerStarted:\n serverStarted = true;\n break;\n case Messages.MyMusicIsPlaying:\n isMusicPlaying = true;\n smtc.playbackStatus = MediaPlaybackStatus.playing;\n break;\n case Messages.CurrentSongName:\n\n document.getElementById(\"curr-song-name\").innerText = e.data.first().current.value;\n break;\n case Messages.CurrentSong:\n updateCurrentSong(e.detail[i].data[key]);\n break;\n }\n }\n }\n}", "function receivedMessage(event) {\n if (!event.message.is_echo) {\n var message = event.message;\n var senderId = event.sender.id;\n\n console.log(\"Received message from senderId: \" + senderId);\n console.log(\"Message is: \" + JSON.stringify(message));\n\n // You may get a text or attachment but not both\n if (message.text) {\n var formattedMsg = message.text.toLowerCase().trim();\n\n // If we receive a text message, check to see if it matches any special\n // keywords and send back the corresponding movie detail.\n // Otherwise, search for new movie.\n switch (formattedMsg) {\n case \"hla!\":\n case \"hola!\":\n case \"hi!\":\n case \"hi\":\n case \"hello\":\n case \"hola\":\n sendMessageText(senderId, \"Hola! Gracias por saludarnos\");\n break;\n\n default:\n sendMessageText(senderId, \"Hola! Ahora estamos algo ocupados! Cuéntanos tu duda o consulta. A penas podamos, te responderemos! Que tengas un estupendo día!\");\n }\n } else if (message.attachments) {\n sendMessage(senderId, {text: \"Sorry. No entiendo lo que quieres decir :(\"});\n }\n }\n}", "function buildPlatformEvent(event){\r\n //Object map that maps Twilio Field to Salesforce Field\r\n var eventToPEMap = {\r\n \"Body\":\"Body__c\",\r\n \"To\":\"To__c\",\r\n \"From\":\"From__c\",\r\n \"AccountSid\":\"AccountSid__c\",\r\n \"SmsSid\":\"MessageSid__c\",\r\n \"MessagingServiceSid\":\"MessagingServiceSid__c\",\r\n \"SmsStatus\":\"SmsStatus__c\",\r\n \"ErrorCode\":\"ErrorCode__c\"\r\n };\r\n\r\n var platformEvent = {};\r\n\r\n //Loop through event and build platform event\r\n for (var property in event) {\r\n if (eventToPEMap.hasOwnProperty(property)) {\r\n var eventProp;\r\n if(useNameSpace){\r\n eventProp = nameSpace + eventToPEMap[property];\r\n } else{\r\n eventProp = eventToPEMap[property];\r\n }\r\n platformEvent[eventProp] = event[property];\r\n }\r\n }\r\n return platformEvent;\r\n }", "receivedMessage( event ) {\n\n var senderID = event.sender.id;\n var recipientID = event.recipient.id;\n var timeOfMessage = event.timestamp;\n var message = event.message;\n\n console.log( \"Received message for user %d and page %d at %d with message:\",\n senderID, recipientID, timeOfMessage );\n console.log( 'Message', JSON.stringify( message ) );\n\n var isEcho = message.is_echo;\n var messageId = message.mid;\n var appId = message.app_id;\n var metadata = message.metadata;\n\n // You may get a text or attachment but not both\n var messageText = message.text;\n var messageAttachments = message.attachments;\n var quickReply = message.quick_reply;\n\n if ( isEcho ) {\n // Just logging message echoes to console\n console.log( \"Received echo for message %s and app %d with metadata %s\",\n messageId, appId, metadata );\n return;\n }\n\n if ( messageText ) {\n if ( [ 'hi', 'hello' ].indexOf( messageText.toLowerCase().trim() ) !== -1 ) return messengerGeneric.sendTextMessage( senderID, 'Hi.' );\n messengerGeneric.sendTypingOn( senderID );\n setTimeout( () => {\n messengerGeneric.sendTextMessage( senderID, 'Nope.' );\n }, messageText.length * 10 < 20000 ? messageText.length * 10 : 20000 );\n }\n }", "function createMessage(unread, date, from, subject) {\n return {\n isUnread: function() { return unread; },\n getDate: function() { return date; },\n getFrom: function() { return from; },\n getSubject: function() { return subject; },\n }\n }", "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\",message.destinationName,message.payloadString);\n\n if (message.destinationName==\"tkkrlab/spacestate\") {\n var elem = document.getElementById(\"space-status\");\n\tif (message.payloadString==\"1\") {\n\t\telem.innerHTML = \"<span class='open'>open</span>\";\n\t} else if (message.payloadString==\"0\") {\n\t\telem.innerHTML = \"<span class='closed'>gesloten</span>\";\n\t} else {\n\t\telem.innerHTML = \"<span class='unknown'>status onbekend (\"+String(message.payloadString)+\")</span>\";\n\t}\n } else if (message.destinationName==\"test/progress1\") {\n progress[0].animate(Number(message.payloadString/100));\n } else if (message.destinationName==\"test/progress2\") {\n progress[1].animate(Number(message.payloadString/100));\n } else if (message.destinationName==\"chat\") {\n drawChat(message.payloadString);\n } else {\n console.log(\"Message received\",message.destinationName,message.payloadString);\n elem = document.getElementById(\"mqtt-content\");\n elem.innerHTML = \"<div class='item'><strong>\"+message.destinationName+\":</strong> \"+message.payloadString+\"</div>\" + elem.innerHTML;\n }\n}", "function eventFromMessage(\n stackParser,\n message,\n // eslint-disable-next-line deprecation/deprecation\n level = 'info',\n hint,\n attachStacktrace,\n ) {\n const syntheticException = (hint && hint.syntheticException) || undefined;\n const event = eventFromString(stackParser, message, syntheticException, attachStacktrace);\n event.level = level;\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return resolvedSyncPromise(event);\n }", "messageHandler(self, e) {\n let msg = ( (e.data).match(/^[0-9]+(\\[.+)$/) || [] )[1];\n if( msg != null ) {\n let msg_parsed = JSON.parse(msg);\n let [r, data] = msg_parsed;\n self.socketEventList.forEach(e=>e.run(self, msg_parsed))\n }\n }", "function process_event(event){\n // Capturamos los datos del que genera el evento y el mensaje \n var senderID = event.sender.id;\n var message = event.message;\n \n // Si en el evento existe un mensaje de tipo texto\n if(message.text){\n // Crear un payload para un simple mensaje de texto\n var response = {\n \"text\": 'Has escrito lo siguiente: ' + message.text\n }\n }\n // Enviamos el mensaje mediante SendAPI\n enviar_texto(senderID, response);\n}", "function receivedMessage(event){\n var senderID = event.sender.id\n var recipientID = event.recipient.id\n var timeOfMessage = event.timestamp\n var message = event.message\n\n console.log(\"Received message for user %d and page %d at %d with message:\",\n senderID, recipientID, timeOfMessage);\n console.log(JSON.stringify(message));\n\n var messageId = message.mid\n\n var messageText = message.text\n var messageAttachments = message.attachments\n\n if (messageText) {\n var simpleText = messageText.toLowerCase()\n\n // If we receive a text message, check to see if it matches a keyword\n switch (simpleText) {\n case 'my schools':\n mySchool(senderID)\n break;\n case 'start':\n welcomeMessage(senderID)\n break;\n case 'points':\n pointStanding(senderID)\n break;\n case 'events':\n postSchedule(senderID)\n break;\n case 'schedule':\n postSchedule(senderID)\n break;\n case 'initrank':\n initializeSchoolRank(senderID)\n break;\n case '9th - 13th':\n displayRanks(senderID,\"boy\",13)\n break;\n case '14th - 18th':\n displayRanks(senderID,\"boy\",18)\n break;\n case '19th - 23th':\n displayRanks(senderID,\"boy\",23)\n break;\n case '24th - 28th':\n displayRanks(senderID,\"boy\",28)\n break;\n break;\n default:\n askAgent(senderID,simpleText)\n //defaultResponse(senderID)\n }\n } else if (messageAttachments) {\n sendTextMessage(senderID, \"Message with attachment received\")\n }\n // Putting a stub for now, we'll expand it in the following steps\n console.log(\"Message data: \", event.message)\n }" ]
[ "0.6628312", "0.66122985", "0.64686126", "0.63631576", "0.635627", "0.62052286", "0.62041575", "0.612522", "0.5981569", "0.5952853", "0.59058005", "0.5882767", "0.5881956", "0.5866299", "0.5860368", "0.5814861", "0.58020043", "0.57038087", "0.5702504", "0.57019526", "0.5675563", "0.5649014", "0.5622061", "0.56139195", "0.56139195", "0.56139195", "0.56139195", "0.56139195", "0.5610146", "0.5606659", "0.5591837", "0.5591837", "0.55901957", "0.5586413", "0.5581236", "0.5575204", "0.557265", "0.5560319", "0.554886", "0.5548767", "0.5548472", "0.55460536", "0.5542353", "0.55214083", "0.5520923", "0.5516046", "0.5515318", "0.5504797", "0.55025953", "0.5498577", "0.54943144", "0.54942197", "0.5489871", "0.54872864", "0.5481825", "0.547566", "0.54753816", "0.5471546", "0.5470406", "0.54644173", "0.5462907", "0.5458768", "0.54538333", "0.545081", "0.54438996", "0.5441929", "0.5435027", "0.5429928", "0.54298764", "0.5429547", "0.5426343", "0.54252803", "0.5421805", "0.5421805", "0.5421805", "0.5418902", "0.5418902", "0.5416914", "0.5411407", "0.5410673", "0.5404398", "0.5401416", "0.54003483", "0.539768", "0.53972995", "0.5391954", "0.5385899", "0.5378896", "0.537488", "0.5370263", "0.5368048", "0.5361032", "0.53601414", "0.5359269", "0.53589207", "0.53539705", "0.53529084", "0.53471774", "0.5346948", "0.5346149" ]
0.5470415
58
Creates a SentryRequest from an event.
function eventToSentryRequest(event, api) { // since JS has no Object.prototype.pop() var _a = event.tags || {}, samplingMethod = _a.__sentry_samplingMethod, sampleRate = _a.__sentry_sampleRate, otherTags = Object(tslib_es6["d" /* __rest */])(_a, ["__sentry_samplingMethod", "__sentry_sampleRate"]); event.tags = otherTags; var useEnvelope = event.type === 'transaction'; var req = { body: JSON.stringify(event), type: event.type || 'event', url: useEnvelope ? api.getEnvelopeEndpointWithUrlEncodedAuth() : api.getStoreEndpointWithUrlEncodedAuth(), }; // https://develop.sentry.dev/sdk/envelopes/ // Since we don't need to manipulate envelopes nor store them, there is no // exported concept of an Envelope with operations including serialization and // deserialization. Instead, we only implement a minimal subset of the spec to // serialize events inline here. if (useEnvelope) { var envelopeHeaders = JSON.stringify({ event_id: event.event_id, sent_at: new Date().toISOString(), }); var itemHeaders = JSON.stringify({ type: event.type, // TODO: Right now, sampleRate may or may not be defined (it won't be in the cases of inheritance and // explicitly-set sampling decisions). Are we good with that? sample_rates: [{ id: samplingMethod, rate: sampleRate }], }); // The trailing newline is optional. We intentionally don't send it to avoid // sending unnecessary bytes. // // const envelope = `${envelopeHeaders}\n${itemHeaders}\n${req.body}\n`; var envelope = envelopeHeaders + "\n" + itemHeaders + "\n" + req.body; req.body = envelope; } return req; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function eventToSentryRequest(event, api) {\n var useEnvelope = event.type === 'transaction';\n var req = {\n body: JSON.stringify(event),\n type: event.type || 'event',\n url: useEnvelope ? api.getEnvelopeEndpointWithUrlEncodedAuth() : api.getStoreEndpointWithUrlEncodedAuth(),\n };\n // https://develop.sentry.dev/sdk/envelopes/\n // Since we don't need to manipulate envelopes nor store them, there is no\n // exported concept of an Envelope with operations including serialization and\n // deserialization. Instead, we only implement a minimal subset of the spec to\n // serialize events inline here.\n if (useEnvelope) {\n var envelopeHeaders = JSON.stringify({\n event_id: event.event_id,\n sent_at: new Date().toISOString(),\n });\n var itemHeaders = JSON.stringify({\n type: event.type,\n });\n // The trailing newline is optional. We intentionally don't send it to avoid\n // sending unnecessary bytes.\n //\n // const envelope = `${envelopeHeaders}\\n${itemHeaders}\\n${req.body}\\n`;\n var envelope = envelopeHeaders + \"\\n\" + itemHeaders + \"\\n\" + req.body;\n req.body = envelope;\n }\n return req;\n}", "function eventToSentryRequest(event, api) {\n // since JS has no Object.prototype.pop()\n var _a = event.tags || {}, samplingMethod = _a.__sentry_samplingMethod, sampleRate = _a.__sentry_sampleRate, otherTags = tslib_1.__rest(_a, [\"__sentry_samplingMethod\", \"__sentry_sampleRate\"]);\n event.tags = otherTags;\n var useEnvelope = event.type === 'transaction';\n var req = {\n body: JSON.stringify(event),\n type: event.type || 'event',\n url: useEnvelope ? api.getEnvelopeEndpointWithUrlEncodedAuth() : api.getStoreEndpointWithUrlEncodedAuth(),\n };\n // https://develop.sentry.dev/sdk/envelopes/\n // Since we don't need to manipulate envelopes nor store them, there is no\n // exported concept of an Envelope with operations including serialization and\n // deserialization. Instead, we only implement a minimal subset of the spec to\n // serialize events inline here.\n if (useEnvelope) {\n var envelopeHeaders = JSON.stringify({\n event_id: event.event_id,\n sent_at: new Date().toISOString(),\n });\n var itemHeaders = JSON.stringify({\n type: event.type,\n // TODO: Right now, sampleRate may or may not be defined (it won't be in the cases of inheritance and\n // explicitly-set sampling decisions). Are we good with that?\n sample_rates: [{ id: samplingMethod, rate: sampleRate }],\n });\n // The trailing newline is optional. We intentionally don't send it to avoid\n // sending unnecessary bytes.\n //\n // const envelope = `${envelopeHeaders}\\n${itemHeaders}\\n${req.body}\\n`;\n var envelope = envelopeHeaders + \"\\n\" + itemHeaders + \"\\n\" + req.body;\n req.body = envelope;\n }\n return req;\n}", "function eventToSentryRequest(event, api) {\n var sdkInfo = getSdkMetadataForEnvelopeHeader(api);\n var eventType = event.type || 'event';\n var useEnvelope = eventType === 'transaction' || api.forceEnvelope();\n var _a = event.debug_meta || {}, transactionSampling = _a.transactionSampling, metadata = tslib_1.__rest(_a, [\"transactionSampling\"]);\n var _b = transactionSampling || {}, samplingMethod = _b.method, sampleRate = _b.rate;\n if (Object.keys(metadata).length === 0) {\n delete event.debug_meta;\n }\n else {\n event.debug_meta = metadata;\n }\n var req = {\n body: JSON.stringify(sdkInfo ? enhanceEventWithSdkInfo(event, api.metadata.sdk) : event),\n type: eventType,\n url: useEnvelope ? api.getEnvelopeEndpointWithUrlEncodedAuth() : api.getStoreEndpointWithUrlEncodedAuth(),\n };\n // https://develop.sentry.dev/sdk/envelopes/\n // Since we don't need to manipulate envelopes nor store them, there is no\n // exported concept of an Envelope with operations including serialization and\n // deserialization. Instead, we only implement a minimal subset of the spec to\n // serialize events inline here.\n if (useEnvelope) {\n var envelopeHeaders = JSON.stringify(tslib_1.__assign(tslib_1.__assign({ event_id: event.event_id, sent_at: new Date().toISOString() }, (sdkInfo && { sdk: sdkInfo })), (api.forceEnvelope() && { dsn: api.getDsn().toString() })));\n var itemHeaders = JSON.stringify({\n type: eventType,\n // TODO: Right now, sampleRate may or may not be defined (it won't be in the cases of inheritance and\n // explicitly-set sampling decisions). Are we good with that?\n sample_rates: [{ id: samplingMethod, rate: sampleRate }],\n });\n // The trailing newline is optional. We intentionally don't send it to avoid\n // sending unnecessary bytes.\n //\n // const envelope = `${envelopeHeaders}\\n${itemHeaders}\\n${req.body}\\n`;\n var envelope = envelopeHeaders + \"\\n\" + itemHeaders + \"\\n\" + req.body;\n req.body = envelope;\n }\n return req;\n}", "function parseRequest(event, req, options) {\n // eslint-disable-next-line no-param-reassign\n options = tslib_1.__assign({ ip: false, request: true, serverName: true, transaction: true, user: true, version: true }, options);\n if (options.version) {\n event.contexts = tslib_1.__assign(tslib_1.__assign({}, event.contexts), { runtime: {\n name: 'node',\n version: global.process.version,\n } });\n }\n if (options.request) {\n // if the option value is `true`, use the default set of keys by not passing anything to `extractRequestData()`\n var extractedRequestData = Array.isArray(options.request)\n ? extractRequestData(req, options.request)\n : extractRequestData(req);\n event.request = tslib_1.__assign(tslib_1.__assign({}, event.request), extractedRequestData);\n }\n if (options.serverName && !event.server_name) {\n event.server_name = global.process.env.SENTRY_NAME || os.hostname();\n }\n if (options.user) {\n var extractedUser = req.user && utils_1.isPlainObject(req.user) ? extractUserData(req.user, options.user) : {};\n if (Object.keys(extractedUser)) {\n event.user = tslib_1.__assign(tslib_1.__assign({}, event.user), extractedUser);\n }\n }\n // client ip:\n // node, nextjs: req.connection.remoteAddress\n // express, koa: req.ip\n if (options.ip) {\n var ip = req.ip || (req.connection && req.connection.remoteAddress);\n if (ip) {\n event.user = tslib_1.__assign(tslib_1.__assign({}, event.user), { ip_address: ip });\n }\n }\n if (options.transaction && !event.transaction) {\n // TODO do we even need this anymore?\n // TODO make this work for nextjs\n event.transaction = extractTransaction(req, options.transaction);\n }\n return event;\n}", "function processEvent(event) {\n const { body, pathParameters, queryStringParameters, requestContext } = event\n const { httpMethod, resourceId, resourcePath, requestId } = requestContext\n\n return {\n body: body && bourne.parse(body),\n queryStringParameters,\n pathParameters\n }\n}", "function TrXMLRequestEvent(\n status,\n request\n )\n{\n this._status = status;\n this._request = request;\n}", "function addRequestDataToEvent(\n event,\n req,\n options,\n) {\n const include = {\n ...DEFAULT_INCLUDES,\n ..._optionalChain([options, 'optionalAccess', _ => _.include]),\n };\n\n if (include.request) {\n const extractedRequestData = Array.isArray(include.request)\n ? extractRequestData(req, { include: include.request, deps: _optionalChain([options, 'optionalAccess', _2 => _2.deps]) })\n : extractRequestData(req, { deps: _optionalChain([options, 'optionalAccess', _3 => _3.deps]) });\n\n event.request = {\n ...event.request,\n ...extractedRequestData,\n };\n }\n\n if (include.user) {\n const extractedUser = req.user && is.isPlainObject(req.user) ? extractUserData(req.user, include.user) : {};\n\n if (Object.keys(extractedUser).length) {\n event.user = {\n ...event.user,\n ...extractedUser,\n };\n }\n }\n\n // client ip:\n // node, nextjs: req.socket.remoteAddress\n // express, koa: req.ip\n if (include.ip) {\n const ip = req.ip || (req.socket && req.socket.remoteAddress);\n if (ip) {\n event.user = {\n ...event.user,\n ip_address: ip,\n };\n }\n }\n\n if (include.transaction && !event.transaction) {\n // TODO do we even need this anymore?\n // TODO make this work for nextjs\n event.transaction = extractTransaction(req, include.transaction);\n }\n\n return event;\n}", "static parse(event) {\r\n const request = isLambdaProxyRequest(event) ? JSON.parse(event.body) : event;\r\n return isLambdaProxyRequest(event)\r\n ? {\r\n request: JSON.parse(event.body),\r\n apiGateway: event,\r\n }\r\n : request;\r\n }", "function sessionToSentryRequest(session, api) {\n var envelopeHeaders = JSON.stringify({\n sent_at: new Date().toISOString(),\n });\n var itemHeaders = JSON.stringify({\n type: 'session',\n });\n return {\n body: envelopeHeaders + \"\\n\" + itemHeaders + \"\\n\" + JSON.stringify(session),\n type: 'session',\n url: api.getEnvelopeEndpointWithUrlEncodedAuth(),\n };\n}", "function sessionToSentryRequest(session, api) {\n var envelopeHeaders = JSON.stringify({\n sent_at: new Date().toISOString(),\n });\n var itemHeaders = JSON.stringify({\n type: 'session',\n });\n return {\n body: envelopeHeaders + \"\\n\" + itemHeaders + \"\\n\" + JSON.stringify(session),\n type: 'session',\n url: api.getEnvelopeEndpointWithUrlEncodedAuth(),\n };\n}", "function sessionToSentryRequest(session, api) {\n var sdkInfo = getSdkMetadataForEnvelopeHeader(api);\n var envelopeHeaders = JSON.stringify(tslib_1.__assign(tslib_1.__assign({ sent_at: new Date().toISOString() }, (sdkInfo && { sdk: sdkInfo })), (api.forceEnvelope() && { dsn: api.getDsn().toString() })));\n // I know this is hacky but we don't want to add `session` to request type since it's never rate limited\n var type = 'aggregates' in session ? 'sessions' : 'session';\n var itemHeaders = JSON.stringify({\n type: type,\n });\n return {\n body: envelopeHeaders + \"\\n\" + itemHeaders + \"\\n\" + JSON.stringify(session),\n type: type,\n url: api.getEnvelopeEndpointWithUrlEncodedAuth(),\n };\n}", "triggerEvent(event) {\n\t\treturn _makeRequest('/events', {method: 'POST', body: {event}})\n\t\t\t.then(responseData => {\n\t\t\t\tif(responseData.success){\n\t\t\t\t\tconsole.log('Event Sent', event);\n\t\t\t\t}\n\t\t\t})\n\t\t\t.catch(error => {\n\t\t\t\tconsole.error(error);\n\t\t\t});\n\t}", "function postEvent(event) {\n let data = JSON.stringify(event);\n\n if (disableKinesis) {\n //log(`Kinesis disabled: POST ${data}`);\n return Promise.resolve(event);\n }\n\n let partitionKey = event.userSessionId;\n if (partitionKey === undefined) {\n partitionKey = event.eventName;\n }\n\n let params = {\n StreamName: KINESIS_STREAM_NAME,\n PartitionKey: partitionKey,\n Data: data,\n };\n\n return kinesis.putRecord(params).promise()\n .then(() => { return event; });\n}", "function buildPromise(entryEvent, event) {\n\n var myPromise;\n if (entryEvent) {\n console.log('aalatief buildPromise Case entryEvent '); \n myPromise = $q.resolve({\n data: {\n entries: [{\n entryServerId: entryEvent.entry || entryEvent.entryServerId,\n _id: entryEvent._id,\n itemServerId: entryEvent.entry.itemServerId\n }\n ],\n items: entryEvent.item,\n retailers: entryEvent.retailer\n }\n })\n ;\n } else {\n console.log('aalatief buildPromise Case Not entryEvent '); \n var data = {\n userServerId: global.userServerId,\n deviceServerId: global.deviceServerId\n };\n var url = global.serverIP + \"/api/entry/\" + (event == \"CREATE\" ? \"getpending\" : \"getUpdates\");\n\n myPromise = $http.post(url, data);\n }\n return myPromise;\n\n }", "function requestFactory(config){\n\n\tvar req = _.extend({}, config);\n\t\n\treturn req;\n}", "function cloneEvent(event) {\n return Object.assign({}, event);\n}", "function createEventEnvelope(\n event,\n dsn,\n metadata,\n tunnel,\n) {\n const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata);\n const eventType = event.type || 'event';\n\n enhanceEventWithSdkInfo(event, metadata && metadata.sdk);\n\n const envelopeHeaders = createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn);\n\n // Prevent this data (which, if it exists, was used in earlier steps in the processing pipeline) from being sent to\n // sentry. (Note: Our use of this property comes and goes with whatever we might be debugging, whatever hacks we may\n // have temporarily added, etc. Even if we don't happen to be using it at some point in the future, let's not get rid\n // of this `delete`, lest we miss putting it back in the next time the property is in use.)\n delete event.sdkProcessingMetadata;\n\n const eventItem = [{ type: eventType }, event];\n return utils.createEnvelope(envelopeHeaders, [eventItem]);\n}", "_processEvent(event, hint, scope) {\n const options = this.getOptions();\n const { sampleRate } = options;\n\n if (!this._isEnabled()) {\n return utils.rejectedSyncPromise(new utils.SentryError('SDK not enabled, will not capture event.', 'log'));\n }\n\n const isTransaction = event.type === 'transaction';\n const beforeSendProcessorName = isTransaction ? 'beforeSendTransaction' : 'beforeSend';\n const beforeSendProcessor = options[beforeSendProcessorName];\n\n // 1.0 === 100% events are sent\n // 0.0 === 0% events are sent\n // Sampling for transaction happens somewhere else\n if (!isTransaction && typeof sampleRate === 'number' && Math.random() > sampleRate) {\n this.recordDroppedEvent('sample_rate', 'error');\n return utils.rejectedSyncPromise(\n new utils.SentryError(\n `Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`,\n 'log',\n ),\n );\n }\n\n return this._prepareEvent(event, hint, scope)\n .then(prepared => {\n if (prepared === null) {\n this.recordDroppedEvent('event_processor', event.type || 'error');\n throw new utils.SentryError('An event processor returned `null`, will not send event.', 'log');\n }\n\n const isInternalException = hint.data && (hint.data ).__sentry__ === true;\n if (isInternalException || !beforeSendProcessor) {\n return prepared;\n }\n\n const beforeSendResult = beforeSendProcessor(prepared, hint);\n return _validateBeforeSendResult(beforeSendResult, beforeSendProcessorName);\n })\n .then(processedEvent => {\n if (processedEvent === null) {\n this.recordDroppedEvent('before_send', event.type || 'error');\n throw new utils.SentryError(`\\`${beforeSendProcessorName}\\` returned \\`null\\`, will not send event.`, 'log');\n }\n\n const session = scope && scope.getSession();\n if (!isTransaction && session) {\n this._updateSessionFromEvent(session, processedEvent);\n }\n\n // None of the Sentry built event processor will update transaction name,\n // so if the transaction name has been changed by an event processor, we know\n // it has to come from custom event processor added by a user\n const transactionInfo = processedEvent.transaction_info;\n if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) {\n const source = 'custom';\n processedEvent.transaction_info = {\n ...transactionInfo,\n source,\n changes: [\n ...transactionInfo.changes,\n {\n source,\n // use the same timestamp as the processed event.\n timestamp: processedEvent.timestamp ,\n propagations: transactionInfo.propagations,\n },\n ],\n };\n }\n\n this.sendEvent(processedEvent, hint);\n return processedEvent;\n })\n .then(null, reason => {\n if (reason instanceof utils.SentryError) {\n throw reason;\n }\n\n this.captureException(reason, {\n data: {\n __sentry__: true,\n },\n originalException: reason ,\n });\n throw new utils.SentryError(\n `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\\nReason: ${reason}`,\n );\n });\n }", "function createEventEnvelope(\n\t event,\n\t dsn,\n\t metadata,\n\t tunnel,\n\t) {\n\t const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata);\n\t const eventType = event.type || 'event';\n\n\t enhanceEventWithSdkInfo(event, metadata && metadata.sdk);\n\n\t const envelopeHeaders = createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn);\n\n\t // Prevent this data (which, if it exists, was used in earlier steps in the processing pipeline) from being sent to\n\t // sentry. (Note: Our use of this property comes and goes with whatever we might be debugging, whatever hacks we may\n\t // have temporarily added, etc. Even if we don't happen to be using it at some point in the future, let's not get rid\n\t // of this `delete`, lest we miss putting it back in the next time the property is in use.)\n\t delete event.sdkProcessingMetadata;\n\n\t const eventItem = [{ type: eventType }, event];\n\t return createEnvelope(envelopeHeaders, [eventItem]);\n\t}", "function findSourceEntryFromEvent_(event) {\n if (!('params' in event) || !('source_dependency' in event.params)) {\n return undefined;\n } else {\n var id = event.params.source_dependency.id;\n return SourceTracker.getInstance().getSourceEntry(id);\n }\n }", "function createEvent(event) {\n const calendar = getCalenderClient();\n calendar.events.insert({\n calendarId: conf.CALENDAR_ID,\n resource: event,\n }, function(err, event) {\n if (err) {\n console.log('There was an error contacting the Calendar service: ' + err);\n return;\n }\n console.log('Event created: %s', event.data.htmlLink);\n });\n}", "function createEventEnvelope(\n event,\n dsn,\n metadata,\n tunnel,\n ) {\n const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata);\n\n /*\n Note: Due to TS, event.type may be `replay_event`, theoretically.\n In practice, we never call `createEventEnvelope` with `replay_event` type,\n and we'd have to adjut a looot of types to make this work properly.\n We want to avoid casting this around, as that could lead to bugs (e.g. when we add another type)\n So the safe choice is to really guard against the replay_event type here.\n */\n const eventType = event.type && event.type !== 'replay_event' ? event.type : 'event';\n\n enhanceEventWithSdkInfo(event, metadata && metadata.sdk);\n\n const envelopeHeaders = createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn);\n\n // Prevent this data (which, if it exists, was used in earlier steps in the processing pipeline) from being sent to\n // sentry. (Note: Our use of this property comes and goes with whatever we might be debugging, whatever hacks we may\n // have temporarily added, etc. Even if we don't happen to be using it at some point in the future, let's not get rid\n // of this `delete`, lest we miss putting it back in the next time the property is in use.)\n delete event.sdkProcessingMetadata;\n\n const eventItem = [{ type: eventType }, event];\n return createEnvelope(envelopeHeaders, [eventItem]);\n }", "function updateCalendar(request){\n var event = calendar.createEvent(\n request.name,\n request.date,\n request.endTime\n )\n}", "function addEvent(){\n\n var error = false;\n\n var newEvent = {\n id:0,\n eventName: window.eventTitle.value,\n eventDesc: window.eventDesc.value,\n eventOn: window.eventWhen.value,\n eventStart:window.eventFrom.value,\n eventFinish:window.eventTo.value\n };\n\n\n\n if(error == false){\n console.log(newEvent);\n var url = 'api/calendar';\n var xhr = new XMLHttpRequest();\n xhr.open('POST', url, true);\n xhr.setRequestHeader(\"Content-Type\", \"application/json;charset=UTF-8\");\n xhr.send(JSON.stringify(newEvent));\n loadEvents();\n window.addEvents.classList.add('hidden');\n window.formAddEv.reset();\n }\n\n}", "promise({ payload, request }) {\n return request.create({ data: payload })\n }", "function addEvent(event) {\n\n\t\t\tevent.id = nextEventId();\n\n\t\t\tevents.push(event);\n\n\t\t\treturn deferred.promiseValue(event);\n\t\t}", "_processEvent(event, hint, scope) {\n const options = this.getOptions();\n const { sampleRate } = options;\n\n if (!this._isEnabled()) {\n return rejectedSyncPromise(new SentryError('SDK not enabled, will not capture event.', 'log'));\n }\n\n const isTransaction = isTransactionEvent(event);\n const isError = isErrorEvent(event);\n const eventType = event.type || 'error';\n const beforeSendLabel = `before send for type \\`${eventType}\\``;\n\n // 1.0 === 100% events are sent\n // 0.0 === 0% events are sent\n // Sampling for transaction happens somewhere else\n if (isError && typeof sampleRate === 'number' && Math.random() > sampleRate) {\n this.recordDroppedEvent('sample_rate', 'error', event);\n return rejectedSyncPromise(\n new SentryError(\n `Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`,\n 'log',\n ),\n );\n }\n\n const dataCategory = eventType === 'replay_event' ? 'replay' : eventType;\n\n return this._prepareEvent(event, hint, scope)\n .then(prepared => {\n if (prepared === null) {\n this.recordDroppedEvent('event_processor', dataCategory, event);\n throw new SentryError('An event processor returned `null`, will not send event.', 'log');\n }\n\n const isInternalException = hint.data && (hint.data ).__sentry__ === true;\n if (isInternalException) {\n return prepared;\n }\n\n const result = processBeforeSend(options, prepared, hint);\n return _validateBeforeSendResult(result, beforeSendLabel);\n })\n .then(processedEvent => {\n if (processedEvent === null) {\n this.recordDroppedEvent('before_send', dataCategory, event);\n throw new SentryError(`${beforeSendLabel} returned \\`null\\`, will not send event.`, 'log');\n }\n\n const session = scope && scope.getSession();\n if (!isTransaction && session) {\n this._updateSessionFromEvent(session, processedEvent);\n }\n\n // None of the Sentry built event processor will update transaction name,\n // so if the transaction name has been changed by an event processor, we know\n // it has to come from custom event processor added by a user\n const transactionInfo = processedEvent.transaction_info;\n if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) {\n const source = 'custom';\n processedEvent.transaction_info = {\n ...transactionInfo,\n source,\n };\n }\n\n this.sendEvent(processedEvent, hint);\n return processedEvent;\n })\n .then(null, reason => {\n if (reason instanceof SentryError) {\n throw reason;\n }\n\n this.captureException(reason, {\n data: {\n __sentry__: true,\n },\n originalException: reason ,\n });\n throw new SentryError(\n `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\\nReason: ${reason}`,\n );\n });\n }", "function _addRequest(transaction, entry, timeOrigin) {\n utils$2._startChild(transaction, {\n op: 'browser',\n description: 'request',\n startTimestamp: timeOrigin + utils$1.msToSec(entry.requestStart ),\n endTimestamp: timeOrigin + utils$1.msToSec(entry.responseEnd ),\n });\n\n utils$2._startChild(transaction, {\n op: 'browser',\n description: 'response',\n startTimestamp: timeOrigin + utils$1.msToSec(entry.responseStart ),\n endTimestamp: timeOrigin + utils$1.msToSec(entry.responseEnd ),\n });\n}", "_processEvent(event, hint, scope) {\n\t const options = this.getOptions();\n\t const { sampleRate } = options;\n\n\t if (!this._isEnabled()) {\n\t return rejectedSyncPromise(new SentryError('SDK not enabled, will not capture event.', 'log'));\n\t }\n\n\t const isTransaction = event.type === 'transaction';\n\t const beforeSendProcessorName = isTransaction ? 'beforeSendTransaction' : 'beforeSend';\n\t const beforeSendProcessor = options[beforeSendProcessorName];\n\n\t // 1.0 === 100% events are sent\n\t // 0.0 === 0% events are sent\n\t // Sampling for transaction happens somewhere else\n\t if (!isTransaction && typeof sampleRate === 'number' && Math.random() > sampleRate) {\n\t this.recordDroppedEvent('sample_rate', 'error');\n\t return rejectedSyncPromise(\n\t new SentryError(\n\t `Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`,\n\t 'log',\n\t ),\n\t );\n\t }\n\n\t return this._prepareEvent(event, hint, scope)\n\t .then(prepared => {\n\t if (prepared === null) {\n\t this.recordDroppedEvent('event_processor', event.type || 'error');\n\t throw new SentryError('An event processor returned `null`, will not send event.', 'log');\n\t }\n\n\t const isInternalException = hint.data && (hint.data ).__sentry__ === true;\n\t if (isInternalException || !beforeSendProcessor) {\n\t return prepared;\n\t }\n\n\t const beforeSendResult = beforeSendProcessor(prepared, hint);\n\t return _validateBeforeSendResult(beforeSendResult, beforeSendProcessorName);\n\t })\n\t .then(processedEvent => {\n\t if (processedEvent === null) {\n\t this.recordDroppedEvent('before_send', event.type || 'error');\n\t throw new SentryError(`\\`${beforeSendProcessorName}\\` returned \\`null\\`, will not send event.`, 'log');\n\t }\n\n\t const session = scope && scope.getSession();\n\t if (!isTransaction && session) {\n\t this._updateSessionFromEvent(session, processedEvent);\n\t }\n\n\t // None of the Sentry built event processor will update transaction name,\n\t // so if the transaction name has been changed by an event processor, we know\n\t // it has to come from custom event processor added by a user\n\t const transactionInfo = processedEvent.transaction_info;\n\t if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) {\n\t const source = 'custom';\n\t processedEvent.transaction_info = {\n\t ...transactionInfo,\n\t source,\n\t changes: [\n\t ...transactionInfo.changes,\n\t {\n\t source,\n\t // use the same timestamp as the processed event.\n\t timestamp: processedEvent.timestamp ,\n\t propagations: transactionInfo.propagations,\n\t },\n\t ],\n\t };\n\t }\n\n\t this.sendEvent(processedEvent, hint);\n\t return processedEvent;\n\t })\n\t .then(null, reason => {\n\t if (reason instanceof SentryError) {\n\t throw reason;\n\t }\n\n\t this.captureException(reason, {\n\t data: {\n\t __sentry__: true,\n\t },\n\t originalException: reason ,\n\t });\n\t throw new SentryError(\n\t `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\\nReason: ${reason}`,\n\t );\n\t });\n\t }", "function _addRequest(transaction, entry, timeOrigin) {\n _startChild(transaction, {\n op: 'browser',\n description: 'request',\n startTimestamp: timeOrigin + msToSec(entry.requestStart ),\n endTimestamp: timeOrigin + msToSec(entry.responseEnd ),\n });\n\n _startChild(transaction, {\n op: 'browser',\n description: 'response',\n startTimestamp: timeOrigin + msToSec(entry.responseStart ),\n endTimestamp: timeOrigin + msToSec(entry.responseEnd ),\n });\n }", "function newEventCreation() {\n let name = document.querySelector(\"#eventName\")\n let location = document.querySelector(\"#eventLocation\")\n let date = date.querySelector(\"#eventDate\")\n\n // Empty object for the Event info to populate\n let event = {\n name: \"\",\n location: \"\",\n date: \"\"\n }\n\n event.name = (name.value)\n event.location = (location.value)\n event.date = (date.value)\n\n userAPIfunctions.postUser(obj)\n .then((response) => response.json()\n .then((user) => sessionStorageSetup(user))\n )\n}", "function addRequest(transaction, entry, timeOrigin) {\n _startChild(transaction, {\n op: 'browser',\n description: 'request',\n startTimestamp: timeOrigin + utils_2.msToSec(entry.requestStart),\n endTimestamp: timeOrigin + utils_2.msToSec(entry.responseEnd),\n });\n _startChild(transaction, {\n op: 'browser',\n description: 'response',\n startTimestamp: timeOrigin + utils_2.msToSec(entry.responseStart),\n endTimestamp: timeOrigin + utils_2.msToSec(entry.responseEnd),\n });\n}", "function addRequest(transaction, entry, timeOrigin) {\n _startChild(transaction, {\n op: 'browser',\n description: 'request',\n startTimestamp: timeOrigin + msToSec(entry.requestStart),\n endTimestamp: timeOrigin + msToSec(entry.responseEnd),\n });\n _startChild(transaction, {\n op: 'browser',\n description: 'response',\n startTimestamp: timeOrigin + msToSec(entry.responseStart),\n endTimestamp: timeOrigin + msToSec(entry.responseEnd),\n });\n}", "function userGridEventFromId(eventId) {\n return {\n type: 'events-sts',\n uuid: eventId\n };\n}", "function _addRequest(transaction, entry, timeOrigin) {\n\t _startChild(transaction, {\n\t op: 'browser',\n\t description: 'request',\n\t startTimestamp: timeOrigin + msToSec(entry.requestStart ),\n\t endTimestamp: timeOrigin + msToSec(entry.responseEnd ),\n\t });\n\n\t _startChild(transaction, {\n\t op: 'browser',\n\t description: 'response',\n\t startTimestamp: timeOrigin + msToSec(entry.responseStart ),\n\t endTimestamp: timeOrigin + msToSec(entry.responseEnd ),\n\t });\n\t}", "function create(request) {\n return request.$save(function (data) {\n service.reqeuests.push(data);\n });\n }", "_captureEvent(event, hint = {}, scope) {\n return this._processEvent(event, hint, scope).then(\n finalEvent => {\n return finalEvent.event_id;\n },\n reason => {\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n // If something's gone wrong, log the error as a warning. If it's just us having used a `SentryError` for\n // control flow, log just the message (no stack) as a log-level log.\n const sentryError = reason ;\n if (sentryError.logLevel === 'log') {\n utils.logger.log(sentryError.message);\n } else {\n utils.logger.warn(sentryError);\n }\n }\n return undefined;\n },\n );\n }", "function new_test_request() {\n return new Request(test_url)\n}", "function transformToEventObj(event) {\n event.title = event.patient.full_name;\n event.start = event.start_at;\n event.end = event.end_at;\n event.backgroundColor = event.color;\n event.borderColor = event.color;\n event.status = event.status;\n event.editable = event.is_editable;\n event.patient = event.patient;\n\n return event;\n}", "function createEvent(event) {\n console.log(\"Calling: /api/events POST\");\n $.ajax({\n url: api_host + '/api/events',\n type: \"POST\",\n data: event,\n success: function()\n {\n console.log(\"Action: refetchEvents\");\n getCalendar().fullCalendar('refetchEvents');\n console.log(\"Action: modal hide\");\n getModalEventCreate().modal('hide');\n }\n })\n}", "_captureEvent(event, hint = {}, scope) {\n return this._processEvent(event, hint, scope).then(\n finalEvent => {\n return finalEvent.event_id;\n },\n reason => {\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n // If something's gone wrong, log the error as a warning. If it's just us having used a `SentryError` for\n // control flow, log just the message (no stack) as a log-level log.\n const sentryError = reason ;\n if (sentryError.logLevel === 'log') {\n logger.log(sentryError.message);\n } else {\n logger.warn(sentryError);\n }\n }\n return undefined;\n },\n );\n }", "constructor(request) {\n this.request = request;\n }", "buildRequest(address) {\n return new Promise((resolve, reject) => {\n let userSignature = new UserSignature();\n userSignature.status.address = address;\n userSignature.status.requestTimeStamp = Date.now();\n userSignature.status.message = `${address}:${userSignature.status.requestTimeStamp}:starRegistry`;\n userSignature.status.validationWindow = 300;\n resolve(userSignature);\n });\n }", "function processEvent(event, callback) {\n // Usually returns array of records, however it is fixed to only return 1 record\n console.log(JSON.stringify(event));\n var loneEvent = event.Records[0];\n var requestBody = JSON.parse(loneEvent.body);\n\n // Print SQS message ID or null or undefined\n const messageId = loneEvent.messageId;\n const messageText = `message ID is: ${messageId}`;\n console.log(messageText);\n\n // The payload is encoded in base64\n const buff = Buffer.from(requestBody.payload, \"base64\");\n const bodyDecoded = buff.toString(\"utf8\");\n const body = JSON.parse(bodyDecoded);\n\n if (!verifyGitHub(requestBody, bodyDecoded)) {\n console.log(\"GitHub could not be verified\");\n console.log(\"GitHub Payload\");\n console.log(JSON.stringify(body));\n callback(null, {\n statusCode: 403,\n body: \"something is wrong, github secret does not match\",\n });\n return;\n } else {\n console.log(\"GitHub is verified\");\n }\n\n var path = process.env.API_URL;\n\n var deliveryId;\n if (requestBody[DELIVERY_ID_HEADER]) {\n deliveryId = requestBody[DELIVERY_ID_HEADER];\n } else {\n // TODO: remove this after 1.15.\n // This was added because there's a small period of time during the 1.15 deploy where the header isn't available\n console.log(\n \"Could not retrieve X-GitHub-Delivery header, generating a random UUID\"\n );\n deliveryId = crypto.randomUUID();\n }\n\n console.log(\"X-GitHub-Delivery: \" + deliveryId);\n var githubEventType = requestBody[\"X-GitHub-Event\"];\n // Handle installation events\n if (githubEventType === \"installation_repositories\") {\n // Currently ignoring repository removal events, only calling the endpoint if we are adding a repository.\n if (body.action === \"added\") {\n console.log(\"Valid installation event\");\n path += \"workflows/github/install\";\n const repositoriesAdded = body.repositories_added;\n const repositories = repositoriesAdded.map((repo) => repo.full_name);\n\n postEndpoint(path, body, deliveryId, (response) => {\n const successMessage =\n \"The GitHub app was successfully installed on repositories \" +\n repositories;\n handleCallback(response, successMessage, callback);\n });\n } else {\n console.log(\n 'installation_repositories event ignored \"' + body.action + '\" action'\n );\n }\n } else if (githubEventType === \"push\") {\n /**\n * We only handle push events, of which there are many subtypes. Unfortunately, the only way to differentiate between them is to look\n * for expected fields. There are no enums for push events subtypes.\n *\n * If an event is deemed not supported, we will return a success and print a message saying the event is not supported.\n */\n if (\n [\"repository\", \"ref\", \"created\", \"deleted\", \"pusher\"].some(\n (str) => !(str in body)\n )\n ) {\n console.log(\"Event is not supported\");\n callback(null, {\n statusCode: 200,\n body: \"Currently, this lambda does not support this event type from GitHub.\",\n });\n return;\n }\n\n // A push has been made for some repository (ignore pushes that are deletes)\n if (!body.deleted) {\n console.log(\"Valid push event\");\n const repository = body.repository.full_name;\n const gitReference = body.ref;\n\n path += \"workflows/github/release\";\n\n postEndpoint(path, body, deliveryId, (response) => {\n const successMessage =\n \"The associated entries on Dockstore for repository \" +\n repository +\n \" with version \" +\n gitReference +\n \" have been updated\";\n handleCallback(response, successMessage, callback);\n });\n } else {\n console.log(\"Valid push event (delete)\");\n const repository = body.repository.full_name;\n const gitReference = body.ref;\n const username = body.sender.login;\n\n path += \"workflows/github\";\n\n deleteEndpoint(\n path,\n repository,\n gitReference,\n username,\n deliveryId,\n (response) => {\n const successMessage =\n \"The associated versions on Dockstore for repository \" +\n repository +\n \" with version \" +\n gitReference +\n \" have been deleted\";\n handleCallback(response, successMessage, callback);\n }\n );\n }\n } else {\n console.log(\"Event \" + githubEventType + \" is not supported\");\n callback(null, {\n statusCode: 200,\n body:\n \"Currently, this lambda does not support the event type\" +\n githubEventType +\n \" from GitHub.\",\n });\n }\n}", "createNewEvent(eventData) {\n fetch(\"/api/event\", {\n method: \"post\",\n body: JSON.stringify(eventData),\n headers: {\n \"Content-Type\": \"application/json\",\n },\n })\n .then((response) => response.json())\n .then((body) => {\n const urlToShare = `${window.location.origin}/event/${body.event.name}`;\n this.setState({\n urlToShare,\n createdEvent: body,\n display: \"confirmation\",\n });\n })\n .catch(console.error);\n }", "function formatEvent (event) {\n return {\n eventID: event.eventID,\n name: event.name,\n numRunners: event.numRunners,\n numCheckpoints: event.numCheckpoints,\n startTime: event.startTime,\n }\n}", "async function eventToRequest(event, channel_id) {\n if (event.bot_id == '' || event.bot_id == null) {\n const response = await detectIntentResponse(event);\n var requests = await convertToSlackMessage(response, channel_id);\n for (req of requests) {\n try {\n await slackClient.chat.postMessage(req)\n } catch (error) {\n console.log(error.data)\n }\n }\n };\n}", "_captureEvent(event, hint = {}, scope) {\n\t return this._processEvent(event, hint, scope).then(\n\t finalEvent => {\n\t return finalEvent.event_id;\n\t },\n\t reason => {\n\t if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n\t // If something's gone wrong, log the error as a warning. If it's just us having used a `SentryError` for\n\t // control flow, log just the message (no stack) as a log-level log.\n\t const sentryError = reason ;\n\t if (sentryError.logLevel === 'log') {\n\t logger.log(sentryError.message);\n\t } else {\n\t logger.warn(sentryError);\n\t }\n\t }\n\t return undefined;\n\t },\n\t );\n\t }", "static from(uri, options = {}) {\n if (typeof uri !== 'string') {\n throw new Error('Invalid request uri');\n }\n const [scheme, path] = uri.split(':');\n if (scheme !== 'esr' && scheme !== 'web+esr') {\n throw new Error('Invalid scheme');\n }\n const data = base64u.decode(path.startsWith('//') ? path.slice(2) : path);\n return SigningRequest.fromData(data, options);\n }", "static initialize(obj, eventAt, event) { \n obj['event_at'] = eventAt;\n obj['event'] = event;\n }", "function makeAuthTokenRequestInProgressEntry(oldEntry) {\r\n const inProgressAuthToken = {\r\n requestStatus: 1 /* IN_PROGRESS */,\r\n requestTime: Date.now()\r\n };\r\n return Object.assign(Object.assign({}, oldEntry), { authToken: inProgressAuthToken });\r\n}", "function buildPlatformEvent(event){\r\n //Object map that maps Twilio Field to Salesforce Field\r\n var eventToPEMap = {\r\n \"Body\":\"Body__c\",\r\n \"To\":\"To__c\",\r\n \"From\":\"From__c\",\r\n \"AccountSid\":\"AccountSid__c\",\r\n \"SmsSid\":\"MessageSid__c\",\r\n \"MessagingServiceSid\":\"MessagingServiceSid__c\",\r\n \"SmsStatus\":\"SmsStatus__c\",\r\n \"ErrorCode\":\"ErrorCode__c\"\r\n };\r\n\r\n var platformEvent = {};\r\n\r\n //Loop through event and build platform event\r\n for (var property in event) {\r\n if (eventToPEMap.hasOwnProperty(property)) {\r\n var eventProp;\r\n if(useNameSpace){\r\n eventProp = nameSpace + eventToPEMap[property];\r\n } else{\r\n eventProp = eventToPEMap[property];\r\n }\r\n platformEvent[eventProp] = event[property];\r\n }\r\n }\r\n return platformEvent;\r\n }", "function calanderToEvent_(calendarEvent) {\n let id = calendarEvent.getId();\n let title = calendarEvent.getTitle();\n let description = calendarEvent.getDescription();\n let startTime = calendarEvent.getStartTime();\n let endTime = calendarEvent.getEndTime();\n let event = {\n 'id': id,\n 'title': title,\n 'description': description,\n 'startTime': startTime,\n 'endTime': endTime,\n 'recurrence': \"null\"\n };\n if (calendarEvent.isRecurringEvent()) {\n let recurrence = calendarEvent.getTag('recurrence');\n event.recurrence = JSON.parse(recurrence);\n }\n return event;\n}", "function createEvent() {\n var calendarId = 'primary';\n var start = getRelativeDate(1, 12);\n var end = getRelativeDate(1, 13);\n var event = {\n summary: 'Lunch Meeting',\n location: 'The Deli',\n description: 'To discuss our plans for the presentation next week.',\n start: {\n dateTime: start.toISOString()\n },\n end: {\n dateTime: end.toISOString()\n },\n attendees: [\n {email: 'alice@example.com'},\n {email: 'bob@example.com'}\n ],\n // Red background. Use Calendar.Colors.get() for the full list.\n colorId: 11\n };\n event = Calendar.Events.insert(event, calendarId);\n Logger.log('Event ID: ' + event.id);\n}", "function makeAuthTokenRequestInProgressEntry(oldEntry) {\n var inProgressAuthToken = {\n requestStatus: 1 /* IN_PROGRESS */,\n requestTime: Date.now()\n };\n return Object(tslib__WEBPACK_IMPORTED_MODULE_2__[\"__assign\"])(Object(tslib__WEBPACK_IMPORTED_MODULE_2__[\"__assign\"])({}, oldEntry), { authToken: inProgressAuthToken });\n}", "_request(request) {\n return request\n .set('X-Parse-Application-Id', this.applicationId)\n .set('X-Parse-Master-Key', this.masterKey)\n .set('Accept', 'application/json');\n }", "function parseEvent(request){\n\n var insightEvent;\n\n var headers = request.headers;\n\n //GIT event type as declared by GIT\n //var eventName = headers['x-github-event'];\n //var eventName = gitJson.webhookEvent\n\n\n var gitJson = request.body;\n console.log(request.body);\n //console.log(gitJson.issue.fields.priority);\n\n var currdate = new Date();\n //if(gitJson.issue == null) {\n //console.log(request.body);\n //return null;\n //}\n\n //Issues\n if(gitJson.webhookEvent === 'jira:issue_created'){\n var dateUpdated = new Date(gitJson.issue.fields.updated);\n var dateCreated = new Date(gitJson.issue.fields.created);\n //var labelArr = gitJson.issue.fields.labels;\n //var componentsArr = gitJson.issue.fields.components;\n var timeFromOpen = Math.abs(currdate - dateCreated);\n var timeFromUpdate = Math.abs(currdate - dateUpdated);\n var timeFromOpenHours = Math.ceil(timeFromOpen/ ( 1000*60*60 ));\n var timeFromUpdateHours = Math.ceil(timeFromUpdate/ ( 1000*60*60 ));\n\n\n insightEvent = {\n\n eventType: 'JIRAEvent',\n eventObject: 'Issue',\n eventName: 'Created',\n webhookEvent: gitJson.webhookEvent,\n\n issueKey: gitJson.issue.key,\n issueUrl: gitJson.issue.self,\n issueId: gitJson.issue.id,\n issueType: gitJson.issue.fields.issuetype.name,\n issueStatus: gitJson.issue.fields.status.statusCategory.name,\n issueDescription: gitJson.issue.fields.description,\n issueSummary: gitJson.issue.fields.summary,\n projectName: gitJson.issue.fields.project.name,\n priority: gitJson.issue.fields.priority.name,\n updated: gitJson.issue.fields.updated,\n created: gitJson.issue.fields.created,\n ... ((!Array.isArray(gitJson.issue.fields.components) || !gitJson.issue.fields.components.length || gitJson.issue.fields.components[0].name == undefined) ? {} : {component: gitJson.issue.fields.components[0].name}),\n ... ((gitJson.issue.fields.labels == undefined) ? {} : {label1: gitJson.issue.fields.labels[0]}),\n ... ((gitJson.issue.fields.labels == undefined) ? {} : {label2: gitJson.issue.fields.labels[0]}),\n ... ((gitJson.customfield_10623 == undefined) ? {} : {assignedGroup: gitJson.customfield_10623}),\n timeOpen: timeFromOpenHours,\n timesinceUpdate: timeFromUpdateHours\n }\n\n return insightEvent;\n }\n\n if(gitJson.webhookEvent === 'jira:issue_updated'){\n\n var dateUpdated = new Date(gitJson.issue.fields.updated);\n var dateCreated = new Date(gitJson.issue.fields.created);\n //var labelArr = gitJson.issue.fields.labels;\n //var componentsArr = gitJson.issue.fields.components;\n var timeFromOpen = Math.abs(currdate - dateCreated);\n var timeFromUpdate = Math.abs(currdate - dateUpdated);\n var timeFromOpenHours = Math.ceil(timeFromOpen/ ( 1000*60*60 ));\n var timeFromUpdateHours = Math.ceil(timeFromUpdate/ ( 1000*60*60 ));\n insightEvent = {\n\n eventType: 'JIRAEvent',\n eventObject: 'Issue',\n eventName: 'Updated',\n webhookEvent: gitJson.webhookEvent,\n\n issueKey: gitJson.issue.key,\n issueUrl: gitJson.issue.self,\n issueId: gitJson.issue.id,\n issueType: gitJson.issue.fields.issuetype.name,\n issueStatus: gitJson.issue.fields.status.name,\n issueDescription: gitJson.issue.fields.description,\n issueSummary: gitJson.issue.fields.summary,\n projectName: gitJson.issue.fields.project.name,\n priority: gitJson.issue.fields.priority.name,\n updated: gitJson.issue.fields.updated,\n created: gitJson.issue.fields.created,\n ... ((!Array.isArray(gitJson.issue.fields.components) || !gitJson.issue.fields.components.length || gitJson.issue.fields.components[0].name == undefined) ? {} : {component: gitJson.issue.fields.components[0].name}),\n ... ((gitJson.issue.fields.labels == undefined) ? {} : {label1: gitJson.issue.fields.labels[0]}),\n ... ((gitJson.issue.fields.labels == undefined) ? {} : {label2: gitJson.issue.fields.labels[0]}),\n ... ((gitJson.customfield_10623 == undefined) ? {} : {assignedGroup: gitJson.customfield_10623}),\n timeOpen: timeFromOpenHours,\n timesinceUpdate: timeFromUpdateHours\n\n }\n\n return insightEvent;\n }\n /*\n if(eventName === 'jira:issue_deleted'){\n\n insightEvent = {\n\n eventType: 'JIRAEvent',\n eventObject: 'Issue',\n eventName: 'Deleted',\n webhookEvent: gitJson.webhookEvent,\n\n issueKey: gitJson.issue.key,\n issueId: gitJson.issue.id,\n issueDescription: gitJson.issue.fields.description,\n projectName: gitJson.issue.fields.project.name\n\n }\n\n return insightEvent;\n }\n*/\n if(gitJson.webhookEvent === 'jira:worklog_updated'){\n\n insightEvent = {\n\n eventType: 'JIRAEvent',\n eventObject: 'Issue',\n eventName: 'Worklog Updated',\n webhookEvent: gitJson.webhookEvent,\n\n issueKey: gitJson.issue.key,\n issueId: gitJson.issue.id,\n issueDescription: gitJson.issue.fields.description,\n projectName: gitJson.issue.fields.project.name\n\n }\n\n return insightEvent;\n }\n/*\n //Comments\n //need to test\n if(eventName === 'comment_created'){\n\n insightEvent = {\n\n eventType: 'JIRAEvent',\n eventName: 'Comment Created',\n webhookEvent: gitJson.webhookEvent,\n\n issueKey: gitJson.issue.key,\n issueId: gitJson.issue.id,\n issueDescription: gitJson.issue.fields.description,\n issueProject: gitJson.issue.fields.project.name\n\n }\n\n return insightEvent;\n }\n\n if(eventName === 'comment_updated'){\n\n insightEvent = {\n\n eventType: 'JIRAEvent',\n eventName: 'Comment Updated',\n webhookEvent: gitJson.webhookEvent,\n\n issueKey: gitJson.issue.key,\n issueId: gitJson.issue.id,\n issueDescription: gitJson.issue.fields.description,\n issueProject: gitJson.issue.fields.project.name\n\n }\n\n return insightEvent;\n }\n\n\n //Sprints\n //webhook mentioned but details no references in API docs\n if(gitJson.webhookEvent === 'sprint_created'){\n\n insightEvent = {\n\n eventType: 'JIRAEvent',\n eventObject: 'Sprint',\n eventName: 'Created',\n webhookEvent: gitJson.webhookEvent,\n\n projectKey: gitJson.sprint.key,\n projectId: gitJson.sprint.id,\n projectDescription: gitJson.sprint.description,\n projectUrl: gitJson.sprint.name\n\n }\n\n return insightEvent;\n }\n\n //Boards\n //webhook mentioned but details no references in API docs\n if(gitJson.webhookEvent === 'board_created'){\n\n insightEvent = {\n\n eventType: 'JIRAEvent',\n eventObject: 'Board',\n eventName: 'Created',\n webhookEvent: gitJson.webhookEvent,\n\n projectKey: gitJson.board.key,\n projectId: gitJson.board.id,\n projectDescription: gitJson.board.description,\n projectUrl: gitJson.board.name\n\n }\n\n return insightEvent;\n }\n */\n\n //Projects\n\n if(gitJson.webhookEvent === 'project_created'){\n\n insightEvent = {\n\n eventType: 'JIRAEvent',\n eventObject: 'Project',\n eventName: 'Created',\n webhookEvent: gitJson.webhookEvent,\n\n projectKey: gitJson.project.key,\n projectId: gitJson.project.id,\n projectDescription: gitJson.project.description,\n projectUrl: gitJson.project.name\n\n }\n\n return insightEvent;\n }\n\n /*\n if(gitJson.webhookEvent === 'project_updated'){\n\n insightEvent = {\n\n eventType: 'JIRAEvent',\n eventObject: 'Project',\n eventName: 'Updated',\n webhookEvent: gitJson.webhookEvent,\n\n projectKey: gitJson.project.key,\n projectId: gitJson.project.id,\n projectUrl: gitJson.project.name\n\n }\n\n return insightEvent;\n }\n\n if(eventName === 'project_deleted'){\n\n insightEvent = {\n\n eventType: 'JIRAEvent',\n eventObject: 'Project',\n eventName: 'Deleted',\n webhookEvent: gitJson.webhookEvent,\n\n projectKey: gitJson.project.key,\n projectId: gitJson.project.id,\n projectDescription: gitJson.project.description,\n projectUrl: gitJson.project.name\n\n }\n\n return insightEvent;\n }\n */\n\n\n console.log( '---------------- EventName: ');\n\n insightEvent = {\n eventType:'JIRAEvent'\n }\n\n return insightEvent;\n}", "importEvent(event) {\n if (event.isValid()) {\n var startSlot = getTimeslot(event.start);\n var endSlot = getTimeslot(event.end);\n this.addSlots(startSlot, endSlot, event.id);\n }\n }", "constructor(eventMetadata) {\n this.id = Uuid();\n this.type = EventType.undefined;\n this.action = NullEventAction.undefined;\n let { createdAt = new Date().toISOString(), state } = eventMetadata, restParams = __rest(eventMetadata, [\"createdAt\", \"state\"]);\n if (createdAt instanceof Date) {\n this.createdAt = createdAt.toISOString(); // ISO 8601\n }\n else {\n this.createdAt = createdAt;\n }\n this.state = state;\n Object.assign(this, restParams);\n }", "async function addEvent(event) {\n let {name, description, image, start, end, color, creatorId, groupId} = event;\n assert.ok(color); assert.ok(creatorId); assert.ok(groupId); assert.ok(start); assert.ok(end);\n\n start = moment(start).toISOString(); end = moment(end).toISOString(); \n\n const eventId = await repository.addEvent({name, description, image, start, end, color, creatorId, groupId});\n\n const resourceId = await repository.addEventResource(eventId);\n\n //give join permission to members of group\n await resourceUsecase.addResourcePermissionToUserGroup({groupId, resourceId, permission: JOIN});\n\n //give update permission to creator of group\n const creatorGroup = await repository.getSoloGroupOfUser(creatorId);\n await resourceUsecase.addResourcePermissionToUserGroup({groupId: creatorGroup.id, resourceId, permission: UPDATE});\n }", "async createRequest(ctx, supplyRequestNumber, state, paid, itemId, amount, isInBudget) {\n console.info('============= START : Create SupplyRequest ===========');\n\n const supplyRequest = {\n state,\n docType: 'request',\n paid,\n itemId,\n amount,\n isInBudget\n };\n\n await ctx.stub.putState(supplyRequestNumber, Buffer.from(JSON.stringify(supplyRequest)));\n console.info('============= END : Create SupplyRequest ===========');\n }", "function makeAuthTokenRequestInProgressEntry(oldEntry) {\r\n var inProgressAuthToken = {\r\n requestStatus: 1 /* IN_PROGRESS */,\r\n requestTime: Date.now()\r\n };\r\n return Object(__WEBPACK_IMPORTED_MODULE_2_tslib__[\"__assign\"])(Object(__WEBPACK_IMPORTED_MODULE_2_tslib__[\"__assign\"])({}, oldEntry), { authToken: inProgressAuthToken });\r\n}", "function makeAuthTokenRequestInProgressEntry(oldEntry) {\r\n var inProgressAuthToken = {\r\n requestStatus: 1 /* IN_PROGRESS */,\r\n requestTime: Date.now()\r\n };\r\n return Object(__WEBPACK_IMPORTED_MODULE_2_tslib__[\"__assign\"])(Object(__WEBPACK_IMPORTED_MODULE_2_tslib__[\"__assign\"])({}, oldEntry), { authToken: inProgressAuthToken });\r\n}", "function addEvent(event) {\n // user should not be able to manually set these\n if (event.id) delete event.id;\n if (event.created_at) delete event.created_at;\n if (event.updated_at) delete event.updated_at;\n\n return knex('events')\n .insert(event)\n .returning('*');\n}", "function makeEvent(deploymentId, sourceId, sourceSequenceId, workbookName, dashboardName, projectName, eventKind, eventData) {\n if (!isValidEventKind(eventKind)) {\n throw new Error(`Not a valid event kind: ${eventKind}`);\n }\n let recordedAt = new Date().toISOString();\n projectName = ((typeof projectName === 'string' && projectName.length > 0) ? projectName : \"Default\" );\n return {\n deploymentId,\n sourceId,\n sourceSequenceId: sourceSequenceId.toString(),\n recordedAt,\n\n workbookName: workbookName,\n dashboardName: dashboardName,\n projectName,\n\n kind: eventKind,\n data: eventData,\n\n }\n }", "function isSentryRequest(url) {\n var _a;\n var dsn = (_a = core_1.getCurrentHub()\n .getClient()) === null || _a === void 0 ? void 0 : _a.getDsn();\n return dsn ? url.includes(dsn.host) : false;\n}", "configureRequest(request) {\n const { ignoreUrlPatterns = [] } = this.injector.settings.logger;\n const minimalInfo = this.minimalRequestPicker(request);\n const requestObj = this.requestToObject(request);\n request.log = new mvc_1.RequestLogger(this.injector.logger, {\n id: request.ctx.id,\n startDate: request.ctx.dateStart,\n url: request.originalUrl || request.url,\n ignoreUrlPatterns,\n minimalRequestPicker: (obj) => (Object.assign({}, minimalInfo, obj)),\n completeRequestPicker: (obj) => (Object.assign({}, requestObj, obj))\n });\n }", "function WrappedRequest(msg, hdrs, req) {\n this._msg = msg;\n this.headers = hdrs || {};\n this.request = req || {};\n}", "function makeAuthTokenRequestInProgressEntry(oldEntry) {\n var inProgressAuthToken = {\n requestStatus: 1\n /* IN_PROGRESS */\n ,\n requestTime: Date.now()\n };\n return Object(tslib__WEBPACK_IMPORTED_MODULE_1__[\"__assign\"])({}, oldEntry, {\n authToken: inProgressAuthToken\n });\n}", "function addEventToGroup(request, response) {\n\n var data = request.params;\n if (!(data && data.group_id && data.event_id && data.app_id)) {\n console.error('Invalid request received. Missing group or app id');\n response.error('Invalid request received. Missing group or app id');\n return;\n }\n\n\n\n} //end addEventToGroup", "function req(data) {\n return new _Request2.default({\n data: data,\n headers: store.getState().core.auth.requestHeaders\n });\n}", "function makeAuthTokenRequestInProgressEntry(oldEntry) {\n var inProgressAuthToken = {\n requestStatus: 1 /* IN_PROGRESS */,\n requestTime: Date.now()\n };\n return (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_4__.__assign)({}, oldEntry), { authToken: inProgressAuthToken });\n}", "function newEvent(request, response){\n var contextData = {\n 'allowedDateInfo': allowedDateInfo\n };\n response.render('create-event.html', contextData);\n}", "function newEvent(request, response){\n var contextData = {\n 'allowedDateInfo': allowedDateInfo\n };\n response.render('create-event.html', contextData);\n}", "getEvent(sketchId, searchindexId, eventId) {\n let params = {\n params: {\n searchindex_id: searchindexId,\n event_id: eventId,\n },\n }\n return RestApiClient.get('/sketches/' + sketchId + '/event/', params)\n }", "function postEvent(event, eventdesc) {\n return $.ajax({\n type: 'POST',\n url: '/api/update/event',\n data: {\n userid: userid,\n event: event,\n eventdesc: eventdesc\n },\n dataType: 'json',\n error: function(err) {\n console.log(err.responseText);\n }\n });\n}", "create(Event) {\n let sqlRequest = \"INSERT into event (type, actorId, created_at) \" +\n \"VALUES ($type, $actorId, $created_at)\";\n let sqlParams = {\n $type: Event.type,\n $actorId: Event.actorId,\n $created_at: Event.created_at\n };\n return this.common.run(sqlRequest, sqlParams);\n }", "function messageListener(event) {\n if (event.type === EVENT_REQUEST) {\n const storage = new Storage(event.id, process);\n\n Promise.resolve()\n .then(() => storage.getRequest())\n .then(requestEvent => new Promise(resolve => {\n lambdaHandler(requestEvent, {}, (error, response = {}) => {\n const responseEvent = new ResponseEvent;\n\n if (error) {\n responseEvent.statusCode = 500;\n responseEvent.body = error.body || error + '';\n } else {\n Object.assign(responseEvent, response);\n }\n\n resolve(responseEvent);\n });\n }))\n .then(responseEvent => storage.setResponse(responseEvent))\n .then(() => process.send({ type: EVENT_RESPONSE, id: event.id }));\n }\n}", "function createEvent() { \n \n var event = {\n 'summary': 'Google I/O 2015',\n 'location': '800 Howard St., San Francisco, CA 94103',\n 'description': 'A chance to hear more about Google\\'s developer products.',\n 'start': {\n 'dateTime': '2015-05-28T09:00:00-07:00',\n 'timeZone': 'America/Los_Angeles'\n },\n 'end': {\n 'dateTime': '2015-05-28T09:00:00-08:00',\n 'timeZone': 'America/Los_Angeles'\n }\n \n };\n\n var request = gapi.client.calendar.events.insert({\n 'calendarId': 'primary',\n 'resource': event\n });\n\n request.execute(function (event) {\n console.log('Event created.');\n });\n }", "function saveEvent(request, response){\n // console.log(\"In saveEvent\");\n // for (var item in request.body)\n // if(request.body.hasOwnProperty(item)){\n // console.log(item + \" = \" + request.body[item]);\n // }\n \n var contextData = {\n errors: [],\n allowedDateInfo: allowedDateInfo\n };\n var year = parseInt(request.body.year);\n var month = parseInt(request.body.month);\n var day = parseInt(request.body.day);\n var hour = parseInt(request.body.hour);\n var minute = parseInt(request.body.minute);\n \n if (validator.isLength(request.body.title, 1, 50) === false) {\n contextData.errors.push('Your title should be between 1 and 50 letters.');\n }\n if (validator.isLength(request.body.location, 1, 50) === false) {\n contextData.errors.push('Your event\\'s location should be between 1 and 50 letters.');\n }\n if (isNaN(year)) {\n contextData.errors.push('Your event\\'s year is not an integer.');\n } else if (year < 2015 || year > 2016) {\n contextData.errors.push('Your event\\'s year is out of range.');\n }\n if (isNaN(month) || month < 0 || month > 11) {\n contextData.errors.push('Your event\\'s month is not acceptable.');\n }\n if (isNaN(day) || day < 1 || day > 31) {\n contextData.errors.push('Your event\\'s day is not acceptable.');\n }\n if (isNaN(hour) || hour < 0 || hour > 23) {\n contextData.errors.push('Your event\\'s hour is not acceptable.');\n }\n if (validator.matches(request.body.image, /http(s?):\\/\\/([a-z0-9.\\/\\?=\\-_]+)(.gif|.png)/i) === false) {\n contextData.errors.push('Your image url is not valid. '+request.body.image);\n }\n\n\n if (contextData.errors.length === 0) {\n var newid = parseInt(events.nextId());\n var date = new Date(year, month, day, hour, minute, 0,0);\n var datestr = date.toDateString();\n var newEvent = {\n id: newid,\n title: request.body.title,\n location: request.body.location,\n image: request.body.image,\n date:datestr,\n attending: []\n };\n events.addEvent(newEvent, function(err, result){\n if (err) {\n contextData.errors.push(err);\n response.render('create-event.html', contextData);\n } else {\n response.redirect('/events/'+newid);\n }\n });\n \n }else{\n response.render('create-event.html', contextData);\n }\n}", "function splitEvent(event) {\n /*\n let captureGroups = event.match(URIREGEX);\n if (!captureGroups) {\n return {}; //leave immediately if\n }\n return {\n service: captureGroups[1].toLowerCase(),\n resource: captureGroups[2].toLowerCase(),\n element: captureGroups[3]\n }\n */\n if (event.lastIndexOf(\"#\") !== -1) {\n event = event.substring(0, event.lastIndexOf(\"#\"));\n }\n if (event.indexOf(\"?\") !== -1) {\n event = event.substring(0, event.lastIndexOf(\"?\"));\n }\n if (event.charAt(0) === \"/\") {\n event = event.substring(1);\n }\n var eventParts = event.split(\"/\");\n var service;\n var resource;\n var element;\n if (eventParts.length >= 1) {\n service = eventParts[0].toLowerCase();\n }\n if (eventParts.length >= 2) {\n resource = eventParts[1].toLowerCase();\n }\n if (eventParts.length >= 3) {\n element = eventParts[2].toLowerCase();\n }\n return {\n element: element,\n resource: resource,\n service: service\n };\n}", "function userGridEventFromData(postedEvent) {\n \n var result = {\n \n type: 'events-sts',\n\n //\n // Note: the property names on the left here are the fields in the\n // database. They must match the '.get(name)' names in the\n // 'eventFromUserGridEvent()' function.\n // The names on the right side must match the properties of the\n // event model in the Angular model (ng-events.js).\n //\n\n owner: postedEvent.owner,\n event_name: postedEvent.name,\n description: postedEvent.description,\n address: postedEvent.address,\n start_date: postedEvent.startDate,\n end_date: postedEvent.endDate,\n timezone_offset: postedEvent.timezoneOffset,\n checkin_period_start_mins: postedEvent.checkinPeriodStartTimeMins,\n website: postedEvent.website,\n inactive_ind: postedEvent.inactiveInd \n\n };\n\n if (!postedEvent.uuid) {\n\n //\n // Must create a unique value for 'name' according to the UG docs:\n // http://apigee.com/docs/usergrid/content/data-model\n //\n // It has some restrictions as far as allowed characters, which apparently\n // are undocumented. Let's use MD5 to be safe.\n //\n result.name = 'name' + globalFunctions.md5Encode(postedEvent.owner + postedEvent.name + new Date());\n \n } else {\n\n result.uuid = postedEvent.uuid;\n\n }\n\n return result;\n\n}", "async function prepareReplayEvent({\n client,\n scope,\n replayId: event_id,\n event,\n }\n\n ) {\n const integrations =\n typeof client._integrations === 'object' && client._integrations !== null && !Array.isArray(client._integrations)\n ? Object.keys(client._integrations)\n : undefined;\n const preparedEvent = (await prepareEvent(\n client.getOptions(),\n event,\n { event_id, integrations },\n scope,\n )) ;\n\n // If e.g. a global event processor returned null\n if (!preparedEvent) {\n return null;\n }\n\n // This normally happens in browser client \"_prepareEvent\"\n // but since we do not use this private method from the client, but rather the plain import\n // we need to do this manually.\n preparedEvent.platform = preparedEvent.platform || 'javascript';\n\n // extract the SDK name because `client._prepareEvent` doesn't add it to the event\n const metadata = client.getSdkMetadata && client.getSdkMetadata();\n const { name, version } = (metadata && metadata.sdk) || {};\n\n preparedEvent.sdk = {\n ...preparedEvent.sdk,\n name: name || 'sentry.javascript.unknown',\n version: version || '0.0.0',\n };\n\n return preparedEvent;\n }", "function makeRequest() {\n var request = gapi.client.calendar.events.list({\n 'calendarId': 'googleCalendarId',\n 'singleEvents': true, /* required to use timeMin */ \n 'timeMin': timeNow.toJSON(),\n });\n \n request.then(function(response) {\n // console.log(response.result.items[0]);\n address = response.result.items[0].location;\n appendResults(JSON.stringify(response.result.items[0], null, 2));\n }, function(reason) {\n console.log('Error: ' + reason.result.error.message);\n });\n}", "newEvent(event) {\n\t\tthis._coordinator.newEvent(event);\n\t}", "ensureEvent (event) {\n if (Object.getPrototypeOf(event.constructor).name !== 'Event') {\n throw new Error(`Your event \"${event.constructor.name}\" must extend the \"Event\" utility`)\n }\n }", "function SummonerRequest(region, accountId)\n{\n this.region = region;\n this.accountId = accountId;\n}", "static request(method, url, config = {}) {\n return Request.make(method, url, config);\n }", "$requestFactory(url, config, requestFunction) {\r\n return requestFunction(url, config)\r\n .then(r => this.$responseHandler(r))\r\n .catch(e => this.$errorHandler(e, url, config, requestFunction));\r\n }", "function TChannelIncomingRequest(id, options) {\n if (!(this instanceof TChannelIncomingRequest)) {\n return new TChannelIncomingRequest(id, options);\n }\n options = options || {};\n var self = this;\n EventEmitter.call(self);\n self.id = id || 0;\n self.ttl = options.ttl || 0;\n self.tracing = options.tracing || null;\n self.service = options.service || '';\n self.remoteAddr = null;\n self.headers = options.headers || {};\n self.checksumType = options.checksumType || 0;\n self.arg1 = options.arg1 || emptyBuffer;\n self.arg2 = options.arg2 || emptyBuffer;\n self.arg3 = options.arg3 || emptyBuffer;\n}", "function createEvent(event) {\n var options = {};\n options.data = {};\n var time = event.start.format('YYYY-MM-DD h:mm:ss a');\n options.data.startTime = time;\n //var time1=event.end.format('h:mm:ss a')\n var time1 = event.end.format('YYYY-MM-DD h:mm:ss a')\n options.data.endTime = time1;\n var time2 = event.start.format('YYYY-MM-DD h:mm:ss a');\n options.data.startDate = time2;\n var time3 = event.end.format('YYYY-MM-DD h:mm:ss a')\n options.data.endDate = time3;\n options.data.idBlock = event.parentBlock;\n options.data.inTransmission = false;\n options.data.type_id = event.idRef;\n options.data.type_publication = event.type;\n options.method = 'POST';\n options.url = Routing.generate('publication_create');\n options.errorcallback = function (error) {\n console.log(error);\n }\n options.successcallback = function (data) {\n if (event.publicationId != '')\n return true;\n else {\n var id = JSON.parse(data);\n event.publicationId = id;\n }\n };\n ajaxAccess(options);\n}", "function parseEvent(logEvent, logGroupName, logStreamName) {\n console.log(\"logEvent: \" + JSON.stringify(logEvent));\n return {\n // remove '\\n' character at the end of the event\n message: logEvent.message.trim(),\n logGroupName: logGroupName,\n logStreamName: logStreamName,\n timestamp: new Date(logEvent.timestamp).toISOString()\n };\n }", "function getArgsFrom(request) {\n var r = request || {};\n var args = _.assign({}, r.params, r.query);\n args.body = r.body;\n args.fromto = getDateRangeFrom(r);\n return args;\n}", "function IEGAPRequest(source, transaction, deferred) {\n this._el = {};\n this.source = source;\n this.transaction = transaction;\n this.readyState = \"pending\";\n var thiz = this;\n var eventTargetProp = { get: function () { return thiz; } };\n deferred(function (e, result) {\n thiz.result = result;\n Object.defineProperty(e, \"target\", eventTargetProp);\n thiz.readyState = \"done\";\n thiz.dispatchEvent(e);\n }, function (e, err) {\n thiz.error = err || e.target.error;\n Object.defineProperty(e, \"target\", eventTargetProp);\n thiz.readyState = \"done\";\n if (e.type != \"error\") {\n Object.defineProperty(e, \"type\", { get: function() { return \"error\"; } });\n }\n thiz.dispatchEvent(e);\n }, this);\n }", "function prepareEvent(\n options,\n event,\n hint,\n scope,\n) {\n const { normalizeDepth = 3, normalizeMaxBreadth = 1000 } = options;\n const prepared = {\n ...event,\n event_id: event.event_id || hint.event_id || uuid4(),\n timestamp: event.timestamp || dateTimestampInSeconds(),\n };\n const integrations = hint.integrations || options.integrations.map(i => i.name);\n\n applyClientOptions(prepared, options);\n applyIntegrationsMetadata(prepared, integrations);\n\n // Only put debug IDs onto frames for error events.\n if (event.type === undefined) {\n applyDebugIds(prepared, options.stackParser);\n }\n\n // If we have scope given to us, use it as the base for further modifications.\n // This allows us to prevent unnecessary copying of data if `captureContext` is not provided.\n let finalScope = scope;\n if (hint.captureContext) {\n finalScope = Scope.clone(finalScope).update(hint.captureContext);\n }\n\n // We prepare the result here with a resolved Event.\n let result = resolvedSyncPromise(prepared);\n\n // This should be the last thing called, since we want that\n // {@link Hub.addEventProcessor} gets the finished prepared event.\n //\n // We need to check for the existence of `finalScope.getAttachments`\n // because `getAttachments` can be undefined if users are using an older version\n // of `@sentry/core` that does not have the `getAttachments` method.\n // See: https://github.com/getsentry/sentry-javascript/issues/5229\n if (finalScope) {\n // Collect attachments from the hint and scope\n if (finalScope.getAttachments) {\n const attachments = [...(hint.attachments || []), ...finalScope.getAttachments()];\n\n if (attachments.length) {\n hint.attachments = attachments;\n }\n }\n\n // In case we have a hub we reassign it.\n result = finalScope.applyToEvent(prepared, hint);\n }\n\n return result.then(evt => {\n if (evt) {\n // We apply the debug_meta field only after all event processors have ran, so that if any event processors modified\n // file names (e.g.the RewriteFrames integration) the filename -> debug ID relationship isn't destroyed.\n // This should not cause any PII issues, since we're only moving data that is already on the event and not adding\n // any new data\n applyDebugMeta(evt);\n }\n\n if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {\n return normalizeEvent(evt, normalizeDepth, normalizeMaxBreadth);\n }\n return evt;\n });\n}", "function _new() {\n var request = new service.datasource();\n request.date = new Date();\n request.details = [{}];\n request.attachments = [];\n return request;\n }", "function Event(event) {\n\t\t// copy of event\n\t\tthis.origin = event;\t// pointer\n\n\t\t/*\n\t\t * PRIVATE\n\t\t * set type of this event\n\t\t * return 'normal'/'all'/'over'\n\t\t */\n\t\tvar setType = function() {\n\t\t\tif (event != null) {\t\t\t\t\n\t\t\t\tvar startDate = event.start.dateTime.getDate();\n\t\t\t\tvar endDate = event.end.dateTime.getDate();\n\t\t\t\n\t\t\t\tvar startHour = event.start.dateTime.getHours();\n\t\t\t\tvar startMin = event.start.dateTime.getMinutes();\n\t\t\t\tvar startSec = event.start.dateTime.getSeconds();\n\t\t\t\t\n\t\t\t\tvar endHour = event.end.dateTime.getHours();\n\t\t\t\tvar endMin = event.end.dateTime.getMinutes();\n\t\t\t\tvar endSec = event.end.dateTime.getSeconds();\n\t\t\t\n\t\t\t\t// check 'all'\n\t\t\t\tif (startDate == endDate && startHour == 0 && startMin == 0\n\t\t\t\t\t&& startSec == 0 && endHour == 23 && endMin == 59\n\t\t\t\t\t&& endSec == 59) {\n\t\t\t\t\treturn \"all\";\n\t\t\t\t}\n\t\t\t\t// check 'over'\n\t\t\t\telse if (!isNormal(event.start, event.end)) {\n\t\t\t\t\treturn \"over\";\n\t\t\t\t}\n\t\t\t\t// check 'normal'\n\t\t\t\telse {\n\t\t\t\t\treturn \"normal\";\n\t\t\t\t}\n\t\t\t} else return null;\n\t\t};\n\t\t\n\t\t/* \n\t\t * PRIVATE\n\t\t * set color\n\t\t */\n\t\tvar setColor = function() {\n\t\t\tif (event.colorId == null) {\n\t\t\t\treturn $rootScope.eventColor[0];\n\t\t\t} else {\n\t\t\t\treturn $rootScope.eventColor[event.colorId];\n\t\t\t}\n\t\t};\n\t\t\n\t\t// type of this event\n\t\t// \"normal\" / \"all\"/ \"over\"\n\t\tthis.type = setType();\n\t\t\n\t\tthis.color = setColor();\n\t}", "function _isSentryRequest(url) {\n const client = getCurrentHub().getClient();\n const dsn = client && client.getDsn();\n return dsn ? url.includes(dsn.host) : false;\n }", "postNewEvent(eventObj) {\n axios({\n method: 'post',\n url: 'http://localhost:3005/event?',\n data: eventObj,\n headers: { 'x-access-token': localStorage.getItem('jwt_token') },\n }).then((response) => {this.getEvents({houseId: this.state.currentHouseId});\n }).catch((response) => {console.log('postNewEvent() failed.');\n });\n }", "function createEvent(eventData) {\n // First create resource that will be send to server.\n var resource = {\n 'summary': eventData.eventTitle,\n 'start': {\n 'dateTime': new Date(eventData.date + ' ' + eventData.startTime).toISOString()\n },\n 'end': {\n 'dateTime': new Date(eventData.date + ' ' + eventData.endTime).toISOString()\n },\n };\n // create the request\n var request = gapi.client.calendar.events.insert({\n 'calendarId': 'primary',\n 'resource': resource\n });\n\n // execute the request\n request.execute(function(resp) {\n var linkToEvent = 'Event created: <a href=\"' + resp.htmlLink + '\">link to event</a>';\n console.log(\"Inside linkToEvent ...\" + linkToEvent);\n document.getElementsByClassName('event-created')[0].innerHTML = linkToEvent;\n });\n}" ]
[ "0.7694293", "0.75287384", "0.72529215", "0.62983173", "0.55627215", "0.54582804", "0.54518145", "0.54089904", "0.5289575", "0.5289575", "0.5101973", "0.5093179", "0.5090165", "0.5089448", "0.50581914", "0.5022951", "0.4989387", "0.4986277", "0.4977421", "0.49507356", "0.49383536", "0.4906426", "0.48640817", "0.4859283", "0.48501223", "0.48396626", "0.48146483", "0.48088008", "0.47995645", "0.47905076", "0.47672215", "0.47670063", "0.4742673", "0.46734023", "0.46726152", "0.4671279", "0.46647373", "0.4660302", "0.46333185", "0.46253031", "0.45964494", "0.45779583", "0.45779362", "0.45705807", "0.456851", "0.456357", "0.45627147", "0.45542252", "0.45493665", "0.45490324", "0.45475492", "0.45416015", "0.4540685", "0.45336816", "0.45182526", "0.45131907", "0.4502948", "0.44987863", "0.44951406", "0.4477739", "0.4476055", "0.44528812", "0.44528812", "0.4449169", "0.44448242", "0.4436631", "0.44352272", "0.44334385", "0.4431244", "0.44240522", "0.4422589", "0.4398998", "0.4392631", "0.4392631", "0.43816626", "0.43771583", "0.4370698", "0.43645364", "0.43640587", "0.4355255", "0.4349658", "0.4334647", "0.43228167", "0.43171015", "0.43046576", "0.43020535", "0.4295168", "0.4291504", "0.4290818", "0.42824775", "0.42813313", "0.42779124", "0.4271675", "0.4258801", "0.42576692", "0.42543674", "0.42486373", "0.42480236", "0.42459574", "0.4244088" ]
0.75170493
2
Create a new instance of API
function API(dsn) { this.dsn = dsn; this._dsnObject = new dsn_Dsn(dsn); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createInstance() {\n return axios.create(getInstanceOptions());\n }", "constructor (api) { this.api = api }", "constructor (api) { this.api = api }", "constructor (api) { this.api = api }", "constructor(api) {\n this.api = api;\n }", "constructor (api) {\n let self = this\n\n // save API reference object\n self.api = api\n }", "function createInstance(baseURL){\n return axios.create({\n baseURL,\n headers: {\n 'Content-Type': 'application/json',\n }\n });\n}", "constructor(api) {\r\n this._api = api;\r\n }", "createAPI(data) {\n return null;\n }", "constructor(config) {\n this.configureApi(config);\n }", "function API(){}", "function API(){}", "function createResource () {\n const instance = axios.create({\n baseURL: '/api/',\n headers: {\n Accept: 'application/json',\n 'Content-Type': 'application/json'\n }\n })\n\n instance.interceptors.request.use(config => {\n // for intercept request or header request\n // const cookie = new Cookie()\n // const token = cookie.get(AUTHENTICATION.TOKEN_NAME)\n\n // if (token) {\n // config.headers.Authorization = `Bearer ${token}`\n // }\n\n return config\n }, error => {\n return Promise.reject(error)\n })\n\n instance.interceptors.response.use(response => {\n return Promise.resolve(response)\n }, error => {\n return handler(error)\n })\n\n return instance\n}", "created() {\n this.api = create({\n baseURL: this.settings.url\n });\n }", "function ApiClient() {\n\n}", "static create(params) {\n return {type: `${this.prefix}${this.name}`, _instance: new this(params)}; //eslint-disable-line\n }", "constructor(){\n\t\t//console.log('API START');\n\t}", "async function createApiManagerInstance(assetId, version, groupId) {\n const posting = `{\"endpoint\": { \"type\": \"rest-api\", \"uri\": \"http://google.com\", \"proxyUri\": null, \"muleVersion4OrAbove\": true, \"isCloudHub\": false }, \"instanceLabel\": \"${assetId}\",\"spec\": { \"assetId\": \"${assetId}\", \"version\": \"${version}\", \"groupId\": \"${groupId}\" }}`;\n const token = await getToken();\n const orgId = await getOrganizationId(token);\n const envId = await getDefaultEnvironmentId(token);\n const options = {\n method: 'POST',\n uri: `https://anypoint.mulesoft.com/apimanager/api/v1/organizations/${orgId}/environments/${envId}/apis`,\n // proxy: 'http://proxy.corp.fin:8080',\n body: JSON.parse(posting),\n headers: { Authorization: `bearer ${token}`, 'Content-Type': 'application/json' },\n json: true,\n };\n\n const data = await request(options)\n .then(response => response)\n .catch(err => err);\n\n return data.id;\n}", "constructor() {\n\t\tconsole.log(ApiService);\n\t\tthis.api = new ApiService();\n\t}", "constructor(Vonage) {\n this.api = Vonage;\n }", "static create () {}", "static init() {\n API.axiosInstance = axios.create({\n baseURL: Env.apiUrl,\n });\n }", "function APIObject(aManifest) {\n this._init(aManifest);\n}", "constructor(options) {\n\n // defaults\n this.clientToken = \"\";\n\n // override defaults\n Object.assign(this, options);\n\n this.client = ApiAi(this.clientToken);\n }", "constructor(api, handleGameStart) {\n this.api = api;\n this.handleGameStart = handleGameStart;\n }", "function Api() {\n _classCallCheck(this, Api);\n\n this.express = (0, _express2.default)();\n this.middleware();\n this.routes();\n this.generateDb();\n }", "function create() {\n return new Response();\n}", "function Api(){\n}", "constructor(url) {\n this.API_URL = url\n }", "function AirplaneFactory2(name, prodYear, amount) {\n const apfAPI = {\n introduce() {\n console.log(\n `The ${name} was made on ${prodYear} and there are ${amount} of them available today`\n );\n },\n };\n return apfAPI;\n}", "constructor(apiEndpoint = null) {\n HttpHelper.apiEndpoint = apiEndpoint;\n\n this._auth = new Auth();\n this._accounts = new Accounts();\n this._products = new Products();\n this._deviceGroups = new DeviceGroups();\n this._devices = new Devices();\n this._deployments = new Deployments();\n this._logStreams = new LogStreams();\n this._webhooks = new Webhooks();\n }", "function Api() {\n \n //Calls the endpoint and returns the body.\n function fetch(endpoint) {\n //Avoid wrong input.\n url = (url.startsWith('http')) ? url : 'http://'+url;\n url = (url.endsWith('/')) ? url : url += '/';\n endpoint = (endpoint.startsWith('/')) ? endpoint.replace('/', '') : endpoint;\n const finUrl = url + endpoint;\n \n // To not break any existing scripts using pre-options syntax\n if (arguments.length === 3) {\n const options = arguments[1];\n const cb = arguments[2];\n const headers = (options[\"headers\"]) ? options[\"headers\"] : {};\n } else if (arguments.length === 2) {\n const cb = arguments[1];\n const headers = {};\n } else {\n const cb = function(){};\n const headers = {};\n }\n\n //TODO: If data has been preloaded or downloaded before, load the already downloaded data.\n \n request({\n url: finUrl,\n headers: headers\n }, function(error, response, body) {\n //Error cases\n if(error) cb(error);\n else if(response && response.statusCode == 400) cb('400 returned.');\n //TODO: Add more error cases (no body, error statusCodes, ...)\n else cb(undefined, body);\n })\n }\n\n //Set object methods with this\n this.fetch = fetch;\n}", "async connect() {\n const _alice = '//Alice';\n const _bob = '//Bob';\n const _charlie = '//Charlie';\n const _dave = '//Dave';\n if (!self.api) {\n self.api = await ApiPromise.create({\n provider: self.wsProvider,\n types: {\n Address: 'MultiAddress',\n LookupSource: 'MultiAddress',\n },\n });\n }\n if (!self.myself) {\n self.myself = self.keyring.addFromUri(_alice);\n self.alice = self.keyring.addFromUri(_alice);\n self.bob = self.keyring.addFromUri(_bob);\n self.charlie = self.keyring.addFromUri(_charlie);\n self.dave = self.keyring.addFromUri(_dave);\n }\n return self.api;\n }", "function Api() {\n _classCallCheck(this, Api);\n\n this.express = (0, _express2.default)();\n this.middleware();\n this.routes();\n }", "function _createInstance(instance) {\n return Object.assign({\n id: app.id('i'),\n name: 'New',\n active: true,\n pending: 0,\n original: null,\n code: '',\n dirty: false,\n connections: [],\n connection: null,\n created: new Date().getTime()\n }, instance);\n }", "create() {}", "create() {}", "function createLocalAPIClient() {\r\n\t\t\tvar idata = Class.interfaceDataOf(appClass,ILocalAPIImports);\r\n\t\t\tvar importTable = null;\r\n\t\t\tif (idata != null) importTable = idata.get();\r\n\t\t\treturn new LocalAPIClient(importTable,apiHubs);\r\n\t\t}", "async create({ request, response, view }) {}", "async create ({ request, response, view }) {\n }", "async create ({ request, response, view }) {\n }", "async create ({ request, response, view }) {\n }", "async create ({ request, response, view }) {\n }", "async create ({ request, response, view }) {\n }", "async create ({ request, response, view }) {\n }", "async create ({ request, response, view }) {\n }", "async _createApi(pingStore) {\n const app = new Koa();\n\n // Make the ping store available to the routes.\n app.context.pingStore = pingStore;\n\n app.use(koaLogger());\n\n // Set up the router middleware.\n app.use(router.routes());\n app.use(router.allowedMethods());\n\n // Start and wait until the server is up and then return it.\n return await new Promise((resolve, reject) => {\n const server = app.listen(this._port, (err) => {\n if (err) reject(err);\n else resolve(server);\n });\n\n // Add a promisified close method to the server.\n server.closeAsync = () => new Promise((resolve) => {\n server.close(() => resolve());\n });\n });\n }", "create(puppy) {\n return http.post('/newPuppy', puppy);\n }", "async createNewInstance() {\n const adapters = this.processAdapters();\n const datastores = this.api.config.models.datastores;\n const models = await this.loadModels();\n\n const ormStart = promisify(Waterline.start);\n\n this.waterline = await ormStart({\n adapters,\n datastores,\n models,\n });\n }", "create () {}", "create () {}", "constructor() {\n this.client = axios.create({\n baseURL: constants.api.url\n });\n }", "static async crearGuion(payload){\n\n\t\tlet bot = new BotService()\n\t\tObject.assign(bot,payload)\n\t\tawait bot.save()\n\t\treturn bot\n\n\t}", "function _createAPIInput() {\n this.skipButtonMod.setTransform(Transform.translate(0, 200, 0));\n this.skipButtonMod.setOpacity(0);\n this.titleSurf.setContent('');\n \n this.apiInput = new InputSurface({\n size: [300, 50]\n });\n \n this.apiMod = new Modifier({\n origin: [0.5, 0.6]\n });\n \n this.labelSurface = new Surface({\n size: [300, 50],\n classes: ['api'],\n content: '<p>Please enter your Asana API Key.</p>'\n });\n \n this.labelMod = new Modifier({\n origin: [0.5, 0.5]\n });\n \n this.syncButtonMod.setTransform(Transform.translate(0, 100, 0), {duration: 300}, function() {\n this.apiMod.setTransform(Transform.translate(0, -200, 0), {duration: 300}, function() {});\n this.labelMod.setTransform(Transform.translate(0, -200, 0), {duration: 300}, function() {});\n this.syncButtonMod.setTransform(Transform.translate(0, -100, 0), {duration: 300}, function() {});\n }.bind(this));\n \n this._add(this.labelMod).add(this.labelSurface);\n this._add(this.apiMod).add(this.apiInput); \n\n}", "function createHttpClient() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n options.baseURL = 'https://api.mollie.com:443/v2/';\n options.headers = Object.assign({}, options.headers, {\n Authorization: \"Bearer \".concat(options.apiKey),\n 'Accept-Encoding': 'gzip',\n 'Content-Type': 'application/json',\n 'User-Agent': \"node.js/\".concat(process.version),\n 'X-Mollie-User-Agent': \"mollie/\".concat(version)\n });\n options.httpsAgent = new https.Agent({\n cert: cert\n });\n options.paramsSerializer = options.paramsSerializer || qs.stringify;\n return axios.create(options);\n}", "async create (req, res) {\n throw new Error('create: Implementation Missing!')\n }", "function initialize(publicAPI, model) {}", "function createHttpClient() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n options.baseURL = 'https://api.mollie.com:443/v1/';\n\n options.headers = Object.assign({}, options.headers, {\n Authorization: 'Bearer ' + options.apiKey,\n 'Accept-Encoding': 'gzip',\n 'Content-Type': 'application/vnd.mollie.api.v1+json',\n 'User-Agent': 'node.js/' + process.version,\n 'X-Mollie-User-Agent': 'mollie/' + version\n });\n\n options.httpsAgent = new https.Agent({\n cert: fs.readFileSync(path.resolve(__dirname, cert))\n });\n\n options.paramsSerializer = options.paramsSerializer || qs.stringify;\n\n return axios.create(options);\n}", "function getPublicApi() {\n return {\n\n };\n }", "static async build(url) {\n let resp = await fetch(url + \"/v1/parameters\");\n let params = await resp.text();\n let client = new Client(url, params, module);\n return client;\n }", "function createRequest() {\n return axios.create({\n baseURL: `${environment.BASE_URL}`,\n headers: getBearerTokenHeader()\n });\n}", "function APIClass() {\n\t// Config\n\tthis.api_url_base = \"http://\" + window.location.hostname + \":\";\n\tthis.default_config = new Config(PORT.ORCHESTRATOR, CONTENT_TYPE.NONE, METHOD.GET);\n\n\n\t/**\n\t * Open HTTP Request\n\t * @param api_config\n\t * @param uri\n\t * @returns {XMLHttpRequest}\n\t */\n\tthis.open_request = function(api_config, uri) {\n\t\tlet url = this.api_url_base + api_config.port + uri;\n\t\tconsole.log(\"[API] [\" + api_config.method + \"] \" + url);\n\n\t\tlet http = new XMLHttpRequest();\n\t\thttp.open(api_config.method, url, true);\n\t\tif(api_config.contentType !== CONTENT_TYPE.NONE) {\n\t\t\thttp.setRequestHeader(\"Content-Type\", api_config.contentType);\n\t\t}\n\t\thttp.setRequestHeader(\"Authorization\", \"Basic \" + window.localStorage.getItem(\"defpi_token\"));\n\t\treturn http;\n\t};\n\n\t/**\n\t * Send method for API request\n\t * @param {object}\t\t\t\tapi_config\n\t * @param {string} \t\turi\n\t * @param {object} \t\tdata\n\t * @param {function} \t\tcallback\n\t * @param {function(number)} error\n\t */\n\tthis.send = function(api_config, uri, data, callback, error) {\n\t\tif(api_config === null) api_config = this.default_config;\n\n\t\tlet http = this.open_request(api_config, uri);\n\t\thttp.onreadystatechange = function() {\n\t\t\tif(http.readyState === http.DONE ) {\n\t\t\t\tif (http.status >= 200 && http.status <= 207) {\n\t\t\t\t\tif (this.getResponseHeader(\"Content-Type\") === \"application/javascript\" || this.getResponseHeader(\"Content-Type\") === \"application/json\") {\n\t\t\t\t\t\tlet response = JSON.parse(http.response);\n\t\t\t\t\t\tcallback(response);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcallback(http.response);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tconsole.error(\"[Api] HTTP CODE: \" + http.status);\n\t\t\t\t\tif(error != null) { error(http.status); return; }\n\n\t\t\t\t\tconsole.log(\"Server down?\");\n\t\t\t\t\t//document.location = \"/\";\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\thttp.send(data);\n\t};\n\n}", "function api(provider, isSandbox) {\n\n this._makeRequest = provider;\n this.sandbox = isSandbox;\n}", "function createApi(dependencies) {\n return {\n /**\n * Returns first if it matches the type, second otherwise.\n *\n * @param {object} first - optional argument\n * @param {object} second - non optional argument\n * @param {string} type - expected type of non optional argument\n */\n optionalArgument: function(first, second, type) {\n dependencies.logger.trace('common.optionalArgument called');\n\n if (typeof(first) === type) {\n return first;\n } else {\n return second;\n }\n },\n\n /**\n * Populates the instance with fields if they contain appropriate keys.\n *\n * @param {object} instance - repository instance\n * @param {object} fields - key/value field mappings\n */\n populateFields: function(instance, fields) {\n dependencies.logger.trace('common.populateFields called');\n\n fields = fields || {};\n Object.keys(instance).forEach(function(field) {\n if (typeof(instance[field]) !== 'function' &&\n fields[field] !== undefined) {\n instance[field] = fields[field];\n }\n });\n\n return instance;\n },\n\n /**\n * Creates the given table using the given provider.\n *\n * @param {object} table - a node-sql table definition\n * @param {object} provider - a database specific provider instance\n * @returns {Q} promise - a promise containing the result of creating\n * the table\n */\n createTable: function(table, provider) {\n dependencies.logger.trace('common.createTable called');\n\n var query = table.create().ifNotExists().toQuery();\n query.text = provider.autoIncrement(query.text);\n\n return provider.runQuery(query);\n },\n\n /**\n * Creates an index for the table using the name and fields given.\n *\n * @param {object} table - node-sql table definition\n * @param {string} name - index name\n * @param {string[]} fields - array of field names\n * @param {object} provider - database provider\n * @returns {Q} promise - a promise containing the result of creating\n * the index\n */\n createIndex: function(table, name, fields, provider) {\n dependencies.logger.trace('common.createIndex called');\n\n fields = (Array.isArray(fields)) ? fields: [fields];\n\n var indexFields = fields.map(function(field) {\n return table[field];\n });\n var index = table.indexes().create(name).unique();\n var query = index.on.apply(index, indexFields).toQuery();\n\n return provider.runQuery(query);\n },\n\n /**\n * Returns a single instance tied to the given table using a where clause\n * and the given constructor to construct the instance.\n *\n * @param {object} table - a node-sql table definition\n * @param {object} where - a node-sql where clause\n * @param {object} provider - a database specific provider instance\n * @param {function} constructor - a constructor for the repository being\n * operated on\n */\n get: function(table, where, provider, constructor) {\n dependencies.logger.trace('common.get called');\n\n // this set to repo instance, can use this.create to get instance\n var query = table\n .select(table.star())\n .from(table)\n .where(where)\n .toQuery();\n\n return provider.runQuery(query)\n .then(function(result) {\n var row = result.rows[0];\n\n return instanceFromRow(row, constructor);\n });\n },\n\n /**\n * Returns an array of instances for the given query using the given\n * constructor.\n *\n * @param {object} query - a node-sql query instance\n * @param {object} provider - a database specific provider instance\n * @param {function} constructor - a constructor for the repository being\n * operated on\n */\n find: function(query, provider, constructor) {\n dependencies.logger.trace('common.find called');\n\n return provider.runQuery(query)\n .then(function(result) {\n var instances = result.rows.map(function(row) {\n return instanceFromRow(row, constructor);\n });\n\n return instances;\n });\n },\n\n /**\n * Returns an integer count using the given query.\n *\n * @param {object} table - a node-sql table definition\n * @param {object} query - a node-sql query instance\n * @param {object} provider - a database specific provider instance\n */\n count: function(table, query, provider) {\n dependencies.logger.trace('common.count called');\n\n return provider.runQuery(query)\n .then(function(result) {\n var countRow = result.rows[0];\n var count = +countRow[Object.keys(countRow)[0]];\n\n return count;\n });\n },\n\n /**\n * Saves the instance using the given table and provider.\n *\n * @param {pbject} instance - the instance to save to the database\n * @param {object} table - a node-sql table definition\n * @param {object} provider - a database specific provider instance\n */\n save: function(instance, table, provider) {\n dependencies.logger.trace('common.save called');\n\n var query;\n var fields;\n\n // update or insert?\n if (instance.getId()) {\n fields = getFields(instance, table, function(all, current, value) {\n all[current] = value;\n\n return all;\n }, {});\n query = table\n .update(removeEmptyFields(fields))\n .where(table.id.equals(instance.getId()))\n .toQuery();\n } else {\n fields = getFields(instance, table, function(all, current, value) {\n var field = table[current].value(value);\n all.push(field);\n\n return all;\n }, []);\n query = table\n .insert.apply(table, fields)\n .toQuery();\n }\n\n return provider.runQuery(query);\n },\n\n remove: function(instance, table, provider) {\n dependencies.logger.trace('common.remove called');\n\n var query = table\n .delete()\n .where(table.id.equals(instance.getId()))\n .toQuery();\n\n return provider.runQuery(query);\n }\n };\n\n /**\n * Returns an instance from the given row using the given constructor.\n *\n * @param {object} row - a database row\n * @param {function} constructor - a constructor for the repository being\n * operated on\n */\n function instanceFromRow(row, constructor) {\n dependencies.logger.trace('common.instanceFromRow called');\n\n var instance = null;\n\n if (row) {\n instance = constructor(row.id);\n Object.keys(instance).forEach(function(key) {\n if (instance[key] === undefined) {\n var field = Case.snake(key);\n instance[key] = row[field];\n }\n });\n }\n\n return instance;\n }\n\n /**\n * Returns the fields that should be saved to the database from the given\n * instance using the table definition as a reference.\n *\n * @param {pbject} instance - the instance to save to the database\n * @param {object} table - a node-sql table definition\n * @param {function} step - a step function for accumulating fields\n * @param {object} initial - an initial value to reduce the fields over\n * @returns {collection} - a collection containing the fields that should be\n * saved\n */\n function getFields(instance, table, step, initial) {\n dependencies.logger.trace('common.getFields called');\n\n var fields = table.columns.reduce(function(all, column) {\n // reference or property?\n if (column.references) {\n var referenceName = column.name.split('_')[0];\n var referenceField = column.name.split('_')[1];\n var method = util.format('get%s', Case.title(referenceName));\n\n if (instance[method]) {\n all = step(all, column.name, instance[method]().getId());\n }\n } else {\n var property = Case.camel(column.name);\n\n if (instance[property] && typeof(instance[property]) !== 'function') {\n all = step(all, column.name, instance[property]);\n }\n }\n\n return all;\n }, initial);\n\n return fields;\n }\n\n /**\n * Removes any field from the object with an undefined value. Nulls are\n * conserved to ensure fields can be updated to a null value.\n *\n * @param {Object} fields - object used to update a record\n */\n function removeEmptyFields(fields) {\n dependencies.logger.trace('common.removeEmptyFields called');\n\n var result = {};\n Object.keys(fields).forEach(function(field) {\n if (fields[field] !== undefined) {\n result[field] = fields[field];\n }\n });\n\n return result;\n }\n}", "getApi(api_name) {\n const self = this;\n return new self.KnetikCloud[api_name]();\n }", "function createService(schemaName) {\n var baseEndpoint = [API_BASE, schemaName].join('/');\n\n // Potential contraints for the ID\n function assertId(id) {\n var deferred = $q.defer();\n if (id) {\n deferred.resolve();\n } else {\n deferred.reject('Missing ID');\n }\n return deferred.promise;\n }\n\n /**\n * Get an object by id from the API.\n * @param id : The id of the object.\n * @returns : Promise with the object.\n **/\n function get(id) {\n return assertId(id).then(function () {\n return $http.get([baseEndpoint, id].join('/'));\n });\n }\n\n /**\n * Query an endpoint with a collection of parameters instead of an id.\n * @param data : Object with the parameters to put in the query string.\n * @returns : Promise with the result of the query.\n **/\n function query(data, method) {\n method = method || 'GET';\n var queryParams = {\n method: method,\n url: baseEndpoint\n };\n if (method === 'GET') {\n queryParams.params = data;\n }\n if (method === 'POST') {\n queryParams.data = data;\n }\n\n return $http(queryParams);\n }\n\n /**\n * Get a list of objects from the API.\n * @returns : Promise with a list of objects.\n **/\n function getAll() {\n return $http.get(baseEndpoint);\n }\n\n /**\n * Update an object through the API\n * @param id : The id of the object.\n * @param data : The data to update the object with\n * @returns : Promise with the result of the update.\n **/\n function update(id, data) {\n return assertId(id).then(function () {\n return $http.put([baseEndpoint, id].join('/'), data);\n });\n }\n\n /**\n * Create a new object through the API\n * @param data : The data to update the object with\n * @returns : Promise that returns the provided data, amended with the id\n * that the API assigned.\n **/\n function create(data) {\n return $http.post(baseEndpoint, data).then(function (response) {\n data.id = R.last(response.headers().location.split('/'));\n response.data = data;\n return response;\n });\n }\n\n /**\n * Wrapper that saves or updates an object, based on whether it already\n * has an id. Data without an id attribute are created as new objects, and\n * those with an id are updated.\n * This function expects the angular model representation, and will handle\n * the formatting of the request.\n * @param data : The angular model to persist.\n * @returns : Promise that returns the provided data (with the id added\n * if a create took place)\n **/\n function save(data) {\n if (data.id) {\n return update(data.id, data).then(function (result) {\n return data;\n });\n } else {\n return create(data).then(function (result) {\n data.id = result.id;\n return data;\n });\n }\n }\n\n if (!baseEndpoint || !schemaName) {\n throw 'Must specify base endpoint and schema name';\n }\n\n return {\n get: get,\n query: query,\n getAll: getAll,\n update: update,\n create: create,\n save: save\n };\n }", "constructor(key) {\n let Spotify = require('node-spotify-api');\n this.api = new Spotify(key);\n }", "static initialize(obj, active, config, createdAt, events, id, lastResponse, name, pingUrl, testUrl, type, updatedAt, url) { \n obj['active'] = active;\n obj['config'] = config;\n obj['created_at'] = createdAt;\n obj['events'] = events;\n obj['id'] = id;\n obj['last_response'] = lastResponse;\n obj['name'] = name;\n obj['ping_url'] = pingUrl;\n obj['test_url'] = testUrl;\n obj['type'] = type;\n obj['updated_at'] = updatedAt;\n obj['url'] = url;\n }", "function createApiRequest(apiKey) {\n var apiRequest = request.defaults({\n auth: {\n bearer: apiKey\n }\n });\n\n return apiRequest;\n}", "function UserApiClass(initJson) {\n return this.getInstance().init(initJson); // when called from \"new\", return the only instance of the API\n }", "create() {\n return this.new();\n }", "axios(){\n const instance = this.http.create({\n headers: {'token': this.token,'Content-type' : 'application/json'}\n });\n return instance;\n }", "createAPI(app) {\n\n // Add swagger validation and ui.\n swagger_helper.addValidation(router, teamsSwagger);\n swagger_helper.addUI(app, teamsSwagger, 'teams');\n\n router.get(\"/\", (req, res, next) => {\n \n this.teams_dao.getTeams()\n .then((teams) => {\n res.status(200).json(teams);\n })\n .catch((err) => {\n res.status(500).json({ err: err });\n }); \n });\n\n router.post(\"/\", (req, res, next) => {\n res.status(200).json({ msg: 'Post team successful' });\n });\n\n router.put('/', (req, res, next) => {\n\n this.teams_dao.updateTeam(req.body)\n .then(() => {\n res.status(200).json({ msg: 'Put team successful' });\n })\n .catch((err) => {\n res.status(500).json({ err: err });\n }); \n });\n\n router.delete('/', (req, res, next) => {\n res.status(200).json({ msg: 'Delete team successful' });\n }); \n\n return router;\n }", "create() {\n\n }", "create() {\n\n }", "create() {\n\n }", "function ApiProvider() {\n\t\tthis.endpoints = {};\n\t}", "constructor() { \n \n Api1ItemRequest1.initialize(this);\n }", "function create() {\n var ariConfig = config.getAppConfig().ari;\n\n ari.getClient(ariConfig, ariConfig.applicationName)\n .then(function(client) {\n logger.debug({\n ari: {\n url: ariConfig.url,\n username: ariConfig.username\n }\n }, 'Connected to ARI');\n\n client.on('StasisStart', fsm.create);\n\n logger.info('Voicemail Main application started');\n })\n .catch(function(err) {\n logger.error({err: err}, 'Error connecting to ARI');\n throw err;\n });\n}", "create() {\n\t}", "function create(uri, version) {\n return {\n uri: uri,\n version: version\n };\n }", "function create(uri, version) {\n return {\n uri: uri,\n version: version\n };\n }", "function create(uri, version) {\n return {\n uri: uri,\n version: version\n };\n }", "function create(uri, version) {\n return {\n uri: uri,\n version: version\n };\n }", "create(data, params) {}", "function instance($http) {\n }", "constructor(storageAPI) {\n this.api = storageAPI;\n }", "constructor() {\n super(\"api/planetspecies\");\n this.router\n .get(\"\", this.getAll)\n .post(\"\", this.create);\n }", "function create(uri) {\n return {\n uri: uri\n };\n }", "function create(uri) {\n return {\n uri: uri\n };\n }", "function create(uri) {\n return {\n uri: uri\n };\n }", "constructor(name, args, opts) {\n let inputs = {};\n opts = opts || {};\n if (!opts.id) {\n if ((!args || args.apiId === undefined) && !opts.urn) {\n throw new Error(\"Missing required property 'apiId'\");\n }\n if ((!args || args.resourceGroupName === undefined) && !opts.urn) {\n throw new Error(\"Missing required property 'resourceGroupName'\");\n }\n if ((!args || args.serviceName === undefined) && !opts.urn) {\n throw new Error(\"Missing required property 'serviceName'\");\n }\n inputs[\"apiId\"] = args ? args.apiId : undefined;\n inputs[\"notes\"] = args ? args.notes : undefined;\n inputs[\"releaseId\"] = args ? args.releaseId : undefined;\n inputs[\"resourceGroupName\"] = args ? args.resourceGroupName : undefined;\n inputs[\"serviceName\"] = args ? args.serviceName : undefined;\n inputs[\"createdDateTime\"] = undefined /*out*/;\n inputs[\"name\"] = undefined /*out*/;\n inputs[\"type\"] = undefined /*out*/;\n inputs[\"updatedDateTime\"] = undefined /*out*/;\n }\n else {\n inputs[\"apiId\"] = undefined /*out*/;\n inputs[\"createdDateTime\"] = undefined /*out*/;\n inputs[\"name\"] = undefined /*out*/;\n inputs[\"notes\"] = undefined /*out*/;\n inputs[\"type\"] = undefined /*out*/;\n inputs[\"updatedDateTime\"] = undefined /*out*/;\n }\n if (!opts.version) {\n opts = pulumi.mergeOptions(opts, { version: utilities.getVersion() });\n }\n const aliasOpts = { aliases: [{ type: \"azure-nextgen:apimanagement/v20190101:ApiRelease\" }, { type: \"azure-native:apimanagement:ApiRelease\" }, { type: \"azure-nextgen:apimanagement:ApiRelease\" }, { type: \"azure-native:apimanagement/v20170301:ApiRelease\" }, { type: \"azure-nextgen:apimanagement/v20170301:ApiRelease\" }, { type: \"azure-native:apimanagement/v20180101:ApiRelease\" }, { type: \"azure-nextgen:apimanagement/v20180101:ApiRelease\" }, { type: \"azure-native:apimanagement/v20180601preview:ApiRelease\" }, { type: \"azure-nextgen:apimanagement/v20180601preview:ApiRelease\" }, { type: \"azure-native:apimanagement/v20191201:ApiRelease\" }, { type: \"azure-nextgen:apimanagement/v20191201:ApiRelease\" }, { type: \"azure-native:apimanagement/v20191201preview:ApiRelease\" }, { type: \"azure-nextgen:apimanagement/v20191201preview:ApiRelease\" }, { type: \"azure-native:apimanagement/v20200601preview:ApiRelease\" }, { type: \"azure-nextgen:apimanagement/v20200601preview:ApiRelease\" }, { type: \"azure-native:apimanagement/v20201201:ApiRelease\" }, { type: \"azure-nextgen:apimanagement/v20201201:ApiRelease\" }, { type: \"azure-native:apimanagement/v20210101preview:ApiRelease\" }, { type: \"azure-nextgen:apimanagement/v20210101preview:ApiRelease\" }] };\n opts = pulumi.mergeOptions(opts, aliasOpts);\n super(ApiRelease.__pulumiType, name, inputs, opts);\n }", "function BaseServiceInstance(url) {\n this.appName = \"megazord\";\n this.urlBase = EnvironmentConfig.api;\n this.urlBackOfficeBase = EnvironmentConfig.api;\n\n this.httpRequest = function (type, url, params) {\n return $http[type](url, params).then(function (response) {\n return response.data;\n }, function (error) {\n throw error.data;\n });\n };\n\n this.serviceUrl = url;\n this.get = function (id) {\n return this.httpRequest(\"get\", this.urlBackOfficeBase + this.serviceUrl + id);\n };\n\n this.getAll = function (data) {\n return this.httpRequest(\"get\", this.urlBackOfficeBase + this.serviceUrl);\n };\n\n this.create = function (entity) {\n return this.httpRequest(\"post\", this.urlBackOfficeBase + this.serviceUrl, entity);\n };\n\n this.update = function (entity) {\n return this.httpRequest(\"put\", this.urlBackOfficeBase + this.serviceUrl + entity.id, entity);\n };\n\n this.delete = function (id) {\n return this.httpRequest(\"delete\", this.urlBackOfficeBase + this.serviceUrl + id);\n };\n\n return this;\n }", "function API(dsn, metadata, tunnel) {\n if (metadata === void 0) { metadata = {}; }\n this.dsn = dsn;\n this._dsnObject = new utils_1.Dsn(dsn);\n this.metadata = metadata;\n this._tunnel = tunnel;\n }", "addToApi() {\n // Invoke the factory function, passing along the form field values to\n const newJournalEntry = renderDom.buildEntry();\n // console.log(\"newJournalEntry\", newJournalEntry)\n API.postJournalEntry(newJournalEntry);\n }", "constructor() {\n super();\n this.client = new Web3(new Web3.providers.HttpProvider(`${this.url}/v3/${keys.infura.project_id}`));\n }", "function API(e=\"untitled\",s=!1){return new class{constructor(e,s){this.name=e,this.debug=s,this.isRequest=\"undefined\"!=typeof $request,this.isQX=\"undefined\"!=typeof $task,this.isLoon=\"undefined\"!=typeof $loon,this.isSurge=\"undefined\"!=typeof $httpClient&&!this.isLoon,this.isNode=\"function\"==typeof require,this.isJSBox=this.isNode&&\"undefined\"!=typeof $jsbox,this.node=(()=>{if(this.isNode){const e=\"undefined\"!=typeof $request?void 0:require(\"request\"),s=require(\"fs\");return{request:e,fs:s}}return null})(),this.initCache();const t=(e,s)=>new Promise(function(t){setTimeout(t.bind(null,s),e)});Promise.prototype.delay=function(e){return this.then(function(s){return t(e,s)})}}get(e){return this.isQX?(\"string\"==typeof e&&(e={url:e,method:\"GET\"}),$task.fetch(e)):new Promise((s,t)=>{this.isLoon||this.isSurge?$httpClient.get(e,(e,i,o)=>{e?t(e):s({statusCode:i.status,headers:i.headers,body:o})}):this.node.request(e,(e,i,o)=>{e?t(e):s({...i,statusCode:i.statusCode,body:o})})})}post(e){return e.body&&e.headers&&!e.headers[\"Content-Type\"]&&(e.headers[\"Content-Type\"]=\"application/x-www-form-urlencoded\"),this.isQX?(\"string\"==typeof e&&(e={url:e}),e.method=\"POST\",$task.fetch(e)):new Promise((s,t)=>{this.isLoon||this.isSurge?$httpClient.post(e,(e,i,o)=>{e?t(e):s({statusCode:i.status,headers:i.headers,body:o})}):this.node.request.post(e,(e,i,o)=>{e?t(e):s({...i,statusCode:i.statusCode,body:o})})})}initCache(){if(this.isQX&&(this.cache=JSON.parse($prefs.valueForKey(this.name)||\"{}\")),(this.isLoon||this.isSurge)&&(this.cache=JSON.parse($persistentStore.read(this.name)||\"{}\")),this.isNode){let e=\"root.json\";this.node.fs.existsSync(e)||this.node.fs.writeFileSync(e,JSON.stringify({}),{flag:\"wx\"},e=>console.log(e)),this.root={},e=`${this.name}.json`,this.node.fs.existsSync(e)?this.cache=JSON.parse(this.node.fs.readFileSync(`${this.name}.json`)):(this.node.fs.writeFileSync(e,JSON.stringify({}),{flag:\"wx\"},e=>console.log(e)),this.cache={})}}persistCache(){const e=JSON.stringify(this.cache);this.isQX&&$prefs.setValueForKey(e,this.name),(this.isLoon||this.isSurge)&&$persistentStore.write(e,this.name),this.isNode&&(this.node.fs.writeFileSync(`${this.name}.json`,e,{flag:\"w\"},e=>console.log(e)),this.node.fs.writeFileSync(\"root.json\",JSON.stringify(this.root),{flag:\"w\"},e=>console.log(e)))}write(e,s){this.log(`SET ${s}`),-1!==s.indexOf(\"#\")?(s=s.substr(1),(this.isSurge||this.isLoon)&&$persistentStore.write(e,s),this.isQX&&$prefs.setValueForKey(e,s),this.isNode&&(this.root[s]=e)):this.cache[s]=e,this.persistCache()}read(e){return this.log(`READ ${e}`),-1===e.indexOf(\"#\")?this.cache[e]:(e=e.substr(1),this.isSurge||this.isLoon?$persistentStore.read(e):this.isQX?$prefs.valueForKey(e):this.isNode?this.root[e]:void 0)}delete(e){this.log(`DELETE ${e}`),-1!==e.indexOf(\"#\")?(e=e.substr(1),(this.isSurge||this.isLoon)&&$persistentStore.write(null,e),this.isQX&&$prefs.removeValueForKey(e),this.isNode&&delete this.root[e]):delete this.cache[e],this.persistCache()}notify(s=e,t=\"\",i=\"\",o,n){if(this.isSurge){let e=i+(null==n?\"\":`\\n\\n多媒体链接:${n}`),r={};o&&(r.url=o),\"{}\"==JSON.stringify(r)?$notification.post(s,t,e):$notification.post(s,t,e,r)}if(this.isQX){let e={};o&&(e[\"open-url\"]=o),n&&(e[\"media-url\"]=n),\"{}\"==JSON.stringify(e)?$notify(s,t,i):$notify(s,t,i,e)}if(this.isLoon){let e={};o&&(e.openUrl=o),n&&(e.mediaUrl=n),\"{}\"==JSON.stringify(e)?$notification.post(s,t,i):$notification.post(s,t,i,e)}if(this.isNode){let e=i+(null==o?\"\":`\\n\\n跳转链接:${o}`)+(null==n?\"\":`\\n\\n多媒体链接:${n}`);if(this.isJSBox){const i=require(\"push\");i.schedule({title:s,body:t?t+\"\\n\"+e:e})}else console.log(`${s}\\n${t}\\n${e}\\n\\n`)}}log(e){this.debug&&console.log(e)}info(e){console.log(e)}error(e){console.log(\"ERROR: \"+e)}wait(e){return new Promise(s=>setTimeout(s,e))}done(e={}){this.isQX||this.isLoon||this.isSurge?this.isRequest?$done(e):$done():this.isNode&&!this.isJSBox&&\"undefined\"!=typeof $context&&($context.headers=e.headers,$context.statusCode=e.statusCode,$context.body=e.body)}}(e,s)}", "static create(id, password, type, firstname, lastname, nationality, gender, phonenumber) {\n const client = new Client(id, password, type, firstname, lastname, nationality, gender, phonenumber);\n Client.map.set(client.id, client);\n return client;\n }", "construct(self) {\n var obj = {};\n this.paths.forEach((val, path) => {\n const key = path.slice(1).replace(/ [a-z]/, x => x[1].toUpperCase(1));\n switch (val.constructor) {\n case PlatformApiFunction:\n obj[key] = input => val.impl.call(self, input);\n break;\n case PlatformApiGetter:\n obj[key] = () => val.impl.call(self);\n break;\n default: throw new Error(\n `PlatformApi had path of weird constructor ${val.constructor}`);\n }\n });\n }", "function create(uri, version) {\n return { uri: uri, version: version };\n }", "constructor() {\n super('API', []);\n this.success();\n }" ]
[ "0.724392", "0.7010439", "0.7010439", "0.7010439", "0.687676", "0.6817843", "0.67550576", "0.6705468", "0.67049843", "0.6595939", "0.65819085", "0.65819085", "0.6538902", "0.6532248", "0.64544296", "0.6402999", "0.6384868", "0.6349989", "0.6345771", "0.63152045", "0.63140696", "0.6226806", "0.621012", "0.6187152", "0.61384934", "0.61291116", "0.60839504", "0.6076817", "0.6010761", "0.6001064", "0.60010487", "0.59920096", "0.5987657", "0.59713995", "0.5966281", "0.5939206", "0.5939206", "0.59282684", "0.5902131", "0.5893565", "0.5893565", "0.5893565", "0.5893565", "0.5893565", "0.5893565", "0.5893565", "0.588473", "0.58843863", "0.586017", "0.5832607", "0.5832607", "0.58112115", "0.58095443", "0.5801975", "0.57788694", "0.57732624", "0.57704926", "0.5763352", "0.57628095", "0.576106", "0.57610136", "0.57579005", "0.57468104", "0.57281595", "0.5722773", "0.5713503", "0.5707431", "0.5680376", "0.5679279", "0.56771475", "0.5675459", "0.56725127", "0.5660189", "0.56445473", "0.56445473", "0.56445473", "0.56429315", "0.56417775", "0.5638514", "0.5627695", "0.5616971", "0.5616971", "0.5616971", "0.5616971", "0.56079364", "0.55781883", "0.5575089", "0.5543267", "0.55432373", "0.55432373", "0.55432373", "0.5535968", "0.55320185", "0.5530253", "0.552665", "0.5525656", "0.55214506", "0.55101997", "0.5507495", "0.5498359", "0.549271" ]
0.0
-1
Captures an exception event and sends it to Sentry.
function captureException(exception, captureContext) { var syntheticException; try { throw new Error('Sentry syntheticException'); } catch (exception) { syntheticException = exception; } return callOnHub('captureException', exception, { captureContext: captureContext, originalException: exception, syntheticException: syntheticException, }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function captureException(exception) {\r\n var syntheticException;\r\n try {\r\n throw new Error('Sentry syntheticException');\r\n } catch (exception) {\r\n syntheticException = exception;\r\n }\r\n return callOnHub('captureException', exception, {\r\n originalException: exception,\r\n syntheticException: syntheticException\r\n });\r\n}", "function captureException(exception) {\n var syntheticException;\n try {\n throw new Error('Sentry syntheticException');\n }\n catch (exception) {\n syntheticException = exception;\n }\n return callOnHub('captureException', exception, {\n originalException: exception,\n syntheticException: syntheticException,\n });\n}", "function captureException(exception) {\n var syntheticException;\n try {\n throw new Error('Sentry syntheticException');\n }\n catch (exception) {\n syntheticException = exception;\n }\n return callOnHub('captureException', exception, {\n originalException: exception,\n syntheticException: syntheticException,\n });\n}", "_handleException(error) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('[Replay]', error);\n\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && this._options._experiments && this._options._experiments.captureExceptions) {\n captureException(error);\n }\n }", "function exceptionHandler(event) {\n\t\talert(\"Exception: \" + event.code + \"::\" + event.message);\n\t}", "function exceptionHandler(event) {\n alert(\"Exception: \" + event.code + \"::\" + event.message);\n }", "function exceptionHandler(event) {\n\talert(\"Exception: \" + event.code + \"::\" + event.message);\n}", "function reportException(e) {\n \tconsole.error('Exception at line: ' + lastLine + \", file: \" + lastFile + \", reason: \" + e.toString());\n \tsendDebuggerPaused('exception', { description : e.toString() });\n }", "catchExceptions(){\n process.on('uncaughtException', function (err) {\n Logger.fatal(err);\n //var stack = new Error().stack;\n //Logger.exception(stack);\n });\n }", "exceptionTrack(properties) {\n const description = properties.event || properties.description || properties;\n appInsights.trackException(description);\n }", "trackException(telemetry) {\n this.defaultClient.trackException(telemetry);\n }", "_captureEvent(event, hint = {}, scope) {\n return this._processEvent(event, hint, scope).then(\n finalEvent => {\n return finalEvent.event_id;\n },\n reason => {\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n // If something's gone wrong, log the error as a warning. If it's just us having used a `SentryError` for\n // control flow, log just the message (no stack) as a log-level log.\n const sentryError = reason ;\n if (sentryError.logLevel === 'log') {\n logger.log(sentryError.message);\n } else {\n logger.warn(sentryError);\n }\n }\n return undefined;\n },\n );\n }", "_captureEvent(event, hint = {}, scope) {\n return this._processEvent(event, hint, scope).then(\n finalEvent => {\n return finalEvent.event_id;\n },\n reason => {\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n // If something's gone wrong, log the error as a warning. If it's just us having used a `SentryError` for\n // control flow, log just the message (no stack) as a log-level log.\n const sentryError = reason ;\n if (sentryError.logLevel === 'log') {\n utils.logger.log(sentryError.message);\n } else {\n utils.logger.warn(sentryError);\n }\n }\n return undefined;\n },\n );\n }", "function handleCrash(event) {\n }", "_handle_error(event) {\n let message = event.detail;\n this.$.log.error(message)\n }", "componentDidCatch(error, errorInfo) {\n Raven.captureException(error, { extra: errorInfo });\n }", "_captureEvent(event, hint = {}, scope) {\n\t return this._processEvent(event, hint, scope).then(\n\t finalEvent => {\n\t return finalEvent.event_id;\n\t },\n\t reason => {\n\t if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n\t // If something's gone wrong, log the error as a warning. If it's just us having used a `SentryError` for\n\t // control flow, log just the message (no stack) as a log-level log.\n\t const sentryError = reason ;\n\t if (sentryError.logLevel === 'log') {\n\t logger.log(sentryError.message);\n\t } else {\n\t logger.warn(sentryError);\n\t }\n\t }\n\t return undefined;\n\t },\n\t );\n\t }", "function captureException(exception, captureContext) {\n return getCurrentHub().captureException(exception, { captureContext });\n }", "function UncaughtExceptionHandler(err){\n console.log(\"Uncaught Exception Encountered!!\");\n console.log(\"err: \", err);\n console.log(\"Stack trace: \", err.stack);\n setInterval(function(){}, 1000);\n}", "_triggerException(e) {\n\t\tthrow e\n\t}", "_processEvent(event, hint, scope) {\n const options = this.getOptions();\n const { sampleRate } = options;\n\n if (!this._isEnabled()) {\n return utils.rejectedSyncPromise(new utils.SentryError('SDK not enabled, will not capture event.', 'log'));\n }\n\n const isTransaction = event.type === 'transaction';\n const beforeSendProcessorName = isTransaction ? 'beforeSendTransaction' : 'beforeSend';\n const beforeSendProcessor = options[beforeSendProcessorName];\n\n // 1.0 === 100% events are sent\n // 0.0 === 0% events are sent\n // Sampling for transaction happens somewhere else\n if (!isTransaction && typeof sampleRate === 'number' && Math.random() > sampleRate) {\n this.recordDroppedEvent('sample_rate', 'error');\n return utils.rejectedSyncPromise(\n new utils.SentryError(\n `Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`,\n 'log',\n ),\n );\n }\n\n return this._prepareEvent(event, hint, scope)\n .then(prepared => {\n if (prepared === null) {\n this.recordDroppedEvent('event_processor', event.type || 'error');\n throw new utils.SentryError('An event processor returned `null`, will not send event.', 'log');\n }\n\n const isInternalException = hint.data && (hint.data ).__sentry__ === true;\n if (isInternalException || !beforeSendProcessor) {\n return prepared;\n }\n\n const beforeSendResult = beforeSendProcessor(prepared, hint);\n return _validateBeforeSendResult(beforeSendResult, beforeSendProcessorName);\n })\n .then(processedEvent => {\n if (processedEvent === null) {\n this.recordDroppedEvent('before_send', event.type || 'error');\n throw new utils.SentryError(`\\`${beforeSendProcessorName}\\` returned \\`null\\`, will not send event.`, 'log');\n }\n\n const session = scope && scope.getSession();\n if (!isTransaction && session) {\n this._updateSessionFromEvent(session, processedEvent);\n }\n\n // None of the Sentry built event processor will update transaction name,\n // so if the transaction name has been changed by an event processor, we know\n // it has to come from custom event processor added by a user\n const transactionInfo = processedEvent.transaction_info;\n if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) {\n const source = 'custom';\n processedEvent.transaction_info = {\n ...transactionInfo,\n source,\n changes: [\n ...transactionInfo.changes,\n {\n source,\n // use the same timestamp as the processed event.\n timestamp: processedEvent.timestamp ,\n propagations: transactionInfo.propagations,\n },\n ],\n };\n }\n\n this.sendEvent(processedEvent, hint);\n return processedEvent;\n })\n .then(null, reason => {\n if (reason instanceof utils.SentryError) {\n throw reason;\n }\n\n this.captureException(reason, {\n data: {\n __sentry__: true,\n },\n originalException: reason ,\n });\n throw new utils.SentryError(\n `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\\nReason: ${reason}`,\n );\n });\n }", "function captureException(exception, captureContext) {\n\t return getCurrentHub().captureException(exception, { captureContext });\n\t}", "sendError(res, err, title = 'smilr-api-error') {\n console.log(`### Error with events API ${err.toString()}`); \n let source = ((new Error().stack).split(\"at \")[2]).trim();\n\n let statusCode = err.code ? err.code : 500;\n if(statusCode < 100 || statusCode > 999) statusCode = 500;\n\n // Problem Details object as per https://tools.ietf.org/html/rfc7807\n let problemDetails = {\n error: true,\n title: title,\n details: err.toString(),\n status: statusCode,\n source: source\n };\n\n // App Insights\n const appInsights = require(\"applicationinsights\"); \n if(appInsights.defaultClient) appInsights.defaultClient.trackException({apiError: problemDetails});\n\n res.status(statusCode).send(problemDetails);\n }", "function captureException(exception, captureContext) {\n return hub.getCurrentHub().captureException(exception, { captureContext });\n}", "function ExceptionHandlerDecorator($delegate, $raven) {\n function ExceptionHandler(exception, cause) {\n var raven = $raven.get();\n if (raven) {\n var additionData = {\n culprit: $raven.getUrl(),\n extra: {\n exception: exception,\n cause: cause\n }\n };\n raven.captureException(exception, additionData);\n } else {\n // continue default behavior: $log.error;\n $delegate(exception, cause);\n }\n }\n\n return ExceptionHandler;\n}", "_processEvent(event, hint, scope) {\n const options = this.getOptions();\n const { sampleRate } = options;\n\n if (!this._isEnabled()) {\n return rejectedSyncPromise(new SentryError('SDK not enabled, will not capture event.', 'log'));\n }\n\n const isTransaction = isTransactionEvent(event);\n const isError = isErrorEvent(event);\n const eventType = event.type || 'error';\n const beforeSendLabel = `before send for type \\`${eventType}\\``;\n\n // 1.0 === 100% events are sent\n // 0.0 === 0% events are sent\n // Sampling for transaction happens somewhere else\n if (isError && typeof sampleRate === 'number' && Math.random() > sampleRate) {\n this.recordDroppedEvent('sample_rate', 'error', event);\n return rejectedSyncPromise(\n new SentryError(\n `Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`,\n 'log',\n ),\n );\n }\n\n const dataCategory = eventType === 'replay_event' ? 'replay' : eventType;\n\n return this._prepareEvent(event, hint, scope)\n .then(prepared => {\n if (prepared === null) {\n this.recordDroppedEvent('event_processor', dataCategory, event);\n throw new SentryError('An event processor returned `null`, will not send event.', 'log');\n }\n\n const isInternalException = hint.data && (hint.data ).__sentry__ === true;\n if (isInternalException) {\n return prepared;\n }\n\n const result = processBeforeSend(options, prepared, hint);\n return _validateBeforeSendResult(result, beforeSendLabel);\n })\n .then(processedEvent => {\n if (processedEvent === null) {\n this.recordDroppedEvent('before_send', dataCategory, event);\n throw new SentryError(`${beforeSendLabel} returned \\`null\\`, will not send event.`, 'log');\n }\n\n const session = scope && scope.getSession();\n if (!isTransaction && session) {\n this._updateSessionFromEvent(session, processedEvent);\n }\n\n // None of the Sentry built event processor will update transaction name,\n // so if the transaction name has been changed by an event processor, we know\n // it has to come from custom event processor added by a user\n const transactionInfo = processedEvent.transaction_info;\n if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) {\n const source = 'custom';\n processedEvent.transaction_info = {\n ...transactionInfo,\n source,\n };\n }\n\n this.sendEvent(processedEvent, hint);\n return processedEvent;\n })\n .then(null, reason => {\n if (reason instanceof SentryError) {\n throw reason;\n }\n\n this.captureException(reason, {\n data: {\n __sentry__: true,\n },\n originalException: reason ,\n });\n throw new SentryError(\n `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\\nReason: ${reason}`,\n );\n });\n }", "function logException(state, exception, context) {\n let handler = state.facet(exceptionSink);\n if (handler.length)\n handler[0](exception);\n else if (window.onerror)\n window.onerror(String(exception), context, undefined, undefined, exception);\n else if (context)\n console.error(context + \":\", exception);\n else\n console.error(exception);\n}", "function logException(state, exception, context) {\n var handler = state.facet(exceptionSink);\n if (handler.length) handler[0](exception);else if (window.onerror) window.onerror(String(exception), context, undefined, undefined, exception);else if (context) console.error(context + \":\", exception);else console.error(exception);\n}", "reportError(error) {\n event.emit(\"error-event\", error)\n }", "onWorkerMessageError(event) {\n console.error('⚙️ Error message from InMemorySearch worker ⚙️', event);\n }", "function addOneErrorEvent() {\n window.onerror = function (message, url, lineNo, columnNo, errorObj) {\n console.log(message, url, lineNo, columnNo, errorObj);\n var oneErrorParams = {\n message: (errorObj === null || errorObj === void 0 ? void 0 : errorObj.message) || message,\n lineNo: lineNo,\n columnNo: columnNo,\n url: url,\n type: getOnerrorType(message)\n };\n computedErrorObject(oneErrorParams);\n };\n}", "onWorkerError(event) {\n console.error('⚙️ Error with InMemorySearch worker ⚙️', event);\n }", "function handlerError(token, ex) {\n //store the exception\n token.result.exception = ex;\n finalizeTest(token, ex);\n }", "function onUncaughtException(err) {\n console.log('Uncaught exception:', err);\n }", "error(e, message) {\n notify.onError({\n title: this.title,\n message: message + ': <%= error.message %>',\n onLast: true\n })(e);\n\n log.error(e);\n }", "componentDidCatch(error, errorInfo) {\n this.setState({ hasError: true });\n // Note: In development mode componentDidCatch is not based on try-catch\n // to catch exceptions. Thus exceptions caught here will also be caught in\n // the global `error` event listener (setup-global-error-listener.js).\n // see: https://github.com/facebook/react/issues/10474\n reportErrorToSentry(error, { extra: errorInfo });\n }", "async trackFailureEvent (failureEvent) {\n\t\tif (!this.user) { return; }\n\t\tconst trackObject = {\n\t\t\tError: failureEvent,\n\t\t\t'email': this.user.get('email')\n\t\t};\n\t\tthis.api.services.analytics.track(\n\t\t\t'Email Confirmation Failed',\n\t\t\ttrackObject,\n\t\t\t{\n\t\t\t\trequest: this,\n\t\t\t\tuser: this.user\n\t\t\t}\n\t\t);\n\t}", "function onCaptureError(message) { }", "onError(e) {\n console.log('error =>', e.message);\n }", "_processEvent(event, hint, scope) {\n\t const options = this.getOptions();\n\t const { sampleRate } = options;\n\n\t if (!this._isEnabled()) {\n\t return rejectedSyncPromise(new SentryError('SDK not enabled, will not capture event.', 'log'));\n\t }\n\n\t const isTransaction = event.type === 'transaction';\n\t const beforeSendProcessorName = isTransaction ? 'beforeSendTransaction' : 'beforeSend';\n\t const beforeSendProcessor = options[beforeSendProcessorName];\n\n\t // 1.0 === 100% events are sent\n\t // 0.0 === 0% events are sent\n\t // Sampling for transaction happens somewhere else\n\t if (!isTransaction && typeof sampleRate === 'number' && Math.random() > sampleRate) {\n\t this.recordDroppedEvent('sample_rate', 'error');\n\t return rejectedSyncPromise(\n\t new SentryError(\n\t `Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`,\n\t 'log',\n\t ),\n\t );\n\t }\n\n\t return this._prepareEvent(event, hint, scope)\n\t .then(prepared => {\n\t if (prepared === null) {\n\t this.recordDroppedEvent('event_processor', event.type || 'error');\n\t throw new SentryError('An event processor returned `null`, will not send event.', 'log');\n\t }\n\n\t const isInternalException = hint.data && (hint.data ).__sentry__ === true;\n\t if (isInternalException || !beforeSendProcessor) {\n\t return prepared;\n\t }\n\n\t const beforeSendResult = beforeSendProcessor(prepared, hint);\n\t return _validateBeforeSendResult(beforeSendResult, beforeSendProcessorName);\n\t })\n\t .then(processedEvent => {\n\t if (processedEvent === null) {\n\t this.recordDroppedEvent('before_send', event.type || 'error');\n\t throw new SentryError(`\\`${beforeSendProcessorName}\\` returned \\`null\\`, will not send event.`, 'log');\n\t }\n\n\t const session = scope && scope.getSession();\n\t if (!isTransaction && session) {\n\t this._updateSessionFromEvent(session, processedEvent);\n\t }\n\n\t // None of the Sentry built event processor will update transaction name,\n\t // so if the transaction name has been changed by an event processor, we know\n\t // it has to come from custom event processor added by a user\n\t const transactionInfo = processedEvent.transaction_info;\n\t if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) {\n\t const source = 'custom';\n\t processedEvent.transaction_info = {\n\t ...transactionInfo,\n\t source,\n\t changes: [\n\t ...transactionInfo.changes,\n\t {\n\t source,\n\t // use the same timestamp as the processed event.\n\t timestamp: processedEvent.timestamp ,\n\t propagations: transactionInfo.propagations,\n\t },\n\t ],\n\t };\n\t }\n\n\t this.sendEvent(processedEvent, hint);\n\t return processedEvent;\n\t })\n\t .then(null, reason => {\n\t if (reason instanceof SentryError) {\n\t throw reason;\n\t }\n\n\t this.captureException(reason, {\n\t data: {\n\t __sentry__: true,\n\t },\n\t originalException: reason ,\n\t });\n\t throw new SentryError(\n\t `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\\nReason: ${reason}`,\n\t );\n\t });\n\t }", "recordException(_exception, _time) { }", "static logException({ ex, context }) {\n /* eslint no-console:0 */\n if (getConsole() && getConsole().error) {\n getConsole().error(ex)\n }\n }", "function registerErrorInstrumentation() {\n utils_1.addInstrumentationHandler({\n callback: errorCallback,\n type: 'error',\n });\n utils_1.addInstrumentationHandler({\n callback: errorCallback,\n type: 'unhandledrejection',\n });\n}", "function registerErrorInstrumentation() {\n addInstrumentationHandler('error', errorCallback);\n addInstrumentationHandler('unhandledrejection', errorCallback);\n }", "onStoreException(event) {\n const me = this;\n\n let message;\n\n switch (event.type) {\n case 'server':\n message = event.response.message || 'Unspecified failure';\n break;\n\n case 'exception':\n if (event.exceptionType === 'network') {\n message = 'Network error';\n } else {\n // Server sent something that couldn't be parsed\n message = (event.error && event.error.message) || 'Failed to parse server response';\n }\n break;\n\n default:\n message = event.response.status + ' - ' + event.response.statusText || 'Unknown error';\n }\n\n // eslint-disable-next-line\n const messageHTML = `<div class=\"b-grid-load-failure\">\n <div class=\"b-grid-load-fail\">${me.L('loadFailedMessage')}</div>\n <div class=\"b-grid-load-fail\">${event.response.url ? event.response.url + ' responded with' : ''}</div>\n <div class=\"b-grid-load-fail\">${message}</div>\n </div>`;\n\n if (me.activeMask) {\n me.activeMask.icon = me.loadMaskErrorIcon;\n me.activeMask.text = messageHTML;\n\n me.loadmaskHideTimer = me.setTimeout(() => {\n me.unmaskBody();\n }, me.loadMaskHideTimeout);\n }\n }", "triggerEvent(event) {\n\t\treturn _makeRequest('/events', {method: 'POST', body: {event}})\n\t\t\t.then(responseData => {\n\t\t\t\tif(responseData.success){\n\t\t\t\t\tconsole.log('Event Sent', event);\n\t\t\t\t}\n\t\t\t})\n\t\t\t.catch(error => {\n\t\t\t\tconsole.error(error);\n\t\t\t});\n\t}", "function LogException( exc ) {\n\tvar record = Session.Installer.CreateRecord( 0 );\n\trecord.StringData( 0 ) = \"CustomAction: Exception: \" + exc.number.toString(16).toUpperCase() + \" : \" + exc.message;\n\tSession.Message(\n\t\tMsgKind.Error + Icons.Critical + Buttons.btnOkOnly,\n\t\trecord\n\t);\n}", "function on_error(e) {\n\tconsole.error(e, e.stack); // eslint-disable-line no-console\n\tvar div = document.createElement('div');\n\tdiv.appendChild(document.createTextNode(e.message));\n\tdocument.querySelector('.error').appendChild(div);\n}", "function catchEvent(e) {\n /* Don't bubble */\n e.stopPropagation();\n\n /* Usually a redirect - prevent it */\n e.preventDefault();\n }", "function on_error(e) {\n\tconsole.error(e, e.stack); // eslint-disable-line no-console\n\tvar div = document.createElement('div');\n\tdiv.appendChild(document.createTextNode(e.message));\n\tdocument.querySelector('.error').appendChild(div);\n}", "function registerErrorInstrumentation() {\n utils.addInstrumentationHandler('error', errorCallback);\n utils.addInstrumentationHandler('unhandledrejection', errorCallback);\n}", "function incomingEvent(e) {\n trace(\"incomingEvent: \" + JSON.stringify(e));\n}", "function postEvent(eventName) {\n const body = {\n 'name': eventName //body\n };\n\n fetch('http://localhost:3000/events', { //endpoint\n method: 'post',\n body: JSON.stringify(body),\n headers: {\n 'Content-Type': 'application/json'\n },\n })\n .then(res => res.json())\n .then((json) => {\n newLine();\n console.table(json);\n endLine();\n continueCallback();\n });\n }", "function handleUncaughtException() {\n process.on('uncaughtException', (error) => {\n debug('Uncaught exception');\n console.error('\\n\\n=== uncaught exception ================='); // eslint-disable-line no-console\n console.error(error.message); // eslint-disable-line no-console\n console.error(error.stack); // eslint-disable-line no-console\n console.error('========================================\\n\\n');\n\n const message = error.message || '';\n const stack = (error.stack || '').split('\\n');\n logger.error('Uncaught exception. Exiting.', { error: { message, stack }, tags: 'exit' });\n\n exitProcess(100);\n });\n}", "sendEvent(event) {\n if (!(event instanceof Logger.LogOutputEvent)) {\n // Don't create an infinite loop...\n let objectToLog = event;\n if (event instanceof debugSession_1.OutputEvent && event.body && event.body.data && event.body.data.doNotLogOutput) {\n delete event.body.data.doNotLogOutput;\n objectToLog = Object.assign({}, event);\n objectToLog.body = Object.assign(Object.assign({}, event.body), { output: '<output not logged>' });\n }\n logger.verbose(`To client: ${JSON.stringify(objectToLog)}`);\n }\n super.sendEvent(event);\n }", "function handleEventFailure(rsp) {\n loadComplete();\n $scope.currentEvent = null;\n $scope.showToast('Load failed, please restart.');\n }", "function testForUnHandledException() {\n let loggerConfig = {\n \"log-level\": customLogger.LOG_LEVEL.verbose\n }\n\n customLogger.setConfig(loggerConfig);\n customLogger.logMessage(\"tion\", customLogger.LOG_LEVEL.error, \"some-business-tag\", txnID);\n\n}", "function registerErrorInstrumentation() {\n\t addInstrumentationHandler('error', errorCallback);\n\t addInstrumentationHandler('unhandledrejection', errorCallback);\n\t}", "onError(fn) {\n\n this.eventEmitter.on(settings.socket.error, (data) => {\n\n fn(data)\n });\n }", "function captureTxErrors(tx) {\n tx.onerror.attach(function(tx, e) {\n var handler = context[\"_wr_txErrorHandlers\"];\n if (handler) {\n handler(e);\n } else {\n log.error(\"Unhandled transaction error\", e);\n }\n });\n }", "function logTransactionError(event) {\n\t\tconsole.log('error in transaction');\n\t}", "error(handleRequest) {\n if (!handleRequest.jovo) {\n return;\n }\n const log = this.createErrorLog(handleRequest);\n if (log) {\n Sentry.configureScope(scope => {\n scope.setTag('locale', log.locale);\n scope.setTag('platform', log.platform);\n if (log.intent)\n scope.setTag('intent', log.intent);\n scope.setTag('state', log.state);\n scope.setExtra('request', log.request);\n scope.setExtra('session', log.session);\n scope.setUser({ id: log.userId });\n });\n Sentry.captureException(handleRequest.error);\n }\n }", "function eventToSentryRequest(event, api) {\n var sdkInfo = getSdkMetadataForEnvelopeHeader(api);\n var eventType = event.type || 'event';\n var useEnvelope = eventType === 'transaction' || api.forceEnvelope();\n var _a = event.debug_meta || {}, transactionSampling = _a.transactionSampling, metadata = tslib_1.__rest(_a, [\"transactionSampling\"]);\n var _b = transactionSampling || {}, samplingMethod = _b.method, sampleRate = _b.rate;\n if (Object.keys(metadata).length === 0) {\n delete event.debug_meta;\n }\n else {\n event.debug_meta = metadata;\n }\n var req = {\n body: JSON.stringify(sdkInfo ? enhanceEventWithSdkInfo(event, api.metadata.sdk) : event),\n type: eventType,\n url: useEnvelope ? api.getEnvelopeEndpointWithUrlEncodedAuth() : api.getStoreEndpointWithUrlEncodedAuth(),\n };\n // https://develop.sentry.dev/sdk/envelopes/\n // Since we don't need to manipulate envelopes nor store them, there is no\n // exported concept of an Envelope with operations including serialization and\n // deserialization. Instead, we only implement a minimal subset of the spec to\n // serialize events inline here.\n if (useEnvelope) {\n var envelopeHeaders = JSON.stringify(tslib_1.__assign(tslib_1.__assign({ event_id: event.event_id, sent_at: new Date().toISOString() }, (sdkInfo && { sdk: sdkInfo })), (api.forceEnvelope() && { dsn: api.getDsn().toString() })));\n var itemHeaders = JSON.stringify({\n type: eventType,\n // TODO: Right now, sampleRate may or may not be defined (it won't be in the cases of inheritance and\n // explicitly-set sampling decisions). Are we good with that?\n sample_rates: [{ id: samplingMethod, rate: sampleRate }],\n });\n // The trailing newline is optional. We intentionally don't send it to avoid\n // sending unnecessary bytes.\n //\n // const envelope = `${envelopeHeaders}\\n${itemHeaders}\\n${req.body}\\n`;\n var envelope = envelopeHeaders + \"\\n\" + itemHeaders + \"\\n\" + req.body;\n req.body = envelope;\n }\n return req;\n}", "function onUncaughtException(err) {\n var err = \"uncaught exception: \" + err;\n console.log(err);\n}", "function JitsiGlobalUnhandledRejection(event) {\n handlers.forEach(handler => handler(null, null, null, null, event.reason));\n oldOnUnhandledRejection && oldOnUnhandledRejection(event);\n} // Setting the custom error handlers.", "onerror(err) {\n debug(\"error\", err);\n this.emitReserved(\"error\", err);\n }", "function processEvent(event, callback) {\n // Usually returns array of records, however it is fixed to only return 1 record\n console.log(JSON.stringify(event));\n var loneEvent = event.Records[0];\n var requestBody = JSON.parse(loneEvent.body);\n\n // Print SQS message ID or null or undefined\n const messageId = loneEvent.messageId;\n const messageText = `message ID is: ${messageId}`;\n console.log(messageText);\n\n // The payload is encoded in base64\n const buff = Buffer.from(requestBody.payload, \"base64\");\n const bodyDecoded = buff.toString(\"utf8\");\n const body = JSON.parse(bodyDecoded);\n\n if (!verifyGitHub(requestBody, bodyDecoded)) {\n console.log(\"GitHub could not be verified\");\n console.log(\"GitHub Payload\");\n console.log(JSON.stringify(body));\n callback(null, {\n statusCode: 403,\n body: \"something is wrong, github secret does not match\",\n });\n return;\n } else {\n console.log(\"GitHub is verified\");\n }\n\n var path = process.env.API_URL;\n\n var deliveryId;\n if (requestBody[DELIVERY_ID_HEADER]) {\n deliveryId = requestBody[DELIVERY_ID_HEADER];\n } else {\n // TODO: remove this after 1.15.\n // This was added because there's a small period of time during the 1.15 deploy where the header isn't available\n console.log(\n \"Could not retrieve X-GitHub-Delivery header, generating a random UUID\"\n );\n deliveryId = crypto.randomUUID();\n }\n\n console.log(\"X-GitHub-Delivery: \" + deliveryId);\n var githubEventType = requestBody[\"X-GitHub-Event\"];\n // Handle installation events\n if (githubEventType === \"installation_repositories\") {\n // Currently ignoring repository removal events, only calling the endpoint if we are adding a repository.\n if (body.action === \"added\") {\n console.log(\"Valid installation event\");\n path += \"workflows/github/install\";\n const repositoriesAdded = body.repositories_added;\n const repositories = repositoriesAdded.map((repo) => repo.full_name);\n\n postEndpoint(path, body, deliveryId, (response) => {\n const successMessage =\n \"The GitHub app was successfully installed on repositories \" +\n repositories;\n handleCallback(response, successMessage, callback);\n });\n } else {\n console.log(\n 'installation_repositories event ignored \"' + body.action + '\" action'\n );\n }\n } else if (githubEventType === \"push\") {\n /**\n * We only handle push events, of which there are many subtypes. Unfortunately, the only way to differentiate between them is to look\n * for expected fields. There are no enums for push events subtypes.\n *\n * If an event is deemed not supported, we will return a success and print a message saying the event is not supported.\n */\n if (\n [\"repository\", \"ref\", \"created\", \"deleted\", \"pusher\"].some(\n (str) => !(str in body)\n )\n ) {\n console.log(\"Event is not supported\");\n callback(null, {\n statusCode: 200,\n body: \"Currently, this lambda does not support this event type from GitHub.\",\n });\n return;\n }\n\n // A push has been made for some repository (ignore pushes that are deletes)\n if (!body.deleted) {\n console.log(\"Valid push event\");\n const repository = body.repository.full_name;\n const gitReference = body.ref;\n\n path += \"workflows/github/release\";\n\n postEndpoint(path, body, deliveryId, (response) => {\n const successMessage =\n \"The associated entries on Dockstore for repository \" +\n repository +\n \" with version \" +\n gitReference +\n \" have been updated\";\n handleCallback(response, successMessage, callback);\n });\n } else {\n console.log(\"Valid push event (delete)\");\n const repository = body.repository.full_name;\n const gitReference = body.ref;\n const username = body.sender.login;\n\n path += \"workflows/github\";\n\n deleteEndpoint(\n path,\n repository,\n gitReference,\n username,\n deliveryId,\n (response) => {\n const successMessage =\n \"The associated versions on Dockstore for repository \" +\n repository +\n \" with version \" +\n gitReference +\n \" have been deleted\";\n handleCallback(response, successMessage, callback);\n }\n );\n }\n } else {\n console.log(\"Event \" + githubEventType + \" is not supported\");\n callback(null, {\n statusCode: 200,\n body:\n \"Currently, this lambda does not support the event type\" +\n githubEventType +\n \" from GitHub.\",\n });\n }\n}", "RegisterEventSource() {\n\n }", "handleBrushError(e) {\n console.error(\"Brush error\");\n console.error(e);\n this.fireEvent('error', {\n croquisError: e\n });\n }", "function onError(event) {\n\t\tconsole.log('Client socket: Error occured, messsage: ' + event.data);\n\t\tcastEvent('onError', event);\n\t}", "_attachErrorEvent() {\n\t\tthis._oConnection.onEvent(\"error\", function(err) {\n\t\t\tlogger.error(\"VoiceConnection error: \", err);\n\t\t\tthis.play(); //Try to play the next song on error\n\t\t}.bind(this));\n\n\t\tthis._oConnection.onEvent(\"failed\", function(err) {\n\t\t\tlogger.error(\"VoiceConnection failed: \", err);\n\t\t\tthis.play(); //Try to play the next song on error\n\t\t}.bind(this));\n\n\t\tthis._bErrorEventAttached = true;\n\t}", "function attachGlobalErrorHandling() {\n function logAndDie(e) {\n console.error(chalk.bgRed(formatErrorForConsole(e)));\n console.error(chalk.bgRed('yerna: unexpected error, exiting suddenly!'));\n console.error(chalk.bgRed('yerna: this is probably a bug in Yerna itself, please file an issue!'));\n console.error(chalk.bgRed('yerna: NOTE: package.jsons or links may be in an inconsistent state'));\n console.error(chalk.bgRed('yerna: NOTE: child processes may be abandoned'));\n process.exit(1);\n }\n\n process.on('uncaughtException', logAndDie);\n process.on('unhandledRejection', logAndDie);\n}", "constructor({ et = \"\", nt = { msg: \"...\", ev: \"error\" } }) {\n super(exceptionMessages[et]);\n this.name = \"InspectionException\";\n this.notify = nt;\n }", "function log(exception, cause) {\n var errorMessage, stackTrace, itm;\n\n try {\n errorMessage = exception.toString();\n stackTrace = stacktraceService.print({\n e: exception\n });\n\n itm = {\n errorUrl: $window.location.href,\n errorMessage: errorMessage,\n stackTrace: stackTrace,\n cause: (cause || \"\")\n };\n\n $log.error(JSON.stringify(itm, null, '\\t'));\n\n } catch (loggingError) {\n console.log(arguments);\n }\n\n if (logSettings.pushToServer) {\n // Now, we need to try and log the error the server.\n // --\n // NOTE: In production, I have some debouncing\n // logic here to prevent the same client from\n // logging the same error over and over again! All\n // that would do is add noise to the log.\n try {\n var ESWEBAPI = $injector.get('esWebApi');\n\n ESWEBAPI.registerException(itm, logSettings.logServer);\n\n } catch (loggingError) {\n\n // For Developers - log the log-failure.\n $log.warn(\"ES Error in registerException on store \" + logSettings.logServer);\n $log.error(loggingError);\n\n }\n }\n\n }", "function logEvent(string) {\n Logger.log(\"[EVENT] \" + string);\n}", "__init7() {this.instrumenter = 'sentry';}", "__init7() {this.instrumenter = 'sentry';}", "__init7() {this.instrumenter = 'sentry';}", "_onError(event) {\n const span = document.createElement(\"span\");\n span.innerHTML = \"\" + \"Upload failed. Retrying in 5 seconds.\";\n this.node.appendChild(span);\n this.retry = setTimeout(() => this.callbackUpload(), 5000, this.data);\n\n TheFragebogen.logger.error(this.constructor.name + \".callbackUpload()\", \"Upload failed with HTTP code: \" + this.request.status + \". Retrying in 5 seconds.\");\n }", "function eventToSentryRequest(event, api) {\n // since JS has no Object.prototype.pop()\n var _a = event.tags || {}, samplingMethod = _a.__sentry_samplingMethod, sampleRate = _a.__sentry_sampleRate, otherTags = Object(tslib_es6[\"d\" /* __rest */])(_a, [\"__sentry_samplingMethod\", \"__sentry_sampleRate\"]);\n event.tags = otherTags;\n var useEnvelope = event.type === 'transaction';\n var req = {\n body: JSON.stringify(event),\n type: event.type || 'event',\n url: useEnvelope ? api.getEnvelopeEndpointWithUrlEncodedAuth() : api.getStoreEndpointWithUrlEncodedAuth(),\n };\n // https://develop.sentry.dev/sdk/envelopes/\n // Since we don't need to manipulate envelopes nor store them, there is no\n // exported concept of an Envelope with operations including serialization and\n // deserialization. Instead, we only implement a minimal subset of the spec to\n // serialize events inline here.\n if (useEnvelope) {\n var envelopeHeaders = JSON.stringify({\n event_id: event.event_id,\n sent_at: new Date().toISOString(),\n });\n var itemHeaders = JSON.stringify({\n type: event.type,\n // TODO: Right now, sampleRate may or may not be defined (it won't be in the cases of inheritance and\n // explicitly-set sampling decisions). Are we good with that?\n sample_rates: [{ id: samplingMethod, rate: sampleRate }],\n });\n // The trailing newline is optional. We intentionally don't send it to avoid\n // sending unnecessary bytes.\n //\n // const envelope = `${envelopeHeaders}\\n${itemHeaders}\\n${req.body}\\n`;\n var envelope = envelopeHeaders + \"\\n\" + itemHeaders + \"\\n\" + req.body;\n req.body = envelope;\n }\n return req;\n}", "function eventToSentryRequest(event, api) {\n // since JS has no Object.prototype.pop()\n var _a = event.tags || {}, samplingMethod = _a.__sentry_samplingMethod, sampleRate = _a.__sentry_sampleRate, otherTags = tslib_1.__rest(_a, [\"__sentry_samplingMethod\", \"__sentry_sampleRate\"]);\n event.tags = otherTags;\n var useEnvelope = event.type === 'transaction';\n var req = {\n body: JSON.stringify(event),\n type: event.type || 'event',\n url: useEnvelope ? api.getEnvelopeEndpointWithUrlEncodedAuth() : api.getStoreEndpointWithUrlEncodedAuth(),\n };\n // https://develop.sentry.dev/sdk/envelopes/\n // Since we don't need to manipulate envelopes nor store them, there is no\n // exported concept of an Envelope with operations including serialization and\n // deserialization. Instead, we only implement a minimal subset of the spec to\n // serialize events inline here.\n if (useEnvelope) {\n var envelopeHeaders = JSON.stringify({\n event_id: event.event_id,\n sent_at: new Date().toISOString(),\n });\n var itemHeaders = JSON.stringify({\n type: event.type,\n // TODO: Right now, sampleRate may or may not be defined (it won't be in the cases of inheritance and\n // explicitly-set sampling decisions). Are we good with that?\n sample_rates: [{ id: samplingMethod, rate: sampleRate }],\n });\n // The trailing newline is optional. We intentionally don't send it to avoid\n // sending unnecessary bytes.\n //\n // const envelope = `${envelopeHeaders}\\n${itemHeaders}\\n${req.body}\\n`;\n var envelope = envelopeHeaders + \"\\n\" + itemHeaders + \"\\n\" + req.body;\n req.body = envelope;\n }\n return req;\n}", "componentDidCatch(error, info) {\n // NOTE: In reality, we'd send this to a configured logging server\n console.error('ERROR: Caught in %s', appId, error, info);\n }", "function reportError(err, context = {}) {\n // This is the name of the StackDriver log stream that will receive the log\n // entry. This name can be any valid log stream name, but must contain \"err\"\n // in order for the error to be picked up by StackDriver Error Reporting.\n const logName = 'errors';\n const log = logging.log(logName);\n\n // https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/MonitoredResource\n const metadata = {\n resource: {\n type: 'cloud_function',\n labels: { function_name: process.env.FUNCTION_NAME }\n }\n };\n\n // https://cloud.google.com/error-reporting/reference/rest/v1beta1/ErrorEvent\n const errorEvent = {\n message: err.stack,\n serviceContext: {\n service: process.env.FUNCTION_NAME,\n resourceType: 'cloud_function'\n },\n context: context\n };\n\n // Write the error log entry\n return new Promise((resolve, reject) => {\n log.write(log.entry(metadata, errorEvent), error => {\n if (error) { reject(error); }\n resolve();\n });\n });\n}", "function reportError(err, context = {}) {\n // This is the name of the StackDriver log stream that will receive the log\n // entry. This name can be any valid log stream name, but must contain \"err\"\n // in order for the error to be picked up by StackDriver Error Reporting.\n const logName = 'errors';\n const log = logging.log(logName);\n\n // https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/MonitoredResource\n const metadata = {\n resource: {\n type: 'cloud_function',\n labels: { function_name: process.env.FUNCTION_NAME }\n }\n };\n\n // https://cloud.google.com/error-reporting/reference/rest/v1beta1/ErrorEvent\n const errorEvent = {\n message: err.stack,\n serviceContext: {\n service: process.env.FUNCTION_NAME,\n resourceType: 'cloud_function'\n },\n context: context\n };\n\n // Write the error log entry\n return new Promise((resolve, reject) => {\n log.write(log.entry(metadata, errorEvent), error => {\n if (error) { reject(error); }\n resolve();\n });\n });\n}", "function reportError(err, context = {}) {\n // This is the name of the StackDriver log stream that will receive the log\n // entry. This name can be any valid log stream name, but must contain \"err\"\n // in order for the error to be picked up by StackDriver Error Reporting.\n const logName = 'errors';\n const log = logging.log(logName);\n\n // https://cloud.google.com/logging/docs/api/ref_v2beta1/rest/v2beta1/MonitoredResource\n const metadata = {\n resource: {\n type: 'cloud_function',\n labels: { function_name: process.env.FUNCTION_NAME },\n },\n };\n\n // https://cloud.google.com/error-reporting/reference/rest/v1beta1/ErrorEvent\n const errorEvent = {\n message: err.stack,\n serviceContext: {\n service: process.env.FUNCTION_NAME,\n resourceType: 'cloud_function',\n },\n context: context,\n };\n\n // Write the error log entry\n return new Promise((resolve, reject) => {\n log.write(log.entry(metadata, errorEvent), (error) => {\n if (error) {\n return reject(error);\n }\n return resolve();\n });\n });\n}", "HandleProcessErrors()\n {\n process.on(\"uncaughtException\", error => {\n outerr(`[Uncaught Exception] ${error.message}\\n${error.stack}`);\n });\n process.on(\"unhandledRejection\", error => {\n outerr(`[Unhandled Promise Rejection] ${error.message}\\n${error.stack}`);\n });\n process.on('exit', code => {\n carrier(`status: ${code}`, `Process instance has exited with code ${code}.`);\n });\n }", "function findPromiseRejectionHandler(evtName){return function(e){var eventTasks=findEventTasks(global,evtName);eventTasks.forEach(function(eventTask){// windows has added unhandledrejection event listener\n// trigger the event listener\nvar PromiseRejectionEvent=global[\"PromiseRejectionEvent\"];if(PromiseRejectionEvent){var evt=new PromiseRejectionEvent(evtName,{promise:e.promise,reason:e.rejection});eventTask.invoke(evt)}})}}", "handleAppErrors() {\r\n this.app.on('error', (err, ctx) => {\r\n logger.error(`Application Error: ${ err.name } @ ${ ctx.method }:${ ctx.url }`);\r\n logger.error(err.stack);\r\n });\r\n }", "callUnhandledRejectionHandler(error) {\n const errHandler = window.onunhandledrejection;\n\n if (!errHandler) {\n return;\n }\n\n errHandler(error);\n }", "function onerror(er){debug(\"onerror\",er);unpipe();dest.removeListener(\"error\",onerror);if(EElistenerCount(dest,\"error\")===0)dest.emit(\"error\",er)}", "function debug_handle(exception) {\n\tenvironment_stack.push(exception.environment);\n\tconsole.warn(\"Debugger environment initialised.\");\n\n\tif (debug_handler) {\n\t\tdebug_handler(exception.line);\n\t}\n}", "function eventListRaise(eventList) {\n for (var i = 0; i < eventList.events.length; i++) {\n var eventData = eventList.events[i];\n if (eventData !== null) {\n eventList.events[i] = null;\n var eventFn = eventData.getEventRunner();\n if (logger) {\n log('event: ' + eventData.toString());\n }\n exceptionGuard(eventFn);\n }\n }\n}", "function errorHandler(options) {\n return function sentryErrorMiddleware(error, _req, res, next) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n var shouldHandleError = (options && options.shouldHandleError) || defaultShouldHandleError;\n if (shouldHandleError(error)) {\n core_1.withScope(function (_scope) {\n // For some reason we need to set the transaction on the scope again\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n var transaction = res.__sentry_transaction;\n if (transaction && _scope.getSpan() === undefined) {\n _scope.setSpan(transaction);\n }\n var client = core_1.getCurrentHub().getClient();\n if (client && sdk_1.isAutoSessionTrackingEnabled(client)) {\n // Check if the `SessionFlusher` is instantiated on the client to go into this branch that marks the\n // `requestSession.status` as `Crashed`, and this check is necessary because the `SessionFlusher` is only\n // instantiated when the the`requestHandler` middleware is initialised, which indicates that we should be\n // running in SessionAggregates mode\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n var isSessionAggregatesMode = client._sessionFlusher !== undefined;\n if (isSessionAggregatesMode) {\n var requestSession = _scope.getRequestSession();\n // If an error bubbles to the `errorHandler`, then this is an unhandled error, and should be reported as a\n // Crashed session. The `_requestSession.status` is checked to ensure that this error is happening within\n // the bounds of a request, and if so the status is updated\n if (requestSession && requestSession.status !== undefined)\n requestSession.status = types_1.RequestSessionStatus.Crashed;\n }\n }\n var eventId = core_1.captureException(error);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n res.sentry = eventId;\n next(error);\n });\n return;\n }\n next(error);\n };\n}", "function onerror (err) {\n debug('http.ClientRequest \"error\" event: %o', err.stack || err);\n fn(err);\n }", "function trackException(msg, lastActionId, status, fault, faultDescription) {\r\n if (!fault || !msg.FaultCode || (settingsHelper.mode && settingsHelper.mode !== \"NORMAL\")) {\r\n return;\r\n }\r\n\r\n // Prevent errors from being escalated more than once an hour\r\n var exists = _exceptionCollection._collection.find(function (e) {\r\n return e.label === msg.FaultCode;\r\n });\r\n if (exists && !signInResponse.isManaged && !signInResponse.isPartlyManaged) {\r\n return;\r\n }\r\n else {\r\n _exceptionCollection.push(false, msg.FaultCode);\r\n }\r\n\r\n\r\n var time = moment();\r\n var messageId = guid.v1();\r\n\r\n var trackingMessage =\r\n {\r\n _message: msg.MessageBuffer,\r\n NodeId: settingsHelper.settings.id,\r\n ContentType: msg.ContentType,\r\n LastActivity: lastActionId,\r\n NextActivity: null,\r\n Node: settingsHelper.settings.nodeName,\r\n NodeDescription: settingsHelper.settings.nodeDescription,\r\n MessageId: messageId,\r\n Variables: null,\r\n OrganizationId: settingsHelper.settings.organizationId,\r\n IntegrationName: msg.IntegrationName,\r\n Environment: msg.Environment,\r\n TrackingLevel: msg.TrackingLevel,\r\n InterchangeId: msg.InterchangeId,\r\n ItineraryId: msg.ItineraryId,\r\n IntegrationId: msg.IntegrationId,\r\n FaultCode: msg.FaultCode,\r\n FaultDescription: msg.FaultDescripton,\r\n IsFirstAction: msg.IsFirstAction,\r\n TimeStamp: time.utc().toISOString(),\r\n IsFault: true,\r\n CreateTicket: msg.CreateTicket,\r\n State: status\r\n };\r\n\r\n if (com)\r\n com.Track(trackingMessage);\r\n\r\n if (_applicationinsights)\r\n _applicationinsights.trackException(trackingMessage);\r\n }", "_handleError(event) {\r\n console.log(event);\r\n this.message = \"\";\r\n this.$.toast.open();\r\n }", "function registerEventError(errorMessage) {\n registerWebview.emit('error', errorMessage);\n}", "function logEvent(eventType) {}", "function handleMessage(message_event) {\n appendToEventLog('nexe sez: ' + message_event.data);\n}" ]
[ "0.6757238", "0.6754137", "0.6754137", "0.6212283", "0.61623216", "0.61272734", "0.59746504", "0.5740891", "0.5721274", "0.56346023", "0.5613217", "0.54491013", "0.5407224", "0.53112984", "0.5293176", "0.52926975", "0.5279179", "0.52343935", "0.52094734", "0.51829946", "0.5165", "0.51500785", "0.5143564", "0.51428294", "0.514043", "0.5101505", "0.5054815", "0.5046333", "0.49981683", "0.49943563", "0.49929464", "0.49845102", "0.49628666", "0.49505433", "0.49217173", "0.49092215", "0.48948264", "0.48886997", "0.48806578", "0.48620528", "0.48518705", "0.48313808", "0.4827313", "0.4822895", "0.4819412", "0.48096567", "0.48058006", "0.4804205", "0.4796245", "0.47880557", "0.47876936", "0.47625402", "0.47612074", "0.4744746", "0.474439", "0.4743467", "0.47432488", "0.47347414", "0.47328395", "0.47238153", "0.47108313", "0.4693447", "0.46930385", "0.46827313", "0.46810582", "0.4669259", "0.4659704", "0.46259767", "0.46206102", "0.46185425", "0.46171665", "0.46167982", "0.46142188", "0.46107557", "0.4608989", "0.4607724", "0.4607724", "0.4607724", "0.45996144", "0.45923218", "0.45778698", "0.45769587", "0.45741624", "0.45741624", "0.45728156", "0.45694995", "0.45636028", "0.45632076", "0.45620084", "0.45596898", "0.4558626", "0.4557304", "0.45537135", "0.45519164", "0.45405465", "0.4538393", "0.4536381", "0.45271483", "0.4523311" ]
0.65417737
4
Captures a message event and sends it to Sentry.
function captureMessage(message, captureContext) { var syntheticException; try { throw new Error(message); } catch (exception) { syntheticException = exception; } // This is necessary to provide explicit scopes upgrade, without changing the original // arity of the `captureMessage(message, level)` method. var level = typeof captureContext === 'string' ? captureContext : undefined; var context = typeof captureContext !== 'string' ? { captureContext: captureContext } : undefined; return callOnHub('captureMessage', message, level, Object(tslib_es6["a" /* __assign */])({ originalException: message, syntheticException: syntheticException }, context)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function handleMessage(message_event) {\n appendToEventLog('nexe sez: ' + message_event.data);\n}", "dispatchMessageEvent(){\n const detail = this.getMessage();\n const event = new CustomEvent('message', {detail});\n this.dispatchEvent(event);\n }", "_eventHandler(message) {\n // push to web client\n this._io.emit('service:event:' + message.meta.event, message.payload)\n this._io.emit('_bson:service:event:' + message.meta.event,\n this._gateway._connector.encoder.pack(message.payload))\n }", "function onSendMessage(e)\n{\n\tvar self = this;\n\te.preventDefault();\n\n\tshh.post({\n\t\t\"from\": this.identity,\n\t\t\"topic\": [ web3.fromAscii(TEST_TOPIC) ],\n\t\t\"payload\": [ web3.fromAscii(self.messagePayload()) ],\n\t\t\"ttl\": 1000,\n\t\t\"priority\": 10000\n\t});\n}", "function SendMessage(message)\n{\n client.sendEvent(new Message(JSON.stringify(message))); //, printResultFor(\"send\"));\n}", "function receivedMessage(event) {\n messageHandler.handleMessage(event);\n }", "function receivedMessage(event) {\n\n console.log(\"RECEIVED MESSAGE\");\n var senderID = event.sender.id;\n var recipientID = event.recipient.id;\n var timeOfMessage = event.timestamp;\n var message = event.message;\n\n console.log(\"Received message for user %d and page %d at %d with message:\", \n senderID, recipientID, timeOfMessage);\n //console.log(JSON.stringify(message));\n\n var messageId = message.mid;\n\n // You may get a text or attachment but not both\n var messageText = message.text;\n var messageAttachments = message.attachments;\n\n if (messageText) {\n\n // If we receive a text message, check to see if it matches any special\n // keywords and send back the corresponding example. Otherwise, just echo\n // the text we received.\n switch (messageText) {\n case 'personalizado':\n sendPersonalMessage(senderID);\n break;\n\n default:\n sendInitialMessage(senderID);\n }\n } else if (messageAttachments) {\n sendTextMessage(senderID, \"Message with attachment received\");\n }\n}", "function logEvent(message) {\n debug('logEvent: message=\"%s\"', message);\n var eventTimestamp = Math.floor(new Date());\n var newEvent = {\n message: message,\n timestamp: eventTimestamp\n }\n logParams.logEvents.push(newEvent);\n}", "tell(event, message) {\n this.eventStream.emit(event, message);\n }", "function handler(ev) {\n var event = ev || window.event,\n target = event.target || event.srcElement,\n msg;\n\n event.preventDefault();\n msg = $(\"msg\").value.trim();\n\n var newMessageEvent = new CustomEvent(\"newMessage\", {\n detail: {\n message: msg,\n time: new Date()\n }\n });\n\n target.dispatchEvent(newMessageEvent);\n}", "onMessage(event) {\n try {\n const data = JSON.parse(event.data);\n // data.event is used to lookup which registered listener to call\n this.ee.emit(data.event, data);\n } catch (error) {\n this.ee.emit('error', error);\n }\n }", "receivedMessage( event ) {\n\n var senderID = event.sender.id;\n var recipientID = event.recipient.id;\n var timeOfMessage = event.timestamp;\n var message = event.message;\n\n console.log( \"Received message for user %d and page %d at %d with message:\",\n senderID, recipientID, timeOfMessage );\n console.log( 'Message', JSON.stringify( message ) );\n\n var isEcho = message.is_echo;\n var messageId = message.mid;\n var appId = message.app_id;\n var metadata = message.metadata;\n\n // You may get a text or attachment but not both\n var messageText = message.text;\n var messageAttachments = message.attachments;\n var quickReply = message.quick_reply;\n\n if ( isEcho ) {\n // Just logging message echoes to console\n console.log( \"Received echo for message %s and app %d with metadata %s\",\n messageId, appId, metadata );\n return;\n }\n\n if ( messageText ) {\n if ( [ 'hi', 'hello' ].indexOf( messageText.toLowerCase().trim() ) !== -1 ) return messengerGeneric.sendTextMessage( senderID, 'Hi.' );\n messengerGeneric.sendTypingOn( senderID );\n setTimeout( () => {\n messengerGeneric.sendTextMessage( senderID, 'Nope.' );\n }, messageText.length * 10 < 20000 ? messageText.length * 10 : 20000 );\n }\n }", "function receivedMessage(event) {\n var senderID = event.sender.id;\n var recipientID = event.recipient.id;\n var timeOfMessage = event.timestamp;\n var message = event.message;\n\n console.log(\"Received message for user %d and page %d at %d with message:\", senderID, recipientID, timeOfMessage);\n console.log(JSON.stringify(message));\n\n var isEcho = message.is_echo;\n var messageId = message.mid;\n var appId = message.app_id;\n var metadata = message.metadata;\n\n // You may get a text or attachment but not both\n var messageText = message.text;\n var messageAttachments = message.attachments;\n var quickReply = message.quick_reply;\n\n if (isEcho) {\n // Just logging message echoes to console\n console.log(\"Received echo for message %s and app %d with metadata %s\", messageId, appId, metadata);\n return;\n } else if (quickReply) {\n var quickReplyPayload = quickReply.payload;\n console.log(\"Quick reply for message %s with payload %s\", messageId, quickReplyPayload);\n\n sendTextMessage(senderID, \"Quick reply tapped\");\n return;\n }\n\n if (messageText) {\n\n // If we receive a text message, check to see if it matches any special\n // keywords and send back the corresponding example. Otherwise, just echo\n // the text we received.\n switch (messageText) {\n case 'image':\n sendImageMessage(senderID);\n break;\n\n case 'gif':\n sendGifMessage(senderID);\n break;\n\n case 'audio':\n sendAudioMessage(senderID);\n break;\n\n case 'video':\n sendVideoMessage(senderID);\n break;\n\n case 'file':\n sendFileMessage(senderID);\n break;\n\n case 'button':\n sendButtonMessage(senderID);\n break;\n\n case 'generic':\n sendGenericMessage(senderID);\n break;\n\n case 'receipt':\n sendReceiptMessage(senderID);\n break;\n\n case 'quick reply':\n sendQuickReply(senderID);\n break;\n\n case 'read receipt':\n sendReadReceipt(senderID);\n break;\n\n case 'typing on':\n sendTypingOn(senderID);\n break;\n\n case 'typing off':\n sendTypingOff(senderID);\n break;\n\n case 'account linking':\n sendAccountLinking(senderID);\n break;\n\n default:\n processMessageText(senderID, messageText);\n\n }\n } else if (messageAttachments) {\n console.info(\"messageAttachments: \" + JSON.stringify(messageAttachments));\n for (var i = 0; i < messageAttachments.length; i++) {\n let upsert = {\n title: messageAttachments[i].type + ' attachment from messenger',\n body: messageAttachments[i].payload.url,\n attachment: {\n type: messageAttachments[i].type,\n url: messageAttachments[i].payload.url\n }\n };\n\n if (messageAttachments[i].type == 'image') {\n console.info(\"processing image \" + messageAttachments[i].payload.url);\n\n vision.detectText(messageAttachments[i].payload.url).then(function(data) {\n try {\n console.info(\"processing data \" + JSON.stringify(data));\n var text = data[0][0];\n sendTextMessage(senderID, text.substring(0, 640));\n\n upsert.body = text;\n upsertDocument.call(upsert, function(err, result) {\n if (err) {\n throw new Error(err);\n } else {\n sendTextMessage(senderID, \"document added\");\n }\n });\n } catch (err) {\n console.error(err);\n sendTextMessage(senderID, \"something went wrong with \" + err.toString());\n }\n\n });\n } else if (messageAttachments[i].type == 'audio' || messageAttachments[i].payload.url.includes('.audio')) {\n console.info(\"processing audio \" + messageAttachments[i].payload.url);\n try {\n if (messageAttachments[i].payload.url.includes('.audio')) {\n speechRecognize(senderID, messageAttachments[i].payload.url);\n } else {\n console.info(\"going to zamzar with \" + messageAttachments[i].payload.url);\n const apiKey = Meteor.settings.ZAMZAR_API_KEY;\n const formData = {\n target_format: 'flac',\n source_file: messageAttachments[i].payload.url\n };\n\n request.post({\n url: 'https://sandbox.zamzar.com/v1/jobs/',\n formData: formData\n }, function(err, response, body) {\n if (err) {\n console.error('Unable to start conversion job', err);\n } else {\n console.log('SUCCESS! Conversion job started:', JSON.parse(body));\n const jobID = JSON.parse(body).id;\n\n processRecording(jobID, apiKey, senderID);\n }\n }).auth(apiKey, '', true);\n }\n } catch (err) {\n console.error(err);\n sendTextMessage(senderID, \"something went wrong with \" + err.toString());\n }\n } else {\n upsertDocument.call(upsert, function(error, result) {\n if (error) {\n console.error(error);\n } else {\n sendTextMessage(senderID, \"saved message with \" + messageAttachments[i].type);\n }\n });\n }\n sendTextMessage(senderID, \"processing message with audio\");\n }\n }\n}", "function game_sender(event)\n\t{\n\t\tconsole.log(ghAPIname + \": Sending message: '\"+event+\"'\");\n\t\twindow.postMessage(event,\"*\");\n\t}", "run () {\n this._client.on('messageCreate', this.onMessageCreateEvent.bind(this))\n this._client.on('messageReactionAdd', this.onMessageReactionEvent.bind(this))\n this._client.on('messageReactionRemove', this.onMessageReactionEvent.bind(this))\n }", "startEventListener() {\n Utils.contract.MessagePosted().watch((err, { result }) => {\n if(err)\n return console.error('Failed to bind event listener:', err);\n\n console.log('Detected new message:', result.id);\n this.fetchMessage(+result.id);\n });\n }", "function receivedMessage(event) {\n var senderID = event.sender.id;\n var recipientID = event.recipient.id;\n var timeOfMessage = event.timestamp;\n var message = event.message;\n\n console.log(\"Received message for user %d and page %d at %d with message:\",\n senderID, recipientID, timeOfMessage);\n console.log(JSON.stringify(message));\n\n var messageId = message.mid;\n var appId = message.app_id;\n var metadata = message.metadata;\n\n // You may get a text or attachment but not both\n var messageText = message.text;\n\n if (messageText) {\n\n // If we receive a text message, check to see if it matches any special\n // keywords and send back the corresponding example. Otherwise, just echo\n // the text we received.\n // proposeActivity(senderID);\n } else if (messageAttachments) {\n // sendTextMessage(senderID, \"Sorry could you please write text?\");\n }\n}", "function handleReceiveMessage(event) {\n console.log(event.data);\n}", "function handleMessage(event) {\r\n\t\t//console.log('Received message: ' + event.data);\r\n\t\tvar data = JSON.parse(event.data);\r\n\t\thandleReceiveData(data);\r\n\t}", "function receivedMessage(event) {\n const senderID = event.sender.id;\n const recipientID = event.recipient.id;\n const timeOfMessage = event.timestamp;\n const message = event.message;\n\n if(message.is_echo) {\n // for now simply log a message and return 200;\n // logger.info(\"Echo message received. Doing nothing at this point\");\n return;\n }\n\n // logger.info(\"receivedMessage: Received event for user %d, page %d, session %d at timestamp: %d, guid: %s Event: \", senderID, recipientID, this.session.fbid, timeOfMessage, this.session.guid, JSON.stringify(event));\n\n const messageText = message.text;\n const messageAttachments = message.attachments;\n if (messageText) {\n // If we receive a text message, check to see if it matches any special\n // keywords and send back the corresponding example. Otherwise, just echo\n // the text we received.\n switch (messageText) {\n case 'generic':\n sendGenericMessage(senderID);\n break;\n default:\n determineResponseType.call(this, event);\n }\n } else if (messageAttachments) {\n const response = this.travelSfoPageHandler.handleSendingAttractionsNearMe(message, this.pageId, senderID);\n // const response = this.travelSfoPageHandler.handleSendingAttractionsNearMeVegas(message, this.pageId, senderID);\n if(response) return callSendAPI.call(this, response);\n const stickerId = message.sticker_id;\n if(stickerId && stickerId === 369239263222822) {\n const handleMesg = this.travelSfoPageHandler.handleLikeButton(this.pageId, senderID);\n if(handleMesg) {\n if(Array.isArray(handleMesg)) {\n callSendAPI.call(this, handleMesg[0]);\n const self = this;\n setTimeout(function() {\n callSendAPI.call(self, handleMesg[1]);\n }, 2000);\n return;\n }\n return callSendAPI.call(this, handleMesg);\n }\n return sendTextMessage.call(this, senderID, \"Glad you like us!\");\n }\n sendTextMessage.call(this, senderID, \"Message with attachment received\");\n }\n}", "function trackEvent(logLevel, message) {\n var prefix = deviceId ? deviceId + ' - ' : '';\n\n TrackingService.trackEvent(logLevel, prefix + message);\n }", "function eventHandler(message){\n bdayHandler(message);\n}", "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\" + message.payloadString);\n write(message.payloadString);\n}", "function messageListener(event) {\r\n //console.log(event.data);\r\n }", "function traceMessage (event) {\n\t\t_logger.log(_prefix, 'trace event message: ' + event.data.message);\n\t\tif (_pageNotificationCallback) {\n\t\t\t_pageNotificationCallback('message', event.data.message);\n\t\t}\n\t}", "send (debuggingData, context, functionDetails, payload) {\n const detail = this.createEventDetail(debuggingData, context, functionDetails, payload)\n\n if (this.isConnected) {\n const event = new window.CustomEvent('cerebral2.client.message', {\n detail\n })\n window.dispatchEvent(event)\n } else {\n this.backlog.push(detail)\n }\n }", "function receivedMessage(event) {\n console.log(\"event: \" + JSON.stringify(event));\n\n var senderID = event.sender.id;\n var recipientID = event.recipient.id;\n var timeOfMessage = event.timestamp;\n var message = event.message;\n console.log(\"Received message for user %d and page %d at %d with message:\",\n senderID, recipientID, timeOfMessage);\n console.log(JSON.stringify(message));\n\n var isEcho = message.is_echo;\n var messageId = message.mid;\n var appId = message.app_id;\n var metadata = message.metadata;\n\n // You may get a text or attachment but not both\n var messageText = message.text;\n var messageAttachments = message.attachments;\n var quickReply = message.quick_reply;\n\n if (isEcho) {\n // Just logging message echoes to console\n console.log(\"Received echo for message %s and app %d with metadata %s senderID :%s recipientID : %s\",\n messageId, appId, metadata, senderID, recipientID);\n try {\n if (messageAttachments[0].title == \"Dang.ai\") {\n // for send message button in ads\n sendTextMessage(recipientID, \"นี่คือ 😁\\nไอ้แดง - Dang.ai \\n\\nต้องการเล่น Quiz พิมพ์ เล่น,เริ่ม,play,start หรือกดปุ่ม เล่น Quiz ด้านล่าง\\n\\nต้องการดูการทำงานอื่นๆ พิมพ์ #help\");\n }\n } catch (e) {\n\n }\n _metadata.metadataProcess(metadata, function(results) {\n if (results.results != null) {\n for (var i = 0; i < results.results.length; i++) {\n console.log(\"callSendAPI :\" + JSON.stringify(results.results[i]));\n callSendAPI(results.results[i]);\n //return;\n }\n }\n });\n } else if (quickReply) {\n var quickReplyPayload = quickReply.payload;\n console.log(\"Quick reply for message %s with payload %s\",\n messageId, quickReplyPayload);\n\n //sendTextMessage(senderID, \"Quick reply tapped\");\n _quickreply.payloadProcess(senderID, quickReplyPayload, function(results) {\n if (results.results != null) {\n callSendAPI(results.results.messageText);\n setTimeout(function() {\n if (results.results.quizData != null) {\n callSendAPI(results.results.quizData);\n }\n }, 1000);\n\n }\n return;\n });\n\n }\n\n if (messageText && !isEcho) {\n _fbMessageProcess.process(senderID, messageText);\n } else if (messageAttachments) {\n sendTextMessage(senderID, \"นี่คือ 😁\\nไอ้แดง - Dang.ai \\n\\nต้องการเล่น Quiz พิมพ์ เล่น,เริ่ม,play,start หรือกดปุ่ม เล่น Quiz ด้านล่าง\\n\\nต้องการดูการทำงานอื่นๆ พิมพ์ #help\");\n }\n}", "function process_event(event){\n // Capturamos los datos del que genera el evento y el mensaje \n var senderID = event.sender.id;\n var message = event.message;\n \n // Si en el evento existe un mensaje de tipo texto\n if(message.text){\n // Crear un payload para un simple mensaje de texto\n var response = {\n \"text\": 'Has escrito lo siguiente: ' + message.text\n }\n }\n // Enviamos el mensaje mediante SendAPI\n enviar_texto(senderID, response);\n}", "publishOneMessage(message) {\n try {\n appClient.connect();\n } catch (err) {\n logException(\"publishOneMessage\", err);\n }\n appClient.on('connect', () => {\n try {\n let myData = {MESSAGE: message};\n appClient.publishDeviceEvent(DEFAULT_DEVICE_TYPE, DEFAULT_DEVICE_ID, MESSAGE_FROM_WEBBAPP, MESSAGE_FORMAT, myData, QOS_LEVEL);\n logPublishOneMessage(DEFAULT_DEVICE_TYPE, DEFAULT_DEVICE_ID, MESSAGE_FROM_WEBBAPP, MESSAGE_FORMAT, myData, QOS_LEVEL);\n } catch (err) {\n logException(\"publishOneMessage\", err);\n }\n });\n }", "function handleEntry(entry) {\n\tentry.messaging.forEach(event => {\n\t\tif (event.message) {\n\t\t\t// Got a new message.\n\t\t\t// We retrieve the message content\n\t\t\tconst {text, attachments} = event.message;\n\t\t\t// fbid of sender\n\t\t\tconst sender = event.sender.id;\n\n\t\t\tfbSend.typing(sender);\n\n\t\t\tif (attachments) {\n\t\t\t\tfbSend.text(sender, 'Sorry I can only process text messages for now.')\n\t\t\t\t.catch(console.error);\n\t\t\t} else if (text) {\n\t\t\t\t// Forwarding the message to the Wit.ai Bot Engine\n\t\t\t\t// This will run all actions until our bot has nothing left to do\n\t\t\t\twitBot.process(sender, text)\n\t\t\t\t.then(context => { // after bot is done\n\t\t\t\t\t\tif (context.text) {\n\t\t\t\t\t\t\tfbSend.text(sender, context.text);\n\t\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.catch((err) => {\n\t\t\t\t\tconsole.error('Got an error from Wit: ', err.stack || err);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t});\n}", "function message (data) {\n let name = data.source.name\n let screenName = data.source.screen_name\n \n // DM user\n\n console.log('Messaged by: ' + name + ' @' + screenName)\n}", "triggerEvent(event) {\n\t\treturn _makeRequest('/events', {method: 'POST', body: {event}})\n\t\t\t.then(responseData => {\n\t\t\t\tif(responseData.success){\n\t\t\t\t\tconsole.log('Event Sent', event);\n\t\t\t\t}\n\t\t\t})\n\t\t\t.catch(error => {\n\t\t\t\tconsole.error(error);\n\t\t\t});\n\t}", "function sendMessageForEvent(event){\n\tvar eventName = event.title;\n\tvar participantList = event.participants;\n\tvar eventDate = new Date(event.eventDate);\n\t//get phone numbers for user\n\tuserService.getMobileNumberForUsers(participantList, function(err, phoneNumberList){\n\t\tvar smsContent = \"You have \" + eventName + \" tomorrow.\";\n\t\tif(phoneNumberList.length > 0){\n\t\t\tfor(var i = 0; i < phoneNumberList.length; i++){\n\t\t\t\tsmsSender.sendSms(phoneNumberList[i].profile.mobileNumber, smsContent);\n\t\t\t}\n\n\t\t\tevent.isRemind = true;\n\t\t\teventService.saveEvent(event, function(err){});\n\t\t}\t\t\n\n\t});\n}", "function sendMessage(message) {\n drone.publish({\n room: roomName,\n message,\n });\n }", "function receivedMessage(event){\n var senderID = event.sender.id\n var recipientID = event.recipient.id\n var timeOfMessage = event.timestamp\n var message = event.message\n\n console.log(\"Received message for user %d and page %d at %d with message:\",\n senderID, recipientID, timeOfMessage);\n console.log(JSON.stringify(message));\n\n var messageId = message.mid\n\n var messageText = message.text\n var messageAttachments = message.attachments\n\n if (messageText) {\n var simpleText = messageText.toLowerCase()\n\n // If we receive a text message, check to see if it matches a keyword\n switch (simpleText) {\n case 'my schools':\n mySchool(senderID)\n break;\n case 'start':\n welcomeMessage(senderID)\n break;\n case 'points':\n pointStanding(senderID)\n break;\n case 'events':\n postSchedule(senderID)\n break;\n case 'schedule':\n postSchedule(senderID)\n break;\n case 'initrank':\n initializeSchoolRank(senderID)\n break;\n case '9th - 13th':\n displayRanks(senderID,\"boy\",13)\n break;\n case '14th - 18th':\n displayRanks(senderID,\"boy\",18)\n break;\n case '19th - 23th':\n displayRanks(senderID,\"boy\",23)\n break;\n case '24th - 28th':\n displayRanks(senderID,\"boy\",28)\n break;\n break;\n default:\n askAgent(senderID,simpleText)\n //defaultResponse(senderID)\n }\n } else if (messageAttachments) {\n sendTextMessage(senderID, \"Message with attachment received\")\n }\n // Putting a stub for now, we'll expand it in the following steps\n console.log(\"Message data: \", event.message)\n }", "function sendMessage(message) {\n drone.publish({\n room: roomName,\n message\n });\n}", "function sendMessage(message) {\n drone.publish({\n room: roomName,\n message\n });\n}", "handleMessage(message) {\r\n console.log('Received message', message.payloadString);\r\n this.callbacks.forEach((callback) => callback(message));\r\n }", "function PostShabbatMessage(message){\n console.log(message)\n}", "function postEvent(eventName) {\n const body = {\n 'name': eventName //body\n };\n\n fetch('http://localhost:3000/events', { //endpoint\n method: 'post',\n body: JSON.stringify(body),\n headers: {\n 'Content-Type': 'application/json'\n },\n })\n .then(res => res.json())\n .then((json) => {\n newLine();\n console.table(json);\n endLine();\n continueCallback();\n });\n }", "function receivedMessage(event) {\n var senderID = event.sender.id;\n var recipientID = event.recipient.id;\n var timeOfMessage = event.timestamp;\n var message = event.message;\n\n console.log(\"Received message for user %d and page %d at %d with message:\", \n senderID, recipientID, timeOfMessage);\n console.log(JSON.stringify(message));\n\n var messageId = message.mid;\n var messageText = message.text;\n var messageAttachments = message.attachments;\n var messagePostback = message.payload;\n if (messageText) {\n\n // If we receive a text message, check to see if it matches a keyword\n // and send back the example. Otherwise, just echo the text we received.\n switch (classifier.classify(messageText)) {\n // Be friendly! After all civiility costs nothing except a few\n // lines of code :p\n case 'greet':\n sendTextMessage(senderID, 'Hi! How can I help you today? You can ask me things like \"show me the categories\" or \"what\\'s the weather in Johannesburg\" and I\\'ll try me best to help. So, what will it be?');\n break;\n\n // Lists the categories\n case 'categories':\n sendTextMessage(senderID, 'Okay, let me retrieve them for you.');\n sendCategoriesMessage(senderID);\n break;\n\n // Weather related searches\n case 'weather':\n sendWeatherMessage(senderID, messageText);\n break;\n\n default:\n sendTextMessage(senderID, 'I\\'m sorry but I did not understand your question. You can ask me things like \"show me the categories\" or \"what\\'s the weather in Johannesburg\" and I\\'ll try me best to help. So, what will it be?');\n }\n } else if (messageAttachments) {\n sendTextMessage(senderID, \"Message with attachment received\");\n }\n}", "function process_event(event){\n // Capturamos los datos del que genera el evento y el mensaje \n var senderID = event.sender.id;\n var message = event.message;\n \n // Si en el evento existe un mensaje de tipo texto\n if(message.text){\n // Crear un payload para un simple mensaje de texto\n console.log(senderID);\n var response = {\n \"text\": 'Va que esto dijiste: ' + message.text\n \n }\n }\n \n // Enviamos el mensaje mediante SendAPI\n enviar_texto(senderID, response);\n}", "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\"+message.payloadString);\n}", "function receivedMessage(event) {\n if (!event.message.is_echo) {\n var message = event.message;\n var senderId = event.sender.id;\n\n console.log(\"Received message from senderId: \" + senderId);\n console.log(\"Message is: \" + JSON.stringify(message));\n\n // You may get a text or attachment but not both\n if (message.text) {\n var formattedMsg = message.text.toLowerCase().trim();\n\n // If we receive a text message, check to see if it matches any special\n // keywords and send back the corresponding movie detail.\n // Otherwise, search for new movie.\n switch (formattedMsg) {\n case \"hla!\":\n case \"hola!\":\n case \"hi!\":\n case \"hi\":\n case \"hello\":\n case \"hola\":\n sendMessageText(senderId, \"Hola! Gracias por saludarnos\");\n break;\n\n default:\n sendMessageText(senderId, \"Hola! Ahora estamos algo ocupados! Cuéntanos tu duda o consulta. A penas podamos, te responderemos! Que tengas un estupendo día!\");\n }\n } else if (message.attachments) {\n sendMessage(senderId, {text: \"Sorry. No entiendo lo que quieres decir :(\"});\n }\n }\n}", "function handleSendEmailClick(event) {\n console.log(\" sendNewMessage()...\");\n sendNewMessage();\n}", "function handleMessage(e) {\n\t\tif (!e.data) return;\n\n\t\tvar payload;\n\t\ttry {\n\t\t\tpayload = JSON.parse(e.data);\n\t\t} catch (e) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!payload) return;\n\n\t\tvar handler = handlers[payload.event];\n\t\tif (handler) {\n\t\t\thandler(e.source, payload);\n\t\t}\n\t}", "_onStreamEvent(message) {\n let eventTarget;\n if (this._publication && message.id === this._publication.id) {\n eventTarget = this._publication;\n } else if (\n this._subscribedStream && message.id === this._subscribedStream.id) {\n eventTarget = this._subscription;\n }\n if (!eventTarget) {\n return;\n }\n let trackKind;\n if (message.data.field === 'audio.status') {\n trackKind = TrackKind.AUDIO;\n } else if (message.data.field === 'video.status') {\n trackKind = TrackKind.VIDEO;\n } else {\n Logger.warning('Invalid data field for stream update info.');\n }\n if (message.data.value === 'active') {\n eventTarget.dispatchEvent(new MuteEvent('unmute', {kind: trackKind}));\n } else if (message.data.value === 'inactive') {\n eventTarget.dispatchEvent(new MuteEvent('mute', {kind: trackKind}));\n } else {\n Logger.warning('Invalid data value for stream update info.');\n }\n }", "on_message(message) {\r\n }", "on_message(message) {\r\n }", "on_message(message) {\r\n }", "_processEvent(event, hint, scope) {\n const options = this.getOptions();\n const { sampleRate } = options;\n\n if (!this._isEnabled()) {\n return rejectedSyncPromise(new SentryError('SDK not enabled, will not capture event.', 'log'));\n }\n\n const isTransaction = isTransactionEvent(event);\n const isError = isErrorEvent(event);\n const eventType = event.type || 'error';\n const beforeSendLabel = `before send for type \\`${eventType}\\``;\n\n // 1.0 === 100% events are sent\n // 0.0 === 0% events are sent\n // Sampling for transaction happens somewhere else\n if (isError && typeof sampleRate === 'number' && Math.random() > sampleRate) {\n this.recordDroppedEvent('sample_rate', 'error', event);\n return rejectedSyncPromise(\n new SentryError(\n `Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`,\n 'log',\n ),\n );\n }\n\n const dataCategory = eventType === 'replay_event' ? 'replay' : eventType;\n\n return this._prepareEvent(event, hint, scope)\n .then(prepared => {\n if (prepared === null) {\n this.recordDroppedEvent('event_processor', dataCategory, event);\n throw new SentryError('An event processor returned `null`, will not send event.', 'log');\n }\n\n const isInternalException = hint.data && (hint.data ).__sentry__ === true;\n if (isInternalException) {\n return prepared;\n }\n\n const result = processBeforeSend(options, prepared, hint);\n return _validateBeforeSendResult(result, beforeSendLabel);\n })\n .then(processedEvent => {\n if (processedEvent === null) {\n this.recordDroppedEvent('before_send', dataCategory, event);\n throw new SentryError(`${beforeSendLabel} returned \\`null\\`, will not send event.`, 'log');\n }\n\n const session = scope && scope.getSession();\n if (!isTransaction && session) {\n this._updateSessionFromEvent(session, processedEvent);\n }\n\n // None of the Sentry built event processor will update transaction name,\n // so if the transaction name has been changed by an event processor, we know\n // it has to come from custom event processor added by a user\n const transactionInfo = processedEvent.transaction_info;\n if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) {\n const source = 'custom';\n processedEvent.transaction_info = {\n ...transactionInfo,\n source,\n };\n }\n\n this.sendEvent(processedEvent, hint);\n return processedEvent;\n })\n .then(null, reason => {\n if (reason instanceof SentryError) {\n throw reason;\n }\n\n this.captureException(reason, {\n data: {\n __sentry__: true,\n },\n originalException: reason ,\n });\n throw new SentryError(\n `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\\nReason: ${reason}`,\n );\n });\n }", "pushEvent(self, event, ref, message) {\n firebase.database.ref(ref).child(event[\"key\"]).set({\n name: event[\"name\"],\n startDate: event[\"startDate\"],\n duration: parseInt(event[\"duration\"]),\n location: event[\"location\"],\n organization: event[\"organization\"],\n imgid: event[\"imgid\"],\n description: event[\"description\"],\n webLink: event[\"webLink\"],\n tags: this.state.tags.toString(),\n email: event[\"email\"],\n });\n self.setState({ uploading: false });\n self.displayMessage(self, message);\n this.group.leave(this.token);\n }", "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\"+message.payloadString);\n}", "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\"+message.payloadString);\n}", "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\"+message.payloadString);\n}", "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\"+message.payloadString);\n}", "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\"+message.payloadString);\n}", "onClientMessage(message) {\n try {\n // Decode the string to an object\n const { event, payload } = JSON.parse(message);\n\n this.emit(\"message\", event, payload);\n } catch {}\n }", "sendEventDetails(message, options) {\n\t\tconst eventDetailsEmbed = this.createEventDetailsEmbed(options, message);\n\n\t\treturn message.channel.send({\n\t\t\tfiles: eventDetailsEmbed.messageAttachments,\n\t\t\tembed: eventDetailsEmbed.messageEmbed\n\t\t});\n\t}", "function onMessageArrived(message) {\n\tconsole.log(\"onMessageArrived:\"+message.payloadString); \n}", "async function sendMessage (event) {\n console.log('sendMessage');\n const messageInput = document.getElementById('message-text');\n\n // Create a new message with the input field value\n await app.service('messages').create({\n text: messageInput.value\n });\n\n messageInput.value = '';\n}", "sendMessage(message) {\n if (this.handler) {\n this.handler.sendMessageFor(message, this.identity);\n }\n }", "function enter(e) {\n if (e.key === 'Enter') {\n postChatMessage() // fires off post message function\n }\n}", "onMessage( message ) {\n\t\tconsole.log(`Received message from client: ${ message.toString() }`);\n\t}", "function onMessageReceived(e) {\n console.log('message received');\n console.log(e);\n var msg = JSON.parse(e.data);\n console.log(msg.event);\n switch (msg.event) {\n case 'ready':\n onReady();\n break;\n case 'finish': \n onFinish();\n break;\n };\n }", "function handleMessage(event) {\n const { data } = event;\n const { type, payload } = data;\n\n switch (type) {\n case 'SANDBOX.DISPATCH.MODIFY':\n dispatch({ type: 'MODIFY', payload });\n break;\n case 'SANDBOX.STATE.REQUEST':\n postUpdate();\n break;\n case 'SANDBOX.DISPATCH.SELECT':\n dispatch({ type: 'SELECT', payload });\n break;\n default:\n console.log('WARNING: Unsupported message.');\n }\n }", "async _send() {\n clearTimeout(this._sendTimeout);\n if (this._eventQueue.length > 0) {\n const path = [\n `/log?v=${LOG_VERSION}`,\n toQueryString(this._pageParams),\n toQueryString(this._userParams),\n ].join('&');\n\n const body = this._eventQueue.map((ep) => toQueryString(ep)).join('\\n');\n\n // Use `navigator.sendBeacon()` if available, with a fallback to `fetch()`\n (navigator.sendBeacon && navigator.sendBeacon(path, body)) ||\n fetch(path, {body, method: 'POST', keepalive: true});\n\n this._eventQueue = [];\n }\n }", "function send () {\n Cute.get(\n // Send the event name and emission number as URL params.\n Beams.endpointUrl + '&m=' + Cute.escape(name) + '&n=' + Beams.emissionNumber,\n // Send the message data as POST body so we're not size-limited.\n 'd=' + Cute.escape(data),\n // On success, there's nothing we need to do.\n function () {\n Beams.retryTimeout = Beams.retryMin\n },\n // On failure, retry.\n function () {\n Beams.retryTimeout = Math.min(Beams.retryTimeout * Beams.retryBackoff, Beams.retryMax)\n setTimeout(send, Beams.retryTimeout)\n }\n )\n }", "function sendMessage() {\n\n channel.push('shout', { \n name: name.value || \"guest\", // get value of \"name\" of person sending the message. Set guest as default\n message: msg.value, // get message text (value) from msg input field.\n inserted_at: new Date() // date + time of when the message was sent\n });\n\n msg.value = ''; // reset the message input field for next message.\n}", "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\"+message.payloadString);\n }", "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\"+message.payloadString);\n }", "function onMessageArrived(message) {\n console.log(\"onMessageArrived:\" + message.payloadString);\n EventBus.dispatch(message.destinationName, this, message)\n }", "function incomingEvent(e) {\n trace(\"incomingEvent: \" + JSON.stringify(e));\n}", "function sendMessage(message) {\n\tdrone.publish({\n\t room: roomName,\n\t message\n\t});\n }", "function MinimaPostMessage(event, info){\n //Create Data Object\n var data = { \"event\": event, \"info\" : info };\n\n //And dispatch\n if(MINIMA_MAIN_CALLBACK){\n\t\tMINIMA_MAIN_CALLBACK(data);\t\n } \n}", "function receive(entry){\n //we could do a broadcast to all devices if we need to...\n console.log(\"Data: \" + entry.data + \", Timestamp: \" + entry.timestamp);\n}", "handleESPINOMessage(message) {\n console.log('Mensaje desde ESPino: ' + message);\n\n if (message === \"MS Detection\" || message === \"PIR Detection\") {\n email.sendMail(message);\n }\n serverClient.publish('web/messages', message);\n serverClient.publish('bot/messages', message);\n }", "_captureEvent(event, hint = {}, scope) {\n return this._processEvent(event, hint, scope).then(\n finalEvent => {\n return finalEvent.event_id;\n },\n reason => {\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n // If something's gone wrong, log the error as a warning. If it's just us having used a `SentryError` for\n // control flow, log just the message (no stack) as a log-level log.\n const sentryError = reason ;\n if (sentryError.logLevel === 'log') {\n logger.log(sentryError.message);\n } else {\n logger.warn(sentryError);\n }\n }\n return undefined;\n },\n );\n }", "log(message){\n // Send an HTTP request\n console.log(message);\n \n // Raise an event\n /*\n \n We first give the name of the event we want to emit. Then, we can pass\n some data. It's good practice to encapsulate the event argument in an\n object where the data is labeled. \n \n */\n this.emit('messageLogged', { id: 1, url: 'http://'});\n }", "function direct_message (data) {\n let name = data.source.name\n let screenName = data.source.screen_name\n \n // DM User\n\n console.log('Direct Messaged by: ' + name + ' @' + screenName)\n}", "_captureEvent(event, hint = {}, scope) {\n\t return this._processEvent(event, hint, scope).then(\n\t finalEvent => {\n\t return finalEvent.event_id;\n\t },\n\t reason => {\n\t if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n\t // If something's gone wrong, log the error as a warning. If it's just us having used a `SentryError` for\n\t // control flow, log just the message (no stack) as a log-level log.\n\t const sentryError = reason ;\n\t if (sentryError.logLevel === 'log') {\n\t logger.log(sentryError.message);\n\t } else {\n\t logger.warn(sentryError);\n\t }\n\t }\n\t return undefined;\n\t },\n\t );\n\t }", "function strap_log_event(evtText, appId) {\n\n var strap_params = {\n app_id : appId,\n resolution : \"144x168\",\n useragent : \"PEBBLE/2.0\"\n };\n\n var e = {\n \"payload\" : {\n \"51000\" : encodeURIComponent(evtText)\n }\n };\n\n // -------------------------\n // Strap API inclusion in appmessage\n // This allows Strap to process Strap-related messages\n // DO NOT EDIT\n // -------------------------\n if (strap_api_can_handle_msg(e.payload)) {\n clearTimeout(strap_api_timer_send);\n var params = strap_api_clone(strap_params);\n strap_api_log(e.payload, 200, params);\n strap_api_timer_send = setTimeout(function() {\n strap_api_log({}, 0, params);\n }, 10 * 1000);\n }\n // -------------------------\n\n}", "function processMessage (event) {\n var node = event.target;\n var parent = node.parentNode;\n var isLine = node.className.match(/line/);\n if (parent !== document.body || !isLine) return;\n triggerEvents(node);\n }", "sendDebugMessage(message) {\n if (this.settings.debug_messages) {\n this.postMessageToUser(this.settings.authorised_username, message, {\n as_user: true,\n });\n }\n }", "function handleMessage(message) {\n var logger = hier.getLogger(message.name)\n logger.dispatch(logger.importRecord(message))\n }", "emitMessage (event) {\n this.emit('on-message', event)\n }", "function onMessage(event) {\n var str = event.data.split(\"\\r\");\n var pos\n for (pos = 0; pos < str.length - 1; pos++) {\n if (logMessages.length >= maxLogs) {\n logMessages.shift();\n }\n logMessages.push(str[pos]);\n }\n}", "function sendMessage(message, drone) {\n drone.publish({\n room: roomName,\n message\n })\n}", "sendDM(data, id) {\r\n return this.T.post(\r\n 'direct_messages/events/new',\r\n {\r\n \"event\": {\r\n \"type\": \"message_create\",\r\n \"message_create\": {\r\n \"target\": {\r\n \"recipient_id\": id,\r\n },\r\n \"message_data\": {\r\n \"text\": data\r\n }\r\n }\r\n }\r\n }\r\n )\r\n }", "function eventToSentryRequest(event, api) {\n var sdkInfo = getSdkMetadataForEnvelopeHeader(api);\n var eventType = event.type || 'event';\n var useEnvelope = eventType === 'transaction' || api.forceEnvelope();\n var _a = event.debug_meta || {}, transactionSampling = _a.transactionSampling, metadata = tslib_1.__rest(_a, [\"transactionSampling\"]);\n var _b = transactionSampling || {}, samplingMethod = _b.method, sampleRate = _b.rate;\n if (Object.keys(metadata).length === 0) {\n delete event.debug_meta;\n }\n else {\n event.debug_meta = metadata;\n }\n var req = {\n body: JSON.stringify(sdkInfo ? enhanceEventWithSdkInfo(event, api.metadata.sdk) : event),\n type: eventType,\n url: useEnvelope ? api.getEnvelopeEndpointWithUrlEncodedAuth() : api.getStoreEndpointWithUrlEncodedAuth(),\n };\n // https://develop.sentry.dev/sdk/envelopes/\n // Since we don't need to manipulate envelopes nor store them, there is no\n // exported concept of an Envelope with operations including serialization and\n // deserialization. Instead, we only implement a minimal subset of the spec to\n // serialize events inline here.\n if (useEnvelope) {\n var envelopeHeaders = JSON.stringify(tslib_1.__assign(tslib_1.__assign({ event_id: event.event_id, sent_at: new Date().toISOString() }, (sdkInfo && { sdk: sdkInfo })), (api.forceEnvelope() && { dsn: api.getDsn().toString() })));\n var itemHeaders = JSON.stringify({\n type: eventType,\n // TODO: Right now, sampleRate may or may not be defined (it won't be in the cases of inheritance and\n // explicitly-set sampling decisions). Are we good with that?\n sample_rates: [{ id: samplingMethod, rate: sampleRate }],\n });\n // The trailing newline is optional. We intentionally don't send it to avoid\n // sending unnecessary bytes.\n //\n // const envelope = `${envelopeHeaders}\\n${itemHeaders}\\n${req.body}\\n`;\n var envelope = envelopeHeaders + \"\\n\" + itemHeaders + \"\\n\" + req.body;\n req.body = envelope;\n }\n return req;\n}", "_captureEvent(event, hint = {}, scope) {\n return this._processEvent(event, hint, scope).then(\n finalEvent => {\n return finalEvent.event_id;\n },\n reason => {\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n // If something's gone wrong, log the error as a warning. If it's just us having used a `SentryError` for\n // control flow, log just the message (no stack) as a log-level log.\n const sentryError = reason ;\n if (sentryError.logLevel === 'log') {\n utils.logger.log(sentryError.message);\n } else {\n utils.logger.warn(sentryError);\n }\n }\n return undefined;\n },\n );\n }", "function onSocketMessage(event) {\r\n\tappendContent(\"theMessages\", \"Received: \" + event.data + \"<br/>\");\r\n}", "log(message) {\n //Sends an HTTP request\n console.log('testing' + message);\n\n //Raise an event\n // 'this' references Logger class itself, which extends EventEmitter\n this.emit('messageLogged', { id: 1, url: 'http://' });\n }", "_eventChannel(event) {\n\n // IE9 requires the data to be extracted here as it will fail when trying to\n // set the data property of the event in the try / catch below\n\n // Extract the event data\n var eventData = event.data;\n\n // If this message came from this player, handle it\n if (this._validateEvent(event)) {\n\n // Store the event in the list of incoming messages\n this._messages.incoming = lastElements(this._messages.incoming.concat([event]), 25);\n\n // Always trigger a generic message event whenever a message is received\n this._triggerEvent('message');\n\n // Hand of the valid event to the be parsed and potentially\n // triggered\n this._triggerEvent(eventData);\n }\n }", "function SendMessage(e) {\r\n\r\n\t\te.preventDefault();\r\n\t\tvar msg = document.getElementById(\"msg\").value.trim();\r\n\r\n\t\tif (msg && window.CustomEvent) {\r\n\t\t\tvar event = new CustomEvent(\"newMessage\", {\r\n\t\t\t\tdetail: {\r\n\t\t\t\t\tmessage: msg,\r\n\t\t\t\t\ttime: new Date(),\r\n\t\t\t\t},\r\n\t\t\t\tbubbles: true,\r\n\t\t\t\tcancelable: true\r\n\t\t\t});\r\n\r\n\t\t\te.currentTarget.dispatchEvent(event);\r\n\t\t}\r\n\r\n\t}", "on(messageType, handler) {\n assert.string(messageType, 'messageType')\n assert.func(handler, 'handler')\n this._eventEmitter.on(messageType, handler)\n }", "sendEvent(event) {\n return new Promise((resolve, _) => {\n event.Channel = this.channel_name;\n event.ClientID = this.client_id;\n event.Store = this.store;\n this.sender.sendEvent(event).then(Response => {\n resolve(Response)\n })\n })\n }", "function onMessage(event) {\n\t\tconsole.log('Client socket: Message received: ' + event.data);\n\t\tcastEvent('onMessage', event);\n\t}", "function handleEvent(event) {\n switch (event.type) {\n case 'message':\n // create a echoing text message\n const echo = { type: 'text', text: event.message.text };\n\n // use reply API\n //return client.replyMessage(event.replyToken, echo);\n\n const message = event.message;\n switch (message.type) {\n case 'text':\n return client.replyMessage(event.replyToken, echo);\n return client.pushMessage(event.source.groupId, echo).catch((err)=>{\n console.log(err)\n });\n case 'image':\n return handleImage(message, event.replyToken);\n case 'video':\n return handleVideo(message, event.replyToken);\n case 'audio':\n return handleAudio(message, event.replyToken);\n case 'location':\n return handleLocation(message, event.replyToken);\n case 'sticker':\n return handleSticker(message, event.replyToken);\n default:\n throw new Error(`Unknown message: ${JSON.stringify(message)}`);\n }\n\n case 'follow':\n return replyText(event.replyToken, 'Got followed event');\n\n case 'unfollow':\n return console.log(`Unfollowed this bot: ${JSON.stringify(event)}`);\n\n case 'join':\n return replyText(event.replyToken, `Joined ${event.source.type}`);\n\n case 'leave':\n return console.log(`Left: ${JSON.stringify(event)}`);\n\n case 'postback':\n let data = event.postback.data;\n if (data === 'DATE' || data === 'TIME' || data === 'DATETIME') {\n data += `(${JSON.stringify(event.postback.params)})`;\n }\n return replyText(event.replyToken, `Got postback: ${data}`);\n\n case 'beacon':\n return replyText(event.replyToken, `Got beacon: ${event.beacon.hwid}`);\n\n default:\n throw new Error(`Unknown event: ${JSON.stringify(event)}`);\n }\n}", "function processEvent(event, callback) {\n // Usually returns array of records, however it is fixed to only return 1 record\n console.log(JSON.stringify(event));\n var loneEvent = event.Records[0];\n var requestBody = JSON.parse(loneEvent.body);\n\n // Print SQS message ID or null or undefined\n const messageId = loneEvent.messageId;\n const messageText = `message ID is: ${messageId}`;\n console.log(messageText);\n\n // The payload is encoded in base64\n const buff = Buffer.from(requestBody.payload, \"base64\");\n const bodyDecoded = buff.toString(\"utf8\");\n const body = JSON.parse(bodyDecoded);\n\n if (!verifyGitHub(requestBody, bodyDecoded)) {\n console.log(\"GitHub could not be verified\");\n console.log(\"GitHub Payload\");\n console.log(JSON.stringify(body));\n callback(null, {\n statusCode: 403,\n body: \"something is wrong, github secret does not match\",\n });\n return;\n } else {\n console.log(\"GitHub is verified\");\n }\n\n var path = process.env.API_URL;\n\n var deliveryId;\n if (requestBody[DELIVERY_ID_HEADER]) {\n deliveryId = requestBody[DELIVERY_ID_HEADER];\n } else {\n // TODO: remove this after 1.15.\n // This was added because there's a small period of time during the 1.15 deploy where the header isn't available\n console.log(\n \"Could not retrieve X-GitHub-Delivery header, generating a random UUID\"\n );\n deliveryId = crypto.randomUUID();\n }\n\n console.log(\"X-GitHub-Delivery: \" + deliveryId);\n var githubEventType = requestBody[\"X-GitHub-Event\"];\n // Handle installation events\n if (githubEventType === \"installation_repositories\") {\n // Currently ignoring repository removal events, only calling the endpoint if we are adding a repository.\n if (body.action === \"added\") {\n console.log(\"Valid installation event\");\n path += \"workflows/github/install\";\n const repositoriesAdded = body.repositories_added;\n const repositories = repositoriesAdded.map((repo) => repo.full_name);\n\n postEndpoint(path, body, deliveryId, (response) => {\n const successMessage =\n \"The GitHub app was successfully installed on repositories \" +\n repositories;\n handleCallback(response, successMessage, callback);\n });\n } else {\n console.log(\n 'installation_repositories event ignored \"' + body.action + '\" action'\n );\n }\n } else if (githubEventType === \"push\") {\n /**\n * We only handle push events, of which there are many subtypes. Unfortunately, the only way to differentiate between them is to look\n * for expected fields. There are no enums for push events subtypes.\n *\n * If an event is deemed not supported, we will return a success and print a message saying the event is not supported.\n */\n if (\n [\"repository\", \"ref\", \"created\", \"deleted\", \"pusher\"].some(\n (str) => !(str in body)\n )\n ) {\n console.log(\"Event is not supported\");\n callback(null, {\n statusCode: 200,\n body: \"Currently, this lambda does not support this event type from GitHub.\",\n });\n return;\n }\n\n // A push has been made for some repository (ignore pushes that are deletes)\n if (!body.deleted) {\n console.log(\"Valid push event\");\n const repository = body.repository.full_name;\n const gitReference = body.ref;\n\n path += \"workflows/github/release\";\n\n postEndpoint(path, body, deliveryId, (response) => {\n const successMessage =\n \"The associated entries on Dockstore for repository \" +\n repository +\n \" with version \" +\n gitReference +\n \" have been updated\";\n handleCallback(response, successMessage, callback);\n });\n } else {\n console.log(\"Valid push event (delete)\");\n const repository = body.repository.full_name;\n const gitReference = body.ref;\n const username = body.sender.login;\n\n path += \"workflows/github\";\n\n deleteEndpoint(\n path,\n repository,\n gitReference,\n username,\n deliveryId,\n (response) => {\n const successMessage =\n \"The associated versions on Dockstore for repository \" +\n repository +\n \" with version \" +\n gitReference +\n \" have been deleted\";\n handleCallback(response, successMessage, callback);\n }\n );\n }\n } else {\n console.log(\"Event \" + githubEventType + \" is not supported\");\n callback(null, {\n statusCode: 200,\n body:\n \"Currently, this lambda does not support the event type\" +\n githubEventType +\n \" from GitHub.\",\n });\n }\n}", "_processEvent(event, hint, scope) {\n const options = this.getOptions();\n const { sampleRate } = options;\n\n if (!this._isEnabled()) {\n return utils.rejectedSyncPromise(new utils.SentryError('SDK not enabled, will not capture event.', 'log'));\n }\n\n const isTransaction = event.type === 'transaction';\n const beforeSendProcessorName = isTransaction ? 'beforeSendTransaction' : 'beforeSend';\n const beforeSendProcessor = options[beforeSendProcessorName];\n\n // 1.0 === 100% events are sent\n // 0.0 === 0% events are sent\n // Sampling for transaction happens somewhere else\n if (!isTransaction && typeof sampleRate === 'number' && Math.random() > sampleRate) {\n this.recordDroppedEvent('sample_rate', 'error');\n return utils.rejectedSyncPromise(\n new utils.SentryError(\n `Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`,\n 'log',\n ),\n );\n }\n\n return this._prepareEvent(event, hint, scope)\n .then(prepared => {\n if (prepared === null) {\n this.recordDroppedEvent('event_processor', event.type || 'error');\n throw new utils.SentryError('An event processor returned `null`, will not send event.', 'log');\n }\n\n const isInternalException = hint.data && (hint.data ).__sentry__ === true;\n if (isInternalException || !beforeSendProcessor) {\n return prepared;\n }\n\n const beforeSendResult = beforeSendProcessor(prepared, hint);\n return _validateBeforeSendResult(beforeSendResult, beforeSendProcessorName);\n })\n .then(processedEvent => {\n if (processedEvent === null) {\n this.recordDroppedEvent('before_send', event.type || 'error');\n throw new utils.SentryError(`\\`${beforeSendProcessorName}\\` returned \\`null\\`, will not send event.`, 'log');\n }\n\n const session = scope && scope.getSession();\n if (!isTransaction && session) {\n this._updateSessionFromEvent(session, processedEvent);\n }\n\n // None of the Sentry built event processor will update transaction name,\n // so if the transaction name has been changed by an event processor, we know\n // it has to come from custom event processor added by a user\n const transactionInfo = processedEvent.transaction_info;\n if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) {\n const source = 'custom';\n processedEvent.transaction_info = {\n ...transactionInfo,\n source,\n changes: [\n ...transactionInfo.changes,\n {\n source,\n // use the same timestamp as the processed event.\n timestamp: processedEvent.timestamp ,\n propagations: transactionInfo.propagations,\n },\n ],\n };\n }\n\n this.sendEvent(processedEvent, hint);\n return processedEvent;\n })\n .then(null, reason => {\n if (reason instanceof utils.SentryError) {\n throw reason;\n }\n\n this.captureException(reason, {\n data: {\n __sentry__: true,\n },\n originalException: reason ,\n });\n throw new utils.SentryError(\n `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\\nReason: ${reason}`,\n );\n });\n }" ]
[ "0.6476069", "0.6183527", "0.5994304", "0.5896113", "0.579589", "0.57329035", "0.5710347", "0.57103395", "0.5652154", "0.56413186", "0.5607286", "0.5599919", "0.5571477", "0.5565884", "0.5564804", "0.5563031", "0.55622643", "0.5559248", "0.5558566", "0.55480725", "0.5543915", "0.55437994", "0.5539153", "0.55200326", "0.55158406", "0.551406", "0.5514039", "0.5513797", "0.551178", "0.5496456", "0.54851466", "0.54782325", "0.5478115", "0.54530424", "0.5439919", "0.5435361", "0.5435361", "0.5431251", "0.54291", "0.5416085", "0.540895", "0.5405733", "0.54041475", "0.53948855", "0.53912646", "0.53825265", "0.5380789", "0.5375543", "0.5375543", "0.5375543", "0.5373764", "0.5361683", "0.53612596", "0.53612596", "0.53612596", "0.53612596", "0.53612596", "0.5357138", "0.5356344", "0.5348607", "0.5347793", "0.5344873", "0.53448564", "0.53399795", "0.5327024", "0.5311329", "0.5306388", "0.5300565", "0.5299477", "0.5297098", "0.5297098", "0.5293679", "0.52833164", "0.52694094", "0.5265749", "0.52636063", "0.5238786", "0.5235605", "0.5232991", "0.5232361", "0.5228606", "0.52242744", "0.52184653", "0.5215428", "0.52143633", "0.52086806", "0.52070385", "0.5203249", "0.52016", "0.519674", "0.51953834", "0.5187769", "0.51825243", "0.51815724", "0.51761156", "0.5161024", "0.51597005", "0.5156703", "0.51482105", "0.51459175", "0.51454914" ]
0.0
-1
Captures a manually created event and sends it to Sentry.
function captureEvent(event) { return callOnHub('captureEvent', event); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "onEventCreated(newEventRecord) {}", "triggerEvent(event) {\n\t\treturn _makeRequest('/events', {method: 'POST', body: {event}})\n\t\t\t.then(responseData => {\n\t\t\t\tif(responseData.success){\n\t\t\t\t\tconsole.log('Event Sent', event);\n\t\t\t\t}\n\t\t\t})\n\t\t\t.catch(error => {\n\t\t\t\tconsole.error(error);\n\t\t\t});\n\t}", "function postEvent(eventName) {\n const body = {\n 'name': eventName //body\n };\n\n fetch('http://localhost:3000/events', { //endpoint\n method: 'post',\n body: JSON.stringify(body),\n headers: {\n 'Content-Type': 'application/json'\n },\n })\n .then(res => res.json())\n .then((json) => {\n newLine();\n console.table(json);\n endLine();\n continueCallback();\n });\n }", "function createEvent(event) {\n const calendar = getCalenderClient();\n calendar.events.insert({\n calendarId: conf.CALENDAR_ID,\n resource: event,\n }, function(err, event) {\n if (err) {\n console.log('There was an error contacting the Calendar service: ' + err);\n return;\n }\n console.log('Event created: %s', event.data.htmlLink);\n });\n}", "function createEvent(eventData) {\n // First create resource that will be send to server.\n var resource = {\n 'summary': eventData.eventTitle,\n 'start': {\n 'dateTime': new Date(eventData.date + ' ' + eventData.startTime).toISOString()\n },\n 'end': {\n 'dateTime': new Date(eventData.date + ' ' + eventData.endTime).toISOString()\n },\n };\n // create the request\n var request = gapi.client.calendar.events.insert({\n 'calendarId': 'primary',\n 'resource': resource\n });\n\n // execute the request\n request.execute(function(resp) {\n var linkToEvent = 'Event created: <a href=\"' + resp.htmlLink + '\">link to event</a>';\n console.log(\"Inside linkToEvent ...\" + linkToEvent);\n document.getElementsByClassName('event-created')[0].innerHTML = linkToEvent;\n });\n}", "_captureEvent(event, hint = {}, scope) {\n return this._processEvent(event, hint, scope).then(\n finalEvent => {\n return finalEvent.event_id;\n },\n reason => {\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n // If something's gone wrong, log the error as a warning. If it's just us having used a `SentryError` for\n // control flow, log just the message (no stack) as a log-level log.\n const sentryError = reason ;\n if (sentryError.logLevel === 'log') {\n logger.log(sentryError.message);\n } else {\n logger.warn(sentryError);\n }\n }\n return undefined;\n },\n );\n }", "_captureEvent(event, hint = {}, scope) {\n return this._processEvent(event, hint, scope).then(\n finalEvent => {\n return finalEvent.event_id;\n },\n reason => {\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n // If something's gone wrong, log the error as a warning. If it's just us having used a `SentryError` for\n // control flow, log just the message (no stack) as a log-level log.\n const sentryError = reason ;\n if (sentryError.logLevel === 'log') {\n utils.logger.log(sentryError.message);\n } else {\n utils.logger.warn(sentryError);\n }\n }\n return undefined;\n },\n );\n }", "handleAccountCreated(evt) {\n this.createStatus = `Account record created. Id is ${evt.detail.id}.`;\n\n const event = new CustomEvent('newrecord', {\n bubbles: true,\n cancelable: true,\n composed: true,\n detail: { data: evt.detail },\n });\n this.dispatchEvent(event);\n }", "_captureEvent(event, hint = {}, scope) {\n\t return this._processEvent(event, hint, scope).then(\n\t finalEvent => {\n\t return finalEvent.event_id;\n\t },\n\t reason => {\n\t if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n\t // If something's gone wrong, log the error as a warning. If it's just us having used a `SentryError` for\n\t // control flow, log just the message (no stack) as a log-level log.\n\t const sentryError = reason ;\n\t if (sentryError.logLevel === 'log') {\n\t logger.log(sentryError.message);\n\t } else {\n\t logger.warn(sentryError);\n\t }\n\t }\n\t return undefined;\n\t },\n\t );\n\t }", "handleCreated(event) {\n //If \"Create Issue and Upload Screenshot\" button has been clicked then we can use this flag to show file dialog after Issue has been crated\n if(this.fileUploadButtonClicked){\n this.showUploadFileDialog = true;\n }\n this.newIssueRecordId = event.detail.id;\n //Reset the form so we can enter more data for next issue; if needed\n this.handleResetFields();\n this.dispatchEvent(\n new ShowToastEvent({\n title: 'Success',\n message: '{0} was successfully created!',\n \"messageData\": [\n {\n url: '/'+ event.detail.id,\n label: 'Issue:: ' + event.detail.fields.Name.value\n }\n ],\n variant: 'success'\n })\n );\n }", "_processEvent(event, hint, scope) {\n const options = this.getOptions();\n const { sampleRate } = options;\n\n if (!this._isEnabled()) {\n return utils.rejectedSyncPromise(new utils.SentryError('SDK not enabled, will not capture event.', 'log'));\n }\n\n const isTransaction = event.type === 'transaction';\n const beforeSendProcessorName = isTransaction ? 'beforeSendTransaction' : 'beforeSend';\n const beforeSendProcessor = options[beforeSendProcessorName];\n\n // 1.0 === 100% events are sent\n // 0.0 === 0% events are sent\n // Sampling for transaction happens somewhere else\n if (!isTransaction && typeof sampleRate === 'number' && Math.random() > sampleRate) {\n this.recordDroppedEvent('sample_rate', 'error');\n return utils.rejectedSyncPromise(\n new utils.SentryError(\n `Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`,\n 'log',\n ),\n );\n }\n\n return this._prepareEvent(event, hint, scope)\n .then(prepared => {\n if (prepared === null) {\n this.recordDroppedEvent('event_processor', event.type || 'error');\n throw new utils.SentryError('An event processor returned `null`, will not send event.', 'log');\n }\n\n const isInternalException = hint.data && (hint.data ).__sentry__ === true;\n if (isInternalException || !beforeSendProcessor) {\n return prepared;\n }\n\n const beforeSendResult = beforeSendProcessor(prepared, hint);\n return _validateBeforeSendResult(beforeSendResult, beforeSendProcessorName);\n })\n .then(processedEvent => {\n if (processedEvent === null) {\n this.recordDroppedEvent('before_send', event.type || 'error');\n throw new utils.SentryError(`\\`${beforeSendProcessorName}\\` returned \\`null\\`, will not send event.`, 'log');\n }\n\n const session = scope && scope.getSession();\n if (!isTransaction && session) {\n this._updateSessionFromEvent(session, processedEvent);\n }\n\n // None of the Sentry built event processor will update transaction name,\n // so if the transaction name has been changed by an event processor, we know\n // it has to come from custom event processor added by a user\n const transactionInfo = processedEvent.transaction_info;\n if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) {\n const source = 'custom';\n processedEvent.transaction_info = {\n ...transactionInfo,\n source,\n changes: [\n ...transactionInfo.changes,\n {\n source,\n // use the same timestamp as the processed event.\n timestamp: processedEvent.timestamp ,\n propagations: transactionInfo.propagations,\n },\n ],\n };\n }\n\n this.sendEvent(processedEvent, hint);\n return processedEvent;\n })\n .then(null, reason => {\n if (reason instanceof utils.SentryError) {\n throw reason;\n }\n\n this.captureException(reason, {\n data: {\n __sentry__: true,\n },\n originalException: reason ,\n });\n throw new utils.SentryError(\n `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\\nReason: ${reason}`,\n );\n });\n }", "_processEvent(event, hint, scope) {\n const options = this.getOptions();\n const { sampleRate } = options;\n\n if (!this._isEnabled()) {\n return rejectedSyncPromise(new SentryError('SDK not enabled, will not capture event.', 'log'));\n }\n\n const isTransaction = isTransactionEvent(event);\n const isError = isErrorEvent(event);\n const eventType = event.type || 'error';\n const beforeSendLabel = `before send for type \\`${eventType}\\``;\n\n // 1.0 === 100% events are sent\n // 0.0 === 0% events are sent\n // Sampling for transaction happens somewhere else\n if (isError && typeof sampleRate === 'number' && Math.random() > sampleRate) {\n this.recordDroppedEvent('sample_rate', 'error', event);\n return rejectedSyncPromise(\n new SentryError(\n `Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`,\n 'log',\n ),\n );\n }\n\n const dataCategory = eventType === 'replay_event' ? 'replay' : eventType;\n\n return this._prepareEvent(event, hint, scope)\n .then(prepared => {\n if (prepared === null) {\n this.recordDroppedEvent('event_processor', dataCategory, event);\n throw new SentryError('An event processor returned `null`, will not send event.', 'log');\n }\n\n const isInternalException = hint.data && (hint.data ).__sentry__ === true;\n if (isInternalException) {\n return prepared;\n }\n\n const result = processBeforeSend(options, prepared, hint);\n return _validateBeforeSendResult(result, beforeSendLabel);\n })\n .then(processedEvent => {\n if (processedEvent === null) {\n this.recordDroppedEvent('before_send', dataCategory, event);\n throw new SentryError(`${beforeSendLabel} returned \\`null\\`, will not send event.`, 'log');\n }\n\n const session = scope && scope.getSession();\n if (!isTransaction && session) {\n this._updateSessionFromEvent(session, processedEvent);\n }\n\n // None of the Sentry built event processor will update transaction name,\n // so if the transaction name has been changed by an event processor, we know\n // it has to come from custom event processor added by a user\n const transactionInfo = processedEvent.transaction_info;\n if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) {\n const source = 'custom';\n processedEvent.transaction_info = {\n ...transactionInfo,\n source,\n };\n }\n\n this.sendEvent(processedEvent, hint);\n return processedEvent;\n })\n .then(null, reason => {\n if (reason instanceof SentryError) {\n throw reason;\n }\n\n this.captureException(reason, {\n data: {\n __sentry__: true,\n },\n originalException: reason ,\n });\n throw new SentryError(\n `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\\nReason: ${reason}`,\n );\n });\n }", "function postEvent(name, guid) {\n assert(name, \"Event name required\");\n assert(guid, \"Wallet identifier required\");\n\n var fail = function() {\n console.log(\"Unable to post to analytics endpoint.\");\n }\n\n var handleResponse = function (res) {\n if (!res || !res.success)\n fail();\n };\n\n var params = {\n name: name,\n hashed_guid: CryptoJS.SHA256(guid).toString()\n };\n\n API.request('POST', 'wallet-event', params, false)\n .then(handleResponse).catch(fail);\n}", "createEvent(text) {\n const id = Date.now(); // TODO not great\n this.events.push({\n id,\n text,\n complete: false,\n });\n\n this.emit(\"change\");\n }", "function postEventsToDiscord( options ) {\n var today = new Date();\n \n if( options.day_override ) {\n today.setDate( options.day_override );\n }\n \n // Compare event start times with this to determine if they span multiple\n // days. For writing (continued) in the event header as opposed to a\n // specific time.\n var last_midnight = new Date();\n last_midnight.setHours( 0, 0, 0, 0 );\n \n var events = [];\n \n // Note that the timezone used with all of the time functions should be\n // the same as the script host, and they should have their settings set\n // to CENTRAL time to match Moon Guard.\n for( var calendar_index = 0; calendar_index < options.calendars.length; calendar_index++ ) {\n var calendar = CalendarApp.getCalendarById( options.calendars[calendar_index] );\n if( !calendar ) {\n Logger.log( \"Couldn't fetch calendar with ID:\", calendar_id );\n continue;\n }\n \n var calendar_events = calendar.getEventsForDay( today );\n \n for( var i = 0; i < calendar_events.length; i++ ) {\n var event = calendar_events[i];\n var event_item = {};\n \n // Strip HTML from description.\n event_item.description = HTMLtoDiscord( event.getDescription() );\n \n // Style title with a bullet prefix.\n var title = event.getTitle();\n var start_time = event.getStartTime();\n \n // Parse time from title.\n var title_time = parseTitleTime( title );\n if( title_time ) {\n event_item.title = title_time.title;\n event_item.time = title_time.time;\n } else {\n event_item.title = title;\n \n var start_time = event.getStartTime();\n \n if( start_time < last_midnight ) {\n // Start time is before today, so this event is continuing into today.\n event_item.time = -2;\n } else if( event.isAllDayEvent() ) {\n // Event is an \"all-day\" event, and we don't know the start time. Could\n // default to 8:00 p.m.?\n event_item.time = -1;\n } else {\n // Event has a specific time set, so use that.\n // We need to be extra careful here turning a time into hours+minutes. Daylight savings is a bitch.\n var hours = parseInt(Utilities.formatDate( start_time, \"America/Chicago\", \"H\" ));\n var minutes = parseInt(Utilities.formatDate( start_time, \"America/Chicago\", \"mm\" ));\n \n event_item.time = hours * 60 + minutes;\n }\n }\n \n event_item.color = parseInt( calendar.getColor().replace( \"#\", \"\" ), 16 );\n \n events.push( event_item );\n }\n \n }\n \n var output;\n \n if( events.length == 0 ) {\n // Message shown when no events are found for the day.\n output = \"*No events are posted for today.*\";\n } else {\n events = events.sort( function( a, b ) {\n if( a.time < b.time ) {\n return -1;\n } else if( a.time > b.time ) {\n return 1;\n }\n return a.title.toLocaleLowerCase().localeCompare( b.title.toLocaleLowerCase() );\n });\n \n var pump_header = true;\n output = \"The following events are posted for today:\\n\\n\";\n \n function pump() {\n //---------------------------------------------------------------------------\n // Discord Webhook data.\n var data = {\n // Content can be empty if there are embeds.\n content: \"\",\n embeds: [{\n // And display our built output.\n description: output.trim()\n }]\n };\n \n if( pump_header ) {\n data.embeds[0].title = \":calendar_spiral: \" + options.title;\n if( options.public_url ) data.embeds[0].url = options.public_url;\n }\n \n // \"Post\" to the Discord webhook.\n var post_options = {\n method: \"post\",\n contentType: \"application/json\",\n payload: JSON.stringify( data )\n };\n \n for( var i = 0; i < options.webhooks.length; i++ ) {\n var response = UrlFetchApp.fetch( options.webhooks[i], post_options );\n }\n \n output = \"\"\n pump_header = false\n }\n \n for( var i = 0; i < events.length; i++ ) {\n var event = events[i];\n var time = \"\";\n if( event.time == -2 ) {\n time = \"continued\";\n } else if( event.time == -1 ) {\n time = \"\";\n } else {\n var hour = Math.floor(event.time / 60);\n var minute = event.time - hour * 60;\n if( minute < 10 ) minute = \"0\" + minute;\n var pm = hour >= 12 ? \"p.m.\" : \"a.m.\";\n hour = hour % 12;\n if( hour == 0 ) hour = 12;\n time = hour.toString() + \":\" + minute + \" \" + pm\n }\n \n var event_text;\n \n event_text = \"**• \" + event.title + \"**\";\n \n if( time ) {\n event_text += \" (\" + time + \")\"\n }\n \n event_text += \"\\n\";\n if( event.description ) {\n event_text += event.description + \"\\n\";\n }\n \n if( event_text.length > 1800 ) {\n event_text = event_text.substring( 0, 1800 ) + \"...\";\n }\n \n if( output.length + event_text.length > 2000 ) {\n pump();\n }\n output += event_text + \"\\n\";\n }\n pump();\n \n }\n \n}", "function logEvent(message) {\n debug('logEvent: message=\"%s\"', message);\n var eventTimestamp = Math.floor(new Date());\n var newEvent = {\n message: message,\n timestamp: eventTimestamp\n }\n logParams.logEvents.push(newEvent);\n}", "function eventToSentryRequest(event, api) {\n var sdkInfo = getSdkMetadataForEnvelopeHeader(api);\n var eventType = event.type || 'event';\n var useEnvelope = eventType === 'transaction' || api.forceEnvelope();\n var _a = event.debug_meta || {}, transactionSampling = _a.transactionSampling, metadata = tslib_1.__rest(_a, [\"transactionSampling\"]);\n var _b = transactionSampling || {}, samplingMethod = _b.method, sampleRate = _b.rate;\n if (Object.keys(metadata).length === 0) {\n delete event.debug_meta;\n }\n else {\n event.debug_meta = metadata;\n }\n var req = {\n body: JSON.stringify(sdkInfo ? enhanceEventWithSdkInfo(event, api.metadata.sdk) : event),\n type: eventType,\n url: useEnvelope ? api.getEnvelopeEndpointWithUrlEncodedAuth() : api.getStoreEndpointWithUrlEncodedAuth(),\n };\n // https://develop.sentry.dev/sdk/envelopes/\n // Since we don't need to manipulate envelopes nor store them, there is no\n // exported concept of an Envelope with operations including serialization and\n // deserialization. Instead, we only implement a minimal subset of the spec to\n // serialize events inline here.\n if (useEnvelope) {\n var envelopeHeaders = JSON.stringify(tslib_1.__assign(tslib_1.__assign({ event_id: event.event_id, sent_at: new Date().toISOString() }, (sdkInfo && { sdk: sdkInfo })), (api.forceEnvelope() && { dsn: api.getDsn().toString() })));\n var itemHeaders = JSON.stringify({\n type: eventType,\n // TODO: Right now, sampleRate may or may not be defined (it won't be in the cases of inheritance and\n // explicitly-set sampling decisions). Are we good with that?\n sample_rates: [{ id: samplingMethod, rate: sampleRate }],\n });\n // The trailing newline is optional. We intentionally don't send it to avoid\n // sending unnecessary bytes.\n //\n // const envelope = `${envelopeHeaders}\\n${itemHeaders}\\n${req.body}\\n`;\n var envelope = envelopeHeaders + \"\\n\" + itemHeaders + \"\\n\" + req.body;\n req.body = envelope;\n }\n return req;\n}", "function registerEvents(SmsTemplate) {\n for(var e in events) {\n let event = events[e];\n SmsTemplate.post(e, emitEvent(event));\n }\n}", "function insertEvent(obj) {\n var event = {\n 'reminders': {\n 'useDefault': false,\n 'overrides': [\n {'method': 'email', 'minutes': 24 * 60},\n {'method': 'popup', 'minutes': 10}\n ]\n },\n 'recurrence': [\n 'RRULE:FREQ=DAILY;COUNT=1'\n ]\n };\n\n var startTime = obj.start;\n var endTime = obj.end;\n var date = obj.date.split('/');\n var gmtTimeZone = date.indexOf('GMT')+3;\n var start = {}; var end = {};\n var parseDate = function(time) {\n debugger;\n return date[2] + '-' + date[1] + '-' + date[0] + 'T' + time + ':00' + gmtTimeZone + ':00';\n };\n gmtTimeZone = date.substring(gmtTimeZone, gmtTimeZone + 3);\n start.dateTime = parseDate(startTime);\n end.dateTime = parseDate(endTime);\n\n event.summary = obj.get('name') + ' - ' + obj.get('therapistName');\n event.location = obj.location;\n event.start = {'dateTime': startTime, 'timeZone': 'Asia/Jerusalem'};\n event.end = {'dateTime': endTime, 'timeZone': 'Asia/Jerusalem'};\n\n\n console.log('inserting event!');\n\n // var event2 = {\n // 'summary': 'Hackathon',\n // 'location': 'Daniel Hotel, Herzelia',\n // 'description': 'Winning at least second place',\n // 'start': {\n // 'dateTime': '2017-05-10T09:00:00+02:00',\n // 'timeZone': 'Asia/Jerusalem'\n // },\n // 'end': {\n // 'dateTime': '2017-05-10T17:00:00+02:00',\n // 'timeZone': 'Asia/Jerusalem'\n // },\n // 'recurrence': [\n // 'RRULE:FREQ=DAILY;COUNT=1'\n // ],\n // 'attendees': [\n // {'email': 'danielle611@example.com'}\n // ],\n // 'reminders': {\n // 'useDefault': false,\n // 'overrides': [\n // {'method': 'email', 'minutes': 24 * 60},\n // {'method': 'popup', 'minutes': 10}\n // ]\n // }\n // };\n\n var request = gapi.client.calendar.events.insert({\n 'calendarId': 'pkgiq4dasdasdas2321312312.com',\n 'resource': event\n });\n\n request.execute(function(resp) {\n if (resp.error) {\n failureModal(resp.error);\n }\n else {\n window.sessionStorage.setItem('EventsInserted', true);\n successModal(resp)\n }\n });\n}", "function createEvent() {\n var calendarId = 'primary';\n var start = getRelativeDate(1, 12);\n var end = getRelativeDate(1, 13);\n var event = {\n summary: 'Lunch Meeting',\n location: 'The Deli',\n description: 'To discuss our plans for the presentation next week.',\n start: {\n dateTime: start.toISOString()\n },\n end: {\n dateTime: end.toISOString()\n },\n attendees: [\n {email: 'alice@example.com'},\n {email: 'bob@example.com'}\n ],\n // Red background. Use Calendar.Colors.get() for the full list.\n colorId: 11\n };\n event = Calendar.Events.insert(event, calendarId);\n Logger.log('Event ID: ' + event.id);\n}", "function eventToSentryRequest(event, api) {\n // since JS has no Object.prototype.pop()\n var _a = event.tags || {}, samplingMethod = _a.__sentry_samplingMethod, sampleRate = _a.__sentry_sampleRate, otherTags = tslib_1.__rest(_a, [\"__sentry_samplingMethod\", \"__sentry_sampleRate\"]);\n event.tags = otherTags;\n var useEnvelope = event.type === 'transaction';\n var req = {\n body: JSON.stringify(event),\n type: event.type || 'event',\n url: useEnvelope ? api.getEnvelopeEndpointWithUrlEncodedAuth() : api.getStoreEndpointWithUrlEncodedAuth(),\n };\n // https://develop.sentry.dev/sdk/envelopes/\n // Since we don't need to manipulate envelopes nor store them, there is no\n // exported concept of an Envelope with operations including serialization and\n // deserialization. Instead, we only implement a minimal subset of the spec to\n // serialize events inline here.\n if (useEnvelope) {\n var envelopeHeaders = JSON.stringify({\n event_id: event.event_id,\n sent_at: new Date().toISOString(),\n });\n var itemHeaders = JSON.stringify({\n type: event.type,\n // TODO: Right now, sampleRate may or may not be defined (it won't be in the cases of inheritance and\n // explicitly-set sampling decisions). Are we good with that?\n sample_rates: [{ id: samplingMethod, rate: sampleRate }],\n });\n // The trailing newline is optional. We intentionally don't send it to avoid\n // sending unnecessary bytes.\n //\n // const envelope = `${envelopeHeaders}\\n${itemHeaders}\\n${req.body}\\n`;\n var envelope = envelopeHeaders + \"\\n\" + itemHeaders + \"\\n\" + req.body;\n req.body = envelope;\n }\n return req;\n}", "_processEvent(event, hint, scope) {\n\t const options = this.getOptions();\n\t const { sampleRate } = options;\n\n\t if (!this._isEnabled()) {\n\t return rejectedSyncPromise(new SentryError('SDK not enabled, will not capture event.', 'log'));\n\t }\n\n\t const isTransaction = event.type === 'transaction';\n\t const beforeSendProcessorName = isTransaction ? 'beforeSendTransaction' : 'beforeSend';\n\t const beforeSendProcessor = options[beforeSendProcessorName];\n\n\t // 1.0 === 100% events are sent\n\t // 0.0 === 0% events are sent\n\t // Sampling for transaction happens somewhere else\n\t if (!isTransaction && typeof sampleRate === 'number' && Math.random() > sampleRate) {\n\t this.recordDroppedEvent('sample_rate', 'error');\n\t return rejectedSyncPromise(\n\t new SentryError(\n\t `Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`,\n\t 'log',\n\t ),\n\t );\n\t }\n\n\t return this._prepareEvent(event, hint, scope)\n\t .then(prepared => {\n\t if (prepared === null) {\n\t this.recordDroppedEvent('event_processor', event.type || 'error');\n\t throw new SentryError('An event processor returned `null`, will not send event.', 'log');\n\t }\n\n\t const isInternalException = hint.data && (hint.data ).__sentry__ === true;\n\t if (isInternalException || !beforeSendProcessor) {\n\t return prepared;\n\t }\n\n\t const beforeSendResult = beforeSendProcessor(prepared, hint);\n\t return _validateBeforeSendResult(beforeSendResult, beforeSendProcessorName);\n\t })\n\t .then(processedEvent => {\n\t if (processedEvent === null) {\n\t this.recordDroppedEvent('before_send', event.type || 'error');\n\t throw new SentryError(`\\`${beforeSendProcessorName}\\` returned \\`null\\`, will not send event.`, 'log');\n\t }\n\n\t const session = scope && scope.getSession();\n\t if (!isTransaction && session) {\n\t this._updateSessionFromEvent(session, processedEvent);\n\t }\n\n\t // None of the Sentry built event processor will update transaction name,\n\t // so if the transaction name has been changed by an event processor, we know\n\t // it has to come from custom event processor added by a user\n\t const transactionInfo = processedEvent.transaction_info;\n\t if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) {\n\t const source = 'custom';\n\t processedEvent.transaction_info = {\n\t ...transactionInfo,\n\t source,\n\t changes: [\n\t ...transactionInfo.changes,\n\t {\n\t source,\n\t // use the same timestamp as the processed event.\n\t timestamp: processedEvent.timestamp ,\n\t propagations: transactionInfo.propagations,\n\t },\n\t ],\n\t };\n\t }\n\n\t this.sendEvent(processedEvent, hint);\n\t return processedEvent;\n\t })\n\t .then(null, reason => {\n\t if (reason instanceof SentryError) {\n\t throw reason;\n\t }\n\n\t this.captureException(reason, {\n\t data: {\n\t __sentry__: true,\n\t },\n\t originalException: reason ,\n\t });\n\t throw new SentryError(\n\t `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\\nReason: ${reason}`,\n\t );\n\t });\n\t }", "function eventToSentryRequest(event, api) {\n // since JS has no Object.prototype.pop()\n var _a = event.tags || {}, samplingMethod = _a.__sentry_samplingMethod, sampleRate = _a.__sentry_sampleRate, otherTags = Object(tslib_es6[\"d\" /* __rest */])(_a, [\"__sentry_samplingMethod\", \"__sentry_sampleRate\"]);\n event.tags = otherTags;\n var useEnvelope = event.type === 'transaction';\n var req = {\n body: JSON.stringify(event),\n type: event.type || 'event',\n url: useEnvelope ? api.getEnvelopeEndpointWithUrlEncodedAuth() : api.getStoreEndpointWithUrlEncodedAuth(),\n };\n // https://develop.sentry.dev/sdk/envelopes/\n // Since we don't need to manipulate envelopes nor store them, there is no\n // exported concept of an Envelope with operations including serialization and\n // deserialization. Instead, we only implement a minimal subset of the spec to\n // serialize events inline here.\n if (useEnvelope) {\n var envelopeHeaders = JSON.stringify({\n event_id: event.event_id,\n sent_at: new Date().toISOString(),\n });\n var itemHeaders = JSON.stringify({\n type: event.type,\n // TODO: Right now, sampleRate may or may not be defined (it won't be in the cases of inheritance and\n // explicitly-set sampling decisions). Are we good with that?\n sample_rates: [{ id: samplingMethod, rate: sampleRate }],\n });\n // The trailing newline is optional. We intentionally don't send it to avoid\n // sending unnecessary bytes.\n //\n // const envelope = `${envelopeHeaders}\\n${itemHeaders}\\n${req.body}\\n`;\n var envelope = envelopeHeaders + \"\\n\" + itemHeaders + \"\\n\" + req.body;\n req.body = envelope;\n }\n return req;\n}", "function createEvent() { \n \n var event = {\n 'summary': 'Google I/O 2015',\n 'location': '800 Howard St., San Francisco, CA 94103',\n 'description': 'A chance to hear more about Google\\'s developer products.',\n 'start': {\n 'dateTime': '2015-05-28T09:00:00-07:00',\n 'timeZone': 'America/Los_Angeles'\n },\n 'end': {\n 'dateTime': '2015-05-28T09:00:00-08:00',\n 'timeZone': 'America/Los_Angeles'\n }\n \n };\n\n var request = gapi.client.calendar.events.insert({\n 'calendarId': 'primary',\n 'resource': event\n });\n\n request.execute(function (event) {\n console.log('Event created.');\n });\n }", "setupSubscribers() {\n DomainEvents.subscribe(MemberEntryViewEvent, async (ev) => {\n const event = AnalyticEvent.create({\n name: 'entry_view',\n memberId: ev.data.memberId,\n memberStatus: ev.data.memberStatus,\n entryId: ev.data.entryId,\n sourceUrl: ev.data.entryUrl,\n timestamp: ev.timestamp\n });\n\n await this.repository.save(event);\n });\n\n DomainEvents.subscribe(MemberUnsubscribeEvent, async (ev) => {\n const event = AnalyticEvent.create({\n name: 'unsubscribe',\n memberId: ev.data.memberId,\n memberStatus: ev.data.memberStatus,\n entryId: ev.data.entryId,\n sourceUrl: ev.data.sourceUrl,\n timestamp: ev.timestamp\n });\n\n await this.repository.save(event);\n });\n\n DomainEvents.subscribe(MemberSignupEvent, async (ev) => {\n const event = AnalyticEvent.create({\n name: 'signup',\n memberId: ev.data.memberId,\n memberStatus: 'free',\n entryId: ev.data.entryId,\n sourceUrl: ev.data.sourceUrl,\n timestamp: ev.timestamp\n });\n\n await this.repository.save(event);\n });\n\n DomainEvents.subscribe(MemberPaidCancellationEvent, async (ev) => {\n const event = AnalyticEvent.create({\n name: 'paid_cancellation',\n memberId: ev.data.memberId,\n memberStatus: ev.data.memberStatus,\n entryId: ev.data.entryId,\n sourceUrl: ev.data.sourceUrl,\n metadata: ev.data.subscriptionId,\n timestamp: ev.timestamp\n });\n\n await this.repository.save(event);\n });\n\n DomainEvents.subscribe(MemberPaidConverstionEvent, async (ev) => {\n const event = AnalyticEvent.create({\n name: 'paid_conversion',\n memberId: ev.data.memberId,\n memberStatus: ev.data.memberStatus,\n entryId: ev.data.entryId,\n sourceUrl: ev.data.sourceUrl,\n metadata: ev.data.subscriptionId,\n timestamp: ev.timestamp\n });\n\n await this.repository.save(event);\n });\n }", "function logSimpaticoEvent(component, element, event, details) {\n var timestamp = new Date().getTime()\n //TODO: HIB- Implement it\n var postData = {\n \"component\": component, // Component which produces the event\n \"element\": element,\n \"event\": event,\n \"details\": details,\n \"userID\": \"userData.userId\", // the id of the logged user\n \"serviceID\": simpaticoEservice, // the id of the corresponding e-service\n \"timestamp\": timestamp\n }\n insertLogEvent(postData);\n }", "function dailyTrigger() {\n postEventsToDiscord({\n calendars: calendar_list,\n webhooks: discord_webhooks,\n title: \"My calendar shit\",\n public_url: \"URL to public calendar (or any URL when you click the title)\"\n });\n}", "function captureEvent(event) {\r\n return callOnHub('captureEvent', event);\r\n}", "send (debuggingData, context, functionDetails, payload) {\n const detail = this.createEventDetail(debuggingData, context, functionDetails, payload)\n\n if (this.isConnected) {\n const event = new window.CustomEvent('cerebral2.client.message', {\n detail\n })\n window.dispatchEvent(event)\n } else {\n this.backlog.push(detail)\n }\n }", "trackCustomEvent(context, eventName, keyValuePair) {\n let message = context.message;\n let address = message.address || {};\n let conversation = address.conversation || {};\n let user = address.user || {};\n let item = {\n timestamp: message.timestamp,\n channel: address.channelId,\n conversationId: conversation.id,\n userId: user.id,\n userName: user.name\n };\n //merge the custom properties with the defaults\n let eventData = Object.assign(item, keyValuePair);\n this.trackEvent(eventName, eventData);\n }", "function incomingEvent(e) {\n trace(\"incomingEvent: \" + JSON.stringify(e));\n}", "function logEvent(eventName, eventData){\n console.log(\"Event triggered. Event name : \" + eventName + \" , Data : \" + JSON.stringify(eventData));\n}", "emitEvent(packet) {\n return tslib_1.__awaiter(this, void 0, void 0, function* () {\n if (!this.working) {\n return;\n }\n // publish and store\n yield this.eventPubSub.publish(packet.event, packet);\n this.registry.addEventExample([packet.event], packet);\n // log\n this.props.logger[this.opts.log.event ? \"info\" : \"debug\"](`received ${kleur.green(packet.event)} ${packet.broadcast ? \"broadcast \" : \"\"}event from ${kleur.yellow(packet.from || \"unknown\")}`);\n });\n }", "function recordEvent(info) {\n ///console.log('event', info);\n var detail = { detail: info };\n var event = new CustomEvent('benchmarkEvent', detail);\n document.dispatchEvent(event);\n }", "function newEventCreation() {\n let name = document.querySelector(\"#eventName\")\n let location = document.querySelector(\"#eventLocation\")\n let date = date.querySelector(\"#eventDate\")\n\n // Empty object for the Event info to populate\n let event = {\n name: \"\",\n location: \"\",\n date: \"\"\n }\n\n event.name = (name.value)\n event.location = (location.value)\n event.date = (date.value)\n\n userAPIfunctions.postUser(obj)\n .then((response) => response.json()\n .then((user) => sessionStorageSetup(user))\n )\n}", "trackEvent(telemetry) {\n const { name, properties, metrics: measurements } = telemetry;\n this.defaultClient.trackEvent({ name, properties, measurements });\n }", "\"events.createNewEvent\"(\n business,\n sizeLimit,\n appTimeObj,\n displayDate,\n displayTime\n ) {\n check(displayDate, String);\n check(displayTime, String);\n\n if (Meteor.isServer) {\n if (!Meteor.userId()) {\n throw new Meteor.Error(\"not-authorized\");\n }\n Events.insert({\n createAt: Date.now(),\n owner: this.userId,\n status: \"ongoing\",\n isFull: false,\n member: [\n {\n id: this.userId,\n vote: -1\n }\n ],\n appTime: appTimeObj,\n displayDate: displayDate,\n displayTime: displayTime,\n restaurantId: business.id,\n restaurantUrl: business.url,\n restaurantName: business.name,\n peopleLimit: sizeLimit\n });\n }\n }", "function postEvents(req, res, next) {\n jackalopeApp.jackrabbitConnection.publish('queue.simple', req.body);\n res.status(200).end();\n }", "handleSuccess(event) {\n \n this.dispatchEvent( new ShowToastEvent({title: 'Success', message: 'New record created successfully', variant: 'success' }));\n this.dispatchEvent( new CustomEvent('created', { detail: event.detail.id}));\n \n \n \n }", "function postEvent(event) {\n let data = JSON.stringify(event);\n\n if (disableKinesis) {\n //log(`Kinesis disabled: POST ${data}`);\n return Promise.resolve(event);\n }\n\n let partitionKey = event.userSessionId;\n if (partitionKey === undefined) {\n partitionKey = event.eventName;\n }\n\n let params = {\n StreamName: KINESIS_STREAM_NAME,\n PartitionKey: partitionKey,\n Data: data,\n };\n\n return kinesis.putRecord(params).promise()\n .then(() => { return event; });\n}", "function onEvent(name, event) {\n //console.log(event);\n console.log(name, JSON.stringify(event, null, 2));\n}", "function addEvent(events) {\n\n var startDateTime = new Date();\n var endDateTime = new Date() + 60; /* makes workout time always 1 hr */\n\n newEvent['start']['dateTime'] = startDateTime;\n newEvent['end']['dateTime'] = endDateTime;\n\n events.push(newEvent);\n\n // var end = new EventDateTime();\n //end.setDateTime(endDateTime);\n // newEvent.setEnd(end);\n\n/*\n var reminderOverrides = new EventReminder[] {\n new EventReminder().setMethod(\"email\").setMinutes(60 * 12),\n new EventReminder().setMethod(\"popup\").setMinutes(30),\n };*/\n\n /* var reminders = new Event.Reminders()\n reminders.setUseDefault(false)\n reminders.setOverrides(Arrays.asList(reminderOverrides));\n newEvent.setReminders(reminders); */\n\n console.log(\"end of add event\");\n\n}", "function triggerSignupEvent() {\n\t\tif (typeof ga !== 'undefined') {\n\t\t\tga('send', 'event', 'website', 'signup', 'signup', '1');\n\t\t}\n\t}", "function log(event_name, thing) {\n // Create a HH:MM:SS:iii timestamp\n function create_timestamp() {\n const now = new Date();\n\n const hours = now.getHours().toString().padStart(2, '0');\n const minutes = now.getMinutes().toString().padStart(2, '0');\n const seconds = now.getSeconds().toString().padStart(2, '0');\n const millis = now.getMilliseconds().toString().padStart(3, '0');\n\n return `${hours}:${minutes}:${seconds}.${millis}`;\n }\n\n function new_entry() {\n // Copy from template\n const entry = entry_template.cloneNode(/* deep */ true);\n delete entry.id;\n entry.hidden = false;\n entry.classList.add(event_name.replace('.', '-'));\n\n // Timestamp\n entry.getElementsByClassName('timestamp')[0].textContent = create_timestamp();\n\n // Event\n const event_link = document.createElement('a');\n event_link.href = event_link_map[event_name];\n event_link.target = '_blank';\n event_link.textContent = event_name;\n entry.getElementsByClassName('event')[0].append(event_link);\n\n // Message\n entry.getElementsByClassName('entry-text')[0].textContent = thing.toString();\n\n return entry;\n }\n\n // Creates a new log entry group and adds it at the beginning of the log\n function new_entry_group() {\n // eslint-disable-next-line no-shadow\n const entry_group = document.createElement('div');\n entry_group.classList.add('entry-group');\n html_log_header.insertAdjacentElement('afterend', entry_group);\n return entry_group;\n }\n\n /* Group events if they happen within 100ms (= new_entry_timeout) of each other */\n if (create_entry_group) {\n entry_group = new_entry_group();\n }\n // Reset timeout\n clearTimeout(entry_group_timer);\n create_entry_group = false;\n entry_group_timer = setTimeout(() => { create_entry_group = true; }, new_entry_timeout);\n\n const entry = new_entry();\n entry_group.insertAdjacentElement('afterbegin', entry);\n}", "function logCreationEvent(id, type, message, time) {\n \n if (logMode === 'l') {\n if (!eventList.creationEvents[id]) {\n eventList.creationEvents[id] = [];\n }\n eventList.creationEvents[id].push({'type': type, 'event': message, \"timestamp\": time});\n } else if (logMode === 'v') {\n console.log(type + ': Agent ' + id + ' ' + message + ' on ' + time);\n }\n\n }", "sendEvent(event) {\n if (!(event instanceof Logger.LogOutputEvent)) {\n // Don't create an infinite loop...\n let objectToLog = event;\n if (event instanceof debugSession_1.OutputEvent && event.body && event.body.data && event.body.data.doNotLogOutput) {\n delete event.body.data.doNotLogOutput;\n objectToLog = Object.assign({}, event);\n objectToLog.body = Object.assign(Object.assign({}, event.body), { output: '<output not logged>' });\n }\n logger.verbose(`To client: ${JSON.stringify(objectToLog)}`);\n }\n super.sendEvent(event);\n }", "function trackEvent(logLevel, message) {\n var prefix = deviceId ? deviceId + ' - ' : '';\n\n TrackingService.trackEvent(logLevel, prefix + message);\n }", "function handleMessage(message_event) {\n appendToEventLog('nexe sez: ' + message_event.data);\n}", "function logEvent(eventType) {}", "function generateEvent(s,args){var evt=document.createEvent(\"CustomEvent\");evt.initCustomEvent(s,false,false,args);return evt;}", "createNewEvent(eventData) {\n fetch(\"/api/event\", {\n method: \"post\",\n body: JSON.stringify(eventData),\n headers: {\n \"Content-Type\": \"application/json\",\n },\n })\n .then((response) => response.json())\n .then((body) => {\n const urlToShare = `${window.location.origin}/event/${body.event.name}`;\n this.setState({\n urlToShare,\n createdEvent: body,\n display: \"confirmation\",\n });\n })\n .catch(console.error);\n }", "function createEvent(summary, location, dateFrom, dateTo) {\n var resource = {\n \"summary\": summary.toString(),\n \"location\": location.toString(),\n \"start\": {\n \"dateTime\": dateFrom.toISOString()\n },\n \"end\": {\n \"dateTime\": dateTo.toISOString()\n }\n };\n var request = gapi.client.calendar.events.insert({\n 'calendarId': 'primary',\n 'resource': resource\n });\n request.execute(function (response) {\n if (response.status === \"confirmed\") window.location.replace('event.html?event=' + response.id);\n });\n}", "function createEvent(eventName, value, address) {\n var msg = new builder.Message().address(address);\n msg.data.type = 'event';\n msg.data.name = eventName;\n msg.data.value = value;\n\n console.log('function check', msg);\n return msg;\n}", "function registerTwoPhaseEvent(registrationName,dependencies){registerDirectEvent(registrationName,dependencies);registerDirectEvent(registrationName+'Capture',dependencies);}", "function registerTwoPhaseEvent(registrationName,dependencies){registerDirectEvent(registrationName,dependencies);registerDirectEvent(registrationName+'Capture',dependencies);}", "function InsertEventRecord(kid1id, kid2id, kid1name, kid2name, kid1avatar, kid2avatar) {\n // Create on Azure\n // ---------------\n Azureservice.insert('events', {\n //id: guid, // I'll let Azure handle this GUID since I don't need to track it locally \n fromkid_id: kid1id,\n tokid_id: kid2id,\n fromkid_avatar: kid1avatar,\n tokid_avatar: kid2avatar,\n fromkid_name: kid1name,\n tokid_name: kid2name,\n datetime: Date.now(),\n event_type: \"friends\",\n })\n .then(function () {\n alert('freind record inserted');\n console.log('new event insert successful');\n },\n function (err) {\n console.error('Azure Error: ' + err);\n });\n\n }", "createEvent() {\n var self = this;\n // Get what we need from the modal\n var eventName = document.getElementById('createEventNameEvent').value;\n var eventAuthor = document.getElementById('createEventNameAuthor').value;\n\n // Set the name from the value\n this.currentEvent.title = eventName;\n this.currentEvent.author = eventAuthor;\n\n this.currentEvent.pins.forEach((pin) => {\n pin.author = eventAuthor;\n });\n\n // Generate an id for the event\n // this is the ID that will be used in the URL bar\n // and generally to refer to the event\n var newEventId = this.generateUUID();\n\n // Save on Firebase\n this.db.ref('/events/' + newEventId).set(this.currentEvent)\n .then(() => {\n console.log('SUCCESS in createEvent: event created.');\n // Add the id to current event and update the event saved in DB\n self.currentEvent.id = newEventId;\n self.updateEvent();\n\n // We create a cookie that stores useful infos about the current user\n // his name (for later use) and the ids of the pins he has created\n // => we'll use these ids to render or not elements of the DOM (i.e.: the delete pin button)\n self.setCookie(\n `${SETTINGS.cookieNameFirstPart}${newEventId}`,\n { user: {\n name: eventAuthor,\n pinsCreated: this.pinsCreated\n }\n },\n 100\n );\n\n // We show the event created modal giving the author of the event the \n // URL to share to his friends\n self.toggleModal(true, eventCreatedComponent(newEventId));\n\n this.appState = this.appStates.sharing;\n })\n .catch(function(error) {\n console.error(\"Error adding document: \", error);\n });\n }", "function makeSendEvent(directory) {\n // Send stage: evaluated inside of the base-instrumentation\n return function withRequire(require) {\n var fs = require('fs');\n var path = require('path');\n\n var lastEventIdx = 0;\n var base = 'event-' + process.pid + '-';\n\n // The actual sendEvent function\n return function sendEvent(method, params) {\n var eventFile = path.join(directory, base + (++lastEventIdx));\n var json = JSON.stringify({ method: method, params: params });\n try {\n fs.writeFileSync(eventFile, json);\n } catch (writeErr) {\n process.stderr.write(\n '[bugger/FileBackchannel] Failed to send event: ' +\n writeErr.message + '\\n');\n }\n };\n };\n}", "function logGoogleAnalyticsEvent (type, subtype, detail) {\n // console.debug([ 'Google Analytics Event', type, subtype, detail]);\n\n if (typeof gtag !== 'function') return; // they may not have it set up\n\n gtag('event', type, {\n 'event_category': subtype,\n 'event_label': detail,\n });\n}", "function eventReporter(e) {\n if (e.type !== \"keypress\") e.preventDefault();\n var display = ''; // Text to display in event box.\n display += (\"<li>Event type: <code>\" + e.type + \"</code></li>\");\n var target_box = ($(e.target).attr('id') ? $(e.target).attr('id') : $(e.target).parent().attr('id'));\n display += (\"<li>Target box: <code>\" + target_box + \"</code></li>\");\n $(\"#event-box-content\").html(display);\n}", "sendTracking(video_obj){\n if (video_obj) {\n\n var eventLabel = video_obj.video_url.split('/');\n eventLabel = eventLabel[3] + ' - ' + video_obj.start_local; //+ eventLabel[4]; // EG. snapper-rocks - 2018-02-04\n\n // console.log(eventLabel);\n\n setTimeout(() => {\n window.ga('send', 'event', 'Replays', 'Surfcam replay thumbnail clicked', eventLabel, {\n nonInteraction: true\n });\n }, 10);\n }\n }", "async function addNewEvent() {\n let token = localStorage.token;\n try {\n let res = await Axios.post(\n `http://localhost:80/dashboard/addevent`,\n inputFields,\n {\n headers: {\n Authorization: `Bearer ${token}`,\n },\n }\n );\n\n getEventData();\n setShow(false);\n } catch (error) {\n console.log(error);\n // return res.status(400).json({ error: error });\n }\n }", "function logClick() {\n ReactGA.event({\n category: 'Registration',\n action: 'Clicked Register Today',\n label: 'Challenge Text link',\n });\n}", "pushEvent(self, event, ref, message) {\n firebase.database.ref(ref).child(event[\"key\"]).set({\n name: event[\"name\"],\n startDate: event[\"startDate\"],\n duration: parseInt(event[\"duration\"]),\n location: event[\"location\"],\n organization: event[\"organization\"],\n imgid: event[\"imgid\"],\n description: event[\"description\"],\n webLink: event[\"webLink\"],\n tags: this.state.tags.toString(),\n email: event[\"email\"],\n });\n self.setState({ uploading: false });\n self.displayMessage(self, message);\n this.group.leave(this.token);\n }", "function logEvent(string) {\n Logger.log(\"[EVENT] \" + string);\n}", "function generateEvent(s, args) {\n \tvar evt = document.createEvent(\"CustomEvent\");\n \tevt.initCustomEvent(s, false, false, args);\n \treturn evt;\n }", "function generateEvent(s, args) {\n \tvar evt = document.createEvent(\"CustomEvent\");\n \tevt.initCustomEvent(s, false, false, args);\n \treturn evt;\n }", "function generateEvent(s, args) {\n \tvar evt = document.createEvent(\"CustomEvent\");\n \tevt.initCustomEvent(s, false, false, args);\n \treturn evt;\n }", "function generateEvent(s, args) {\r\n var evt = document.createEvent(\"CustomEvent\");\r\n evt.initCustomEvent(s, false, false, args);\r\n return evt;\r\n }", "socket_customEventFromServer(_, payload) {\n console.log(\"customEventFromServer\", payload);\n }", "_addEvent(event, timeline) {\n this._scheduledEvents[event.id.toString()] = {\n event,\n timeline,\n };\n timeline.add(event);\n return event.id;\n }", "function handleAddStreamEvent(event) {\n log(\"*** Stream added\");\n console.log('///////////////////////////////// Stream added');\n // document.getElementById(\"received_video\").srcObject = event.stream;\n // document.getElementById(\"hangup-button\").disabled = false;\n}", "capture(event) {\n const { extract, context } = this.props\n const { queue } = this\n\n const action = extract(event, context)\n\n if (action) {\n console.log('captured', action.type, action)\n queue.push(action)\n }\n }", "function createEvent(event) {\n console.log(\"Calling: /api/events POST\");\n $.ajax({\n url: api_host + '/api/events',\n type: \"POST\",\n data: event,\n success: function()\n {\n console.log(\"Action: refetchEvents\");\n getCalendar().fullCalendar('refetchEvents');\n console.log(\"Action: modal hide\");\n getModalEventCreate().modal('hide');\n }\n })\n}", "push(eventName,pushToken, pubEncKey, attestation){\n let url='me.uport:add?attestations='+attestation\n return this.credentials[eventName].push(pushToken, pubEncKey, {url})\n }", "async function logEvent$1(gtagFunction, initializationPromise, eventName, eventParams, options) {\r\n if (options && options.global) {\r\n gtagFunction(\"event\" /* EVENT */, eventName, eventParams);\r\n return;\r\n }\r\n else {\r\n const measurementId = await initializationPromise;\r\n const params = Object.assign(Object.assign({}, eventParams), { 'send_to': measurementId });\r\n gtagFunction(\"event\" /* EVENT */, eventName, params);\r\n }\r\n}", "RegisterEventSource() {\n\n }", "function createEvent(req, res){\n var newActivity = new db.Activity({\n name: req.body.activityname\n });\n\n var newEvent = new db.Event({\n name: req.body.name,\n date: req.body.date,\n votingAllowed: req.body.votingAllowed,\n activity: newActivity\n });\n\n newEvent.save(function handleDBSave(err, data){\n if (err){\n console.log('handleDBSave err: ', err);\n return res.status(400).send({error: err});\n }\n res.redirect('/events/' + data._id);\n });\n}", "function triggerEvent (name, object) {\n if (isEventEnabled(name) && enablePostMessage) {\n sendMessage({\n type: \"event\",\n action: \"result\",\n event: name,\n result: object\n });\n }\n}", "createEvent(event:Event):Promise<Void> {\n return axios.post(url+\"/createEvent\", event, axiosConfig);\n\n }", "function makeEvent(deploymentId, sourceId, sourceSequenceId, workbookName, dashboardName, projectName, eventKind, eventData) {\n if (!isValidEventKind(eventKind)) {\n throw new Error(`Not a valid event kind: ${eventKind}`);\n }\n let recordedAt = new Date().toISOString();\n projectName = ((typeof projectName === 'string' && projectName.length > 0) ? projectName : \"Default\" );\n return {\n deploymentId,\n sourceId,\n sourceSequenceId: sourceSequenceId.toString(),\n recordedAt,\n\n workbookName: workbookName,\n dashboardName: dashboardName,\n projectName,\n\n kind: eventKind,\n data: eventData,\n\n }\n }", "function processEvent(event, callback) {\n // Usually returns array of records, however it is fixed to only return 1 record\n console.log(JSON.stringify(event));\n var loneEvent = event.Records[0];\n var requestBody = JSON.parse(loneEvent.body);\n\n // Print SQS message ID or null or undefined\n const messageId = loneEvent.messageId;\n const messageText = `message ID is: ${messageId}`;\n console.log(messageText);\n\n // The payload is encoded in base64\n const buff = Buffer.from(requestBody.payload, \"base64\");\n const bodyDecoded = buff.toString(\"utf8\");\n const body = JSON.parse(bodyDecoded);\n\n if (!verifyGitHub(requestBody, bodyDecoded)) {\n console.log(\"GitHub could not be verified\");\n console.log(\"GitHub Payload\");\n console.log(JSON.stringify(body));\n callback(null, {\n statusCode: 403,\n body: \"something is wrong, github secret does not match\",\n });\n return;\n } else {\n console.log(\"GitHub is verified\");\n }\n\n var path = process.env.API_URL;\n\n var deliveryId;\n if (requestBody[DELIVERY_ID_HEADER]) {\n deliveryId = requestBody[DELIVERY_ID_HEADER];\n } else {\n // TODO: remove this after 1.15.\n // This was added because there's a small period of time during the 1.15 deploy where the header isn't available\n console.log(\n \"Could not retrieve X-GitHub-Delivery header, generating a random UUID\"\n );\n deliveryId = crypto.randomUUID();\n }\n\n console.log(\"X-GitHub-Delivery: \" + deliveryId);\n var githubEventType = requestBody[\"X-GitHub-Event\"];\n // Handle installation events\n if (githubEventType === \"installation_repositories\") {\n // Currently ignoring repository removal events, only calling the endpoint if we are adding a repository.\n if (body.action === \"added\") {\n console.log(\"Valid installation event\");\n path += \"workflows/github/install\";\n const repositoriesAdded = body.repositories_added;\n const repositories = repositoriesAdded.map((repo) => repo.full_name);\n\n postEndpoint(path, body, deliveryId, (response) => {\n const successMessage =\n \"The GitHub app was successfully installed on repositories \" +\n repositories;\n handleCallback(response, successMessage, callback);\n });\n } else {\n console.log(\n 'installation_repositories event ignored \"' + body.action + '\" action'\n );\n }\n } else if (githubEventType === \"push\") {\n /**\n * We only handle push events, of which there are many subtypes. Unfortunately, the only way to differentiate between them is to look\n * for expected fields. There are no enums for push events subtypes.\n *\n * If an event is deemed not supported, we will return a success and print a message saying the event is not supported.\n */\n if (\n [\"repository\", \"ref\", \"created\", \"deleted\", \"pusher\"].some(\n (str) => !(str in body)\n )\n ) {\n console.log(\"Event is not supported\");\n callback(null, {\n statusCode: 200,\n body: \"Currently, this lambda does not support this event type from GitHub.\",\n });\n return;\n }\n\n // A push has been made for some repository (ignore pushes that are deletes)\n if (!body.deleted) {\n console.log(\"Valid push event\");\n const repository = body.repository.full_name;\n const gitReference = body.ref;\n\n path += \"workflows/github/release\";\n\n postEndpoint(path, body, deliveryId, (response) => {\n const successMessage =\n \"The associated entries on Dockstore for repository \" +\n repository +\n \" with version \" +\n gitReference +\n \" have been updated\";\n handleCallback(response, successMessage, callback);\n });\n } else {\n console.log(\"Valid push event (delete)\");\n const repository = body.repository.full_name;\n const gitReference = body.ref;\n const username = body.sender.login;\n\n path += \"workflows/github\";\n\n deleteEndpoint(\n path,\n repository,\n gitReference,\n username,\n deliveryId,\n (response) => {\n const successMessage =\n \"The associated versions on Dockstore for repository \" +\n repository +\n \" with version \" +\n gitReference +\n \" have been deleted\";\n handleCallback(response, successMessage, callback);\n }\n );\n }\n } else {\n console.log(\"Event \" + githubEventType + \" is not supported\");\n callback(null, {\n statusCode: 200,\n body:\n \"Currently, this lambda does not support the event type\" +\n githubEventType +\n \" from GitHub.\",\n });\n }\n}", "ADD_EVENT(state, event) {\n state.events.push(event);\n }", "function sendAnalyticsEvent({ action, category, label, value }) {\n window.gtag && window.gtag('event', action, {\n event_category: category,\n event_label: label,\n event_value: value\n }); \n}", "startEventListener() {\n Utils.contract.MessagePosted().watch((err, { result }) => {\n if(err)\n return console.error('Failed to bind event listener:', err);\n\n console.log('Detected new message:', result.id);\n this.fetchMessage(+result.id);\n });\n }", "function createNewEvent() {\n\t\tcalendar.dblclick(function(event) {\n\t\t\tconsole.log(\"event\", event.originalEvent.layerX);\n\t\t\tvar orgEvent = event.originalEvent;\n\t\t\tvar _x = orgEvent.layerX;\n\t\t\tvar _y = orgEvent.layerY;\n\t\t\tvar eventTarget = calendar.find(\".events\");\n\t\t\tvar calOffset = calendar.offset();\n\t\t\tvar callOffsetX = calOffset.left;\n\t\t\tvar callOffsetY = calOffset.top;\n\t\t\tvar x = event.clientX- callOffsetX;\n\t\t\tvar y = event.clientY - callOffsetY;\n\n\t\t\tconsole.log(\"_Y\" + _y);\n\t\t\tconsole.log(\"_X\" + _x);\n\n\t\t\tvar event = \n\t\t\t\t \"<div class='event day-view cal-entry f-min noob' style='top: \" + y + \"px; left: \" + x + \"px;'>\"\n\t\t\t\t+ \"\t\t\t<dl>\"\n\t\t\t\t+ \"\t\t\t\t<dt class='tutor'>KEINE LEHRER</dt>\"\n\t\t\t\t+ \"\t\t\t\t<dt></dt>\"\n\t\t\t\t+ \"\t\t\t\t<dd class='placeholder'>KEINE SCHÜLER</dd>\"\n\t\t\t\t+ \"\t\t\t</dl>\"\n\t\t\t\t+ \"\t\t</div>\";\n\t\t\teventTarget.append(event);\n\t\t\tvar noob = eventTarget.find(\".noob\");\n\n\t\t\tconsole.log(\"MAKING AJAX REQUEST\");\n\n\t\t\t$.ajax({\n\t\t\t\ttype: \"POST\",\n\t\t\t\turl: \"http://127.0.0.1:8000/calendar\",\n\t\t\t\tdata: { \"newEvent\": \"True\", \"room\" : currCol, \"pos_x\" : _x, \"pos_y\" : _y}\n\t\t\t})\n\t\t\t.done(function( msg ) {\n\t\t\t\talert( \"Data Saved: \" + msg );\n\t\t\t});\n\n\t\t\t_this.reloadListener();\n\t\t});\n\t}", "create(Event) {\n let sqlRequest = \"INSERT into event (type, actorId, created_at) \" +\n \"VALUES ($type, $actorId, $created_at)\";\n let sqlParams = {\n $type: Event.type,\n $actorId: Event.actorId,\n $created_at: Event.created_at\n };\n return this.common.run(sqlRequest, sqlParams);\n }", "execute(client, data) {\n events.log.push(data);\n }", "function strap_log_event(evtText, appId) {\n\n var strap_params = {\n app_id : appId,\n resolution : \"144x168\",\n useragent : \"PEBBLE/2.0\"\n };\n\n var e = {\n \"payload\" : {\n \"51000\" : encodeURIComponent(evtText)\n }\n };\n\n // -------------------------\n // Strap API inclusion in appmessage\n // This allows Strap to process Strap-related messages\n // DO NOT EDIT\n // -------------------------\n if (strap_api_can_handle_msg(e.payload)) {\n clearTimeout(strap_api_timer_send);\n var params = strap_api_clone(strap_params);\n strap_api_log(e.payload, 200, params);\n strap_api_timer_send = setTimeout(function() {\n strap_api_log({}, 0, params);\n }, 10 * 1000);\n }\n // -------------------------\n\n}", "notificationEvents(state) {\n const url = 'http://localhost:3000/reservations/notification'\n const sse = new EventSource(url)\n /* To listen to the named event \"reservationAdded\" */\n sse.addEventListener(\"reservationAdded\", (e) => {\n state.notifications.push(JSON.parse(e.data))\n })\n sse.addEventListener(\"message\", (e) => {\n console.log('MESSAGE')\n console.log(e.data)\n })\n sse.addEventListener(\"rUpdate\", () => {\n this.dispatch('getReservations')\n })\n }", "function prescriptionHandler(event){\n\n\n // important info to send\n var uniqueID = event.dataset.id;\n var operation = event.dataset.operation;\n var patientID = event.dataset.patient;\n \n var pkg_to_send = {event: event,\n operation: operation,\n patientID : patientID,\n uniqid : uniqueID};\n\n getLastPrescription(pkg_to_send);\n}", "_eventHandler(message) {\n // push to web client\n this._io.emit('service:event:' + message.meta.event, message.payload)\n this._io.emit('_bson:service:event:' + message.meta.event,\n this._gateway._connector.encoder.pack(message.payload))\n }", "function newEvent(request, response){\n var contextData = {\n 'allowedDateInfo': allowedDateInfo\n };\n response.render('create-event.html', contextData);\n}", "function newEvent(request, response){\n var contextData = {\n 'allowedDateInfo': allowedDateInfo\n };\n response.render('create-event.html', contextData);\n}", "function initiateLogEvent(\n type: string,\n ts: ?Date,\n logLine: MongoLine\n): LogEvent {\n return {\n type: type,\n title: \"FixtureLogEvent\",\n ts: ts,\n messages: [],\n stacktrace: [],\n logLine: logLine,\n };\n}", "function pickup(payload) {\n console.log(`EVENT { event: 'pickup',\n time: ${new Date().toISOString()},\n payload: { store: ${payload.storeName},\n orderID: ${payload.orderId},\n customer: ${payload.customerName},\n address: ${payload.address} }\n}`);\n}", "sendEvent(workflowName, customId, eventName, eventData) {\n const url = this.getSendEventURL();\n\n const body = {\n [ATTR_PROG]: PROG,\n [ATTR_NAME]: workflowName,\n [ATTR_ID]: customId,\n [EVENT_NAME]: eventName,\n [EVENT_INPUT]: serializer.encode(eventData),\n };\n\n const params = this.getAppEnv();\n\n return http.post(url, body, { params });\n }" ]
[ "0.6208244", "0.61771953", "0.6031723", "0.60251844", "0.5701248", "0.56615484", "0.56306124", "0.56184113", "0.5598724", "0.5593427", "0.55571496", "0.5550946", "0.55365014", "0.55334854", "0.5509732", "0.5496576", "0.54932994", "0.5485117", "0.5418578", "0.54155225", "0.54063547", "0.540529", "0.5397179", "0.53529465", "0.53474337", "0.5342131", "0.5312328", "0.5304321", "0.53041476", "0.530249", "0.52988005", "0.5293346", "0.52705735", "0.5264928", "0.5247906", "0.5241117", "0.52267575", "0.5217558", "0.52129245", "0.5212754", "0.52111745", "0.52103335", "0.52074003", "0.52014637", "0.51882976", "0.5182214", "0.5175713", "0.51684755", "0.51680064", "0.5154908", "0.5145388", "0.51327056", "0.5128169", "0.51270413", "0.51270413", "0.51182646", "0.5117723", "0.50920373", "0.50871587", "0.50847167", "0.508186", "0.5076517", "0.5071883", "0.50671893", "0.5062287", "0.50516427", "0.50516427", "0.50516427", "0.5045986", "0.50308204", "0.5015654", "0.50140834", "0.50100225", "0.500996", "0.49900693", "0.49860886", "0.498454", "0.49807248", "0.49793494", "0.49754795", "0.4974026", "0.49636585", "0.49539545", "0.49490264", "0.49459782", "0.49315265", "0.4931289", "0.49293873", "0.49230883", "0.49225333", "0.49202704", "0.4916159", "0.49100515", "0.49100515", "0.4908678", "0.49068674", "0.49055636" ]
0.52906096
35
Callback to set context information onto the scope.
function configureScope(callback) { callOnHub('configureScope', callback); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setContext() {\n\n $context = $( Config.get( 'context' ) );\n\n }", "setContext(context) {\n this.context = context;\n }", "function setScope() {\n\t if (this.opts && this.opts.noScope) return;\n\n\t var target = this.context || this.parentPath;\n\t this.scope = this.getScope(target && target.scope);\n\t if (this.scope) this.scope.init();\n\t}", "function setScope() {\n\t if (this.opts && this.opts.noScope) return;\n\n\t var target = this.context || this.parentPath;\n\t this.scope = this.getScope(target && target.scope);\n\t if (this.scope) this.scope.init();\n\t}", "updateContext(context) {\n this.context = context\n }", "function setScope() {\n if (this.opts && this.opts.noScope) return;\n\n var target = this.context || this.parentPath;\n this.scope = this.getScope(target && target.scope);\n if (this.scope) this.scope.init();\n}", "function emitContext (env, scope, context) {\n\t var shared = env.shared;\n\t var CONTEXT = shared.context;\n\t\n\t var contextEnter = env.scope();\n\t\n\t Object.keys(context).forEach(function (name) {\n\t scope.save(CONTEXT, '.' + name);\n\t var defn = context[name];\n\t contextEnter(CONTEXT, '.', name, '=', defn.append(env, scope), ';');\n\t });\n\t\n\t scope(contextEnter);\n\t }", "function setContext(context) {\n\t this.shouldSkip = false;\n\t this.shouldStop = false;\n\t this.removed = false;\n\t this.skipKeys = {};\n\n\t if (context) {\n\t this.context = context;\n\t this.state = context.state;\n\t this.opts = context.opts;\n\t }\n\n\t this.setScope();\n\n\t return this;\n\t}", "function setContext(context) {\n\t this.shouldSkip = false;\n\t this.shouldStop = false;\n\t this.removed = false;\n\t this.skipKeys = {};\n\n\t if (context) {\n\t this.context = context;\n\t this.state = context.state;\n\t this.opts = context.opts;\n\t }\n\n\t this.setScope();\n\n\t return this;\n\t}", "function emitContext (env, scope, context) {\n var shared = env.shared\n var CONTEXT = shared.context\n\n var contextEnter = env.scope()\n\n Object.keys(context).forEach(function (name) {\n scope.save(CONTEXT, '.' + name)\n var defn = context[name]\n contextEnter(CONTEXT, '.', name, '=', defn.append(env, scope), ';')\n })\n\n scope(contextEnter)\n }", "function emitContext (env, scope, context) {\n var shared = env.shared;\n var CONTEXT = shared.context;\n\n var contextEnter = env.scope();\n\n Object.keys(context).forEach(function (name) {\n scope.save(CONTEXT, '.' + name);\n var defn = context[name];\n contextEnter(CONTEXT, '.', name, '=', defn.append(env, scope), ';');\n });\n\n scope(contextEnter);\n }", "function emitContext (env, scope, context) {\n var shared = env.shared;\n var CONTEXT = shared.context;\n\n var contextEnter = env.scope();\n\n Object.keys(context).forEach(function (name) {\n scope.save(CONTEXT, '.' + name);\n var defn = context[name];\n contextEnter(CONTEXT, '.', name, '=', defn.append(env, scope), ';');\n });\n\n scope(contextEnter);\n }", "function emitContext (env, scope, context) {\n var shared = env.shared;\n var CONTEXT = shared.context;\n\n var contextEnter = env.scope();\n\n Object.keys(context).forEach(function (name) {\n scope.save(CONTEXT, '.' + name);\n var defn = context[name];\n contextEnter(CONTEXT, '.', name, '=', defn.append(env, scope), ';');\n });\n\n scope(contextEnter);\n }", "function emitContext (env, scope, context) {\n var shared = env.shared;\n var CONTEXT = shared.context;\n\n var contextEnter = env.scope();\n\n Object.keys(context).forEach(function (name) {\n scope.save(CONTEXT, '.' + name);\n var defn = context[name];\n contextEnter(CONTEXT, '.', name, '=', defn.append(env, scope), ';');\n });\n\n scope(contextEnter);\n }", "function emitContext (env, scope, context) {\n var shared = env.shared;\n var CONTEXT = shared.context;\n\n var contextEnter = env.scope();\n\n Object.keys(context).forEach(function (name) {\n scope.save(CONTEXT, '.' + name);\n var defn = context[name];\n contextEnter(CONTEXT, '.', name, '=', defn.append(env, scope), ';');\n });\n\n scope(contextEnter);\n }", "function emitContext (env, scope, context) {\n var shared = env.shared;\n var CONTEXT = shared.context;\n\n var contextEnter = env.scope();\n\n Object.keys(context).forEach(function (name) {\n scope.save(CONTEXT, '.' + name);\n var defn = context[name];\n contextEnter(CONTEXT, '.', name, '=', defn.append(env, scope), ';');\n });\n\n scope(contextEnter);\n }", "function emitContext (env, scope, context) {\n var shared = env.shared;\n var CONTEXT = shared.context;\n\n var contextEnter = env.scope();\n\n Object.keys(context).forEach(function (name) {\n scope.save(CONTEXT, '.' + name);\n var defn = context[name];\n contextEnter(CONTEXT, '.', name, '=', defn.append(env, scope), ';');\n });\n\n scope(contextEnter);\n }", "set contextId(value) { this._contextId = value; }", "function setScenarioContext(context){\n\t\tm_scenarioContext = context;\n\t\t\n\t\tm_scenarioContext.createScenarioPlay();\n\t\t\n\t\t// Notify the view that the context can be used\n\t\tscenarioView.initiateScenarioDisplay(context);\n\t}", "function setContext(id) {\n\n if (typeof(id) === 'number') {\n\n // Initialize global categories.\n var categories = CategoryList.query();\n categories.$promise.then(function (data) {\n Data.categories = data;\n Data.currentCategoryIndex = data[0].id;\n });\n\n // Initialize global tags.\n var tags = TagList.query();\n tags.$promise.then(function (data) {\n if (data.length > 0) {\n\n Data.tags = data;\n Data.currentTagIndex = data[0].id;\n }\n });\n\n // Initialize global content types\n var types = ContentTypeList.query();\n types.$promise.then(function (data) {\n if (data.length > 0) {\n Data.contentTypes = data;\n Data.currentContentIndex = data[0].id;\n }\n\n });\n\n updateAreaContext(id);\n\n }\n\n }", "function ContextClosure(template, context) {\n this.template = template;\n this.context = context;\n}", "function setContext(context) {\n this.shouldSkip = false;\n this.shouldStop = false;\n this.removed = false;\n this.skipKeys = {};\n\n if (context) {\n this.context = context;\n this.state = context.state;\n this.opts = context.opts;\n }\n\n this.setScope();\n\n return this;\n}", "function emitContext (env, scope, context) {\n var shared = env.shared;\n var CONTEXT = shared.context;\n\n var contextEnter = env.scope();\n\n Object.keys(context).forEach(function (name) {\n scope.save(CONTEXT, '.' + name);\n var defn = context[name];\n var value = defn.append(env, scope);\n if (Array.isArray(value)) {\n contextEnter(CONTEXT, '.', name, '=[', value.join(), '];');\n } else {\n contextEnter(CONTEXT, '.', name, '=', value, ';');\n }\n });\n\n scope(contextEnter);\n }", "function emitContext (env, scope, context) {\n var shared = env.shared\n var CONTEXT = shared.context\n\n var contextEnter = env.scope()\n\n Object.keys(context).forEach(function (name) {\n scope.save(CONTEXT, '.' + name)\n var defn = context[name]\n var value = defn.append(env, scope)\n if (Array.isArray(value)) {\n contextEnter(CONTEXT, '.', name, '=[', value.join(), '];')\n } else {\n contextEnter(CONTEXT, '.', name, '=', value, ';')\n }\n })\n\n scope(contextEnter)\n }", "function setScope (vnode) {\n\t var i\n\t if (isDef(i = vnode.context) && isDef(i = i.$options._scopeId)) {\n\t nodeOps.setAttribute(vnode.elm, i, '')\n\t }\n\t if (isDef(i = activeInstance) &&\n\t i !== vnode.context &&\n\t isDef(i = i.$options._scopeId)) {\n\t nodeOps.setAttribute(vnode.elm, i, '')\n\t }\n\t }", "function enterContext(context) {\n var keyword = toKeyword(context);\n lt.objs.context.in_BANG_.call(null, keyword, null);\n }", "addContext(param, value) {\n\t\tthis.context[param] = value;\n\t}", "function setContext(id, ok) {\n var xhr = new XMLHttpRequest();\n xhr.open('GET', ENDPOINT + id, true);\n xhr.onreadystatechange = function() {\n if(xhr.readyState === 4 && xhr.status === 200) {\n ok(id);\n }\n }\n xhr.send();\n }", "function Context() {\n this.scope = {};\n this.ordered = false;\n this._commands = {};\n this._beforeFn = [];\n this._queue = [];\n this._refreshCommands = [];\n}", "function setsContextValue(field, value) { }", "function setScope (vnode) {\n\t var i;\n\t if (isDef(i = vnode.context) && isDef(i = i.$options._scopeId)) {\n\t nodeOps.setAttribute(vnode.elm, i, '');\n\t }\n\t if (isDef(i = activeInstance) &&\n\t i !== vnode.context &&\n\t isDef(i = i.$options._scopeId)) {\n\t nodeOps.setAttribute(vnode.elm, i, '');\n\t }\n\t }", "function setScope (vnode) {\n\t var i;\n\t if (isDef(i = vnode.context) && isDef(i = i.$options._scopeId)) {\n\t nodeOps.setAttribute(vnode.elm, i, '');\n\t }\n\t if (isDef(i = activeInstance) &&\n\t i !== vnode.context &&\n\t isDef(i = i.$options._scopeId)) {\n\t nodeOps.setAttribute(vnode.elm, i, '');\n\t }\n\t }", "function setScope (vnode) {\n\t var i;\n\t if (isDef(i = vnode.context) && isDef(i = i.$options._scopeId)) {\n\t nodeOps.setAttribute(vnode.elm, i, '');\n\t }\n\t if (isDef(i = activeInstance) &&\n\t i !== vnode.context &&\n\t isDef(i = i.$options._scopeId)) {\n\t nodeOps.setAttribute(vnode.elm, i, '');\n\t }\n\t }", "withContext(context, cb) {\n this.context |= context;\n const ret = cb();\n this.context ^= context;\n return ret;\n }", "withContext(context, cb) {\n this.context |= context;\n const ret = cb();\n this.context ^= context;\n return ret;\n }", "changeContextParameter(param) {}", "contextDidChange() {\n this.currentModel = this.context;\n }", "function LContext() { }", "function LContext() { }", "function LContext() {}", "function LContext() {}", "function LContext() {}", "function setScope(vnode) {\n\t var i;\n\t if (isDef(i = vnode.context) && isDef(i = i.$options._scopeId)) {\n\t nodeOps.setAttribute(vnode.elm, i, '');\n\t }\n\t if (isDef(i = activeInstance) && i !== vnode.context && isDef(i = i.$options._scopeId)) {\n\t nodeOps.setAttribute(vnode.elm, i, '');\n\t }\n\t }", "_enterContext(context) {\n this._stack.push(context);\n }", "function setScope (vnode) {\n\t var i;\n\t if (isDef(i = vnode.fnScopeId)) {\n\t nodeOps.setStyleScope(vnode.elm, i);\n\t } else {\n\t var ancestor = vnode;\n\t while (ancestor) {\n\t if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n\t nodeOps.setStyleScope(vnode.elm, i);\n\t }\n\t ancestor = ancestor.parent;\n\t }\n\t }\n\t // for slot content they should also get the scopeId from the host instance.\n\t if (isDef(i = activeInstance) &&\n\t i !== vnode.context &&\n\t i !== vnode.fnContext &&\n\t isDef(i = i.$options._scopeId)\n\t ) {\n\t nodeOps.setStyleScope(vnode.elm, i);\n\t }\n\t }", "function setContext(name, context) {\n\t getCurrentHub().setContext(name, context);\n\t}", "function storeExtensionContext(ctx) {\n console.log(\"storing extension context\");\n extensionContext = ctx;\n}", "function setScope(vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n i !== vnode.fnContext &&\n isDef(i = i.$options._scopeId)\n ) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }", "function getContext(_, ctx) {\n return ctx;\n }", "function getContext(_, ctx) {\n return ctx;\n }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n i !== vnode.fnContext &&\n isDef(i = i.$options._scopeId)\n ) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }", "function setupContext( itcb ) {\n // if a context was passed we can skip this step\n if ( hasContext || isTest ) { return itcb( null ); }\n options.activityContext = {\n skipInvalidateParentActivities,\n 'cache': {},\n 'queueKey': {},\n 'lastInBatch': ( 0 === numberOfCopies )\n };\n itcb( null );\n }", "function setScope(vnode) {\n\t\t var i = void 0;\n\t\t if (isDef(i = vnode.host) && isDef(i = i.$options._scopeId)) {\n\t\t nodeOps.setAttribute(vnode.elm, i, '');\n\t\t }\n\t\t if (isDef(i = vnode.context) && isDef(i = i.$options._scopeId)) {\n\t\t nodeOps.setAttribute(vnode.elm, i, '');\n\t\t }\n\t\t }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n i !== vnode.fnContext &&\n isDef(i = i.$options._scopeId)\n ) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n i !== vnode.fnContext &&\n isDef(i = i.$options._scopeId)\n ) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n i !== vnode.fnContext &&\n isDef(i = i.$options._scopeId)\n ) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n i !== vnode.fnContext &&\n isDef(i = i.$options._scopeId)\n ) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }", "function setScope(vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) && i !== vnode.context && i !== vnode.fnContext && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }", "function setScope(vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) && i !== vnode.context && i !== vnode.fnContext && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setAttribute(vnode.elm, i, '');\n }\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n isDef(i = i.$options._scopeId)) {\n nodeOps.setAttribute(vnode.elm, i, '');\n }\n }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setAttribute(vnode.elm, i, '');\n }\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n isDef(i = i.$options._scopeId)) {\n nodeOps.setAttribute(vnode.elm, i, '');\n }\n }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setAttribute(vnode.elm, i, '');\n }\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n isDef(i = i.$options._scopeId)) {\n nodeOps.setAttribute(vnode.elm, i, '');\n }\n }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setAttribute(vnode.elm, i, '');\n }\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n isDef(i = i.$options._scopeId)) {\n nodeOps.setAttribute(vnode.elm, i, '');\n }\n }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setAttribute(vnode.elm, i, '');\n }\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n isDef(i = i.$options._scopeId)) {\n nodeOps.setAttribute(vnode.elm, i, '');\n }\n }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n i !== vnode.fnContext &&\n isDef(i = i.$options._scopeId)\n ) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n i !== vnode.fnContext &&\n isDef(i = i.$options._scopeId)\n ) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n i !== vnode.fnContext &&\n isDef(i = i.$options._scopeId)\n ) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n i !== vnode.fnContext &&\n isDef(i = i.$options._scopeId)\n ) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n i !== vnode.fnContext &&\n isDef(i = i.$options._scopeId)\n ) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n i !== vnode.fnContext &&\n isDef(i = i.$options._scopeId)\n ) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n i !== vnode.fnContext &&\n isDef(i = i.$options._scopeId)\n ) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n i !== vnode.fnContext &&\n isDef(i = i.$options._scopeId)\n ) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n i !== vnode.fnContext &&\n isDef(i = i.$options._scopeId)\n ) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n i !== vnode.fnContext &&\n isDef(i = i.$options._scopeId)\n ) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n i !== vnode.fnContext &&\n isDef(i = i.$options._scopeId)\n ) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n i !== vnode.fnContext &&\n isDef(i = i.$options._scopeId)\n ) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n i !== vnode.fnContext &&\n isDef(i = i.$options._scopeId)\n ) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n i !== vnode.fnContext &&\n isDef(i = i.$options._scopeId)\n ) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n i !== vnode.fnContext &&\n isDef(i = i.$options._scopeId)\n ) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n i !== vnode.fnContext &&\n isDef(i = i.$options._scopeId)\n ) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n i !== vnode.fnContext &&\n isDef(i = i.$options._scopeId)\n ) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n i !== vnode.fnContext &&\n isDef(i = i.$options._scopeId)\n ) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n i !== vnode.fnContext &&\n isDef(i = i.$options._scopeId)\n ) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n i !== vnode.fnContext &&\n isDef(i = i.$options._scopeId)\n ) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n i !== vnode.fnContext &&\n isDef(i = i.$options._scopeId)\n ) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n i !== vnode.fnContext &&\n isDef(i = i.$options._scopeId)\n ) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n i !== vnode.fnContext &&\n isDef(i = i.$options._scopeId)\n ) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n i !== vnode.fnContext &&\n isDef(i = i.$options._scopeId)\n ) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n i !== vnode.fnContext &&\n isDef(i = i.$options._scopeId)\n ) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n i !== vnode.fnContext &&\n isDef(i = i.$options._scopeId)\n ) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n i !== vnode.fnContext &&\n isDef(i = i.$options._scopeId)\n ) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n i !== vnode.fnContext &&\n isDef(i = i.$options._scopeId)\n ) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n i !== vnode.fnContext &&\n isDef(i = i.$options._scopeId)\n ) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n i !== vnode.fnContext &&\n isDef(i = i.$options._scopeId)\n ) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n i !== vnode.fnContext &&\n isDef(i = i.$options._scopeId)\n ) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n i !== vnode.fnContext &&\n isDef(i = i.$options._scopeId)\n ) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n i !== vnode.fnContext &&\n isDef(i = i.$options._scopeId)\n ) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n i !== vnode.fnContext &&\n isDef(i = i.$options._scopeId)\n ) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n i !== vnode.fnContext &&\n isDef(i = i.$options._scopeId)\n ) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n i !== vnode.fnContext &&\n isDef(i = i.$options._scopeId)\n ) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }", "function setScope (vnode) {\n var i;\n if (isDef(i = vnode.fnScopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n } else {\n var ancestor = vnode;\n while (ancestor) {\n if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n ancestor = ancestor.parent;\n }\n }\n // for slot content they should also get the scopeId from the host instance.\n if (isDef(i = activeInstance) &&\n i !== vnode.context &&\n i !== vnode.fnContext &&\n isDef(i = i.$options._scopeId)\n ) {\n nodeOps.setStyleScope(vnode.elm, i);\n }\n }" ]
[ "0.6870521", "0.6496326", "0.64944124", "0.64944124", "0.64558554", "0.64025575", "0.62711966", "0.61644095", "0.61644095", "0.6125142", "0.61220825", "0.61220825", "0.61220825", "0.61220825", "0.61220825", "0.61220825", "0.61220825", "0.60853523", "0.59609556", "0.59436244", "0.5888992", "0.58865416", "0.5878334", "0.58669746", "0.5820647", "0.58182484", "0.5801592", "0.58012503", "0.57576835", "0.5727521", "0.5673598", "0.5673598", "0.5673598", "0.5657515", "0.5657515", "0.56551737", "0.5646533", "0.56370485", "0.56370485", "0.56256986", "0.56256986", "0.56256986", "0.56183994", "0.5610365", "0.5607364", "0.55981296", "0.5597165", "0.5591005", "0.55847013", "0.55847013", "0.5584619", "0.55778193", "0.5576108", "0.55669886", "0.55669886", "0.55669886", "0.55669886", "0.55643624", "0.55643624", "0.5560871", "0.5560871", "0.5560871", "0.5560871", "0.5560871", "0.55600166", "0.55600166", "0.55600166", "0.55600166", "0.55600166", "0.55600166", "0.55600166", "0.55600166", "0.55600166", "0.55600166", "0.55600166", "0.55600166", "0.55600166", "0.55600166", "0.55600166", "0.55600166", "0.55600166", "0.55600166", "0.55600166", "0.55600166", "0.55600166", "0.55600166", "0.55600166", "0.55600166", "0.55600166", "0.55600166", "0.55600166", "0.55600166", "0.55600166", "0.55600166", "0.55600166", "0.55600166", "0.55600166", "0.55600166", "0.55600166", "0.55600166", "0.55600166" ]
0.0
-1
Records a new breadcrumb which will be attached to future events. Breadcrumbs will be added to subsequent events to provide more context on user's actions prior to an error or crash.
function addBreadcrumb(breadcrumb) { callOnHub('addBreadcrumb', breadcrumb); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addBreadcrumbEvent(replay, breadcrumb) {\n if (breadcrumb.category === 'sentry.transaction') {\n return;\n }\n\n if (breadcrumb.category === 'ui.click') {\n replay.triggerUserActivity();\n } else {\n replay.checkAndHandleExpiredSession();\n }\n\n replay.addUpdate(() => {\n void addEvent(replay, {\n type: EventType.Custom,\n // TODO: We were converting from ms to seconds for breadcrumbs, spans,\n // but maybe we should just keep them as milliseconds\n timestamp: (breadcrumb.timestamp || 0) * 1000,\n data: {\n tag: 'breadcrumb',\n payload: breadcrumb,\n },\n });\n\n // Do not flush after console log messages\n return breadcrumb.category === 'console';\n });\n }", "_createCustomBreadcrumb(breadcrumb) {\n this.addUpdate(() => {\n void addEvent(this, {\n type: EventType.Custom,\n timestamp: breadcrumb.timestamp || 0,\n data: {\n tag: 'breadcrumb',\n payload: breadcrumb,\n },\n });\n });\n }", "function addBreadcrumb(breadcrumb) {\r\n callOnHub('addBreadcrumb', breadcrumb);\r\n}", "function addBreadcrumb(breadcrumb) {\n hub.getCurrentHub().addBreadcrumb(breadcrumb);\n}", "function addBreadcrumb(breadcrumb) {\n getCurrentHub().addBreadcrumb(breadcrumb);\n }", "function addBreadcrumb(breadcrumb) {\n\t getCurrentHub().addBreadcrumb(breadcrumb);\n\t}", "addSentryBreadcrumb(event) {\n if (this.options.sentry) {\n getCurrentHub().addBreadcrumb(\n {\n category: `sentry.${event.type === 'transaction' ? 'transaction' : 'event'}`,\n event_id: event.event_id,\n level: event.level,\n message: getEventDescription(event),\n },\n {\n event,\n },\n );\n }\n }", "addSentryBreadcrumb(event) {\n if (this.options.sentry) {\n core.getCurrentHub().addBreadcrumb(\n {\n category: `sentry.${event.type === 'transaction' ? 'transaction' : 'event'}`,\n event_id: event.event_id,\n level: event.level,\n message: utils.getEventDescription(event),\n },\n {\n event,\n },\n );\n }\n }", "function onBreadCrumbClicked(event)\n\t{\n\t\tvar breadcrumbId = event.currentTarget.dataset.breadcrumbId;\n\n\t\tthis.back(breadcrumbId);\n\t}", "function addBreadcrumbs(title, url) {\n var breadcrumbs_list = $('.breadcrumb');\n var parent_el = breadcrumbs_list.find('li.active');\n parent_el.children().attr('href', url).attr('data-remote', \"true\");\n parent_el.removeClass('active');\n var active_li = $('<li></li>').addClass('active');\n var a_value = $('<a>').html(title);\n active_li.append(a_value);\n breadcrumbs_list.append(active_li);\n // Handheld action 'back'\n parent_el.children().click(function() {\n // remove previous <li>\n parent_el.next().remove();\n parent_el.addClass('active');\n });\n}", "function addSentryBreadcrumb(serializedData) {\n // There's always something that can go wrong with deserialization...\n try {\n var event_1 = JSON.parse(serializedData);\n Object(_sentry_core__WEBPACK_IMPORTED_MODULE_1__[\"getCurrentHub\"])().addBreadcrumb({\n category: \"sentry.\" + (event_1.type === 'transaction' ? 'transaction' : 'event'),\n event_id: event_1.event_id,\n level: event_1.level || _sentry_types__WEBPACK_IMPORTED_MODULE_2__[\"Severity\"].fromString('error'),\n message: Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_3__[\"getEventDescription\"])(event_1),\n }, {\n event: event_1,\n });\n }\n catch (_oO) {\n _sentry_utils__WEBPACK_IMPORTED_MODULE_3__[\"logger\"].error('Error while adding sentry type breadcrumb');\n }\n}", "function _historyBreadcrumb(handlerData) {\n\t let from = handlerData.from;\n\t let to = handlerData.to;\n\t const parsedLoc = parseUrl(WINDOW$1.location.href);\n\t let parsedFrom = parseUrl(from);\n\t const parsedTo = parseUrl(to);\n\n\t // Initial pushState doesn't provide `from` information\n\t if (!parsedFrom.path) {\n\t parsedFrom = parsedLoc;\n\t }\n\n\t // Use only the path component of the URL if the URL matches the current\n\t // document (almost all the time when using pushState)\n\t if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) {\n\t to = parsedTo.relative;\n\t }\n\t if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) {\n\t from = parsedFrom.relative;\n\t }\n\n\t getCurrentHub().addBreadcrumb({\n\t category: 'navigation',\n\t data: {\n\t from,\n\t to,\n\t },\n\t });\n\t}", "fillBreadcrumb() {\n const { breadcrumbs } = this.pageElements;\n const li = document.createElement('li');\n \n li.textContent = this.restaurant.name;\n li.classList.add('breadcrumbs__nav-item');\n li.setAttribute('aria-current', 'page');\n\n breadcrumbs.appendChild(li);\n }", "function generateBreadcrumb () {\n let cloneBreadcrumb = module.exports.internal.breadcrumb.cloneNode(false)\n module.exports.internal.breadcrumb.parentNode.replaceChild(cloneBreadcrumb, module.exports.internal.breadcrumb)\n module.exports.internal.breadcrumb = cloneBreadcrumb\n\n let spanHome = document.createElement('span')\n spanHome.innerHTML = 'Home'\n spanHome.className = 'link'\n spanHome.onclick = () => { module.exports.internal.stateManager.showState('pick-a-season', 'pick-a-team') }\n module.exports.internal.breadcrumb.appendChild(spanHome)\n\n let spanSep1 = document.createElement('span')\n spanSep1.innerHTML = '&nbsp;&gt;&nbsp;'\n module.exports.internal.breadcrumb.appendChild(spanSep1)\n\n let spanTeam = document.createElement('span')\n spanTeam.innerHTML = module.exports.internal.dataObj.name\n module.exports.internal.breadcrumb.appendChild(spanTeam)\n}", "function _consoleBreadcrumb(handlerData) {\n\t // This is a hack to fix a Vue3-specific bug that causes an infinite loop of\n\t // console warnings. This happens when a Vue template is rendered with\n\t // an undeclared variable, which we try to stringify, ultimately causing\n\t // Vue to issue another warning which repeats indefinitely.\n\t // see: https://github.com/getsentry/sentry-javascript/pull/6010\n\t // see: https://github.com/getsentry/sentry-javascript/issues/5916\n\t for (let i = 0; i < handlerData.args.length; i++) {\n\t if (handlerData.args[i] === 'ref=Ref<') {\n\t handlerData.args[i + 1] = 'viewRef';\n\t break;\n\t }\n\t }\n\t const breadcrumb = {\n\t category: 'console',\n\t data: {\n\t arguments: handlerData.args,\n\t logger: 'console',\n\t },\n\t level: severityLevelFromString(handlerData.level),\n\t message: safeJoin(handlerData.args, ' '),\n\t };\n\n\t if (handlerData.level === 'assert') {\n\t if (handlerData.args[0] === false) {\n\t breadcrumb.message = `Assertion failed: ${safeJoin(handlerData.args.slice(1), ' ') || 'console.assert'}`;\n\t breadcrumb.data.arguments = handlerData.args.slice(1);\n\t } else {\n\t // Don't capture a breadcrumb for passed assertions\n\t return;\n\t }\n\t }\n\n\t getCurrentHub().addBreadcrumb(breadcrumb, {\n\t input: handlerData.args,\n\t level: handlerData.level,\n\t });\n\t}", "function addCrumbItem(text, href) {\r\n let a = document.createElement(\"a\");\r\n a.classList.add(\"crumb-item\");\r\n a.innerText = text;\r\n a.href = href;\r\n\r\n if(document.getElementById(\"breadcrumbs\").firstElementChild != null)\r\n document.getElementById(\"breadcrumbs\").appendChild(document.createTextNode(\">>\"));\r\n\r\n document.getElementById(\"breadcrumbs\").appendChild(a);\r\n \r\n}", "function _consoleBreadcrumb(handlerData) {\n // This is a hack to fix a Vue3-specific bug that causes an infinite loop of\n // console warnings. This happens when a Vue template is rendered with\n // an undeclared variable, which we try to stringify, ultimately causing\n // Vue to issue another warning which repeats indefinitely.\n // see: https://github.com/getsentry/sentry-javascript/pull/6010\n // see: https://github.com/getsentry/sentry-javascript/issues/5916\n for (let i = 0; i < handlerData.args.length; i++) {\n if (handlerData.args[i] === 'ref=Ref<') {\n handlerData.args[i + 1] = 'viewRef';\n break;\n }\n }\n const breadcrumb = {\n category: 'console',\n data: {\n arguments: handlerData.args,\n logger: 'console',\n },\n level: severityLevelFromString(handlerData.level),\n message: safeJoin(handlerData.args, ' '),\n };\n\n if (handlerData.level === 'assert') {\n if (handlerData.args[0] === false) {\n breadcrumb.message = `Assertion failed: ${safeJoin(handlerData.args.slice(1), ' ') || 'console.assert'}`;\n breadcrumb.data.arguments = handlerData.args.slice(1);\n } else {\n // Don't capture a breadcrumb for passed assertions\n return;\n }\n }\n\n getCurrentHub().addBreadcrumb(breadcrumb, {\n input: handlerData.args,\n level: handlerData.level,\n });\n }", "function _historyBreadcrumb(handlerData) {\n let from = handlerData.from;\n let to = handlerData.to;\n const parsedLoc = parseUrl(WINDOW$2.location.href);\n let parsedFrom = parseUrl(from);\n const parsedTo = parseUrl(to);\n\n // Initial pushState doesn't provide `from` information\n if (!parsedFrom.path) {\n parsedFrom = parsedLoc;\n }\n\n // Use only the path component of the URL if the URL matches the current\n // document (almost all the time when using pushState)\n if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) {\n to = parsedTo.relative;\n }\n if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) {\n from = parsedFrom.relative;\n }\n\n getCurrentHub().addBreadcrumb({\n category: 'navigation',\n data: {\n from,\n to,\n },\n });\n }", "function breadcrumbEventHandler(eventName, debounce) {\r\n if (debounce === void 0) {\r\n debounce = false;\r\n }\r\n return function (event) {\r\n // reset keypress timeout; e.g. triggering a 'click' after\r\n // a 'keypress' will reset the keypress debounce so that a new\r\n // set of keypresses can be recorded\r\n keypressTimeout = undefined;\r\n // It's possible this handler might trigger multiple times for the same\r\n // event (e.g. event propagation through node ancestors). Ignore if we've\r\n // already captured the event.\r\n if (!event || lastCapturedEvent === event) {\r\n return;\r\n }\r\n lastCapturedEvent = event;\r\n var captureBreadcrumb = function () {\r\n // try/catch both:\r\n // - accessing event.target (see getsentry/raven-js#838, #768)\r\n // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\r\n // can throw an exception in some circumstances.\r\n var target;\r\n try {\r\n target = event.target ? _htmlTreeAsString(event.target) : _htmlTreeAsString(event);\r\n } catch (e) {\r\n target = '<unknown>';\r\n }\r\n if (target.length === 0) {\r\n return;\r\n }\r\n Object(_sentry_core__WEBPACK_IMPORTED_MODULE_1__[\"getCurrentHub\"])().addBreadcrumb({\r\n category: \"ui.\" + eventName,\r\n message: target\r\n }, {\r\n event: event,\r\n name: eventName\r\n });\r\n };\r\n if (debounceTimer) {\r\n clearTimeout(debounceTimer);\r\n }\r\n if (debounce) {\r\n debounceTimer = setTimeout(captureBreadcrumb);\r\n } else {\r\n captureBreadcrumb();\r\n }\r\n };\r\n}", "function generateBreadcrumb () {\n let cloneBreadcrumb = module.exports.internal.breadcrumb.cloneNode(false)\n module.exports.internal.breadcrumb.parentNode.replaceChild(cloneBreadcrumb, module.exports.internal.breadcrumb)\n module.exports.internal.breadcrumb = cloneBreadcrumb\n\n let spanHome = document.createElement('span')\n spanHome.innerHTML = 'Home'\n spanHome.className = 'link'\n spanHome.onclick = () => { module.exports.internal.stateManager.showState('main-branch', 'pick-a-team') }\n module.exports.internal.breadcrumb.appendChild(spanHome)\n\n let spanSep1 = document.createElement('span')\n spanSep1.innerHTML = '&nbsp;&gt;&nbsp;'\n module.exports.internal.breadcrumb.appendChild(spanSep1)\n\n let spanTeam = document.createElement('span')\n spanTeam.innerHTML = module.exports.internal.dataObj.name\n spanTeam.className = 'link'\n spanTeam.onclick = () => { module.exports.internal.stateManager.showState('main-branch', 'pick-a-season') }\n module.exports.internal.breadcrumb.appendChild(spanTeam)\n\n let spanSep2 = document.createElement('span')\n spanSep2.innerHTML = '&nbsp;&gt;&nbsp;'\n module.exports.internal.breadcrumb.appendChild(spanSep2)\n\n let spanSeason = document.createElement('span')\n spanSeason.innerHTML = module.exports.internal.dataObj.seasons[module.exports.internal.seasonId].name\n module.exports.internal.breadcrumb.appendChild(spanSeason)\n}", "function _historyBreadcrumb(handlerData) {\n let from = handlerData.from;\n let to = handlerData.to;\n const parsedLoc = utils.parseUrl(helpers.WINDOW.location.href);\n let parsedFrom = utils.parseUrl(from);\n const parsedTo = utils.parseUrl(to);\n\n // Initial pushState doesn't provide `from` information\n if (!parsedFrom.path) {\n parsedFrom = parsedLoc;\n }\n\n // Use only the path component of the URL if the URL matches the current\n // document (almost all the time when using pushState)\n if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) {\n to = parsedTo.relative;\n }\n if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) {\n from = parsedFrom.relative;\n }\n\n core.getCurrentHub().addBreadcrumb({\n category: 'navigation',\n data: {\n from,\n to,\n },\n });\n}", "function _historyBreadcrumb(handlerData) {\n let from = handlerData.from;\n let to = handlerData.to;\n const parsedLoc = utils.parseUrl(helpers.WINDOW.location.href);\n let parsedFrom = utils.parseUrl(from);\n const parsedTo = utils.parseUrl(to);\n\n // Initial pushState doesn't provide `from` information\n if (!parsedFrom.path) {\n parsedFrom = parsedLoc;\n }\n\n // Use only the path component of the URL if the URL matches the current\n // document (almost all the time when using pushState)\n if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) {\n to = parsedTo.relative;\n }\n if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) {\n from = parsedFrom.relative;\n }\n\n core.getCurrentHub().addBreadcrumb({\n category: 'navigation',\n data: {\n from,\n to,\n },\n });\n}", "function createBreadcrumb(\n breadcrumb,\n ) {\n return {\n timestamp: new Date().getTime() / 1000,\n type: 'default',\n ...breadcrumb,\n };\n }", "function addBreadcrumbs() {\n var table = document.body.getElementsByTagName('table')[0];\n\n var nav = document.createElement('nav');\n nav.id = 'directory-bar';\n table.insertAdjacentElement('beforebegin', nav);\n\n var navWrapper = document.createElement('div');\n navWrapper.classList.add('nav-wrapper');\n nav.appendChild(navWrapper);\n\n var breadcrumbs = document.createElement('div');\n breadcrumbs.id = 'breadcrumbs';\n navWrapper.appendChild(breadcrumbs);\n\n // Convert from UTF-8 byte sequence to readable strings\n // First and last element are empty after split due to URI structure and so removed\n var pathNames = decodeURIComponent(window.location.pathname).split('/');\n pathNames = pathNames.slice(1, pathNames.length-1);\n var href = window.location.protocol + \"//\" + window.location.host + \"/\";\n\n // Unlike the \"file:\" protocol, FTP has a root directory so an empty item is inserted at the front\n if(window.location.protocol == 'ftp:' || pathNames.length == 0) {\n pathNames.unshift('');\n }\n\n // Building the href reference iteratively and adding it to the end of \"breadcrumbs\" div\n for (var i=0; i<pathNames.length; i++) {\n // Do not append to href if item is root directory\n if(pathNames[i] == '') {\n pathNames[i] = '/'; // Root directory will have text '/' as name\n } else {\n href += pathNames[i] + \"/\";\n }\n\n var a = document.createElement('a');\n a.href = href;\n a.classList.add('breadcrumb');\n\n // Determines what colour to make the breadcrumb arrow and hover effect\n var current = localStorage.getItem(\"option\");\n if (current == \"theme4\") {\n var arrowColour = \"breadcrumb-arrow2\";\n\t\t\tvar breadcrumbTextColour = \"breadcrumb-text2\";\n } else {\n var arrowColour = \"breadcrumb-arrow1\";\n\t\t\tvar breadcrumbTextColour = \"breadcrumb-text1\";\n }\n // Adds additional colour attribute to breadcrumb arrow\n a.classList.add(arrowColour);\n\n var span = document.createElement('span');\n span.classList.add(breadcrumbTextColour);\n span.textContent = pathNames[i];\n a.appendChild(span);\n \n breadcrumbs.appendChild(a);\n }\n\n truncateBreadcrumb();\n}", "function setPageBreadcrumb(){\n\t//check to see if page has navigation element, if so show breadcrumb\n\tif(jq(\"#viewnavigation_div\").html() && jq(\"#breadcrumbs\").length){\n\t\tvar pageTitle = jq(\"#currentPageTitle\").val();\n\t\tvar pageId = jq(\"#pageId\").val();\n\t\tjq(\"#breadcrumbs\").find(\"#page_breadcrumb\").remove();\n\t\tvar bcSet = false;\n\t\tif(pageTitle && pageTitle != \"&nbsp;\"){\n\t\t\tjq(\"#breadcrumbs\").append(\"<li id='page_breadcrumb'><span role='presentation'>&raquo;</span> <span class='kr-current'>\" + pageTitle + \"</span></li>\");\n\t\t\tjq(\"#current_breadcrumb_span\").hide();\n if(jq(\"#current_breadcrumb_span\").parent(\"li\").length){\n jq(\"#current_breadcrumb_span\").unwrap();\n }\n var anchor = jq(\"#current_breadcrumb_anchor\");\n jq(\"#current_breadcrumb_anchor\").wrap(\"<li/>\");\n\t\t\tjq(\"#current_breadcrumb_anchor\").show();\n\t\t\tbcSet = true;\n\t\t}\n\t\telse if(pageId){\n\t\t\tpageTitle = jq(\"a[name='\"+ escapeName(pageId) + \"']\").text();\n\t\t\tif(pageTitle && pageTitle != \"&nbsp;\"){\n\t\t\t\tjq(\"#breadcrumbs\").append(\"<li id='page_breadcrumb'><span role='presentation'>&raquo;</span> <span class='kr-current'>\" + pageTitle + \"</span></li>\");\n\t\t\t\tjq(\"#current_breadcrumb_span\").hide();\n if(jq(\"#current_breadcrumb_span\").parent(\"li\").length){\n jq(\"#current_breadcrumb_span\").unwrap();\n }\n jq(\"#current_breadcrumb_anchor\").wrap();\n\t\t\t\tjq(\"#current_breadcrumb_anchor\").show();\n\t\t\t\tbcSet=true;\n\t\t\t}\n\t\t}\n\n\t\tif(!bcSet){\n\t\t\tjq(\"#current_breadcrumb_anchor\").hide();\n if(jq(\"#current_breadcrumb_anchor\").parent(\"li\").length){\n jq(\"#current_breadcrumb_anchor\").unwrap();\n }\n jq(\"#current_breadcrumb_span\").wrap(\"<li/>\");\n\t\t\tjq(\"#current_breadcrumb_span\").show();\n\t\t}\n\t}\n}", "function _consoleBreadcrumb(handlerData) {\n // This is a hack to fix a Vue3-specific bug that causes an infinite loop of\n // console warnings. This happens when a Vue template is rendered with\n // an undeclared variable, which we try to stringify, ultimately causing\n // Vue to issue another warning which repeats indefinitely.\n // see: https://github.com/getsentry/sentry-javascript/pull/6010\n // see: https://github.com/getsentry/sentry-javascript/issues/5916\n for (let i = 0; i < handlerData.args.length; i++) {\n if (handlerData.args[i] === 'ref=Ref<') {\n handlerData.args[i + 1] = 'viewRef';\n break;\n }\n }\n const breadcrumb = {\n category: 'console',\n data: {\n arguments: handlerData.args,\n logger: 'console',\n },\n level: utils.severityLevelFromString(handlerData.level),\n message: utils.safeJoin(handlerData.args, ' '),\n };\n\n if (handlerData.level === 'assert') {\n if (handlerData.args[0] === false) {\n breadcrumb.message = `Assertion failed: ${utils.safeJoin(handlerData.args.slice(1), ' ') || 'console.assert'}`;\n breadcrumb.data.arguments = handlerData.args.slice(1);\n } else {\n // Don't capture a breadcrumb for passed assertions\n return;\n }\n }\n\n core.getCurrentHub().addBreadcrumb(breadcrumb, {\n input: handlerData.args,\n level: handlerData.level,\n });\n}", "function _consoleBreadcrumb(handlerData) {\n // This is a hack to fix a Vue3-specific bug that causes an infinite loop of\n // console warnings. This happens when a Vue template is rendered with\n // an undeclared variable, which we try to stringify, ultimately causing\n // Vue to issue another warning which repeats indefinitely.\n // see: https://github.com/getsentry/sentry-javascript/pull/6010\n // see: https://github.com/getsentry/sentry-javascript/issues/5916\n for (let i = 0; i < handlerData.args.length; i++) {\n if (handlerData.args[i] === 'ref=Ref<') {\n handlerData.args[i + 1] = 'viewRef';\n break;\n }\n }\n const breadcrumb = {\n category: 'console',\n data: {\n arguments: handlerData.args,\n logger: 'console',\n },\n level: utils.severityLevelFromString(handlerData.level),\n message: utils.safeJoin(handlerData.args, ' '),\n };\n\n if (handlerData.level === 'assert') {\n if (handlerData.args[0] === false) {\n breadcrumb.message = `Assertion failed: ${utils.safeJoin(handlerData.args.slice(1), ' ') || 'console.assert'}`;\n breadcrumb.data.arguments = handlerData.args.slice(1);\n } else {\n // Don't capture a breadcrumb for passed assertions\n return;\n }\n }\n\n core.getCurrentHub().addBreadcrumb(breadcrumb, {\n input: handlerData.args,\n level: handlerData.level,\n });\n}", "fillBreadcrumb (restaurant) {\n const breadcrumb = document.getElementById('breadcrumb')\n const li = document.createElement('li')\n li.innerHTML = restaurant.name\n breadcrumb.appendChild(li)\n }", "function _fetchBreadcrumb(handlerData) {\n // We only capture complete fetch requests\n if (!handlerData.endTimestamp) {\n return;\n }\n\n if (handlerData.fetchData.url.match(/sentry_key/) && handlerData.fetchData.method === 'POST') {\n // We will not create breadcrumbs for fetch requests that contain `sentry_key` (internal sentry requests)\n return;\n }\n\n if (handlerData.error) {\n getCurrentHub().addBreadcrumb(\n {\n category: 'fetch',\n data: handlerData.fetchData,\n level: 'error',\n type: 'http',\n },\n {\n data: handlerData.error,\n input: handlerData.args,\n },\n );\n } else {\n getCurrentHub().addBreadcrumb(\n {\n category: 'fetch',\n data: {\n ...handlerData.fetchData,\n status_code: handlerData.response.status,\n },\n type: 'http',\n },\n {\n input: handlerData.args,\n response: handlerData.response,\n },\n );\n }\n }", "function _fetchBreadcrumb(handlerData) {\n\t // We only capture complete fetch requests\n\t if (!handlerData.endTimestamp) {\n\t return;\n\t }\n\n\t if (handlerData.fetchData.url.match(/sentry_key/) && handlerData.fetchData.method === 'POST') {\n\t // We will not create breadcrumbs for fetch requests that contain `sentry_key` (internal sentry requests)\n\t return;\n\t }\n\n\t if (handlerData.error) {\n\t getCurrentHub().addBreadcrumb(\n\t {\n\t category: 'fetch',\n\t data: handlerData.fetchData,\n\t level: 'error',\n\t type: 'http',\n\t },\n\t {\n\t data: handlerData.error,\n\t input: handlerData.args,\n\t },\n\t );\n\t } else {\n\t getCurrentHub().addBreadcrumb(\n\t {\n\t category: 'fetch',\n\t data: {\n\t ...handlerData.fetchData,\n\t status_code: handlerData.response.status,\n\t },\n\t type: 'http',\n\t },\n\t {\n\t input: handlerData.args,\n\t response: handlerData.response,\n\t },\n\t );\n\t }\n\t}", "onCrumbClick(crumb) {\n this.navigateTo(crumb.path);\n }", "function _fetchBreadcrumb(handlerData) {\n // We only capture complete fetch requests\n if (!handlerData.endTimestamp) {\n return;\n }\n\n if (handlerData.fetchData.url.match(/sentry_key/) && handlerData.fetchData.method === 'POST') {\n // We will not create breadcrumbs for fetch requests that contain `sentry_key` (internal sentry requests)\n return;\n }\n\n if (handlerData.error) {\n core.getCurrentHub().addBreadcrumb(\n {\n category: 'fetch',\n data: handlerData.fetchData,\n level: 'error',\n type: 'http',\n },\n {\n data: handlerData.error,\n input: handlerData.args,\n },\n );\n } else {\n core.getCurrentHub().addBreadcrumb(\n {\n category: 'fetch',\n data: {\n ...handlerData.fetchData,\n status_code: handlerData.response.status,\n },\n type: 'http',\n },\n {\n input: handlerData.args,\n response: handlerData.response,\n },\n );\n }\n}", "function initializeBreadcrumbTrail() {\r\n // Add the svg area.\r\n var trail = d3.select(el).select(\".sunburst-sequence\").append(\"svg\")\r\n .attr(\"width\", width)\r\n //.attr(\"height\", 50)\r\n .attr(\"id\", el.id + \"-trail\");\r\n // Add the label at the end, for the percentage.\r\n trail.append(\"text\")\r\n .attr(\"id\", el.id + \"-endlabel\")\r\n .style(\"fill\", \"#000\");\r\n }", "function _fetchBreadcrumb(handlerData) {\n const { startTimestamp, endTimestamp } = handlerData;\n\n // We only capture complete fetch requests\n if (!endTimestamp) {\n return;\n }\n\n if (handlerData.fetchData.url.match(/sentry_key/) && handlerData.fetchData.method === 'POST') {\n // We will not create breadcrumbs for fetch requests that contain `sentry_key` (internal sentry requests)\n return;\n }\n\n if (handlerData.error) {\n const data = handlerData.fetchData;\n const hint = {\n data: handlerData.error,\n input: handlerData.args,\n startTimestamp,\n endTimestamp,\n };\n\n core.getCurrentHub().addBreadcrumb(\n {\n category: 'fetch',\n data,\n level: 'error',\n type: 'http',\n },\n hint,\n );\n } else {\n const data = {\n ...handlerData.fetchData,\n status_code: handlerData.response && handlerData.response.status,\n };\n const hint = {\n input: handlerData.args,\n response: handlerData.response,\n startTimestamp,\n endTimestamp,\n };\n core.getCurrentHub().addBreadcrumb(\n {\n category: 'fetch',\n data,\n type: 'http',\n },\n hint,\n );\n }\n}", "function onClickingLink(event, breadcrumb) {\r\n event.preventDefault(); // prevent default action\r\n $state.go(breadcrumb.stateName); // move to state\r\n }", "function InitBreadcrumb() {\n DynamicDetailsViewCtrl.ePage.Masters.Breadcrumb = {};\n DynamicDetailsViewCtrl.ePage.Masters.Breadcrumb.OnBreadcrumbClick = OnBreadcrumbClick;\n\n GetBreadcrumbList();\n }", "function setBreadcrumb(breadcrumb) {\n $(\"#breadcrumbs\").html(\"<p><a href='dashboard.php'><i class='fas fa-home'></i></a> / \" + breadcrumb + \"</p>\");\n}", "function _xhrBreadcrumb(handlerData) {\n\t if (handlerData.endTimestamp) {\n\t // We only capture complete, non-sentry requests\n\t if (handlerData.xhr.__sentry_own_request__) {\n\t return;\n\t }\n\n\t const { method, url, status_code, body } = handlerData.xhr.__sentry_xhr__ || {};\n\n\t getCurrentHub().addBreadcrumb(\n\t {\n\t category: 'xhr',\n\t data: {\n\t method,\n\t url,\n\t status_code,\n\t },\n\t type: 'http',\n\t },\n\t {\n\t xhr: handlerData.xhr,\n\t input: body,\n\t },\n\t );\n\n\t return;\n\t }\n\t}", "function fillBreadcrumb(restaurant = self.restaurant) {\n const breadcrumb = document.getElementById('breadcrumb_ol');\n const li = document.createElement('li');\n li.innerHTML = restaurant.name;\n li.setAttribute('aria-current', 'page');\n breadcrumb.appendChild(li);\n}", "function addBreadcrumbData(url, document) {\n const parents = [];\n const split = url.split(\"/\");\n let parentURL;\n // If the URL was something like `/en-US/docs/Foo/Bar` when you split\n // that, the array becomes `['', 'en-US', 'docs', 'Foo', 'Bar']`\n // And as length, that's `[1, 2, 3, 4, 5]`. Therefore, there's never\n // any point of going for 1, 2, or 3 since that's just the home page\n // which we don't ever include in the breadcrumb trail.\n while (split.length > 4) {\n split.pop();\n parentURL = split.join(\"/\");\n // This test makes it possible to \"skip\" certain URIs that might not\n // be a page on its own. For example: /en-US/docs/Web/ is a page,\n // and so is /en-US/ but there might not be a page for /end-US/docs/.\n\n const parentDoc = Document.findByURL(parentURL);\n if (parentDoc) {\n parents.unshift({\n uri: parentURL,\n title: parentDoc.metadata.title,\n });\n }\n }\n if (parents.length) {\n parents.push({\n uri: url,\n title: document.short_title || document.title,\n });\n document.parents = parents;\n }\n}", "function _xhrBreadcrumb(handlerData) {\n const { startTimestamp, endTimestamp } = handlerData;\n\n const sentryXhrData = handlerData.xhr[utils.SENTRY_XHR_DATA_KEY];\n\n // We only capture complete, non-sentry requests\n if (!startTimestamp || !endTimestamp || !sentryXhrData) {\n return;\n }\n\n const { method, url, status_code, body } = sentryXhrData;\n\n const data = {\n method,\n url,\n status_code,\n };\n\n const hint = {\n xhr: handlerData.xhr,\n input: body,\n startTimestamp,\n endTimestamp,\n };\n\n core.getCurrentHub().addBreadcrumb(\n {\n category: 'xhr',\n data,\n type: 'http',\n },\n hint,\n );\n}", "function breadcrumbs()\n{\n\tif ((document.getElementById) && document.getElementById('breadcrumb_dynamic')) { // Make sure browser supports getElementById and breadcrumb_dynamic exists\n\t\tvar wrkLocation = location.href;\n\t\tvar wrkLength = wrkLocation.indexOf(\"#\"); // Find the begining of any anchor reference\n\t\tif (wrkLength != -1) {\n\t\t\twrkLocation = wrkLocation.substr(0,wrkLength); // Remove the anchor reference\n\t\t}\t\n\t\tvar wrkLength = wrkLocation.indexOf(\"?\"); // Find the begining of the query string\n\t\tif (wrkLength != -1) {\n\t\t\twrkLocation = wrkLocation.substr(0,wrkLength); // Remove the query string\n\t\t}\n\n\t\twrkLocation = unescape(wrkLocation);\n\n\t\t//var re = /<\\S[^>]*>/g; // Remove html tags from a string\n\t\tvar re = /<.*/g; // remove < and anything after\n\t\twrkLocation = wrkLocation.replace(re, \"\");\n\n\t\tvar arrURL=wrkLocation.split(\"/\"); // Array containing the current location, split at the slashes\n\t\tvar output='<a href=\"/\">Home</a>'; // The string which will be output to the browser, starts with a link to the home page\n\t\tvar path = '/'; // Link for the crumbs\n\n\t\t// If last item is blank or index.* or default.*, remove it\n\t\tif (arrURL[arrURL.length-1] == '' || arrURL[arrURL.length-1].match(/^index\\.|^default\\./i) ) {\n\t\t\tarrURL.length--;\n\t\t}\n\n\t\tif (arrURL.length > 3) {\n\t\t\tfor (counter = 3;counter < arrURL.length-1;counter++) { // Loop to display the links\n\t\t\t\tpath += arrURL[counter] + '/'; // always end links to folder with '/' \n\t\t\t\toutput += ' | <a href=\"' + path + '\">' + (arrURL[counter].replace(/_/g,' ')) + '</a>';\n\t\t\t}\n\n\t\t\t// Display the name of the current page in bold\n\t\t\toutput += ' | <strong>' + (arrURL[arrURL.length-1].replace(/_/g,' ').replace(/\\.\\w{3,5}$/,'')) + '</strong>';\n\t\t}\n\n\t\tdocument.getElementById('breadcrumb_dynamic').innerHTML = output; // Display the breadcrumbs\n\t}\n}", "ready(){super.ready();let root=this;root.__breadcrumbs=document.createElement(\"rich-text-editor-breadcrumbs\");document.body.appendChild(root.__breadcrumbs);root.__breadcrumbs.addEventListener(\"breadcrumb-tap\",root._handleBreadcrumb.bind(root));this._stickyChanged()}", "function updateBreadcrumbs(nodeArray, percentageString) {\n\n // Data join; key function combines name and depth (= position in sequence).\n var g = d3.select('#trail')\n .selectAll('g')\n .data(nodeArray, function (d) {\n return d.name + d.depth;\n });\n\n // Add breadcrumb and label for entering nodes.\n var entering = g.enter().append('svg:g');\n\n entering.append('svg:polygon')\n .attr('points', breadcrumbPoints)\n .style('fill', function (d) {\n return colors[d.name];\n });\n\n entering.append('svg:text')\n .attr('x', (b.w + b.t) / 2)\n .attr('y', b.h / 2)\n .attr('dy', '0.35em')\n .attr('text-anchor', 'middle')\n .text(function (d) {\n return d.name;\n });\n\n // Set position for entering and updating nodes.\n g.attr('transform', function (d, i) {\n return 'translate(' + i * (b.w + b.s) + ', 0)';\n });\n\n // Remove exiting nodes.\n g.exit().remove();\n\n // Now move and update the percentage at the end.\n d3.select('#trail').select('#endlabel')\n .attr('x', (nodeArray.length + 0.5) * (b.w + b.s))\n .attr('y', b.h / 2)\n .attr('dy', '0.35em')\n .attr('text-anchor', 'middle')\n .text(percentageString);\n\n // Make the breadcrumb trail visible, if it's hidden.\n d3.select('#trail')\n .style('visibility', '');\n }", "createBreadcrumb(path, isCurrent = false) {\n if (!path) return false\n let crumbRoute = this.#router.resolve(path);\n let breadcrumb = crumbRoute.meta?.breadcrumb;\n if (typeof breadcrumb === 'function') breadcrumb = breadcrumb.call(null, crumbRoute, this.#vueApp);\n\n if (!breadcrumb) return false\n\n let isBcObject = typeof breadcrumb === 'object';\n\n return {\n label: (isBcObject) ? breadcrumb.label : breadcrumb,\n link: (isBcObject && breadcrumb.link) ? breadcrumb.link : crumbRoute.path,\n current: isCurrent,\n _path: path\n }\n }", "function init_breadcrumb() {\n\tif ($(\"breadcrumb\")) {\n\n\t\tvar item_y = null;\n\t\tvar isInFollowingLine = false;\n\n\t\t$A($(\"breadcrumb\").getElementsByTagName(\"dd\")).each(function(item) {\n\t\t\titem = $(item);\n\n\t\t\t//calculate the y-offset position of the current breadcrumb item\n\t\t\tif(item_y == null) {\n\t\t\t\titem_y = Position.cumulativeOffset(item)[1];\n\t\t\t}\n\t\t\tif(item_y < Position.cumulativeOffset(item)[1]) {\n\t\t\t\tisInFollowingLine = true;\n\t\t\t}\n\n\t\t\t//reduce the z-index of the current item\n\t\t\tif(isInFollowingLine) {\n\t\t\t\titem.setStyle({'zIndex':parseInt(item.getStyle('zIndex')) - 1 });\n\t\t\t}\n\n\t\t\t//breadcrumb JS hover only needed for IE<7\n\t\t\tif (Info.browser.isIEpre7) {\n\t\t\t\tvar curBreadcrumbLayer = item.down(\"div\");\n\n\t\t\t\tif(typeof curBreadcrumbLayer == \"undefined\") {\n\t\t\t\t\t// special treatment IE5.5\n\t\t\t\t\tcurBreadcrumbLayer = item.getElementsByTagName(\"DIV\")[0];\n\t\t\t\t}\n\n\t\t\t\tif(curBreadcrumbLayer) {\n\t\t\t\t\tvar iframeLining = new IframeLining(curBreadcrumbLayer);\n\n\t\t\t\t\titem.observe(\"mouseover\", function(e) {\n\t\t\t\t\t\tthis.addClassName(\"active\");\n\t\t\t\t\t\tiframeLining.show();\n\t\t\t\t\t}.bindAsEventListener(item));\n\n\t\t\t\t\titem.observe(\"mouseout\", function(e) {\n\t\t\t\t\t\tvar relatedTarget = $(e.relatedTarget || e.toElement);\n\n\t\t\t\t\t\tif(relatedTarget!=this && relatedTarget.childOf(this)==false) {\n\t\t\t\t\t\t\tthis.removeClassName(\"active\");\n\t\t\t\t\t\t\tiframeLining.hide();\n\t\t\t\t\t\t}\n\t\t\t\t\t}.bindAsEventListener(item));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n}", "function _xhrBreadcrumb(handlerData) {\n if (handlerData.endTimestamp) {\n // We only capture complete, non-sentry requests\n if (handlerData.xhr.__sentry_own_request__) {\n return;\n }\n\n const { method, url, status_code, body } = handlerData.xhr.__sentry_xhr__ || {};\n\n core.getCurrentHub().addBreadcrumb(\n {\n category: 'xhr',\n data: {\n method,\n url,\n status_code,\n },\n type: 'http',\n },\n {\n xhr: handlerData.xhr,\n input: body,\n },\n );\n\n return;\n }\n}", "function addRequestBreadcrumb(event, url, req, res) {\n if (!core_1.getCurrentHub().getIntegration(Http)) {\n return;\n }\n core_1.getCurrentHub().addBreadcrumb({\n category: 'http',\n data: {\n method: req.method,\n status_code: res && res.statusCode,\n url: url,\n },\n type: 'http',\n }, {\n event: event,\n request: req,\n response: res,\n });\n}", "function _xhrBreadcrumb(handlerData) {\n if (handlerData.endTimestamp) {\n // We only capture complete, non-sentry requests\n if (handlerData.xhr.__sentry_own_request__) {\n return;\n }\n\n const { method, url, status_code, body } = handlerData.xhr.__sentry_xhr__ || {};\n\n getCurrentHub().addBreadcrumb(\n {\n category: 'xhr',\n data: {\n method,\n url,\n status_code,\n },\n type: 'http',\n },\n {\n xhr: handlerData.xhr,\n input: body,\n },\n );\n\n return;\n }\n }", "function setBreadcrumb(text){\n\n var data=text.split(\"/\");\n // console.log(data);\n var html=\"\";\n\n $( \".ms-breadcrumb\" ).remove();\n data.forEach(function(item, index){\n\n html=html+'<li class=\"ms-breadcrumb\">'+ item +'</li>';\n\n });\n \n\n\n $(\".ms-breadcrumb-end\").after(html);\n\n}", "updateCrumbs() {\n console.debug(this.dir);\n let elements = this.dir.split('/'),\n pathPrefix = '/gi_album',\n path = _.map(elements, (elem) => {\n if (elem === '') {\n return {\n name: 'Album',\n url: '/gi_album'\n };\n } else {\n let prefix = pathPrefix;\n pathPrefix = pathPrefix + '/' + elem;\n return {\n name: elem,\n url: prefix + '/' + elem\n };\n }\n });\n path.unshift({\n name: 'Home',\n url: '/'\n });\n this.Breadcrumb.setPath(path);\n\n // HACK KI to update document title\n document.title = path[path.length -1].name;\n }", "function createBreadcrumb() {\n \"use strict\";\n\tif (document.location.href.indexOf(\"frames/main/menu\")!=-1){return};\n var requestUrl;\n var dbServer;\n var parentUrlString = \"\";\n var parentUrl = $(\"meta[name=parentUrl]\");\n var serverMap = {\n \"sh0lqitvap239\": \"sh0lqitvap239\",\n \"sh0lqitvap240\": \"sh0lqitvap240\",\n \"sh0lqitvap241\": \"sh0lqitvap241\",\n \"sh0lqitvap242\": \"icms-scgi-si.isvcs.net\",\n \"sh0lqitvap243\": \"sh0lqitvap243\",\n \"sh0lqitvap244\": \"sh0lqitvap244\",\n \"icms-scgi-ut.isvcs.net\": \"icms-scgi-ut.isvcs.net\",\n \"icms-scgi-ot.isvcs.net\": \"icms-scgi-ot.isvcs.net\",\n \"workzone\": \"icms-scgi.isvcs.net\",\n \"staging\": \"icms-scgi.isvcs.net\",\n \"infozone\": \"icms-scgi.isvcs.net\"\n };\n\n var hostname = document.location.hostname;\n var port = document.location.port;\n if (hostname === \"sh0lqitvap242\" && (port === \"82\" || port === \"83\" || port === \"84\")) {\n dbServer = hostname;\n } else {\n dbServer = serverMap[hostname];\n }\n if (dbServer === null || dbServer === undefined || dbServer.trim() === \"\") {\n dbServer = \"icms-scgi-si.isvcs.net\";\n }\n if (parentUrl.length > 0) {\n parentUrlString = \"&parentUrl=\" + $(parentUrl[0]).attr(\"content\");\n }\n requestUrl = \"http://\" + dbServer + \":8080/iw-cc/rest/ck/getBreadcrumbsForUrl?callback=breadcrumbCallback&url=\" + encodeURIComponent(document.location.href) + parentUrlString;\n\n $.ajax({\n type: \"GET\",\n url: requestUrl,\n dataType: \"jsonp\"\n });\n}", "function _domBreadcrumb(dom) {\n\t // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t function _innerDomBreadcrumb(handlerData) {\n\t let target;\n\t let keyAttrs = typeof dom === 'object' ? dom.serializeAttribute : undefined;\n\n\t if (typeof keyAttrs === 'string') {\n\t keyAttrs = [keyAttrs];\n\t }\n\n\t // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n\t try {\n\t target = handlerData.event.target\n\t ? htmlTreeAsString(handlerData.event.target , keyAttrs)\n\t : htmlTreeAsString(handlerData.event , keyAttrs);\n\t } catch (e) {\n\t target = '<unknown>';\n\t }\n\n\t if (target.length === 0) {\n\t return;\n\t }\n\n\t getCurrentHub().addBreadcrumb(\n\t {\n\t category: `ui.${handlerData.name}`,\n\t message: target,\n\t },\n\t {\n\t event: handlerData.event,\n\t name: handlerData.name,\n\t global: handlerData.global,\n\t },\n\t );\n\t }\n\n\t return _innerDomBreadcrumb;\n\t}", "setBreadcrumbTitle({ state, commit }, breadcrumbTitle) {\n const parts = vm.$router.currentRoute.path.split('/').slice(1)\n const breadcrumbs = state.breadcrumbs\n for (const [index] of parts.entries()) {\n let subPath = ''\n for (let i = 0; i <= index; i++) {\n subPath += '/' + parts[i]\n }\n if (subPath === vm.$router.currentRoute.path) {\n breadcrumbs[index].title = breadcrumbTitle\n commit('SET_BREADCRUMBS', breadcrumbs)\n return\n }\n }\n }", "function updateBreadcrumbs(nodeArray, percentageString) {\r\n \r\n // Data join; key function combines name and depth (= position in sequence).\r\n var g = d3.select(\"#trail\")\r\n .selectAll(\"g\")\r\n .data(nodeArray, function(d) { return d.name + d.depth; });\r\n \r\n // Add breadcrumb and label for entering nodes.\r\n var entering = g.enter().append(\"svg:g\");\r\n \r\n entering.append(\"svg:polygon\")\r\n .attr(\"points\", breadcrumbPoints)\r\n .style(\"fill\", function(d) { return colors[d.name]; });\r\n \r\n entering.append(\"svg:text\")\r\n .attr(\"x\", (b.w + b.t) / 2)\r\n .attr(\"y\", b.h / 2)\r\n .attr(\"dy\", \"0.35em\")\r\n .attr(\"text-anchor\", \"middle\")\r\n .text(function(d) { return d.name; });\r\n \r\n // Set position for entering and updating nodes.\r\n g.attr(\"transform\", function(d, i) {\r\n return \"translate(\" + i * (b.w + b.s) + \", 0)\";\r\n });\r\n \r\n // Remove exiting nodes.\r\n g.exit().remove();\r\n \r\n // Now move and update the percentage at the end.\r\n d3.select(\"#trail\").select(\"#endlabel\")\r\n .attr(\"x\", (nodeArray.length + 0.5) * (b.w + b.s))\r\n .attr(\"y\", b.h / 2)\r\n .attr(\"dy\", \"0.35em\")\r\n .attr(\"text-anchor\", \"middle\")\r\n .text(percentageString);\r\n \r\n // Make the breadcrumb trail visible, if it's hidden.\r\n d3.select(\"#trail\")\r\n .style(\"visibility\", \"\");\r\n \r\n }", "function updateBreadcrumbs(nodeArray) {\r\n\r\n // Data join; key function combines name and depth (= position in sequence).\r\n var g = d3.select(el).select(\"#\" + el.id + \"-trail\")\r\n .selectAll(\"g\")\r\n .data(nodeArray, function(d) { return d.name + d.depth; });\r\n\r\n // Add breadcrumb and label for entering nodes.\r\n var entering = g.enter().append(\"g\");\r\n\r\n\r\n if (b.w <= 0) {\r\n // Create a node array that contains all the breadcrumb widths\r\n // Calculate positions of breadcrumbs based on string lengths\r\n var curr_breadcrumb_x = 0;\r\n nodeArray[0].breadcrumb_x = 0;\r\n nodeArray[0].breadcrumb_h = 0;\r\n\r\n entering.append(\"polygon\")\r\n .style(\"z-index\",function(d,i) { return(999-i); })\r\n .style(\"fill\", function(d) { return colors(d.label); });\r\n\r\n entering.append(\"text\")\r\n .attr(\"x\", b.t + 2)\r\n .attr(\"y\", b.h / 2)\r\n .attr(\"dy\", \"0.35em\")\r\n .attr(\"text-anchor\", \"left\")\r\n .text(function(d) { return d.name; });\r\n\r\n // Remove exiting nodes.\r\n g.exit().remove();\r\n\r\n // loop through each g element\r\n // calculate string length\r\n // draw the breadcrumb polygon\r\n // and determine if breadcrumb should be wrapped to next row\r\n g.each(function(d,k){\r\n var crumbg = d3.select(this);\r\n var my_string_length = crumbg.select(\"text\").node().getBoundingClientRect().width;\r\n nodeArray[k].string_length = my_string_length + 12;\r\n crumbg.select(\"polygon\").attr(\"points\", function(d){\r\n return breadcrumbPoints(d, k);\r\n });\r\n var my_g_length = crumbg.node().getBoundingClientRect().width;\r\n curr_breadcrumb_x += k===0 ? 0 : nodeArray[k-1].string_length + b.s;\r\n nodeArray[k].breadcrumb_h = k===0 ? 0 : nodeArray[k-1].breadcrumb_h;\r\n\r\n if (curr_breadcrumb_x + my_g_length > width*0.99) {\r\n nodeArray[k].breadcrumb_h += b.h; // got to next line\r\n curr_breadcrumb_x = b.t + b.s; // restart counter\r\n }\r\n nodeArray[k].breadcrumb_x = curr_breadcrumb_x;\r\n });\r\n\r\n\r\n // Set position for entering and updating nodes.\r\n g.attr(\"transform\", function(d, i) {\r\n return \"translate(\" + d.breadcrumb_x + \", \"+d.breadcrumb_h+\")\";\r\n });\r\n\r\n\r\n\r\n\r\n } else {\r\n entering.append(\"polygon\")\r\n .attr(\"points\", breadcrumbPoints)\r\n .style(\"fill\", function(d) { return colors(d.label); });\r\n\r\n entering.append(\"text\")\r\n .attr(\"x\", (b.w + b.t) / 2)\r\n .attr(\"y\", b.h / 2)\r\n .attr(\"dy\", \"0.35em\")\r\n .attr(\"text-anchor\", \"middle\")\r\n .text(function(d) { return d.name; });\r\n\r\n // Set position for entering and updating nodes.\r\n g.attr(\"transform\", function(d, i) {\r\n return \"translate(\" + i * (b.w + b.s) + \", 0)\";\r\n });\r\n\r\n // Remove exiting nodes.\r\n g.exit().remove();\r\n\r\n\r\n }\r\n\r\n // Make the breadcrumb trail visible, if it's hidden.\r\n d3.select(el).select(\"#\" + el.id + \"-trail\")\r\n .style(\"visibility\", \"\");\r\n\r\n }", "function processBreadcrumbs(bc) {\r\n if (!this.getRootNode()) // initial rendering race condition\r\n return;\r\n\r\n var rootOfThisTree = this.getRootNode().get(\"id\"),\r\n path = \"\";\r\n\r\n // The bc path returned from the service starts at the repository root. If the\r\n // root of this content tree is not the bc path, then we ignore this navigation.\r\n var onPath;\r\n if (rootOfThisTree == \"root\") {\r\n onPath = true;\r\n path = \"/root\"; // $NON-NLS-1$\r\n }\r\n else\r\n onPath = false;\r\n\r\n for (var i=0; i < bc.total; ++i) {\r\n var crumbId = bc.items[i].id;\r\n\r\n if ((crumbId == rootOfThisTree))\r\n onPath = true;\r\n\r\n if (onPath)\r\n path = path.concat(\"/\", crumbId);\r\n }\r\n\r\n // the bc path does not include the target of the navigation, so add it\r\n // before calling selectPath\r\n path = path.concat(\"/\", targetId);\r\n\r\n if (onPath) {\r\n // Use the selectPath method of the Tree to expand to the target node.\r\n this.selectPath(path, \"id\", \"/\", onPathExpanded, this);\r\n }\r\n }", "function updateBreadcrumbs(nodeArray, percentageString) {\n // Data join; key function combines name and depth (= position in sequence).\n const g = d3.select('#trail')\n .selectAll('g')\n .data(nodeArray, d => d.name + d.depth);\n\n // Add breadcrumb and label for entering nodes.\n const entering = g.enter().append('svg:g');\n\n entering.append('svg:polygon')\n .attr('points', breadcrumbPoints)\n .style('fill', d => colors[d.name] || defaultColors[d.rank % defaultColors.length]);\n\n entering.append('svg:text')\n .attr('x', (b.w + b.t) / 2)\n .attr('y', b.h / 2)\n .attr('dy', '0.35em')\n .attr('text-anchor', 'middle')\n .text(d => d.name);\n\n // Set position for entering and updating nodes.\n g.attr('transform', (d, i) => `translate(${i * (b.w + b.s)}, 0)`);\n\n // Remove exiting nodes.\n g.exit().remove();\n\n // Now move and update the percentage at the end.\n d3.select('#trail').select('#endlabel')\n .attr('x', (nodeArray.length + 0.5) * (b.w + b.s))\n .attr('y', b.h / 2)\n .attr('dy', '0.35em')\n .attr('text-anchor', 'middle')\n .text(percentageString);\n\n // Make the breadcrumb trail visible, if it's hidden.\n d3.select('#trail')\n .style('visibility', '');\n}", "onClickAddDefaultShippingLogGA(breadCrumb, productName) {\n const { gtmDataLayer } = this.props;\n const removeAcademyLabel = {\n removeAcademyLabel: true\n };\n gtmDataLayer.push({\n event: 'pdpDetailClick',\n eventCategory: 'pdp interactions',\n eventAction: 'pdp|add a default payment option',\n eventLabel: `${printBreadCrumb([...breadCrumb, productName], removeAcademyLabel)}`.toLowerCase()\n });\n }", "function _updateBreadcrumbs(nodeArray, percentageString) {\n\n var g = self.trail\n .selectAll('g')\n .data(nodeArray, function(d) { return d.name + d.depth; });\n var entering = g.enter().append('svg:g');\n\n entering.append('svg:polygon')\n .attr('points', _breadcrumbPoints)\n .style('fill', function(d) { return _.find(options.supports, {key: d.name}) ? _.find(options.supports, {key: d.name}).color : '#F0F0F0'; });\n\n entering.append('svg:text')\n .attr('x', (options.trail.b.w + options.trail.b.t) / 2)\n .attr('y', options.trail.b.h / 2)\n .attr('dy', '0.35em')\n .attr('text-anchor', 'middle')\n .style('fill', '#ffffff')\n .text(function(d) { return d.name; });\n\n // Set position for entering and updating nodes.\n g.attr('transform', function(d, i) {\n return 'translate(' + i * (options.trail.b.w + options.trail.b.s) + ', 0)';\n });\n\n // Remove exiting nodes.\n g.exit().remove();\n\n // Now move and update the percentage at the end.\n self.trail.select('#endlabel')\n .attr('x', (nodeArray.length + 0.5) * (options.trail.b.w + options.trail.b.s))\n .attr('y', options.trail.b.h / 2)\n .attr('dy', '0.35em')\n .attr('text-anchor', 'middle')\n .text(percentageString);\n\n // Make the breadcrumb trail visible, if it's hidden.\n self.trail.style('visibility', 'visible');\n }", "function updateBreadcrumbs(nodeArray, p) {\n\n // Data join; key function combines name and depth (= position in sequence).\n var trail = d3.select(\"#trail\")\n .selectAll(\"g\")\n .data(nodeArray, function(d) { return d.data.name + p.depth; });\n\n // Remove exiting nodes.\n trail.exit().remove();\n\n // Add breadcrumb and label for entering nodes.\n var entering = trail.enter().append(\"svg:g\");\n\n entering.append(\"svg:polygon\")\n .attr(\"points\", breadcrumbPoints)\n .style(\"fill\", function(d) { \n if (d.depth == 1)\n return colors[d.data.name];\n else if (d.depth == 2) {\n d = d.parent;\n return colors[d.data.name];\n }\n else {\n d = d.parent;\n d = d.parent;\n return colors[d.data.name];\n }\n });\n\n entering.append(\"svg:text\")\n .attr(\"x\", (b.w + b.t) / 2)\n .attr(\"y\", b.h / 2)\n .attr(\"dy\", \"0.35em\")\n .style(\"fill\", \"black\")\n .attr(\"text-anchor\", \"middle\")\n .text(function(d) { return d.data.name; });\n\n // Merge enter and update selections; set position for all nodes.\n entering.merge(trail).attr(\"transform\", function(d, i) {\n return \"translate(\" + i * (b.w + b.s) + \", 0)\";\n });\n\n // Make the breadcrumb trail visible, if it's hidden.\n d3.select(\"#trail\")\n .style(\"visibility\", \"\");\n\n }", "function initiateBreadcrumbs (){\n\n // variables\n let width = $('#breadcrumbs').width(),\n height = $('#breadcrumbs').height();\n\n // dimensions\n let partitionHeight = height/6,\n partitionWidth = width,\n border = 3;\n\n /* initialize 'start' breadcrumb */\n breadcrumbDIV.append('polygon')\n .attr('id', 'polygonOne')\n .attr('points', createPointsOne(0, partitionWidth, partitionHeight))\n .attr('stroke', 'black')\n .attr('stroke-width', '0.7px')\n .attr('fill', 'white')\n .attr('opacity', 1)\n .on('mouseover', function(d){d3.select(this).attr('stroke-width', '1.2px').attr('fill','#d8d8d8')})\n .on('mouseout', function(d){d3.select(this).attr('stroke-width', '0.7px').attr('fill','white')})\n .on('click', function(d){d3.select('#select').dispatch('click')});\n\n breadcrumbDIV.append('text')\n .attr('id', 'polygonOneText')\n .attr('class', 'polygonText')\n .attr(\"x\", partitionWidth/2)\n .attr(\"y\", partitionHeight/2)\n .attr(\"fill\", \"#000000\")\n .attr(\"text-anchor\", \"middle\")\n .text('start selecting');\n\n /* initialize other breadcrumbs */\n createBreadcrumbElement('polygonTwo', partitionHeight+border);\n createBreadcrumbElement('polygonThree', 2*(partitionHeight+border));\n createBreadcrumbElement('polygonFour', 3*(partitionHeight+border));\n createBreadcrumbElement('polygonFive', 4*(partitionHeight+border));\n\n function createBreadcrumbElement(id, start){\n\n breadcrumbDIV.append('polygon')\n .attr('id', id)\n .attr('points', createPointsTwo(start, partitionWidth, partitionHeight))\n .attr('stroke', 'black')\n .attr('stroke-width', '0.7px')\n .attr('fill', '#ffffff')\n .attr('opacity', 0);\n\n breadcrumbDIV.append('text')\n .attr('id', id + 'Text')\n .attr('class', 'polygonText')\n .attr(\"x\", partitionWidth/2)\n .attr(\"y\", partitionHeight/2 + start - border)\n .attr(\"fill\", \"#000000\")\n .attr(\"text-anchor\", \"middle\")\n .text('');\n }\n}", "function updateBreadcrumbs(nodeArray, percentageString, ques, totalpstring) {\n\n // Data join; key function combines name and depth (= position in sequence).\n var g = d3.select(\"#trail\")\n .selectAll(\"g\")\n .data(nodeArray, function(d) { return d.name + d.depth;});\n\n // Add breadcrumb and label for entering nodes.\n var entering = g.enter().append(\"svg:g\");\n\n entering.append(\"svg:polygon\")\n .attr(\"points\", breadcrumbPoints)\n .style(\"fill\", function(d) { return getColor(colors, d.name); });\n\n entering.append(\"svg:text\")\n .attr(\"x\", (b.w + b.t) / 2)\n .attr(\"y\", b.h / 2)\n .attr(\"dy\", \"0.35em\")\n .attr(\"text-anchor\", \"middle\")\n .text(function(d) {\n return d.name; });\n\n // Set position for entering and updating nodes.\n g.attr(\"transform\", function(d, i) {\n return \"translate(\" + i * (b.w + b.s) + \", 0)\";\n });\n\n // Remove exiting nodes.\n g.exit().remove();\n\n // Now move and update the percentage at the end.\n d3.select(\"#trail\").select(\"#endlabel\")\n .attr(\"x\", (nodeArray.length + 1.2) * (b.w + b.s) + 20)\n .attr(\"y\", b.h / 2)\n .attr(\"dy\", \"0.35em\")\n .attr(\"text-anchor\", \"middle\")\n .text(ques + totalpstring);\n\n // Make the breadcrumb trail visible, if it's hidden.\n d3.select(\"#trail\")\n .style(\"visibility\", \"\");\n\n }", "setBreadcrumbsByRoute(route) {\n if (!route) return false\n let arPath = route.path.replace(/\\/$/, \"\").split('/');\n let iterablePath = '';\n let spliced = false;\n\n arPath.forEach((item, i) => {\n // 1. Get path for crumb\n iterablePath += (i === 1) ? item : '/' + item;\n let isCurrentCrumb = i + 1 >= arPath.length;\n\n // 2. Check if this crumb already exist, delete excess crumbs\n if (this.value[i]?._path === iterablePath) {\n // if this is last crumb delete excess existing crumbs\n if (isCurrentCrumb) this.value.splice(i + 1, this.value.length);\n this.value[i].current = i + 1 >= arPath.length;\n return false\n } else if (!spliced && i < this.value.length) {\n this.value.splice(i, this.value.length);\n spliced = true;\n }\n\n // 3. Create and add crumb\n const breadcrumb = this.createBreadcrumb(iterablePath, isCurrentCrumb);\n\n if (!breadcrumb) return false\n\n this.value.push(breadcrumb);\n });\n }", "function handleNewBookmark() {\n $('main').on('click', '#new-bookmark', event => {\n store.adding = true;\n render();\n });\n}", "function updateBreadcrumbs(nodeArray, percentageString) {\n\n // Data join; key function combines name and depth (= position in sequence).\n var g = d3.select(\"#trail\")\n .selectAll(\"g\")\n .data(nodeArray, function(d) { return d.name + d.depth; });\n\n // Add breadcrumb and label for entering nodes.\n var entering = g.enter().append(\"svg:g\");\n\n entering.append(\"svg:polygon\")\n .attr(\"points\", breadcrumbPoints)\n .style(\"fill\", function(d) { return colors[d.name]; });\n\n entering.append(\"svg:text\")\n .attr(\"x\", (b.w + b.t) / 2)\n .attr(\"y\", b.h / 2)\n .attr(\"dy\", \"0.35em\")\n .attr(\"text-anchor\", \"middle\")\n .text(function(d) { return d.name; });\n\n // Set position for entering and updating nodes.\n g.attr(\"transform\", function(d, i) {\n return \"translate(\" + i * (b.w + b.s) + \", 0)\";\n });\n\n // Remove exiting nodes.\n g.exit().remove();\n\n // Now move and update the percentage at the end.\n d3.select(\"#trail\").select(\"#endlabel\")\n .attr(\"x\", (nodeArray.length + 0.5) * (b.w + b.s))\n .attr(\"y\", b.h / 2)\n .attr(\"dy\", \"0.35em\")\n .attr(\"text-anchor\", \"middle\")\n .text(percentageString);\n\n // Make the breadcrumb trail visible, if it's hidden.\n d3.select(\"#trail\")\n .style(\"visibility\", \"\");\n\n }", "function handleAddNewBookmark() {\n $(\"main\").on(\"click\", \"#add-bookmark\", function (event) {\n store.addNewBookmark = !store.addNewBookmark;\n render();\n })\n}", "function _domBreadcrumb(dom) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function _innerDomBreadcrumb(handlerData) {\n let target;\n let keyAttrs = typeof dom === 'object' ? dom.serializeAttribute : undefined;\n\n if (typeof keyAttrs === 'string') {\n keyAttrs = [keyAttrs];\n }\n\n // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n try {\n target = handlerData.event.target\n ? utils.htmlTreeAsString(handlerData.event.target , keyAttrs)\n : utils.htmlTreeAsString(handlerData.event , keyAttrs);\n } catch (e) {\n target = '<unknown>';\n }\n\n if (target.length === 0) {\n return;\n }\n\n core.getCurrentHub().addBreadcrumb(\n {\n category: `ui.${handlerData.name}`,\n message: target,\n },\n {\n event: handlerData.event,\n name: handlerData.name,\n global: handlerData.global,\n },\n );\n }\n\n return _innerDomBreadcrumb;\n}", "breadcrumb (state, getters, rootState) {\n let breadcrumb = {}\n\n if (state.hovered) {\n const { id, label } = state.hovered\n breadcrumb = { id, label }\n\n if ((rootState.components.dragging.status || state.dragging.status) && state.dropline.position.bottom) {\n const parent = NodeHelpers.getRealParent(state.hovered.id)\n if (parent) {\n breadcrumb = { id: parent.id, label: parent.label }\n }\n }\n }\n\n return breadcrumb\n }", "function updateBreadcrumbs(nodeArray, percentageString) {\n\n // Data join; key function combines name and depth (= position in sequence).\n var trail = d3.select(\"#trail\")\n .selectAll(\"g\")\n .data(nodeArray, function(d) { return d.data.name + d.depth; });\n\n // Remove exiting nodes.\n trail.exit().remove();\n\n // Add breadcrumb and label for entering nodes.\n var entering = trail.enter().append(\"svg:g\");\n\n entering.append(\"svg:polygon\")\n .attr(\"points\", breadcrumbPoints)\n .style(\"fill\", function(d) { return colors[d.data.name]; });\n\n entering.append(\"svg:text\")\n .attr(\"x\", (b.w + b.t) / 2)\n .attr(\"y\", b.h / 2)\n .attr(\"dy\", \"0.35em\")\n .attr(\"text-anchor\", \"middle\")\n .text(function(d) { return d.data.name; });\n\n // Merge enter and update selections; set position for all nodes.\n entering.merge(trail).attr(\"transform\", function(d, i) {\n return \"translate(\" + i * (b.w + b.s) + \", 0)\";\n });\n\n // Now move and update the percentage at the end.\n d3.select(\"#trail\").select(\"#endlabel\")\n .attr(\"x\", (nodeArray.length + 0.5) * (b.w + b.s))\n .attr(\"y\", b.h / 2)\n .attr(\"dy\", \"0.35em\")\n .attr(\"text-anchor\", \"middle\")\n .text(percentageString);\n\n // Make the breadcrumb trail visible, if it's hidden.\n d3.select(\"#trail\")\n .style(\"visibility\", \"\");\n\n}", "function updateBreadcrumbs(nodeArray, percentageString) {\n\n // Data join; key function combines name and depth (= position in sequence).\n var g = d3.select(\"#trail\")\n .selectAll(\"g\")\n .data(nodeArray, function(d) { return d.name + d.depth; });\n \n // Add breadcrumb and label for entering nodes.\n var entering = g.enter().append(\"svg:g\");\n\n entering.append(\"svg:polygon\")\n .attr(\"points\", breadcrumbPoints)\n .style(\"fill\", function(d) { return colors[d.name] ? colors[d.name] : \"blue\"; });\n\n entering.append(\"svg:text\")\n .attr(\"x\", (b.w*1.5 + b.t) / 2)\n .attr(\"y\", b.h / 2)\n .attr(\"dy\", \"0.0em\")\n .attr(\"text-anchor\", \"middle\")\n .text(function(d) { return d.name; });\n\n // Set position for entering and updating nodes.\n g.attr(\"transform\", function(d, i) {\n return \"translate(\" + i * (b.w*2+ b.s) + \", 0)\";\n });\n\n // Remove exiting nodes.\n g.exit().remove();\n\n g.selectAll('text').each(insertLinebreaks);\n // Now move and update the percentage at the end.\n d3.select(\"#trail\").select(\"#endlabel\")\n .attr(\"x\", (nodeArray.length + 0.25) * (b.w + b.s))\n .attr(\"y\", b.h / 2)\n .attr(\"dy\", \"0.35em\")\n .attr(\"text-anchor\", \"middle\")\n .text(percentageString);\n\n // Make the breadcrumb trail visible, if it's hidden.\n d3.select(\"#trail\")\n .style(\"visibility\", \"\");\n\n}", "function breadcrumbsBackButtonClickEventHandler() {\n eaUtils.returnToLastSearchOrProduct(historyCursor, $.currentProduct.getId());\n}", "function _domBreadcrumb(dom) {\n function _innerDomBreadcrumb(handlerData) {\n let target;\n let keyAttrs = typeof dom === 'object' ? dom.serializeAttribute : undefined;\n\n let maxStringLength =\n typeof dom === 'object' && typeof dom.maxStringLength === 'number' ? dom.maxStringLength : undefined;\n if (maxStringLength && maxStringLength > MAX_ALLOWED_STRING_LENGTH) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n utils.logger.warn(\n `\\`dom.maxStringLength\\` cannot exceed ${MAX_ALLOWED_STRING_LENGTH}, but a value of ${maxStringLength} was configured. Sentry will use ${MAX_ALLOWED_STRING_LENGTH} instead.`,\n );\n maxStringLength = MAX_ALLOWED_STRING_LENGTH;\n }\n\n if (typeof keyAttrs === 'string') {\n keyAttrs = [keyAttrs];\n }\n\n // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n try {\n const event = handlerData.event ;\n target = _isEvent(event)\n ? utils.htmlTreeAsString(event.target, { keyAttrs, maxStringLength })\n : utils.htmlTreeAsString(event, { keyAttrs, maxStringLength });\n } catch (e) {\n target = '<unknown>';\n }\n\n if (target.length === 0) {\n return;\n }\n\n core.getCurrentHub().addBreadcrumb(\n {\n category: `ui.${handlerData.name}`,\n message: target,\n },\n {\n event: handlerData.event,\n name: handlerData.name,\n global: handlerData.global,\n },\n );\n }\n\n return _innerDomBreadcrumb;\n}", "recordState() {\n this._history.push(this.getDataString());\n }", "function bkmkCreatedHandler (id, BTN) {\r\n // We need the parent to calculate the real offset of insertion\r\n let parentId = BTN.parentId;\r\n let parentBN = curBNList[parentId];\r\n let index = BTN.index;\r\n//let t1 = (new Date()).getTime();\r\n//trace(t1+\" Create event on: \"+id+\" type: \"+BTN.type+\" parentId: \"+parentId+\" index: \"+index);\r\n\r\n // Create the new BN tree and insert it under its parent + maintain inBSP2Trash and trashDate fields\r\n let inBSP2Trash = options.trashEnabled && parentBN.inBSP2Trash;\r\n let BN = buildTree(BTN, parentBN.level+1, inBSP2Trash);\r\n BN_insert(BN, parentBN, index);\r\n\r\n // Record action\r\n historyListAdd(curHNList, HNACTION_BKMKCREATE,\r\n\t \t\t\t false, undefined, id, BTN.type, BN_aPath(parentId), parentId, index,\r\n\t \t\t\t BTN.title, BN.faviconUri, BTN.url, inBSP2Trash);\r\n // Save new current info\r\n saveBNList();\r\n // Refresh BSP2 toolbar icon in active tabs\r\n refreshActiveTabs(BN, false);\r\n\r\n // If we receive creation of the BSP2 trash folder, then rebuild pointer\r\n // and tell open sidebars before they are notified of its creation, to recognize it\r\n if (id == bsp2TrashFldrBNId) {\r\n\tbsp2TrashFldrBN = BN;\r\n\t// Notify open sidebars of new id\r\n\tsendAddonMsgComplex({\r\n\t source: \"background\",\r\n\t content: \"bsp2TrashFldrBNId\",\r\n\t bnId: bsp2TrashFldrBNId\r\n\t});\r\n }\r\n\r\n // Signal to sidebars to make them display it (must work with Private window sidebars\r\n // also, which have their own separate copy of curBNList).\r\n sendAddonMsgComplex({\r\n\tsource: \"background\",\r\n\tcontent: \"bkmkCreated\",\r\n\tnewtree: BN_serialize(BN),\r\n\tindex: index\r\n });\r\n\r\n // If we receive creation of the Recently bookmarked special folder (typically on restore bookmarks),\r\n // then rebuild pointer\r\n // -> Cannot detect it otherwise since FF does not support bookmarks.onImportBegan and onImportEnded\r\n // (but Chrome does)\r\n // Note on complete bookmark restore = the FF process appears to be as follows:\r\n // - Delete of all bookmark items at level 2, under Bppkùarks Toolbar, Bookkmarks Menu, Other Bookmarks ..\r\n // (no delete of lower ones, they get included by the level 2 deleted folders).\r\n // - Then re-create of all bookmarks one by one. This includes the special folders like Most Visited,\r\n // Recent Tags or Recently Bookmarked.\r\n if (id == recentBkmkBNId) {\r\n\trecentBkmkBN = BN;\r\n\t// Notify open sidebars of (possibly new) id\r\n\tsendAddonMsgComplex({\r\n\t source: \"background\",\r\n\t content: \"recentBkmkBNId\",\r\n\t bnId: recentBkmkBNId\r\n\t});\r\n }\r\n // Refresh list of recent bookmarks (always)\r\n triggerRecentRefreshBkmks();\r\n\r\n // If we receive creation of the Most recent special folder (typically on restore bookmarks),\r\n // then rebuild pointer and refresh its content also\r\n if (id == mostVisitedBNId) {\r\n\tmostVisitedBN = BN;\r\n\ttriggerRefreshMostVisited();\r\n\t// Notify open sidebars of (possibly new) id\r\n\tsendAddonMsgComplex({\r\n\t source: \"background\",\r\n\t content: \"mostVisitedBNId\",\r\n\t bnId: mostVisitedBNId\r\n\t});\r\n }\r\n\r\n // If we receive creation of the Recent tags special folder (typically on restore bookmarks),\r\n // then rebuild pointer\r\n if (id == recentTagBNId) {\r\n\trecentTagBN = BN;\r\n\t// Notify open sidebars of (possibly new) id\r\n\tsendAddonMsgComplex({\r\n\t source: \"background\",\r\n\t content: \"recentTagBNId\",\r\n\t bnId: recentTagBNId\r\n\t});\r\n }\r\n}", "handleBackButtonClick() {\n if (this.state.breadcrumbs.length > 1) {\n const currentIndex = this.state.breadcrumbs.length - 1;\n const prevIndex = currentIndex - 1;\n\n this.handleBreadcrumbClick(this.state.breadcrumbs[prevIndex], prevIndex);\n }\n }", "function Breadcrumb(aWidget, aContents) {\n this.document = aWidget.document;\n this.window = aWidget.window;\n this.ownerView = aWidget;\n\n this._target = this.document.createElement(\"hbox\");\n this._target.className = \"breadcrumbs-widget-item\";\n this._target.setAttribute(\"align\", \"center\");\n this.contents = aContents;\n}", "_doChangeToBackgroundTasks(breadcrumb) {\n if (!this.session) {\n return;\n }\n\n const expired = isSessionExpired(this.session, VISIBILITY_CHANGE_TIMEOUT);\n\n if (breadcrumb && !expired) {\n this._createCustomBreadcrumb(breadcrumb);\n }\n\n // Send replay when the page/tab becomes hidden. There is no reason to send\n // replay if it becomes visible, since no actions we care about were done\n // while it was hidden\n this._conditionalFlush();\n }", "function addHistory( data ) {\n\n if ( typeof(aio.history) != 'object' ) { aio.history = []; } // Change aio.history to array\n if ( typeof(aio.history) == 'object' && aio.history.length > 19 ) { aio.history.pop(); } // Delete oldest record if total exceeds 20\n\n // Add this new record\n aio.history.unshift( data );\n updateHistory();\n\n}", "function updateBreadcrumbs(nodeArray, percentageString) {\n // Data join; key function combines name and depth (= position in sequence).\n var trail = d3.select(\"#trail\")\n .selectAll(\"g\")\n .data(nodeArray, function(d) { return d.data.name + d.depth; });\n // Remove exiting nodes.\n trail.exit().remove();\n\n // Add breadcrumb and label for entering nodes.\n var entering = trail.enter().append(\"svg:g\");\n\n entering.append(\"svg:polygon\")\n .attr(\"points\", breadcrumbPoints)\n //.style(\"fill\", function(d) {return colors[d.data.name]; });\n .style(\"fill\", \"none\")\n .style(\"stroke\", \"black\")\n .style(\"stroke-width\", 1);\n\n entering.append(\"svg:text\")\n .attr(\"x\", (b.w + b.t) / 2)\n .attr(\"y\", b.h / 2)\n .attr(\"dy\", \"0.35em\")\n .attr(\"text-anchor\", \"middle\")\n .style(\"fill\", \"black\")\n .attr(\"class\", \"wrap\")\n .style(\"font-size\", function(d){\n var length = d.data.name.length;\n if(length >= 5){\n return 9 + \"px\";\n }else{\n return 15 + \"px\";\n }\n })\n .text(function(d) { return d.data.name; });\n\n // Merge enter and update selections; set position for all nodes.\n entering.merge(trail).attr(\"transform\", function(d, i) {\n return \"translate(\" + i * (b.w + b.s) + \", 0)\";\n //return \"translate(0, \" + i * (b.h + b.s) + \")\";\n });\n\n // Now move and update the percentage at the end.\n d3.select(\"#trail\").select(\"#endlabel\")\n .attr(\"x\", (nodeArray.length + 0.5) * (b.w + b.s))\n .attr(\"y\", b.h / 2)\n .attr(\"dy\", \"0.35em\")\n .attr(\"text-anchor\", \"middle\")\n .text(percentageString);\n\n // Make the breadcrumb trail visible, if it's hidden.\n d3.select(\"#trail\")\n .style(\"visibility\", \"\");\n}", "function updateMainBreadcrumb(resource, attrForTitle) {\n var lastBreadcrumb = $('.breadcrumb.fluid-container').find('li:last-child');\n var lastBreadcrumbAnchorTag = lastBreadcrumb.find('a');\n if (lastBreadcrumbAnchorTag.hasClass('inactive-link')) {\n // remove existing inactive link\n lastBreadcrumb.remove();\n }\n\n if (resource !== undefined) {\n // use default title or title retrieved from the passed in attribute\n var title = resource.text();\n if (attrForTitle) {\n title = resource.attr(attrForTitle);\n }\n $('.breadcrumb.fluid-container').append('<li><a class=\"inactive-link\">' + title + '</a></li>');\n }\n}", "render() {\n return (\n <div className=\"breadcrumb-line breadcrumb-line-component content-group-lg\">\n <ul className=\"breadcrumb\">\n <li>\n <a className=\"text-white btn btn-primary btn-sm btn-raised legitRipple\" href=\"/counter/transfer/add/\">\n <i className=\"icon-add position-left\"></i>\n Transfer\n </a>\n </li>\n </ul>\n <ul className=\"breadcrumb-elements\">\n <li><a href=\"javascript:;\" className=\"text-bold\"> Search:</a></li>\n <li>\n <FilterSearch />\n </li>\n <li><a href=\"javascript:;\" className=\"text-bold\"> Date:</a></li>\n <li>\n <FilterDate />\n </li>\n </ul>\n </div>\n );\n }", "function BreadcrumbComponent(breadcrumbsService) {\n var _this = this;\n this.breadcrumbsService = breadcrumbsService;\n // subscribe to the breadcrumb observable in service to update the view on change of subject\n this.breadcrumbsService.breadcrumbs$.subscribe(function (breadcrumbs) {\n _this.breadcrumbs = breadcrumbs;\n });\n }", "updateBreadcrumbs(nodeArray, percentageString) {\n\t\t\t// Data join; key function combines name and depth (= position in sequence).\n\t\t\tconst g = d3.select(\"#trail\")\n\t\t\t\t.selectAll(\"g\")\n\t\t\t\t.data(nodeArray, d => d.name + d.depth);\n\n\t\t\t// Add breadcrumb and label for entering nodes.\n\t\t\tconst entering = g.enter().append(\"svg:g\");\n\n\t\t\tentering.append(\"svg:polygon\")\n\t\t\t\t.attr(\"points\", this.breadcrumbPoints)\n\t\t\t\t.style(\"fill\", () => \"#f1f1f1\");\n\n\t\t\tentering.append(\"svg:text\")\n\t\t\t\t.attr(\"x\", (this.b.w + this.b.t) / 2)\n\t\t\t\t.attr(\"y\", this.b.h / 2)\n\t\t\t\t.attr(\"dy\", \"0.35em\")\n\t\t\t\t.attr(\"text-anchor\", \"middle\")\n\t\t\t\t.text(d => d.name);\n\n\t\t\t// Set position for entering and updating nodes.\n\t\t\tg.attr(\"transform\", (d, i) => `translate(${i * (this.b.w + this.b.s)}, 0)`);\n\n\t\t\t// Remove exiting nodes.\n\t\t\tg.exit().remove();\n\n\t\t\t// Now move and update the percentage at the end.\n\t\t\td3.select(\"#trail\").select(\"#endlabel\")\n\t\t\t\t.attr(\"x\", (nodeArray.length + 0.5) * (this.b.w + this.b.s))\n\t\t\t\t.attr(\"y\", this.b.h / 2)\n\t\t\t\t.attr(\"dy\", \"0.35em\")\n\t\t\t\t.attr(\"text-anchor\", \"middle\")\n\t\t\t\t.text(percentageString);\n\n\t\t\t// Make the breadcrumb trail visible, if it's hidden.\n\t\t\td3.select(\"#trail\")\n\t\t\t\t.style(\"visibility\", \"\");\n\t\t}", "function setBreadcrumbColor(elem) {\n\n // Create array of all 'a' elements\n var aList = document.getElementsByTagName('a');\n \n //Loop through all 'a' elements to remove active class on non-clicked breadcrumbs\n //This is necessary for coloring of breadcrumb (li and :after/before pseudo elements)\n //Note: I am not using jQuery given parameters of the challenge, but it would probably make selectors easier\n for (i = 0; i < aList.length; i++) {\n // Remove the class 'active' if it exists\n aList[i].closest('li').classList.remove('active');\n aList[i].closest('li').childNodes[1].classList.remove('active')\n }\n\n //Add 'active' and 'visitedAlready' classses to the element that was clicked to add color\n //Now that the breadcrumb was visited, a new color remains (shows progress)\n elem.classList.add('active', 'visitedAlready');\n elem.childNodes[1].classList.add('active', 'visitedAlready');\n\n //Checking analytics\n clickCounter.increment();\n console.log(\"Counter is now: \", clickCounter.value);\n}", "getBreadcrumbCurrentPath() {\n let breadcrumb = [];\n\n let name = this.url.replace(/\\/$/g, \"\").split(\"/\").last;\n let name_1 = this.getBreadcrumbNameForCurrentPath();\n // variable for breadcrumb for last child part of current view path\n let current_bc = {\n name: name_1 || name,\n };\n // if there is no filters and pagination, returns breadcrumbs\n if(isEmptyObject(this.$route.query)) {\n breadcrumb.push(current_bc);\n return breadcrumb;\n }\n\n current_bc.link = this.$route.path.replace(/\\/$/g, \"\");\n breadcrumb.push(current_bc);\n\n // else defines filters and pagination\n let filters = [];\n let filters_keys = Object.keys(this.$route.query);\n let page = this.$route.query[\"page\"];\n\n if(page) {\n filters_keys.splice(filters_keys.indexOf(\"page\"), 1);\n }\n\n for(let item in filters_keys) {\n let key = filters_keys[item];\n filters.push([key, this.$route.query[key]].join('='));\n }\n\n if(filters.length > 0) {\n let obj = {\n name: \"search: \" + filters.join(\"&\"),\n };\n\n if(page) {\n obj.link = this.$route.path.replace(/\\/$/g, \"\") + \"?\" + filters.join(\"&\");\n }\n\n breadcrumb.push(obj);\n }\n\n if(page) {\n breadcrumb.push({\n name: 'page=' + page,\n });\n }\n\n return breadcrumb;\n }", "goHigher () {\n if (this.breadcrumbs.length <= 1) {\n return;\n }\n const parts = this.breadcrumbs.slice(0, this.breadcrumbs.length - 1);\n this.goToPath('/' + parts.join('/'));\n }", "function setContestBreadcrumb(val) {\r\n contestBreadcrumb = \"\";\r\n if (preSelectedCategory != \"\") {\r\n contestBreadcrumb = '<span class=\"breadcrumb-item\"><span class=\"breadcrumb-link\" onclick=\"goToCategory()\">Catégorie ' + selectedCategory + '</span></span>';\r\n }\r\n if (preSelectedLanguage != \"\") {\r\n var separator = \"\";\r\n if (contestBreadcrumb != \"\") {\r\n separator = '<span class=\"breadcrumb-separator\">/</span>';\r\n }\r\n contestBreadcrumb += '<span class=\"breadcrumb-item\">' + separator + '<span class=\"breadcrumb-link\" onclick=\"goToLanguage()\">' + t(\"breadcrumb_language\") + ' ' + selectedLanguage + '</span></span>';\r\n }\r\n if (preSelectedContest != \"\") {\r\n var contest = window.getContest(preSelectedContest);\r\n var separator = \"\";\r\n if (contestBreadcrumb != \"\") {\r\n separator = '<span class=\"breadcrumb-separator\">/</span>';\r\n }\r\n contestBreadcrumb += '<span class=\"breadcrumb-item\">' + separator + '<span class=\"breadcrumb-link\" onclick=\"goToSequence()\">' + contest.name + '</span></span>';\r\n }\r\n $('#selection-breadcrumb').html(contestBreadcrumb);\r\n}", "function _domBreadcrumb(dom) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function _innerDomBreadcrumb(handlerData) {\n let target;\n let keyAttrs = typeof dom === 'object' ? dom.serializeAttribute : undefined;\n\n let maxStringLength =\n typeof dom === 'object' && typeof dom.maxStringLength === 'number' ? dom.maxStringLength : undefined;\n if (maxStringLength && maxStringLength > MAX_ALLOWED_STRING_LENGTH) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn(\n `\\`dom.maxStringLength\\` cannot exceed ${MAX_ALLOWED_STRING_LENGTH}, but a value of ${maxStringLength} was configured. Sentry will use ${MAX_ALLOWED_STRING_LENGTH} instead.`,\n );\n maxStringLength = MAX_ALLOWED_STRING_LENGTH;\n }\n\n if (typeof keyAttrs === 'string') {\n keyAttrs = [keyAttrs];\n }\n\n // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n try {\n target = handlerData.event.target\n ? htmlTreeAsString(handlerData.event.target , { keyAttrs, maxStringLength })\n : htmlTreeAsString(handlerData.event , { keyAttrs, maxStringLength });\n } catch (e) {\n target = '<unknown>';\n }\n\n if (target.length === 0) {\n return;\n }\n\n getCurrentHub().addBreadcrumb(\n {\n category: `ui.${handlerData.name}`,\n message: target,\n },\n {\n event: handlerData.event,\n name: handlerData.name,\n global: handlerData.global,\n },\n );\n }\n\n return _innerDomBreadcrumb;\n }", "function onNavigation() {\r\n var targetId = this.getPageObjectId();\r\n if (targetId == this.previousId)\r\n return;\r\n this.previousId = targetId;\r\n\r\n // Completion callback for breadcrumb request.\r\n function processBreadcrumbs(bc) {\r\n if (!this.getRootNode()) // initial rendering race condition\r\n return;\r\n\r\n var rootOfThisTree = this.getRootNode().get(\"id\"),\r\n path = \"\";\r\n\r\n // The bc path returned from the service starts at the repository root. If the\r\n // root of this content tree is not the bc path, then we ignore this navigation.\r\n var onPath;\r\n if (rootOfThisTree == \"root\") {\r\n onPath = true;\r\n path = \"/root\"; // $NON-NLS-1$\r\n }\r\n else\r\n onPath = false;\r\n\r\n for (var i=0; i < bc.total; ++i) {\r\n var crumbId = bc.items[i].id;\r\n\r\n if ((crumbId == rootOfThisTree))\r\n onPath = true;\r\n\r\n if (onPath)\r\n path = path.concat(\"/\", crumbId);\r\n }\r\n\r\n // the bc path does not include the target of the navigation, so add it\r\n // before calling selectPath\r\n path = path.concat(\"/\", targetId);\r\n\r\n if (onPath) {\r\n // Use the selectPath method of the Tree to expand to the target node.\r\n this.selectPath(path, \"id\", \"/\", onPathExpanded, this);\r\n }\r\n }\r\n\r\n if (targetId && (targetId.indexOf(\"08\") != 0)) // ignore business objects navigations\r\n getBreadcrumbsForObject(targetId, processBreadcrumbs, this);\r\n }", "function BreadcrumbComponent(breadcrumbsService) {\n var _this = this;\n this.breadcrumbsService = breadcrumbsService;\n // subscribe to the breadcrumb observable in service to update the view on change of subject\n this.breadcrumbsService.breadcrumbs$.subscribe((/**\n * @param {?} breadcrumbs\n * @return {?}\n */\n function (breadcrumbs) {\n _this.breadcrumbs = breadcrumbs;\n }));\n }", "function spliceBreadCrumbs(atIndex,total) {\n // First update breadcrumbs array\n var breadCrumbArray = new Array();\n breadCrumbArray = localStorage[constants.breadCrumbs].split(';');\n breadCrumbArray.splice(atIndex,total);\n localStorage[constants.breadCrumbs] = breadCrumbArray.join(\";\");\n // Now update corresponding href array\n var breadCrumbHrefs = new Array();\n breadCrumbHrefs = localStorage[constants.breadCrumbsHref].split(';');\n breadCrumbHrefs.splice(atIndex,total);\n localStorage[constants.breadCrumbsHref] = breadCrumbHrefs.join(\";\");\n}", "function bcListHandler(e) {\n var parentPath = e.target.id;\n // update currentParentPath\n if (parentPath !== 'bread-crumb-container') {\n if (parentPath == \"\") {\n content.style.display = 'none';\n recentActivity.style.display = 'block';\n currentParentPath = parentPath + '/';\n sendAjaxReq('GET', '/category/all?parent=' + sanitizePath(parentPath), updateAllPanes);\n } else {\n currentParentPath = parentPath + '/';\n sendAjaxReq('GET', '/category/all?parent=' + sanitizePath(parentPath), updateAllPanes);\n }\n }\n }", "function generateBreadcrumbs (path){\n\t\t$(\"#perc-chart-breadcrumb-list\").html(\"\");\n\t\tbreadcrumbItems = [];\n\t\tbreadcrumbItems = path.split(\"/\");\n\t\tvar siteName = prefs.getString(SITE_NAME);\n\t\tif (siteName == \"@all\"){\n $(\"#perc-chart-breadcrumb-list\").append(' <li atitle = \"\" ><span id = \"perc-breadcrumb-items\" atitle = \"\">All Sites</span></li><span class = \"perc-breadcrumb-separator\" >&nbsp;>&nbsp;</span>');\t\t\t \t\n\t\t}\n\t\tvar pathValue = breadcrumbItems[0];\n\t\t\n\t\t$(\"#perc-yaxis-label\").html(\"\");\n\t\tif(breadcrumbItems[0] == \"\"){\n\t\t\t$(\".perc-breadcrumb-separator\").hide();\n\t\t\t$(\"#perc-yaxis-label\").append(\"Sites\");\n\t\t}\n\t\telse{\n\t\t\t$(\"#perc-yaxis-label\").append(\"Sections\");\n\t\t}\n\n\n\t\t$(\"#perc-chart-breadcrumb-list\").append('<li atitle = \"'+ breadcrumbItems[0] + '\" ><span id = \"perc-breadcrumb-items\" atitle = \"'+ breadcrumbItems[0] +'\">' +breadcrumbItems[0]+'</span></li>');\n\t\t\n\t\tfor (i=1; i< breadcrumbItems.length; i++)\n\t\t{\n\t\t\t pathValue += '/' + breadcrumbItems[i];\n\t\t\t$(\"#perc-chart-breadcrumb-list\").append(' <span>>&nbsp;</span><li atitle = \"'+ pathValue + '\" ><span id = \"perc-breadcrumb-items\" atitle = \"'+ pathValue +'\">' +breadcrumbItems[i]+'</span></li>');\t\n\t\t}\n\t}", "function update_breadcrumb(currentSlide) {\n const bs = currentSlide.getElementsByClassName(\"breadcrumb-data\")[0];\n if (bs !== undefined ) {\n breadcrumb_bar.textContent = bs.textContent\n } else {\n breadcrumb_bar.textContent = ''\n }\n }", "function addBreadcrumbsContainer() {\r\n let div = document.createElement(\"div\");\r\n div.classList.add(\"breadcrumbs-container\");\r\n let p = document.createElement(\"p\");\r\n p.id = \"breadcrumbs\";\r\n div.appendChild(p);\r\n document.getElementById(\"content\").insertBefore(div, document.getElementById(\"content\").firstElementChild);\r\n}", "function bkmkCreated (BN, index) {\n//trace(t1.getTime()+\" Create event on: \"+BN.id+\" type: \"+BN.type+\" parentId: \"+BN.parentId+\" index: \"+index);\n if (!isDisplayComplete) // If we get an event while not yet ready, ignore\n\treturn;\n\n let parentId = BN.parentId;\n let parentBN = curBNList[parentId];\n if (backgroundPage == undefined) { // Redo insertion in our own copy of curBNList\n\n\t// Insert the new BN tree under its parent\n\tBN_insert(BN, parentBN, index);\n }\n\n // Find insertion point, setting it in global variable insertRowIndex\n // We need to retrieve the insertion point the hard way if we do not want to call\n // getSubtree() which is very very long ...\n let parentRow = curRowList[parentId];\n // Introduce robustness in case the BN tree is empty and index is not 0, as that seems to occur some times\n let children = parentBN.children;\n if ((index == 0) || (children == undefined)) { // Insert just after parent row\n\t// Note that this also takes care of the case where parent had so far no child\n\tinsertRowIndex = parentRow.rowIndex + 1; // Can be at end of bookmarks table\n }\n else { // Insert just after previous row\n\t\t // ASSUMPTION (true so far): when multiple moves / creates to same parent, like in multi-select move\n\t \t // or reorder or ..., items are sent to us in increasing row/index order, so previous\n \t // rows to current item under process are always already at the right place.\n\t\t // Note that in such multi operations, things have been all processed in background first for the copy,\n\t\t // so the BN tree is not anymore in sync with display.\n\tlet previousSibblingBN = children[index-1];\n\tif (previousSibblingBN.inBSP2Trash && !options.trashVisible) { // Protect against inserting just after BSP2 trash when not visible\n\t if (index < 2) {\n\t\tinsertRowIndex = parentRow.rowIndex + 1;\n\t }\n\t else {\n\t\tlet previousBN = BN_lastDescendant(children[index-2]);\n\t\tlet row = curRowList[previousBN.id];\n\t\tinsertRowIndex = row.rowIndex + 1; // Can be at end of bookmarks table\n\t }\n\t}\n\telse {\n\t let previousBN = BN_lastDescendant(previousSibblingBN);\n\t let row = curRowList[previousBN.id];\n\t insertRowIndex = row.rowIndex + 1; // Can be at end of bookmarks table\n\t}\n }\n\n // We got the insertion point, proceed to insertion\n insertBkmks(BN, parentRow);\n\n // Save new current info and refresh search\n let type = BN.type;\n if (type != \"separator\") {\n\tif (type == \"folder\") {\n\t saveFldrOpen(); // If real folder creation, there is no children (yet)\n\t}\n\n\t// Call refresh search if there is one active\n\ttriggerUpdate();\n }\n}" ]
[ "0.7691086", "0.7598787", "0.70052516", "0.6752495", "0.6734956", "0.673213", "0.654936", "0.6504476", "0.63038087", "0.62710744", "0.6237653", "0.61714536", "0.61586857", "0.6125806", "0.6090838", "0.6077805", "0.60623956", "0.6052799", "0.6051221", "0.60472465", "0.601508", "0.601508", "0.60100806", "0.5924794", "0.59026456", "0.5879178", "0.5879178", "0.58705175", "0.58655924", "0.58477724", "0.5841098", "0.58081204", "0.5774939", "0.5659524", "0.56079787", "0.56028515", "0.55892456", "0.5581976", "0.5553911", "0.5502938", "0.54966295", "0.5494179", "0.54829234", "0.54452175", "0.5444384", "0.5439388", "0.54195184", "0.541829", "0.5385967", "0.5384359", "0.5369346", "0.5347277", "0.5333606", "0.53149956", "0.53067446", "0.52823144", "0.5258431", "0.52489", "0.52473724", "0.5229703", "0.5227019", "0.5219194", "0.52189267", "0.521545", "0.5204282", "0.52026874", "0.5201261", "0.5199026", "0.5186132", "0.5178633", "0.5170149", "0.5157039", "0.5138845", "0.5115323", "0.5082006", "0.5071076", "0.50691056", "0.5061616", "0.5055034", "0.5049144", "0.504275", "0.5042532", "0.5031058", "0.5030364", "0.49938744", "0.49832624", "0.49687296", "0.49414757", "0.4932604", "0.49260584", "0.4918508", "0.49164793", "0.49085912", "0.48860925", "0.48656502", "0.4864152", "0.4857834" ]
0.6987254
6
Sets context data with the given name.
function setContext(name, context) { callOnHub('setContext', name, context); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "setContextName(aName) {\n this.contextGUID = aName;\n }", "function setContext(name, context) {\n\t getCurrentHub().setContext(name, context);\n\t}", "function setContext(name, context) {\n getCurrentHub().setContext(name, context);\n }", "setName(context, name) {\n context.commit(\"setName\", name)\n }", "function setContext(name, context) {\n hub.getCurrentHub().setContext(name, context);\n}", "function setData(node, name, value) {\r\n var id = node[exp] || (node[exp] = ++$.uuid),\r\n store = data[id] || (data[id] = attributeData(node))\r\n if (name !== undefined) store[camelize(name)] = value\r\n return store\r\n }", "function setData(node, name, value) {\r\n var id = node[exp] || (node[exp] = ++$.uuid),\r\n store = data[id] || (data[id] = attributeData(node))\r\n if (name !== undefined) store[camelize(name)] = value\r\n return store\r\n }", "function setData(node, name, value) {\n var id = node[exp] || (node[exp] = ++$.uuid),\n store = data[id] || (data[id] = attributeData(node))\n if (name !== undefined) store[camelize(name)] = value\n return store\n }", "function setData(node, name, value) {\n var id = node[exp] || (node[exp] = ++$.uuid),\n store = data[id] || (data[id] = attributeData(node))\n if (name !== undefined) store[camelize(name)] = value\n return store\n }", "function setData(node, name, value) {\n var id = node[exp] || (node[exp] = ++$.uuid),\n store = data[id] || (data[id] = attributeData(node))\n if (name !== undefined) store[camelize(name)] = value\n return store\n }", "function setData(node, name, value) {\n var id = node[exp] || (node[exp] = ++$.uuid),\n store = data[id] || (data[id] = attributeData(node))\n if (name !== undefined) store[camelize(name)] = value\n return store\n }", "function setData(node, name, value) {\n var id = node[exp] || (node[exp] = ++$.uuid),\n store = data[id] || (data[id] = attributeData(node))\n if (name !== undefined) store[camelize(name)] = value\n return store\n }", "function setData(node, name, value) {\n var id = node[exp] || (node[exp] = ++$.uuid),\n store = data[id] || (data[id] = attributeData(node))\n if (name !== undefined) store[camelize(name)] = value\n return store\n }", "function setData(node, name, value) {\n var id = node[exp] || (node[exp] = ++$.uuid),\n store = data[id] || (data[id] = attributeData(node))\n if (name !== undefined) store[camelize(name)] = value\n return store\n }", "function setData(node, name, value) {\n var id = node[exp] || (node[exp] = ++$.uuid),\n store = data[id] || (data[id] = attributeData(node))\n if (name !== undefined) store[camelize(name)] = value\n return store\n }", "function setData(node, name, value) {\n var id = node[exp] || (node[exp] = ++$.uuid),\n store = data[id] || (data[id] = attributeData(node))\n if (name !== undefined) store[camelize(name)] = value\n return store\n }", "setString (name, value) {\n this.data[name] = value\n }", "set name(x) { this._name = x; }", "set name(value) {\n\t\tthis._name = value;\n\t}", "setName(name) {\n\t\tthis.name = name;\n\t}", "set contextId(value) { this._contextId = value; }", "setName(name) {\n this._name = name;\n }", "set setName(name){\n _name=name;\n }", "set name(value) {}", "set name(value) {}", "set name(value) {}", "set name(value) {}", "set name(value) {}", "set name(value) {}", "set name(value) {}", "setName(name) {\n this.name = name;\n }", "setData(name, data) {\n if(!App.pathFinder.data.visualisation_enabled) {\n return;\n }\n\n App.pathFinder.chart.series.find(\n el => el.name === name\n ).setData(data);\n }", "function setContext(id) {\n\n if (typeof(id) === 'number') {\n\n // Initialize global categories.\n var categories = CategoryList.query();\n categories.$promise.then(function (data) {\n Data.categories = data;\n Data.currentCategoryIndex = data[0].id;\n });\n\n // Initialize global tags.\n var tags = TagList.query();\n tags.$promise.then(function (data) {\n if (data.length > 0) {\n\n Data.tags = data;\n Data.currentTagIndex = data[0].id;\n }\n });\n\n // Initialize global content types\n var types = ContentTypeList.query();\n types.$promise.then(function (data) {\n if (data.length > 0) {\n Data.contentTypes = data;\n Data.currentContentIndex = data[0].id;\n }\n\n });\n\n updateAreaContext(id);\n\n }\n\n }", "function setDataToLocalStroage(name, data) {\n let weatherData = {\n lastModifiedDate: today.getTime(),\n data: data\n };\n\n stroage.setItem(name, JSON.stringify(weatherData));\n}", "function setContext() {\n\n $context = $( Config.get( 'context' ) );\n\n }", "setName( name ) {\n this.name = name;\n }", "function setUserData(name, value) {\n if (window.localStorage) { // eslint-disable-line\n window.localStorage.setItem(name, value) // eslint-disable-line\n } else {\n Cookies.set(name, value, { expires: 7 })\n }\n}", "set name(value) {\n if (typeof value !== \"string\") throw new Error(\"Name must be a string\");\n _name.set(this, value);\n }", "set keyname(keyname) {\n this.setAttribute('keyname', keyname);\n }", "function add_context_item(context, name, value)\n{\n\tlet sanity_check = 10;\n\tlet context_name = '$' + name;\n\tlet new_context = {};\n\n\t// copy over prior context so we don't get reference sharing\n\tObject.keys(context).forEach((key, index) => {\n\t\tnew_context[key] = context[key];\n\t});\n\n\twhile (typeof new_context[context_name] !== 'undefined' && sanity_check-- > 0)\n\t{\n\t\tcontext_name = '$' + context_name;\n\t}\n\n\tnew_context[context_name] = value;\n\n\treturn new_context;\n}", "setName(value){\n\t\tthis.name = value;\n\t}", "setApplicationName(name) {\n this[local.config].module = name;\n }", "set Name(MyName){\n this._Name = MyName;\n }", "set name(value) {\n // this replaces the name as the value. whatever the user has inputted becomes \"value\"\n this._name = value;\n }", "setName(name) { }", "function setData(el, name, value) {\n var _a;\n\n var elem = el;\n (_a = elem.data) !== null && _a !== void 0 ? _a : elem.data = {};\n if (_typeof(name) === 'object') Object.assign(elem.data, name);else if (typeof name === 'string' && value !== undefined) {\n elem.data[name] = value;\n }\n}", "function setData(el, name, value) {\n var _a;\n const elem = el;\n (_a = elem.data) !== null && _a !== void 0 ? _a : (elem.data = {});\n if (typeof name === 'object')\n Object.assign(elem.data, name);\n else if (typeof name === 'string' && value !== undefined) {\n elem.data[name] = value;\n }\n}", "addContext(param, value) {\n\t\tthis.context[param] = value;\n\t}", "set name(value) { this._name = value || \"unknown\"; }", "setCurrentContext(context) {\n if (this.getContextByName(context.name)) {\n this.currentContextName = context.name;\n } else {\n this.addContext(context);\n this.currentContextName = context.name;\n }\n debug('current context has been set:', context.name);\n context.current = 'true'; // eslint-disable-line\n }", "set name(name)\n { \n const NAME_REGEX = /^[A-Z]{1}[a-z]{3,}$/\n if(NAME_REGEX.test(name)){\n this._name = name\n return\n }\n else throw \"Invalid Name\"\n }", "setContext(context) {\n this.context = context;\n }", "setName(state, name) {\n state.name = name\n }", "set name(newName) {\n this.setName(newName);\n }", "setName(name){\n this.name = name;\n }", "function updateContexts(names) {\n const canvases = document.querySelectorAll('canvas');\n names.forEach((name, i) => {\n state.ctx[name] = canvases[i].getContext('2d');\n resizeCanvas(canvases[i], state.width, state.height);\n });\n}", "function updateContexts(names) {\n const canvases = document.querySelectorAll('canvas');\n names.forEach((name, i) => {\n state.ctx[name] = canvases[i].getContext('2d');\n resizeCanvas(canvases[i], state.width, state.height);\n });\n}", "function setContextData(event, linkTrackVars) {\n var eventAttributes = event.EventAttributes;\n for (var eventAttributeKey in eventAttributes) {\n if (eventAttributes.hasOwnProperty(eventAttributeKey)) {\n contextVariableMapping.forEach(function(contextVariableMap) {\n if (contextVariableMap.map === eventAttributeKey) {\n appMeasurement.contextData[contextVariableMap.value] =\n eventAttributes[eventAttributeKey];\n if (linkTrackVars) {\n linkTrackVars.push(\n 'contextData.' + contextVariableMap.value\n );\n }\n }\n });\n }\n }\n }", "async setName(name) {\n // window.APP.store.update({\n // activity: {\n // hasChangedName: true,\n // hasAcceptedProfile: true\n // },\n // profile: {\n // // Prepend (bot) to the name so other users know it's a bot\n // displayName: \"bot - \" + name\n // }})\n }", "set(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName$1(name);\n\t\tvalidateValue$1(value);\n\t\tconst key = find$1(this[MAP$1], name);\n\t\tthis[MAP$1][key !== undefined ? key : name] = [value];\n\t}", "setValue(variableName,value) {\r\n this.variables[variableName] = value;\r\n }", "function setsContextValue(field, value) { }", "updateContext(context) {\n this.context = context\n }", "function setName() {\n var input = document.getElementById('name');\n skylink.setUserData({\n name: input.value\n });\n}", "function setScenarioContext(context){\n\t\tm_scenarioContext = context;\n\t\t\n\t\tm_scenarioContext.createScenarioPlay();\n\t\t\n\t\t// Notify the view that the context can be used\n\t\tscenarioView.initiateScenarioDisplay(context);\n\t}", "set(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find$1(this[MAP], name);\n\t\tthis[MAP][key !== undefined ? key : name] = [value];\n\t}", "set userName(userName) {\n this._userName = userName;\n console.log(\"User name set to \" + userName);\n }", "set(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tthis[MAP][key !== undefined ? key : name] = [value];\n\t}", "set(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tthis[MAP][key !== undefined ? key : name] = [value];\n\t}", "set(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tthis[MAP][key !== undefined ? key : name] = [value];\n\t}", "set(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tthis[MAP][key !== undefined ? key : name] = [value];\n\t}", "set(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tthis[MAP][key !== undefined ? key : name] = [value];\n\t}", "set(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tthis[MAP][key !== undefined ? key : name] = [value];\n\t}", "set(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tthis[MAP][key !== undefined ? key : name] = [value];\n\t}", "set(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tthis[MAP][key !== undefined ? key : name] = [value];\n\t}", "set(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tthis[MAP][key !== undefined ? key : name] = [value];\n\t}", "set(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tthis[MAP][key !== undefined ? key : name] = [value];\n\t}", "set(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tthis[MAP][key !== undefined ? key : name] = [value];\n\t}", "set(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tthis[MAP][key !== undefined ? key : name] = [value];\n\t}", "set(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tthis[MAP][key !== undefined ? key : name] = [value];\n\t}", "set(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tthis[MAP][key !== undefined ? key : name] = [value];\n\t}", "set(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tthis[MAP][key !== undefined ? key : name] = [value];\n\t}", "set(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tthis[MAP][key !== undefined ? key : name] = [value];\n\t}", "set(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tthis[MAP][key !== undefined ? key : name] = [value];\n\t}", "set(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tthis[MAP][key !== undefined ? key : name] = [value];\n\t}", "set(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tthis[MAP][key !== undefined ? key : name] = [value];\n\t}", "set(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tthis[MAP][key !== undefined ? key : name] = [value];\n\t}", "set(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tthis[MAP][key !== undefined ? key : name] = [value];\n\t}", "set(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tthis[MAP][key !== undefined ? key : name] = [value];\n\t}", "set(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tthis[MAP][key !== undefined ? key : name] = [value];\n\t}", "set(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tthis[MAP][key !== undefined ? key : name] = [value];\n\t}", "set(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tthis[MAP][key !== undefined ? key : name] = [value];\n\t}", "set(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tthis[MAP][key !== undefined ? key : name] = [value];\n\t}", "set(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tthis[MAP][key !== undefined ? key : name] = [value];\n\t}", "set(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tthis[MAP][key !== undefined ? key : name] = [value];\n\t}", "set(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tthis[MAP][key !== undefined ? key : name] = [value];\n\t}", "set(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tthis[MAP][key !== undefined ? key : name] = [value];\n\t}", "set _productName(name) {\n if (this.__productName !== name)\n this._changedProduct = true;\n this.__productName = name;\n }" ]
[ "0.70002234", "0.68625253", "0.6823114", "0.6653229", "0.6515378", "0.5957811", "0.5943855", "0.59263825", "0.59263825", "0.59263825", "0.59263825", "0.59263825", "0.59263825", "0.59263825", "0.59263825", "0.59263825", "0.5909839", "0.5848561", "0.5803892", "0.57447314", "0.5706277", "0.56791085", "0.5657463", "0.5649882", "0.5649882", "0.5649882", "0.5649882", "0.5649882", "0.5649882", "0.5649882", "0.5640369", "0.5546313", "0.55368173", "0.5505966", "0.54991436", "0.54614025", "0.54453033", "0.54356384", "0.54207927", "0.53930026", "0.5375685", "0.5371467", "0.5357822", "0.53471047", "0.5331782", "0.532701", "0.53197134", "0.5315758", "0.5263073", "0.5246355", "0.5244759", "0.524027", "0.523652", "0.52341425", "0.52193725", "0.52186304", "0.52186304", "0.5217234", "0.52146894", "0.517519", "0.514981", "0.51410234", "0.512267", "0.51005906", "0.5093029", "0.5077646", "0.5069314", "0.5060758", "0.5060758", "0.5060758", "0.5060758", "0.5060758", "0.5060758", "0.5060758", "0.5060758", "0.5060758", "0.5060758", "0.5060758", "0.5060758", "0.5060758", "0.5060758", "0.5060758", "0.5060758", "0.5060758", "0.5060758", "0.5060758", "0.5060758", "0.5060758", "0.5060758", "0.5060758", "0.5060758", "0.5060758", "0.5060758", "0.5060758", "0.5060758", "0.5060758", "0.5060758", "0.5052254" ]
0.6757102
5
Set an object that will be merged sent as extra data with the event.
function setExtras(extras) { callOnHub('setExtras', extras); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "trackCustomEvent(context, eventName, keyValuePair) {\n let message = context.message;\n let address = message.address || {};\n let conversation = address.conversation || {};\n let user = address.user || {};\n let item = {\n timestamp: message.timestamp,\n channel: address.channelId,\n conversationId: conversation.id,\n userId: user.id,\n userName: user.name\n };\n //merge the custom properties with the defaults\n let eventData = Object.assign(item, keyValuePair);\n this.trackEvent(eventName, eventData);\n }", "function setExtraInfo(){}", "_setAll(attr, value) {\n this._forEach(event => {\n event[attr] = value;\n });\n }", "static initialize(obj, eventAt, event) { \n obj['event_at'] = eventAt;\n obj['event'] = event;\n }", "function setExtra(key, extra) {\n\t getCurrentHub().setExtra(key, extra);\n\t}", "function setExtra(key, extra) {\n callOnHub('setExtra', key, extra);\n}", "function setExtra(key, extra) {\n callOnHub('setExtra', key, extra);\n}", "function setExtra(key, extra) {\n callOnHub('setExtra', key, extra);\n}", "setEvento(evento) {\n this._evento = evento;\n }", "function setExtra(key, extra) {\n hub.getCurrentHub().setExtra(key, extra);\n}", "function addRequestDataToEvent(\n event,\n req,\n options,\n) {\n const include = {\n ...DEFAULT_INCLUDES,\n ..._optionalChain([options, 'optionalAccess', _ => _.include]),\n };\n\n if (include.request) {\n const extractedRequestData = Array.isArray(include.request)\n ? extractRequestData(req, { include: include.request, deps: _optionalChain([options, 'optionalAccess', _2 => _2.deps]) })\n : extractRequestData(req, { deps: _optionalChain([options, 'optionalAccess', _3 => _3.deps]) });\n\n event.request = {\n ...event.request,\n ...extractedRequestData,\n };\n }\n\n if (include.user) {\n const extractedUser = req.user && is.isPlainObject(req.user) ? extractUserData(req.user, include.user) : {};\n\n if (Object.keys(extractedUser).length) {\n event.user = {\n ...event.user,\n ...extractedUser,\n };\n }\n }\n\n // client ip:\n // node, nextjs: req.socket.remoteAddress\n // express, koa: req.ip\n if (include.ip) {\n const ip = req.ip || (req.socket && req.socket.remoteAddress);\n if (ip) {\n event.user = {\n ...event.user,\n ip_address: ip,\n };\n }\n }\n\n if (include.transaction && !event.transaction) {\n // TODO do we even need this anymore?\n // TODO make this work for nextjs\n event.transaction = extractTransaction(req, include.transaction);\n }\n\n return event;\n}", "handleSetSharedObjectDetail(event) {\n //console.log('handling handleSetSharedObjectDetail event ',event.detail);\n this.sharedObject = event.detail;\n\n // Fire event for create component to disable button\n const evt = new CustomEvent('sharedobjectselected');\n this.dispatchEvent(evt);\n\n this.sharedObjectApiName = this.sharedObject.objectApiName;\n this.fireEventWithRule();\n }", "function PutObject(event, context) {\n base.Handler.call(this, event, context);\n}", "onBeforeItem(itemEvent) {\n Object.assign(itemEvent, eventParams);\n }", "eventExtras(type) {\n return {\n 'type': type,\n 'timestamp': new Date().getTime()\n };\n }", "function doextra(attr, val) {\n\t if(Array.isArray(attr)) {\n\t attr.forEach(function(a) { doextra(a, val); });\n\t return;\n\t }\n\t // quit if explicitly setting this elsewhere\n\t if(attr in aobj) return;\n\t\n\t var p = Lib.nestedProperty(layout, attr);\n\t if(!(attr in undoit)) undoit[attr] = p.get();\n\t if(val !== undefined) p.set(val);\n\t }", "static setEvent(event) {\n contextEvent.set(event);\n }", "function doextra(attr, val) {\n\t if(Array.isArray(attr)) {\n\t attr.forEach(function(a) { doextra(a, val); });\n\t return;\n\t }\n\t\n\t // if we have another value for this attribute (explicitly or\n\t // via a parent) do not override with this auto-generated extra\n\t if(attr in aobj || helpers.hasParent(aobj, attr)) return;\n\t\n\t var p = Lib.nestedProperty(layout, attr);\n\t if(!(attr in undoit)) undoit[attr] = p.get();\n\t if(val !== undefined) p.set(val);\n\t }", "function attachData(gobj) {\n queueMap[gobj.id] = {'gobj':gobj, 'action':'none', 'transCode':0};\n }", "function setExtras(extras) {\n\t getCurrentHub().setExtras(extras);\n\t}", "function editObjectParameter(obj) {\n obj['fouth'] = 4; // add a member variable to original object.\n}", "function doextra(attr, val) {\n if(Array.isArray(attr)) {\n attr.forEach(function(a) { doextra(a, val); });\n return;\n }\n\n // if we have another value for this attribute (explicitly or\n // via a parent) do not override with this auto-generated extra\n if(attr in aobj || helpers.hasParent(aobj, attr)) return;\n\n var p = Lib.nestedProperty(layout, attr);\n if(!(attr in undoit)) undoit[attr] = p.get();\n if(val !== undefined) p.set(val);\n }", "add(obj){\n this.dict = this.extend(this.dict, obj);\n }", "function set(obj) {\r\n settings = $.extend(true, settings, obj);\r\n }", "function setExtras(extras) {\n hub.getCurrentHub().setExtras(extras);\n}", "function append (desiredKey, masterObject, singleObject){\n\t\n\tmasterObject[desiredKey] = singleObject; //writing to the master object, under specified key\n}", "function saveRequestFromExt(event, args) {\n vm.showDgSaveReq(args.params.event, args.params.reqObj, false);\n }", "function setDataAttr() {\n\t\tvar str = encodeURIComponent(JSON.stringify(T.tally_user));\n\t\t$(\"#tally_data\").attr(\"data-tally\", str);\n\t}", "saveObject(requestObj, values)\n {\n // Defensively program against null attribute values\n if (values == undefined || values == null)\n {\n values = {};\n }\n\n this.dispatchEvent(new CustomEvent(\"save\", {\n detail: values\n }));\n\n if (this._dataType.isTrack && typeof requestObj.localization_ids === \"undefined\") {\n const localizationBody = {\n type: Number(this._dataType.localizationType.id.split(\"_\")[1]),\n name: this._dataType.localizationType.name,\n version: this._version.id,\n media_id: this._mediaId,\n ...requestObj,\n ...values,\n };\n this._undo.post(\"Localizations\", localizationBody, this._dataType.localizationType)\n .then(localizationResponse => {\n if (this._trackId === null) {\n // Track needs to be created.\n const trackBody = {\n type: Number(this._dataType.id.split(\"_\")[1]),\n name: this._dataType.name,\n version: this._version.id,\n media_ids: [this._mediaId],\n localization_ids: localizationResponse[0].id,\n ...values,\n };\n return this._undo.post(\"States\", trackBody, this._dataType);\n } else {\n this.dispatchEvent(new CustomEvent(\"addDetectionToTrack\", {\n detail: {localizationType: this._dataType.localizationType.id,\n trackType: this._dataType.id,\n frame: requestObj.frame,\n mainTrackId: this._trackId,\n detectionId: localizationResponse[0].id[0],\n selectTrack: false}\n }));\n }\n })\n .then(trackResponse => {\n if (trackResponse) {\n this._trackId = trackResponse[0].id[0];\n }\n })\n\n } else {\n var body = {\n type: Number(this._dataType.id.split(\"_\")[1]),\n name: this._dataType.name,\n version: this._version.id,\n ...requestObj,\n ...values,\n };\n\n if (this._dataType.dtype.includes(\"state\")) {\n if (this._stateMediaIds) {\n body.media_ids = this._stateMediaIds;\n }\n else {\n body.media_ids = [this._mediaId];\n }\n this._undo.post(\"States\", body, this._dataType);\n }\n else {\n body.media_id = this._mediaId\n this._undo.post(\"Localizations\", body, this._dataType);\n }\n }\n }", "setObj(obj, on_response = empty_fun) {\n this.httpPost('mset', function(resp) {\n on_response(resp.isOk());\n }, _obj2str(obj));\n }", "function setData(ev) {\n const name = ev.currentTarget.name;\n const inputValue = ev.currentTarget.value;\n formData[name] = inputValue;\n updateCard();\n}", "onObjectAdded(obj) {\n // obj._roomName = obj._roomName || this.DEFAULT_ROOM_NAME;\n /* this.networkTransmitter.addNetworkedEvent('objectCreate', {\n stepCount: this.gameEngine.world.stepCount,\n objectInstance: obj\n });*/\n\n if (this.options.updateOnObjectCreation) ;\n }", "function setLocalEvents(newEvtObjects, callback) {\n\n function applyPropertiesFromTo(eFrom, eTo) {\n\teTo.eventId = eFrom.eventid.toString();\n\teTo.title = eFrom.title;\n\teTo.subtitle = eFrom.subtitle;\n\teTo.date = eFrom.date;\n\teTo.location = eFrom.location;\n\teTo.type = eFrom.type;\n\teTo.description = eFrom.description;\n\teTo.url1 = eFrom.url1;\n\teTo.url2 = eFrom.url2;\n\teTo.organiser = eFrom.organiser;\n\teTo.deadline = eFrom.deadline;\n\teTo.starttime = eFrom.starttime;\n\teTo.endtime = eFrom.endtime;\t\t\t\t\t\t\t\n\teTo.image = eFrom.image;\n };\n\n function storeReceivedEvents(localEvtObjects) { \n\n\t//Create new or update objects as received\n\tfor (var i in newEvtObjects) {\n\t var found = false;\n\t for (var j = 0; j < localEvtObjects.length; j++ ) {\n\t \tvar localID = localEvtObjects[j].eventId.toString();\n\t \tvar newID = newEvtObjects[i].eventid.toString();\n\t \tif (localID==newID) {\n\t \t var existing = $data.context.Events.attachOrGet(localEvtObjects[j]);\n\t \t applyPropertiesFromTo(newEvtObjects[i], existing);\n\t \t found = true;\n\t \t}\n\t }\n\t if (!found) {\n\t \tvar newEvent = new Event();\n\t \tapplyPropertiesFromTo(newEvtObjects[i], newEvent);\n\t \t$data.context.Events.add(newEvent);\n\t }\n\t}\n\t\n\t//Remove non-received already stored objects\n\tfor (var j = 0; j < localEvtObjects.length; j++ ) {\n\t var remove = true;\n\t for (var i in newEvtObjects) {\n\t\tvar localID = localEvtObjects[j].eventId.toString();\n\t\tvar newID = newEvtObjects[i].eventid.toString();\n\t \tif (localID==newID)\n\t \t remove = false;\n\t }\n\t if (remove)\n\t\t$data.context.Events.remove(localEvtObjects[j]);\n\t}\n\n\t//Save all changes\n\t$data.context.saveChanges({\n\t success: function(){\n\t\tif (typeof callback == \"function\")\n\t\t callback();\n\t },\n\t error: function(){\n\t\tconsole.log(\"Failed to store Event updates\");\n\t }\n\t});\n }\n\n $data.context.Events.toArray({\n\tsuccess:storeReceivedEvents,\n\terror:function(){console.log(\"Failed to receive event list update\")}\n });\n}", "function doextra(attr, val) {\n if(Array.isArray(attr)) {\n attr.forEach(function(a) { doextra(a, val); });\n return;\n }\n\n // if we have another value for this attribute (explicitly or\n // via a parent) do not override with this auto-generated extra\n if(attr in aobj || helpers.hasParent(aobj, attr)) return;\n\n var p = Lib.nestedProperty(layout, attr);\n if(!(attr in undoit)) {\n undoit[attr] = undefinedToNull(p.get());\n }\n if(val !== undefined) p.set(val);\n }", "function addInfoToBehaviour(behaviourObject, eventObject){\n\n\t\tbehaviourObject.timestamp = eventObject.timestamp;\n\n\t\tbehaviourObject.timestampms = eventObject.timestampms;\n\t\tbehaviourObject.sortingtimestampms = eventObject.timestampms;\n\n\t\tbehaviourObject.sessionstartms = eventObject.sessionstartms;\n\t\tbehaviourObject.sessionstartparsed = eventObject.sessionstartparsed;\n\t\tbehaviourObject.visitCounter = eventObject.visitCounter;\n\t\tbehaviourObject.visitDuration = eventObject.visitDuration;\n\n\t\tbehaviourObject.sdSessionCounter = eventObject.sdSessionCounter;\n\t\tbehaviourObject.sdTimeSinceLastSession = eventObject.sdTimeSinceLastSession;\n\t\tbehaviourObject.urlSessionCounter = eventObject.urlSessionCounter;\n\t\tbehaviourObject.urlSinceLastSession = eventObject.urlSinceLastSession;\n\t\tbehaviourObject.urlEpisodeLength = eventObject.urlEpisodeLength;\n\n\t\tbehaviourObject.htmlSize = eventObject.htmlSize;\n\t\tbehaviourObject.resolution = eventObject.resolution;\n\t\tbehaviourObject.size = eventObject.size;\n\t\tbehaviourObject.usableSize = eventObject.usableSize;\n\n\t\tbehaviourObject.idleTime = eventObject.idleTime;\n\t\tbehaviourObject.calculatedActiveTime = eventObject.calculatedActiveTime;\n\t\tbehaviourObject.idleTimeSoFar = eventObject.idleTimeSoFar;\n\t\tbehaviourObject.sdCalculatedActiveTime = eventObject.sdCalculatedActiveTime;\n\n\t\treturn behaviourObject\n\t }", "function addData(a)\n {\n if(isObject(a.event.value) || isArray(a.event.value))\n {\n if(!isObservable(a.event.value))\n {\n a.preventDefault();\n var local = a.event.local,\n str = local.__kbscopeString+(local.__kbscopeString.length !== 0 ? '.' : '')+a.key,\n builder = (isObject(a.event.value) ? KObject : KArray)(local.__kbname,local,str);\n \n overwrite(builder).parseData(a.event.value);\n if(local[a.key] === undefined)\n {\n local.add(a.key,builder);\n }\n else if(isArray(local))\n {\n local.splice(a.key,0,builder);\n }\n else if(isObject(local))\n {\n local.set(a.key,builder);\n }\n }\n }\n }", "on_assign_data() {\n }", "set userData(value) {}", "function attachPatchData(target, data) {\n target[MONKEY_PATCH_KEY_NAME] = data;\n }", "applyToEvent(event, hint = {}) {\n if (this._extra && Object.keys(this._extra).length) {\n event.extra = { ...this._extra, ...event.extra };\n }\n if (this._tags && Object.keys(this._tags).length) {\n event.tags = { ...this._tags, ...event.tags };\n }\n if (this._user && Object.keys(this._user).length) {\n event.user = { ...this._user, ...event.user };\n }\n if (this._contexts && Object.keys(this._contexts).length) {\n event.contexts = { ...this._contexts, ...event.contexts };\n }\n if (this._level) {\n event.level = this._level;\n }\n if (this._transactionName) {\n event.transaction = this._transactionName;\n }\n\n // We want to set the trace context for normal events only if there isn't already\n // a trace context on the event. There is a product feature in place where we link\n // errors with transaction and it relies on that.\n if (this._span) {\n event.contexts = { trace: this._span.getTraceContext(), ...event.contexts };\n const transactionName = this._span.transaction && this._span.transaction.name;\n if (transactionName) {\n event.tags = { transaction: transactionName, ...event.tags };\n }\n }\n\n this._applyFingerprint(event);\n\n event.breadcrumbs = [...(event.breadcrumbs || []), ...this._breadcrumbs];\n event.breadcrumbs = event.breadcrumbs.length > 0 ? event.breadcrumbs : undefined;\n\n event.sdkProcessingMetadata = { ...event.sdkProcessingMetadata, ...this._sdkProcessingMetadata };\n\n return this._notifyEventProcessors([...getGlobalEventProcessors(), ...this._eventProcessors], event, hint);\n }", "applyToEvent(event, hint = {}) {\n if (this._extra && Object.keys(this._extra).length) {\n event.extra = { ...this._extra, ...event.extra };\n }\n if (this._tags && Object.keys(this._tags).length) {\n event.tags = { ...this._tags, ...event.tags };\n }\n if (this._user && Object.keys(this._user).length) {\n event.user = { ...this._user, ...event.user };\n }\n if (this._contexts && Object.keys(this._contexts).length) {\n event.contexts = { ...this._contexts, ...event.contexts };\n }\n if (this._level) {\n event.level = this._level;\n }\n if (this._transactionName) {\n event.transaction = this._transactionName;\n }\n\n // We want to set the trace context for normal events only if there isn't already\n // a trace context on the event. There is a product feature in place where we link\n // errors with transaction and it relies on that.\n if (this._span) {\n event.contexts = { trace: this._span.getTraceContext(), ...event.contexts };\n const transactionName = this._span.transaction && this._span.transaction.name;\n if (transactionName) {\n event.tags = { transaction: transactionName, ...event.tags };\n }\n }\n\n this._applyFingerprint(event);\n\n event.breadcrumbs = [...(event.breadcrumbs || []), ...this._breadcrumbs];\n event.breadcrumbs = event.breadcrumbs.length > 0 ? event.breadcrumbs : undefined;\n\n event.sdkProcessingMetadata = { ...event.sdkProcessingMetadata, ...this._sdkProcessingMetadata };\n\n return this._notifyEventProcessors([...getGlobalEventProcessors(), ...this._eventProcessors], event, hint);\n }", "set eventId(value) {\n const {\n event\n } = this; // When assigning a new id to an event, it will update the eventId of the assignment. But the assignments\n // event is still the same so we need to announce here\n\n if ((event === null || event === void 0 ? void 0 : event.isModel) && event.id === value) {\n this.set('eventId', value);\n } else {\n this.event = value;\n }\n }", "onDrag(event, obj){\n\t\tevent.dataTransfer.setData(\"draggedObject\", JSON.stringify(obj));\n\t}", "put(gearId, eventObject) {\n return fetch(`${remoteURL}/gearItems/${gearId}`, {\n method: \"PUT\",\n headers: {\n \"Content-Type\": \"application/json\"\n },\n body: JSON.stringify(eventObject)\n }).then(data => data.json());\n }", "function markAsCompleteSent(event) {\n\t\tvar yprops = event.getProps();\n\t\tfor (var key in yprops) {\n\t\t\tvar varObj = yprops[key].varObj;\n\t\t\tevent.propertyMarkAsSent(varObj);\n\t\t}\n\t\tevent.markAsSent();\n\t}", "function attachPatchData(target, data) {\n target[MONKEY_PATCH_KEY_NAME] = data;\n}", "function attachPatchData(target, data) {\n target[MONKEY_PATCH_KEY_NAME] = data;\n}", "function attachPatchData(target, data) {\n target[MONKEY_PATCH_KEY_NAME] = data;\n}", "function attachPatchData(target, data) {\n target[MONKEY_PATCH_KEY_NAME] = data;\n}", "function attachPatchData(target, data) {\n target[MONKEY_PATCH_KEY_NAME] = data;\n}", "function attachPatchData(target, data) {\n target[MONKEY_PATCH_KEY_NAME] = data;\n}", "function attachPatchData(target, data) {\n target[MONKEY_PATCH_KEY_NAME] = data;\n}", "function attachPatchData(target, data) {\n target[MONKEY_PATCH_KEY_NAME] = data;\n}", "function attachPatchData(target, data) {\n target[MONKEY_PATCH_KEY_NAME] = data;\n}", "function attachPatchData(target, data) {\n target[MONKEY_PATCH_KEY_NAME] = data;\n}", "function notifyData(socket, message, object, key) {\n\tobject.set(\"modified\", new Date());\n\tobject.save(function (err, object) {\n\t\tvar data = {};\n\t\tdata[key] = object.data[key];\n\t\tnotify(socket, getId(message), 'data', {data: data}, parentIds(object, false), message.sender);\n\t});\n}", "setData(dataObj) {\n for (let field in dataObj) {\n this.data[field] = dataObj[field];\n this.changedFields.add(field);\n }\n }", "function Emitter(){\nthis.event = {};\n}", "function extend(o, e){\n each(e, function(v, n){\n if (is(o[n], 'object') && is(v, 'object')){\n o[n] = extend(o[n], v);\n } else if (v !== null) {\n o[n] = v;\n }\n });\n return o;\n}", "sendMy(field,value) {\n if ( this.me != null) {\n this.send('{\"object\":{\"'+this.me.className+'\":'+this.me.id+'},\"changes\":{'+this.stringifyPair(field,value)+'}}');\n } else {\n this.log(\"No my ID yet, ignored user event \"+field+\"=\"+value);\n }\n }", "function sendBack(obj){\n zAu.send(new zk.Event(widget, \"onData\", obj, {toServer:true}));\n}", "function saveNewData(obj) {\n // if current user is interpreter\n if (currentRole === 1) {\n // if the new event is apply, decline, reject or reward\n if(obj.type === \"apply\" || obj.type === \"decline_offer\" || obj.type === \"reject_interpreter\" || obj.type === \"reward\") {\n // we set \"past\" property to True to al older events\n // TODO: Do we still use this property???\n chatData.chat_section.events.map(function(obj) {\n obj.past = true;\n })\n }\n // then we simply push new event to all events\n chatData.chat_section.events.push(obj);\n\n // after it we start to mutate main data according to new event\n // if the new event is reward\n if (obj.type === \"reward\") {\n // we set \"rewarded\" status to main data and update status container\n chatData.status = \"rewarded\";\n refreshStatusBloock();\n // new event type is decline\n } else if (obj.type === \"decline_offer\") {\n // we chech the presents of reason in new event\n // TODO: maybe we should change the logic of this checking??? presents of reason in event isn't reliable at all.\n if (obj.reason) {\n // if the reason is present we check whether initiator of this event is the current user or not\n if (Number(obj.initiator_id) === Number(currentPersonId)) {\n // if current user we know that current user has decline this assignment\n chatData.status = \"cancel_you\";\n refreshStatusBloock();\n } else {\n // otherwise the assignment was declined by other side (business)\n chatData.status = \"declined_by_business\";\n refreshStatusBloock({name: obj.initiator_name});\n }\n // if we don't have the reason of declining we let interpreter to apply again\n // TODO: this whole \"decline_offer\" functional can be better and clearer\n } else {\n chatData.status = \"can_apply\";\n refreshStatusBloock();\n }\n // if new event has \"reject_interpreter\" type\n } else if (obj.type === 'reject_interpreter') {\n // we know that the interpreter's application was declined by other side (business)\n chatData.status = \"declined_by_business\";\n refreshStatusBloock({name: obj.initiator_name});\n // if new event is apply\n } else if (obj.type === \"apply\") {\n // we make appropriate mutation for main data and refresh status block\n chatData.status = \"applied\";\n refreshStatusBloock({clear_price: obj.clear_price});\n }\n\n // then we sort main data with new event inside it from the oldest event to the latest\n chatData.chat_section.events.sort(function(a, b) {\n var first = new Date(a.sys_date);\n var second = new Date(b.sys_date);\n if (first.getTime() < second.getTime()) {\n return -1;\n } else if (first.getTime() > second.getTime()) {\n return 1;\n } else {\n return 0;\n }\n });\n\n // and rerender all chat container\n refreshEventsList();\n\n // if current user is business\n } else if (currentRole === 0) {\n // we loop through all interpreters in main data\n for (var i = 0, lim = chatData.chat_section.length; i < lim; i += 1) {\n\n // if current iteration person id mathes with person id of new event\n if (chatData.chat_section[i].inter_id === obj.person_id) {\n // we set last msg system date of current iteration user to system date of new event\n chatData.chat_section[i].last_msg_sys_date = obj.sys_date;\n // chatData.chat_section[i].last_msg_status\n // if new event is apply, decline or reward\n if(obj.type === \"apply\" || obj.type === \"decline_offer\" || obj.type === \"reject_interpreter\" || obj.type === \"reward\") {\n // we set past property to True for all older significant events\n // TODO: Do we still use this property?\n chatData.chat_section[i].events.map(function(obj) {\n obj.past = true;\n })\n };\n\n // if the new event is apply we pull applied price from it and reassign last applied price of current iteration interpreter\n if (obj.type === \"apply\") {\n chatData.chat_section[i].inter_applied_price = obj.total_price;\n }\n // then we push new event to main data\n chatData.chat_section[i].events.push(obj);\n // sort events from the oldest to the latest\n chatData.chat_section[i].events.sort(function(a, b) {\n var first = new Date(a.last_msg_sys_date);\n var second = new Date(b.last_msg_sys_date);\n\n if (first.getTime() < second.getTime()) {\n return -1;\n } else if (first.getTime() > second.getTime()) {\n return 1;\n } else {\n return 0;\n }\n });\n // and refresh chat container if this event was from interpreter that business is talking to now\n if (obj.person_id === currentActiveDiscussionId) {\n refreshEventsList(currentActiveDiscussionId);\n };\n // we exit from loop because we have done all work with new event\n break;\n }\n }\n\n // if viewport is wider than 600px\n if ($(window).width() > 600) {\n // we need just to refresh interpreters list\n insertInterpretersIntoList($(chatInterListElement));\n // if viewport is narrower than 600px\n } else {\n // we rerender interpreters list and refresh chat container\n // TODO: why we rerender the chat container twice if viewport is narrower than 600px\n insertInterpretersIntoList($(chatInterListElement));\n refreshEventsList(currentActiveDiscussionId);\n }\n\n // if new event is award\n if (obj.type === \"reward\") {\n // we make rewarder status of the assignment and refresh status container\n chatData.status = \"rewarded\";\n refreshStatusBloock();\n // if the new event is decline or reject\n } else if (obj.type === \"decline_offer\" || obj.type === \"reject_interpreter\") {\n // we check whether this event was initiated by current user or not\n if (Number(obj.initiator_id) === Number(currentPersonId)) {\n // if yes we check the previous assignment status\n // if it was \"rewarded\" we make hard action and mutate assignment status to canceled by current user (business)\n if (chatData.status === \"rewarded\") {\n chatData.status = \"cancel_you\";\n // in any other case we make softer action\n } else {\n // and make the whole assignment status \"replied\"\n chatData.status = \"replied\";\n // if it's private assignment and we have the list of appropriate interpreters\n if (chatData.fib_data) {\n // we refresh this list with new data\n findInterBlockModule.getFaIList();\n }\n }\n // at the end we rerender status container\n refreshStatusBloock();\n // if the new event was made not by current user\n } else {\n // if previous assignment status was \"rewarded\"\n if (chatData.status === \"rewarded\") {\n // we now that the new event is decline fron interprete's side\n chatData.status = \"declined_by_interpreter\";\n // if we had not \"rewarded\" status of the assignment\n } else {\n // we make \"replied\" of the assignment\n chatData.status = \"replied\";\n // and refresh appropriate interpreters block if this it the private assignment\n if (chatData.fib_data) {\n findInterBlockModule.getFaIList();\n }\n }\n // we refresh status container at the end of all mutations\n refreshStatusBloock();\n }\n // if new event is apply\n } else if (obj.type === \"apply\") {\n // we set replied status to assignment, rerender status container\n chatData.status = \"replied\";\n refreshStatusBloock();\n // remove interpreters from appropriate interpreters list\n findInterBlockModule.removeInterFromFaIBlock(obj.person_id);\n // and rerender it\n findInterBlockModule.reRenderFaIBlock();\n }\n }\n }", "updateObject(data) {\n super.updateObject(data);\n\n if (data.filterData && !isEqual(this.filterData, data.filterData)) {\n this.setFilterData(data.filterData);\n Signals.elementChanged.dispatch();\n }\n\n if (data.trackingURL && this.trackingURL !== data.trackingURL) {\n this.setTrackingURL(data.trackingURL);\n Signals.elementChanged.dispatch();\n }\n\n if (data.utmData && !isEqual(this.utmData, data.utmData)) {\n this.setUTMData(data.utmData);\n Signals.elementChanged.dispatch();\n }\n\n if (data.texturePath && !isEqual(this.texturePath, data.texturePath)) {\n this.setTexturePath(data.texturePath);\n }\n }", "function useSetHandler(obj, name, setHandler) {\n obj[name + '_setter___'] = setHandler;\n }", "static set EVENT( value ) {\n overtakenAdaptEvent = value;\n }", "setData (data) {\n this.processData(data);\n this.trigger('update', data);\n }", "function setContextData(event, linkTrackVars) {\n var eventAttributes = event.EventAttributes;\n for (var eventAttributeKey in eventAttributes) {\n if (eventAttributes.hasOwnProperty(eventAttributeKey)) {\n contextVariableMapping.forEach(function(contextVariableMap) {\n if (contextVariableMap.map === eventAttributeKey) {\n appMeasurement.contextData[contextVariableMap.value] =\n eventAttributes[eventAttributeKey];\n if (linkTrackVars) {\n linkTrackVars.push(\n 'contextData.' + contextVariableMap.value\n );\n }\n }\n });\n }\n }\n }", "function cd_putData(objName, mimetype, data) {\n\tvar ob = cd_getSpecificObject(objName);\n\tvar oldEncode = ob.DataEncoded;\n\tob.DataEncoded = true;\n\tmimetype.toLowerCase();\n\tob.Data(mimetype) = data;\n\tob.DataEncoded = oldEncode;\n}", "function addExtraDataToLatest(type, extraData) {\n var items = getItems(type);\n if (items.length) {\n items[0].extraData = extraData;\n cache.put(type, items);\n }\n }", "function doextra(attr, val) {\n if (Array.isArray(attr)) {\n attr.forEach(function (a) {\n doextra(a, val);\n });\n return;\n }\n\n // if we have another value for this attribute (explicitly or\n // via a parent) do not override with this auto-generated extra\n if (attr in aobj || helpers.hasParent(aobj, attr)) return;\n var p = layoutNP(layout, attr);\n if (!(attr in undoit)) {\n undoit[attr] = undefinedToNull(p.get());\n }\n if (val !== undefined) p.set(val);\n }", "_addChatAttrs($e, event) {\n $e.attr(\"data-id\", event.flags.id);\n $e.attr(\"data-user\", event.user);\n $e.attr(\"data-user-id\", event.flags[\"user-id\"]);\n $e.attr(\"data-channel\", event.channelString.replace(/^#/, \"\"));\n $e.attr(\"data-channel-id\", event.flags[\"room-id\"]);\n $e.attr(\"data-channel-full\", Twitch.FormatChannel(event.channel));\n if (event.issub) {\n $e.attr(\"data-subscriber\", \"1\");\n }\n if (event.ismod) {\n $e.attr(\"data-mod\", \"1\");\n }\n if (event.isvip) {\n $e.attr(\"data-vip\", \"1\");\n }\n if (event.iscaster) {\n $e.attr(\"data-caster\", \"1\");\n }\n if (event.isstaff) {\n $e.attr(\"data-staff\", \"1\");\n }\n $e.attr(\"data-sent-ts\", event.flags[\"tmi-sent-ts\"]);\n $e.attr(\"data-recv-ts\", Date.now());\n }", "applyToEvent(event, hint = {}) {\n\t if (this._extra && Object.keys(this._extra).length) {\n\t event.extra = { ...this._extra, ...event.extra };\n\t }\n\t if (this._tags && Object.keys(this._tags).length) {\n\t event.tags = { ...this._tags, ...event.tags };\n\t }\n\t if (this._user && Object.keys(this._user).length) {\n\t event.user = { ...this._user, ...event.user };\n\t }\n\t if (this._contexts && Object.keys(this._contexts).length) {\n\t event.contexts = { ...this._contexts, ...event.contexts };\n\t }\n\t if (this._level) {\n\t event.level = this._level;\n\t }\n\t if (this._transactionName) {\n\t event.transaction = this._transactionName;\n\t }\n\n\t // We want to set the trace context for normal events only if there isn't already\n\t // a trace context on the event. There is a product feature in place where we link\n\t // errors with transaction and it relies on that.\n\t if (this._span) {\n\t event.contexts = { trace: this._span.getTraceContext(), ...event.contexts };\n\t const transactionName = this._span.transaction && this._span.transaction.name;\n\t if (transactionName) {\n\t event.tags = { transaction: transactionName, ...event.tags };\n\t }\n\t }\n\n\t this._applyFingerprint(event);\n\n\t event.breadcrumbs = [...(event.breadcrumbs || []), ...this._breadcrumbs];\n\t event.breadcrumbs = event.breadcrumbs.length > 0 ? event.breadcrumbs : undefined;\n\n\t event.sdkProcessingMetadata = { ...event.sdkProcessingMetadata, ...this._sdkProcessingMetadata };\n\n\t return this._notifyEventProcessors([...getGlobalEventProcessors(), ...this._eventProcessors], event, hint);\n\t }", "set eventDate(aValue) {\n this._logger.debug(\"eventDate[set]\");\n this._eventDate = aValue;\n }", "setUserData(field, value) {\r\n\r\n // Get all user data\r\n var userData = this.getUserData()\r\n\r\n // Set new field\r\n userData[field] = value\r\n\r\n // Update entity\r\n Entities.editEntity(this.id, JSON.stringify(userData))\r\n\r\n }", "function addEvent(user, data) {\n if (!events[user]) {\n events[user] = {};\n events[user].events = {};\n events[user].events.eventList = [];\n }\n\n var event = {\n eventObject: {}\n }\n\n if (data)\n event.eventObject = data;\n\n events[user].events.eventList.push(event);\n debug(user, \"P\", \"added \" + JSON.stringify(event));\n}", "async _updateObject(event, formData) {\n // eslint-disable-next-line no-console\n console.log(JSON.stringify(formData));\n }", "data(data) {\n this.__processEvent('data', data);\n }", "function setProps(event, linkTrackVars) {\n var eventAttributes = event.EventAttributes;\n for (var eventAttributeKey in eventAttributes) {\n if (eventAttributes.hasOwnProperty(eventAttributeKey)) {\n propsMapping.forEach(function(propMap) {\n if (propMap.map === eventAttributeKey) {\n appMeasurement[propMap.value] =\n eventAttributes[eventAttributeKey];\n if (linkTrackVars) {\n linkTrackVars.push(propMap.value);\n }\n }\n });\n }\n }\n }", "function attachPatchData(target,data){target[MONKEY_PATCH_KEY_NAME]=data;}", "function updateEvent(eventObj) {\n var params = {\n \"event\": eventObj\n };\n submitAJAX(\"modevent\", params, showEventResult);\n}", "set serializedObject(value) {}", "setUserData(data) {\n this.userData = data;\n }", "setObjectDataLoaded() {\n this.hasDataLoaded.object = true\n if(this.hasDataLoaded.record === true) {\n this.handleWireDataLoaded();\n }\n }", "function enhanceEventWithSdkInfo(event, sdkInfo) {\n if (!sdkInfo) {\n return event;\n }\n event.sdk = event.sdk || {};\n event.sdk.name = event.sdk.name || sdkInfo.name;\n event.sdk.version = event.sdk.version || sdkInfo.version;\n event.sdk.integrations = [...(event.sdk.integrations || []), ...(sdkInfo.integrations || [])];\n event.sdk.packages = [...(event.sdk.packages || []), ...(sdkInfo.packages || [])];\n return event;\n }", "function extendObjects (req, res, next) {\n req.setEncoding(req.headers['content-encoding'] || 'utf8');\n req.params = {};\n res.send = send;\n next();\n}", "function set(obj) {\n registerSetChange.call(this, obj);\n if (obj) {\n if (util.isArray(obj)) {\n this._id = _.pluck(obj, '_id');\n this.related = obj;\n }\n else {\n this._id = obj._id;\n this.related = obj;\n }\n }\n else {\n this._id = null;\n this.related = null;\n }\n}", "setSendData(sendData) {\r\n if (this.encodeData == \"encodeQueryString\") {\r\n this.sendData = ArrayToQueryString(sendData);\r\n }\r\n else if(this.encodeData == \"json\"){\r\n this.sendData = JSON.stringify(sendData);\r\n }\r\n else if(this.encodeData == \"queryString\"){\r\n let outR = new Array();\r\n\r\n for(var key in sendData){\r\n outR.push(key + '=' + sendData[key]);\r\n }\r\n this.sendData = outR.join('&');\r\n }\r\n else if (this.encodeData == \"FormData\") {\r\n this.sendData = sendData;\r\n }\r\n }", "saveData() {\n ipcRenderer.send('set', { 'key': this.type, 'value': this.data })\n }", "function setA(o, val) {\n o.a = val;\n}", "function enhanceEventWithSdkInfo(event, sdkInfo) {\n\t if (!sdkInfo) {\n\t return event;\n\t }\n\t event.sdk = event.sdk || {};\n\t event.sdk.name = event.sdk.name || sdkInfo.name;\n\t event.sdk.version = event.sdk.version || sdkInfo.version;\n\t event.sdk.integrations = [...(event.sdk.integrations || []), ...(sdkInfo.integrations || [])];\n\t event.sdk.packages = [...(event.sdk.packages || []), ...(sdkInfo.packages || [])];\n\t return event;\n\t}", "publish() {\n if ( ! this.VRSPACE ) {\n throw \"the object is not shared yet\";\n }\n let event = new VREvent( this );\n for ( var key in this ) {\n if ( key !== 'id' && key !== 'VRSPACE' ) {\n event.changes[key] = this[key];\n }\n }\n // FIXME: TypeError: cyclic object value\n let json = JSON.stringify(event);\n this.VRSPACE.log(json);\n this.VRSPACE.send(json);\n }", "function saveData(data)\n{\n\tobjectData = data;\n}", "annotate(message: string, data: Object) {\n this.message = message;\n this.data = assign(this.data, data);\n }", "function handelchange (e) {\n const {name, value} = e.target;\n if (name && value) {\n setData ({\n ...data,\n [name]: value,\n });\n }\n }", "function sendEventCompany(company, info)\n{\n result = to_json({'company':company, \n\t\t 'info':info});\n sendCompanyInfoFinance.set(result);\n \n}", "function extend(target, obj) {\r\n properties(obj).forEach( function(prop) {\r\n target[prop] = obj[prop];\r\n });\r\n}", "function setData() {\n\t\tCORE.LOG.addInfo(\"SKILLS_SYNCH:setData\");\n\t\t_this_.socket.emit('skillsSetData',{\n\t\t\t\tskills:gameData.data.player.skills,\t \t\t\n\t \t\t\tplayerID:gameData.data.player.playerID,\n\t \t\t\tdate:gameData.data.synch.skills\n\t\t\t}\n\t\t);\n\t}", "setClientData(data) {\n this.clientData = Object.assign({}, data);\n }" ]
[ "0.58679676", "0.5795962", "0.57156765", "0.56377435", "0.5609997", "0.55735916", "0.55735916", "0.55735916", "0.54696727", "0.5462039", "0.5430377", "0.5400556", "0.5391335", "0.53900546", "0.5334794", "0.53205204", "0.5252584", "0.52073807", "0.5183364", "0.51824147", "0.5161311", "0.51305604", "0.51188266", "0.5112919", "0.5102986", "0.5101417", "0.50782907", "0.5070454", "0.50691396", "0.50602585", "0.5059634", "0.50493956", "0.503118", "0.5029928", "0.5029464", "0.5020686", "0.50098974", "0.4993045", "0.49927777", "0.4989986", "0.4979657", "0.49791974", "0.49696845", "0.49664718", "0.49600422", "0.49596968", "0.49596968", "0.49596968", "0.49596968", "0.49596968", "0.49596968", "0.49596968", "0.49596968", "0.49596968", "0.4953608", "0.49463105", "0.49248385", "0.49172258", "0.4912306", "0.49119484", "0.49069768", "0.4895291", "0.4890636", "0.4890311", "0.4886884", "0.488574", "0.48830974", "0.48734868", "0.48606414", "0.48598096", "0.4848483", "0.48470092", "0.48248643", "0.4818338", "0.48150218", "0.47977605", "0.4796597", "0.47948807", "0.479311", "0.47922218", "0.4789595", "0.47723132", "0.47673228", "0.47437248", "0.47387314", "0.47282177", "0.4726787", "0.47175077", "0.4713928", "0.47113398", "0.47109324", "0.47108272", "0.47050697", "0.46984804", "0.46960542", "0.46960428", "0.46925527", "0.46922413" ]
0.520283
20
Set an object that will be merged sent as tags data with the event.
function setTags(tags) { callOnHub('setTags', tags); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "set tag(value) {}", "set tag(value) {}", "set tag(value) {}", "set tag(value) {}", "_setAll(attr, value) {\n this._forEach(event => {\n event[attr] = value;\n });\n }", "function setTag(key, value) {\n callOnHub('setTag', key, value);\n}", "function setTag(key, value) {\n callOnHub('setTag', key, value);\n}", "function setTag(key, value) {\n callOnHub('setTag', key, value);\n}", "function tagForObject(object, tag) {\n\tvar index = object.tags.indexOf(tag);\n\tif (index != -1) {\n\t\t//if it includes the tag\n\t\tobject.tags.splice(index, 1);\n\t} else {\n\t\tobject.tags.push(tag);\n\t}\n}", "setTagIds(event) {\n let tagIds = null;\n if (event.value.length) {\n tagIds = [];\n for (let i = 0; i < event.value.length; i++) {\n tagIds.push(event.value[i].id);\n }\n }\n this.postsService.post.tag_ids = tagIds;\n }", "setTags(tags) {\n let newContext = new EventMessage_1.EventTraceMetadata(this.getContext());\n if (!newContext.tags) {\n newContext.tags = tags;\n }\n else {\n for (let key in tags) {\n newContext.tags[key] = tags[key];\n }\n }\n this._traceContext = Object.freeze(new EventMessage_1.EventTraceMetadata(newContext));\n this._updateContext();\n return this;\n }", "function setTag(key, value) {\n\t getCurrentHub().setTag(key, value);\n\t}", "function onentertag() {\n currentTag = {\n type: 'mdxTag',\n name: null,\n close: false,\n selfClosing: false,\n attributes: []\n }\n }", "setEvento(evento) {\n this._evento = evento;\n }", "onTagged(doclet, tag) {\n doclet._isVueDoc = true;\n doclet._vueEvent = doclet._vueEvent || [];\n doclet._vueEvent.push(tag.value || {});\n }", "function tag(templateObject) {\n previousObject = templateObject;\n}", "static initialize(obj, eventAt, event) { \n obj['event_at'] = eventAt;\n obj['event'] = event;\n }", "function setTag(key, value) {\n hub.getCurrentHub().setTag(key, value);\n}", "function onTagChange($e,$data){\n\t\t\taddTag($data.item.value);\n\t\t}", "addNewTag() {\n this.$emit('add-tag', this.newTag, this.listIndex, this.cardIndex);\n this.newTag = {\n name: \"\",\n color: \"\"\n };\n }", "trackCustomEvent(context, eventName, keyValuePair) {\n let message = context.message;\n let address = message.address || {};\n let conversation = address.conversation || {};\n let user = address.user || {};\n let item = {\n timestamp: message.timestamp,\n channel: address.channelId,\n conversationId: conversation.id,\n userId: user.id,\n userName: user.name\n };\n //merge the custom properties with the defaults\n let eventData = Object.assign(item, keyValuePair);\n this.trackEvent(eventName, eventData);\n }", "function tagThisObject(tagObject, syncScript, syncIdentifier) {\n var tagName = 'porky';\n var associatedElement;\n var tempTarget;\n var tempObject;\n\n\n if((tagObject instanceof Array).toString() === 'false'){\n tempObject = tagObject;\n tagObject = [];\n tagObject.push(tempObject);\n\n }else if((tagObject instanceof Array).toString() === 'true'){\n if(tagObject.length > 1){\n tagObject.splice(1, tagObject.length - 1);\n console.log('Warning: Too many objects, skipping all but last item of array!');\n }\n }\n\n if(tagObject.toString() === '' || tagObject.toString() === 'undefined' || syncScript === '' || syncIdentifier === ''){\n console.log('Error: tagThisObject() expects object and parameters... cannot proceed.');\n return false;\n }\n\n\n if (tagObject.toString() === '[object TextFrame]') {\n \n tempTarget = tagObject[0].parentStory;\n if(tempTarget.associatedXMLElement){\n // untags separately tagged text parts inside of a textframe when the textframe is tagegd afterwards\n tempTarget.associatedXMLElement.untag();\n }\n associatedElement = app.activeDocument.xmlElements.item(0).xmlElements.add(tagName, tempTarget);\n\n } else if (tagObject.toString() === '[object Rectangle]' || tagObject.toString() === '[object Oval]' || tagObject.toString() === '[object Polygon]' || tagObject.toString() === '[object Table]') {\n \n tempTarget = tagObject[0];\n if(tempTarget.associatedXMLElement){\n tempTarget.associatedXMLElement.untag();\n }\n associatedElement = app.activeDocument.xmlElements.item(0).xmlElements.add(tagName, tempTarget);\n\n } else if (tagObject.toString() === '[object Word]' || tagObject.toString() === '[object Paragraph]' || tagObject.toString() === '[object InsertionPoint]' || tagObject.toString() === '[object Character]' || tagObject.toString() === '[object Text]' || tagObject.toString() === '[object TextColumn]') {\n\n tempTarget = tagObject[0]; \n if(tempTarget.associatedXMLElements[0]){\n // untags textframe if a word inside of it is tagged afterwards\n if(tempTarget.associatedXMLElements[0].markupTag.name.toString() === tagName){\n tempTarget.associatedXMLElements[0].untag();\n }\n }\n associatedElement = app.activeDocument.xmlElements.item(0).xmlElements.add(tagName, tempTarget);\n\n } else {\n associatedElement = false;\n console.log(tagObject + ' is not supported');\n\n }\n\n if(associatedElement){\n associatedElement.xmlAttributes.add('syncScript', syncScript);\n associatedElement.xmlAttributes.add('syncIdentifier', syncIdentifier);\n }\n\n return associatedElement;\n}", "function tagObj (obj, sharedKey) {\n if (typeof obj !== 'object') {\n throw new TypeError('Input must be an object.')\n }\n // If it's an array, we don't want to try to sign it\n if (obj.length !== undefined) {\n throw new TypeError('Input cannot be an array.')\n }\n if (typeof sharedKey !== 'string' && !Buffer.isBuffer(sharedKey)) {\n throw new TypeError('Shared key must be a hex string or hex buffer.')\n }\n const objStr = stringify(obj)\n obj.tag = tag(objStr, sharedKey)\n}", "static setEvent(event) {\n contextEvent.set(event);\n }", "__init5() {this.tags = {};}", "__init5() {this.tags = {};}", "__init5() {this.tags = {};}", "function PutObject(event, context) {\n base.Handler.call(this, event, context);\n}", "publish() {\n if ( ! this.VRSPACE ) {\n throw \"the object is not shared yet\";\n }\n let event = new VREvent( this );\n for ( var key in this ) {\n if ( key !== 'id' && key !== 'VRSPACE' ) {\n event.changes[key] = this[key];\n }\n }\n // FIXME: TypeError: cyclic object value\n let json = JSON.stringify(event);\n this.VRSPACE.log(json);\n this.VRSPACE.send(json);\n }", "function setLocalEvents(newEvtObjects, callback) {\n\n function applyPropertiesFromTo(eFrom, eTo) {\n\teTo.eventId = eFrom.eventid.toString();\n\teTo.title = eFrom.title;\n\teTo.subtitle = eFrom.subtitle;\n\teTo.date = eFrom.date;\n\teTo.location = eFrom.location;\n\teTo.type = eFrom.type;\n\teTo.description = eFrom.description;\n\teTo.url1 = eFrom.url1;\n\teTo.url2 = eFrom.url2;\n\teTo.organiser = eFrom.organiser;\n\teTo.deadline = eFrom.deadline;\n\teTo.starttime = eFrom.starttime;\n\teTo.endtime = eFrom.endtime;\t\t\t\t\t\t\t\n\teTo.image = eFrom.image;\n };\n\n function storeReceivedEvents(localEvtObjects) { \n\n\t//Create new or update objects as received\n\tfor (var i in newEvtObjects) {\n\t var found = false;\n\t for (var j = 0; j < localEvtObjects.length; j++ ) {\n\t \tvar localID = localEvtObjects[j].eventId.toString();\n\t \tvar newID = newEvtObjects[i].eventid.toString();\n\t \tif (localID==newID) {\n\t \t var existing = $data.context.Events.attachOrGet(localEvtObjects[j]);\n\t \t applyPropertiesFromTo(newEvtObjects[i], existing);\n\t \t found = true;\n\t \t}\n\t }\n\t if (!found) {\n\t \tvar newEvent = new Event();\n\t \tapplyPropertiesFromTo(newEvtObjects[i], newEvent);\n\t \t$data.context.Events.add(newEvent);\n\t }\n\t}\n\t\n\t//Remove non-received already stored objects\n\tfor (var j = 0; j < localEvtObjects.length; j++ ) {\n\t var remove = true;\n\t for (var i in newEvtObjects) {\n\t\tvar localID = localEvtObjects[j].eventId.toString();\n\t\tvar newID = newEvtObjects[i].eventid.toString();\n\t \tif (localID==newID)\n\t \t remove = false;\n\t }\n\t if (remove)\n\t\t$data.context.Events.remove(localEvtObjects[j]);\n\t}\n\n\t//Save all changes\n\t$data.context.saveChanges({\n\t success: function(){\n\t\tif (typeof callback == \"function\")\n\t\t callback();\n\t },\n\t error: function(){\n\t\tconsole.log(\"Failed to store Event updates\");\n\t }\n\t});\n }\n\n $data.context.Events.toArray({\n\tsuccess:storeReceivedEvents,\n\terror:function(){console.log(\"Failed to receive event list update\")}\n });\n}", "function setTags(tags) {\n hub.getCurrentHub().setTags(tags);\n}", "initTags(user) {\n this.tags = {};\n user.organization.tags.forEach(tag => {\n this.tags[tag.id] = {\n id: tag.id,\n name: tag.name,\n description: tag.description,\n users: tag.users\n };\n });\n\n user.tags.forEach(tag => {\n this.tags[tag.id].subscribed = true;\n });\n\n this.showAllTags();\n }", "handleSetSharedObjectDetail(event) {\n //console.log('handling handleSetSharedObjectDetail event ',event.detail);\n this.sharedObject = event.detail;\n\n // Fire event for create component to disable button\n const evt = new CustomEvent('sharedobjectselected');\n this.dispatchEvent(evt);\n\n this.sharedObjectApiName = this.sharedObject.objectApiName;\n this.fireEventWithRule();\n }", "function setTags(tags) {\n\t getCurrentHub().setTags(tags);\n\t}", "set eventId(value) {\n const {\n event\n } = this; // When assigning a new id to an event, it will update the eventId of the assignment. But the assignments\n // event is still the same so we need to announce here\n\n if ((event === null || event === void 0 ? void 0 : event.isModel) && event.id === value) {\n this.set('eventId', value);\n } else {\n this.event = value;\n }\n }", "function Emitter(){\nthis.event = {};\n}", "setEvents(state, payload) {\n //console.log(payload);\n state.events = payload;\n }", "set serializedObject(value) {}", "setObj(obj, on_response = empty_fun) {\n this.httpPost('mset', function(resp) {\n on_response(resp.isOk());\n }, _obj2str(obj));\n }", "function changeTags(value){\n setTags(value)\n console.log(tags)\n }", "mapGenericTag(tag, warnings) {\n tag = { id: tag.id, value: tag.value }; // clone object\n this.postMap(tag, warnings);\n // Convert native tag event to generic 'alias' tag\n const id = this.getCommonName(tag.id);\n return id ? { id, value: tag.value } : null;\n }", "function setPlayerTags () {\n var playerTagList = ['human', 'human_' + humanPlayer.gender,\n humanPlayer.size + (humanPlayer.gender == 'male' ? '_penis' : '_breasts')];\n\n for (category in playerTagSelections) {\n var sel = playerTagSelections[category];\n if (!(category in playerTagOptions)) continue;\n playerTagOptions[category].values.some(function (choice) {\n if (playerTagOptions[category].type == 'range') {\n if (sel > choice.to) return false;\n } else {\n if (sel != choice.value) return false;\n }\n playerTagList.push(choice.value);\n return true;\n });\n }\n /* applies tags to the player*/\n console.log(playerTagList);\n humanPlayer.baseTags = playerTagList.map(canonicalizeTag);\n humanPlayer.updateTags();\n}", "function addTag(obj,addNewTag){\n\tif(!obj['tag']){\n\t\tobj['tag'] = [];\n\t}\n\n\tif(obj['genre']){\n\t\tdelete obj['genre'];\n\t}\n\n\tfor(var i = 0; i < obj.tag.length; i++){\n\t\tif(obj.tag[i] === addNewTag){\n\t\t\treturn 'Tag already exist!';\n\t\t} \n\t}\n\n\tobj['tag'].push(addNewTag);\n\t\n\treturn 'New Tag Added!';\n}", "createEvent(text) {\n const id = Date.now(); // TODO not great\n this.events.push({\n id,\n text,\n complete: false,\n });\n\n this.emit(\"change\");\n }", "function populateTagField (tagArray){\n\t\ttagArray.forEach(addTag);\n\t}", "function markAsCompleteSent(event) {\n\t\tvar yprops = event.getProps();\n\t\tfor (var key in yprops) {\n\t\t\tvar varObj = yprops[key].varObj;\n\t\t\tevent.propertyMarkAsSent(varObj);\n\t\t}\n\t\tevent.markAsSent();\n\t}", "function onTagChange() {\n\n\t}", "function on(event, tag, cb) {\n if (!game.objEvents[event]) {\n game.objEvents[event] = new IDList();\n }\n return game.objEvents[event].pushd({\n tag: tag,\n cb: cb,\n });\n }", "function pushTag(gun, tag) {\n gun.get(scope + tag).val(function (group) {\n gun.get(scope + 'all tags').init().path(tag).put(group);\n });\n}", "annotate(message: string, data: Object) {\n this.message = message;\n this.data = assign(this.data, data);\n }", "function onAddTag(e){\n console.log(\"onAddTag: \", e.detail);\n console.log(\"original input value: \", input.value)\n tagify.off('add', onAddTag) // exmaple of removing a custom Tagify event\n }", "function addTagInternal( tag ) {\n if( typeof tag === 'string' && attrs.tagTitleField ) {\n var tmp = {};\n tmp[attrs.tagTitleField] = tag;\n tag = tmp;\n }\n\n scope.tags.push( tag );\n scope.inputText = '';\n scope.selection = -1;\n }", "function setObject(customData, element, key, value) {\n // Get the id for the element\n if (element.nodeType == 1 /* Element */) {\n var id = getAndSetNodeId(customData, element);\n if (id != '') {\n // Get the values for the element\n if (!customData.dict[id]) {\n // First time dictionary creation\n customData.dict[id] = {};\n }\n customData.dict[id][key] = value;\n }\n }\n}", "function setContextData(event, linkTrackVars) {\n var eventAttributes = event.EventAttributes;\n for (var eventAttributeKey in eventAttributes) {\n if (eventAttributes.hasOwnProperty(eventAttributeKey)) {\n contextVariableMapping.forEach(function(contextVariableMap) {\n if (contextVariableMap.map === eventAttributeKey) {\n appMeasurement.contextData[contextVariableMap.value] =\n eventAttributes[eventAttributeKey];\n if (linkTrackVars) {\n linkTrackVars.push(\n 'contextData.' + contextVariableMap.value\n );\n }\n }\n });\n }\n }\n }", "async handleTagCreated(tag) {\n this.setState({\n tags: [...this.state.tags, tag],\n draftTags: [...this.state.draftTags, tag]\n });\n }", "on_assign_data() {\n }", "processEvent(obj,changes) {\n var id = new ID(Object.keys(obj)[0],Object.values(obj)[0]);\n this.log(\"processing changes on \"+id);\n if ( this.scene.has(id.toString())) {\n var object = this.scene.get(id.toString());\n Object.assign(object,changes);\n // TODO: route event to mesh/script\n // TODO: notify listeners\n object.notifyListeners(changes);\n } else {\n this.log(\"Unknown object \"+id);\n }\n }", "function setMapTagName(tag, x, y) {\n\t\tthis.tagName = tag;\n\t\tthis.tagNameXPos = x == null ? 0 : eval(x);\n\t\tthis.tagNameYPos = y == null ? 0 : eval(y);\n\t}", "setvalue(tags) {\n for (let tag of tags) {\n if (tag.body.items && tag.body.items.length > 0) tag.body.value = tag.body.items[tag.body.items.length - 1].value\n else if (tag.body.source) tag.body.value = tag.body.source;\n }\n console.log('Annotations, tags', tags)\n //aggregate targets\n }", "setEvent(hourBlock, event) {\n this.schedule.events\n .filter(e => e.hourBlock === hourBlock)\n .forEach(e => e.event = event);\n\n this.saveTodaysSchedule();\n }", "function ls__addTagFromJson(jsonObj) {\r\n //prepare data\r\n var image = document.getElementById('example');\r\n var options = {\r\n \r\n show: 'mouseenter',\r\n hide: 'mouseleave'\r\n };\r\n var data = [\r\n Taggd.Tag.createFromObject({\r\n position: {x: jsonObj.position.x, y: jsonObj.position.y},\r\n text: jsonObj.text,\r\n id:jsonObj.buttonAttributes\r\n })\r\n ];\r\n\r\n //add tag\r\n taggd = taggd ? taggd.addTag(data.shift()) : new Taggd(image, options, data);\r\n }", "function addData(data) {\n console.log(` Adding: Tag (${data.name})`);\n Tags.insert(data);\n}", "function pushQuoteObject() {\n let quoteObject = {};\n const tags = document.querySelector('.tags');\n quoteObject.quote = document.querySelector('.quote').textContent;\n quoteObject.source = document.querySelector('.source').textContent.slice(0,16);\n quoteObject.citation = document.querySelector('.source').textContent.slice(16,23)\n quoteObject.year = document.querySelector('.source').textContent.slice(23,28)\n quoteObject.tags = [];\n for (let item of tags.children) {\n quoteObject.tags.push(item.textContent);\n }\n quotes.push(quoteObject);\n}", "async tagUpdatedEvent(data) {\n let logger = Logger.create(\"tagUpdatedEvent\");\n logger.info(\"enter\", {data});\n\n let {result, updatedKeys} = data;\n logger.debug(\"updated data\", data);\n\n // Async populate results.\n Populator.populate([result], updatedKeys);\n\n return {data: result, _id: result._id};\n }", "vouchFor(tagsdoc, index) {\n\n var tag = tagsdoc.tags[index];\n var modified_tag = {\n value: tag.value,\n count: tag.count + 1,\n };\n tagsdoc.tags[index] = modified_tag;\n db_pending.put({\n _id: tagsdoc._id,\n _rev: tagsdoc._rev,\n type: \"tag\",\n tags: tagsdoc.tags,\n }, function (err, response) {\n if (err) {\n console.log(err);\n }\n console.log(\"successfully upvoted\");\n });\n\n }", "event(name, data = {}) {\n const eventObj = { event: name };\n for (const d in data) {\n const v = data[d];\n eventObj[d] = v;\n }\n logger.log('pushing event', eventObj);\n return window.criteo_q.push(eventObj);\n }", "function attachData(gobj) {\n queueMap[gobj.id] = {'gobj':gobj, 'action':'none', 'transCode':0};\n }", "function addTag(tag_index,tag_name,tag_content,tagArray) {\r\n var tag={tag_index,tag_name,tag_content};\r\n tagArray.push(tag);\r\n}", "function setDataAttr() {\n\t\tvar str = encodeURIComponent(JSON.stringify(T.tally_user));\n\t\t$(\"#tally_data\").attr(\"data-tally\", str);\n\t}", "set eventDate(aValue) {\n this._logger.debug(\"eventDate[set]\");\n this._eventDate = aValue;\n }", "updateObject(data) {\n super.updateObject(data);\n\n if (data.filterData && !isEqual(this.filterData, data.filterData)) {\n this.setFilterData(data.filterData);\n Signals.elementChanged.dispatch();\n }\n\n if (data.trackingURL && this.trackingURL !== data.trackingURL) {\n this.setTrackingURL(data.trackingURL);\n Signals.elementChanged.dispatch();\n }\n\n if (data.utmData && !isEqual(this.utmData, data.utmData)) {\n this.setUTMData(data.utmData);\n Signals.elementChanged.dispatch();\n }\n\n if (data.texturePath && !isEqual(this.texturePath, data.texturePath)) {\n this.setTexturePath(data.texturePath);\n }\n }", "onObjectAdded(obj) {\n // obj._roomName = obj._roomName || this.DEFAULT_ROOM_NAME;\n /* this.networkTransmitter.addNetworkedEvent('objectCreate', {\n stepCount: this.gameEngine.world.stepCount,\n objectInstance: obj\n });*/\n\n if (this.options.updateOnObjectCreation) ;\n }", "setTags(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, setTagsOperationSpec);\n }", "setTags(options) {\n const operationArguments = {\n options: coreHttp__namespace.operationOptionsToRequestOptionsBase(options || {})\n };\n return this.client.sendOperationRequest(operationArguments, setTagsOperationSpec);\n }", "function updateTags(){\n\tWRAP_STATE.describeTags = WRAP_STATE.tagStack.reduce(function(a, b){\n\t\treturn a.concat(b);\n\t}, []);\n\tWRAP_STATE.hasDescribeTags = (WRAP_OPTIONS.tagsAny)? \n\t\thasAnyTags(WRAP_STATE.describeTags): \n\t\thasAllTags(WRAP_STATE.describeTags);\n}", "set userData(value) {}", "onAddTag() {}", "addAllEvents() {\n this.webhook.events = [].concat(this.events);\n }", "setEvents(...ev) {\n\t\t}", "setupTags() {\n let allTags = [];\n this.model.forEach(function(post) {\n post.tags.forEach(function(tag) {\n let eTag = allTags.find(function(e){\n return e.name = tag;\n });\n\n if(eTag === undefined) {\n allTags.push({id: tag, name: tag, count: 1});\n } else {\n eTag.count++;\n }\n });\n });\n this.set('tags', allTags);\n }", "saveObject(requestObj, values)\n {\n // Defensively program against null attribute values\n if (values == undefined || values == null)\n {\n values = {};\n }\n\n this.dispatchEvent(new CustomEvent(\"save\", {\n detail: values\n }));\n\n if (this._dataType.isTrack && typeof requestObj.localization_ids === \"undefined\") {\n const localizationBody = {\n type: Number(this._dataType.localizationType.id.split(\"_\")[1]),\n name: this._dataType.localizationType.name,\n version: this._version.id,\n media_id: this._mediaId,\n ...requestObj,\n ...values,\n };\n this._undo.post(\"Localizations\", localizationBody, this._dataType.localizationType)\n .then(localizationResponse => {\n if (this._trackId === null) {\n // Track needs to be created.\n const trackBody = {\n type: Number(this._dataType.id.split(\"_\")[1]),\n name: this._dataType.name,\n version: this._version.id,\n media_ids: [this._mediaId],\n localization_ids: localizationResponse[0].id,\n ...values,\n };\n return this._undo.post(\"States\", trackBody, this._dataType);\n } else {\n this.dispatchEvent(new CustomEvent(\"addDetectionToTrack\", {\n detail: {localizationType: this._dataType.localizationType.id,\n trackType: this._dataType.id,\n frame: requestObj.frame,\n mainTrackId: this._trackId,\n detectionId: localizationResponse[0].id[0],\n selectTrack: false}\n }));\n }\n })\n .then(trackResponse => {\n if (trackResponse) {\n this._trackId = trackResponse[0].id[0];\n }\n })\n\n } else {\n var body = {\n type: Number(this._dataType.id.split(\"_\")[1]),\n name: this._dataType.name,\n version: this._version.id,\n ...requestObj,\n ...values,\n };\n\n if (this._dataType.dtype.includes(\"state\")) {\n if (this._stateMediaIds) {\n body.media_ids = this._stateMediaIds;\n }\n else {\n body.media_ids = [this._mediaId];\n }\n this._undo.post(\"States\", body, this._dataType);\n }\n else {\n body.media_id = this._mediaId\n this._undo.post(\"Localizations\", body, this._dataType);\n }\n }\n }", "_setCustomTags () {\n const tags = this._opts.CustomTags;\n if (!tags || !Object.keys(tags).length) {\n return;\n }\n\n const awsTags = Object\n .entries(tags)\n .map(entry => ({ \n Key: entry[0], \n PropagateAtLaunch: true, \n Value: entry[1] \n }));\n\n this._template.Resources[`${this._autoScalingGroupName}`].Properties.Tags = arrayUnion(\n [],\n awsTags,\n this._template.Resources[`${this._autoScalingGroupName}`].Properties.Tags);\n }", "updateValueByDOMTags(){\n this.value.length = 0;\n\n [].forEach.call(this.getTagElms(), node => {\n if( node.classList.contains(this.settings.classNames.tagNotAllowed.split(' ')[0]) ) return\n this.value.push( getSetTagData(node) )\n })\n\n this.update()\n }", "function setTags(tags, doSort) {\n //writeDebug(\"called setTags(\"+tags+\")\");\n\n clearSelection();\n var values;\n if (typeof(tags) == 'object') {\n values = tags;\n } else {\n values = tags.split(/\\s*,\\s*/);\n }\n if (!values.length) {\n return;\n }\n var tmpValues = new Array()\n for (var i = 0; i < values.length; i++) {\n tmpValues.push(values[i].replace(/([^0-9A-Za-z_])/, '\\\\$1'));\n }\n var filter = \"#\"+tmpValues.join(\",#\");\n //writeDebug(\"filter=\"+filter);\n $tagCloud.find(filter).addClass(\"current\");\n if (doSort) {\n values = values.sort();\n }\n $input.val(values.join(\", \"));\n }", "function useSetHandler(obj, name, setHandler) {\n obj[name + '_setter___'] = setHandler;\n }", "applyToEvent(event, hint = {}) {\n if (this._extra && Object.keys(this._extra).length) {\n event.extra = { ...this._extra, ...event.extra };\n }\n if (this._tags && Object.keys(this._tags).length) {\n event.tags = { ...this._tags, ...event.tags };\n }\n if (this._user && Object.keys(this._user).length) {\n event.user = { ...this._user, ...event.user };\n }\n if (this._contexts && Object.keys(this._contexts).length) {\n event.contexts = { ...this._contexts, ...event.contexts };\n }\n if (this._level) {\n event.level = this._level;\n }\n if (this._transactionName) {\n event.transaction = this._transactionName;\n }\n\n // We want to set the trace context for normal events only if there isn't already\n // a trace context on the event. There is a product feature in place where we link\n // errors with transaction and it relies on that.\n if (this._span) {\n event.contexts = { trace: this._span.getTraceContext(), ...event.contexts };\n const transactionName = this._span.transaction && this._span.transaction.name;\n if (transactionName) {\n event.tags = { transaction: transactionName, ...event.tags };\n }\n }\n\n this._applyFingerprint(event);\n\n event.breadcrumbs = [...(event.breadcrumbs || []), ...this._breadcrumbs];\n event.breadcrumbs = event.breadcrumbs.length > 0 ? event.breadcrumbs : undefined;\n\n event.sdkProcessingMetadata = { ...event.sdkProcessingMetadata, ...this._sdkProcessingMetadata };\n\n return this._notifyEventProcessors([...getGlobalEventProcessors(), ...this._eventProcessors], event, hint);\n }", "function setData(ns, obj) {\n memory.setItem(ns, JSON.stringify(obj));\n}", "function setData(data)\n\t{\n\t\tobjThis.selectorElt.tagSuggest().setData(data);\n\t}", "function setData() {\n\t\tCORE.LOG.addInfo(\"SKILLS_SYNCH:setData\");\n\t\t_this_.socket.emit('skillsSetData',{\n\t\t\t\tskills:gameData.data.player.skills,\t \t\t\n\t \t\t\tplayerID:gameData.data.player.playerID,\n\t \t\t\tdate:gameData.data.synch.skills\n\t\t\t}\n\t\t);\n\t}", "setTags(group, tags) {\n const operation = {\n \"operationType\": \"set\",\n \"group\": group,\n \"tags\": tags\n };\n this.operations.push(operation);\n return this;\n }", "function On(e,t){for(var l in t)e[l]=t[l];return e}", "applyToEvent(event, hint = {}) {\n if (this._extra && Object.keys(this._extra).length) {\n event.extra = { ...this._extra, ...event.extra };\n }\n if (this._tags && Object.keys(this._tags).length) {\n event.tags = { ...this._tags, ...event.tags };\n }\n if (this._user && Object.keys(this._user).length) {\n event.user = { ...this._user, ...event.user };\n }\n if (this._contexts && Object.keys(this._contexts).length) {\n event.contexts = { ...this._contexts, ...event.contexts };\n }\n if (this._level) {\n event.level = this._level;\n }\n if (this._transactionName) {\n event.transaction = this._transactionName;\n }\n\n // We want to set the trace context for normal events only if there isn't already\n // a trace context on the event. There is a product feature in place where we link\n // errors with transaction and it relies on that.\n if (this._span) {\n event.contexts = { trace: this._span.getTraceContext(), ...event.contexts };\n const transactionName = this._span.transaction && this._span.transaction.name;\n if (transactionName) {\n event.tags = { transaction: transactionName, ...event.tags };\n }\n }\n\n this._applyFingerprint(event);\n\n event.breadcrumbs = [...(event.breadcrumbs || []), ...this._breadcrumbs];\n event.breadcrumbs = event.breadcrumbs.length > 0 ? event.breadcrumbs : undefined;\n\n event.sdkProcessingMetadata = { ...event.sdkProcessingMetadata, ...this._sdkProcessingMetadata };\n\n return this._notifyEventProcessors([...getGlobalEventProcessors(), ...this._eventProcessors], event, hint);\n }", "function addTagToTrack(...tag) {\n trackTagsArray.push(...tag);\n}", "addStrokeTag(ev){\n console.log(ev)\n var id = guid();\n var firstPoint = [ev['x'], ev['y']];\n var data = {\n 'id': id,\n 'width': 100,\n 'height': 100,\n 'placeHolder': [\n {'id':'left', 'data': {}, 'lines':[]}\n ],\n 'tagSnapped': [],\n 'position': [firstPoint[0],firstPoint[1]]\n \n }\n this.props.addTag(data)\n }", "set(key, object) {\n this._set(this._translateKey(key), object);\n }", "static pushInto({ object: object, instantiatedClassification: instantiatedClassification }) {\n O_Object.pushActiveInstantiatedClassification({\n object: object,\n instantiatedClassification: instantiatedClassification,\n })\n }", "function addTag(tag) {\n // If we entered from payload we have some additional info\n if ($('#eview_sub2')[0]) { \n var longTag = tag.split(\",\")[0];\n var theClass = tag.split(\",\")[1];\n var t_tag = truncTag(longTag,20);\n } else {\n var t_tag = truncTag(tag,20);\n } \n\n // Hide empty\n $('.tag_empty').hide();\n\n // Check if tag exists\n var tag_exists = 0;\n $('.tag').each(function() {\n if ($(this).text() == t_tag) {\n $(this).addClass('tag_active');\n tag_exists = 1;\n }\n }); \n\n // Add tag to left pane\n if (tag_exists == 0) {\n var newTag = \"<div title=\\\"\" + tag + \"\\\" data-val=\\\"\" + tag + \"\\\" class=tag>\" + t_tag + \"</div>\";\n $('#tg_box').prepend(newTag);\n }\n \n // If we have the payload open, add here as well\n if ($('#eview_sub2')[0]) {\n if($('#pickbox_label').is(\":visible\")) {\n theClass = $('#pickbox_label').data('sord')[0];\n }\n // Remove placeholder\n if ($('#tag_none')[0]) $('#tag_none').remove();\n var newTag = \"<div title=\\\"\" + longTag + \"\\\" data-val=\\\"\" + longTag + \"\\\" class=tag_\" + theClass + \">\" + t_tag + \"</div>\"; \n $('#tag_area').prepend(newTag);\n }\n\n }", "setPayload(payload) {\n this.payload = DagCbor.util.serialize(payload);\n }" ]
[ "0.5794419", "0.5794419", "0.5794419", "0.5794419", "0.5780464", "0.5742356", "0.5742356", "0.5742356", "0.5720562", "0.57045376", "0.56896764", "0.56470567", "0.56467664", "0.56253386", "0.5620837", "0.5614256", "0.5609965", "0.5579121", "0.5576711", "0.5479952", "0.5420882", "0.5390463", "0.5294475", "0.52368104", "0.52305704", "0.52305704", "0.52305704", "0.5219576", "0.51703477", "0.5161008", "0.50860703", "0.5080319", "0.50492674", "0.50461125", "0.50449616", "0.50082874", "0.49905226", "0.49853107", "0.49828678", "0.49768838", "0.49731535", "0.49683058", "0.49618593", "0.49369377", "0.49158734", "0.48870546", "0.4884658", "0.48816052", "0.48743585", "0.4871684", "0.4846859", "0.48431867", "0.48404375", "0.48360294", "0.481304", "0.47998318", "0.4787944", "0.47678694", "0.47645718", "0.47632214", "0.4751734", "0.47503325", "0.47496334", "0.47472176", "0.47459474", "0.47456947", "0.4743654", "0.47290742", "0.4720276", "0.47159597", "0.47147864", "0.47147065", "0.47118795", "0.47118795", "0.47088993", "0.4707852", "0.4705358", "0.4704714", "0.47018555", "0.46977282", "0.46965668", "0.46916732", "0.46908322", "0.46864548", "0.46850762", "0.46814004", "0.46809462", "0.46778297", "0.46765956", "0.4673734", "0.4668472", "0.4661881", "0.46598715", "0.46579307", "0.46527177", "0.4651036", "0.4643474", "0.46394992" ]
0.5236603
26
Set key:value that will be sent as extra data with the event.
function setExtra(key, extra) { callOnHub('setExtra', key, extra); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setExtra(key, extra) {\n\t getCurrentHub().setExtra(key, extra);\n\t}", "function setExtra(key, extra) {\n hub.getCurrentHub().setExtra(key, extra);\n}", "_setAll(attr, value) {\n this._forEach(event => {\n event[attr] = value;\n });\n }", "addData(key, value) {\n this.Serialize.addData(key, value);\n }", "function setTag(key, value) {\n callOnHub('setTag', key, value);\n}", "function setTag(key, value) {\n callOnHub('setTag', key, value);\n}", "function setTag(key, value) {\n callOnHub('setTag', key, value);\n}", "function setTag(key, value) {\n\t getCurrentHub().setTag(key, value);\n\t}", "trackCustomEvent(context, eventName, keyValuePair) {\n let message = context.message;\n let address = message.address || {};\n let conversation = address.conversation || {};\n let user = address.user || {};\n let item = {\n timestamp: message.timestamp,\n channel: address.channelId,\n conversationId: conversation.id,\n userId: user.id,\n userName: user.name\n };\n //merge the custom properties with the defaults\n let eventData = Object.assign(item, keyValuePair);\n this.trackEvent(eventName, eventData);\n }", "setConfig(k, v) {\n this._data[k] = v;\n }", "static set(key, value) {\r\n Object.set(Config.data, key, value); \r\n }", "function setTag(key, value) {\n hub.getCurrentHub().setTag(key, value);\n}", "set() {\n\n let kv = this.getKeyValue();\n let config = this.readSteamerConfig({ isGlobal: this.isGlobal });\n\n config[kv.key] = kv.value;\n\n this.createSteamerConfig(config, {\n isGlobal: this.isGlobal,\n overwrite: true,\n });\n\n }", "set(key, val, on_response = empty_fun) {\n this.httpPost('set', function(resp) {\n on_response(resp.isOk());\n }, [key, _raw_size(val), val].join('\\n'));\n\n }", "addBodyParam(key, value) {\n payload[key] = value;\n }", "setInfoKey(key, value) {\n let pair = this.data.info.find((pair) => {\n return pair.key === key;\n });\n let encodedValue;\n switch (typeof value) {\n case 'string':\n encodedValue = this.textEncoder.encode(value);\n break;\n case 'boolean':\n encodedValue = new Uint8Array([value ? 1 : 0]);\n break;\n default:\n throw new TypeError('Invalid value type, expected string or boolean.');\n }\n if (!pair) {\n pair = { key, value: encodedValue };\n this.data.info.push(pair);\n }\n else {\n pair.value = encodedValue;\n }\n }", "addDataToScript(key, value) {\n\t\tthis.responseData.scripts[key] = value;\n\t}", "function set_metadata(key, value) {\n metaData[key] = value;\n}", "set(key, value) {\n const created = Date.now() / 1000;\n this.items[key] = { created, value };\n }", "function set(key, value) {\n self.storage.setItem(key, JSON.stringify(value));\n }", "function set(key, value) {\n self.storage.setItem(key, JSON.stringify(value));\n }", "function setDataCommon(key, value) {\n common_data[key] = value;\n}", "set(key, data) {\n this.sset(key, data)\n this.lset(key, data)\n }", "setAttribute(key, value) {\n this.attributes[key] = value;\n }", "setAttribute(key, value) {\n this.attributes[key] = value;\n }", "set(k, v) {\n let prevV = this.kvStore[k];\n this.kvStore[k] = v;\n if (k in this.listeners) {\n for (let f of this.listeners[k]) {\n f(prevV, v);\n }\n }\n }", "function fnSetKey(aoData, sKey, mValue) {\r\n for (var i = 0, iLen = aoData.length; i < iLen; i++) {\r\n if (aoData[i].name == sKey) {\r\n aoData[i].value = mValue;\r\n }\r\n }\r\n}", "set(key, value) {\n const stringValue = typeof value === 'object' ? JSON.stringify(value) : value;\n this.storageMechanism.setItem(key, stringValue);\n }", "setQValue(key, value, callback) {\n this.set(key, value, (err) => {\n if (err) {\n winston.error(err);\n throw err;\n }\n callback();\n });\n }", "set(key, value) {\n this.frame.set(to_key(key), value);\n }", "update(metadataKey, value) {\n this.metadata[metadataKey] = value;\n }", "writeKeyValue(key, value) {\n this._isChanged = true;\n this._json = null;\n // write the key value to data in derived class\n }", "add(key, value) {\n if (key instanceof Transport) {\n let t = key;\n\n if (!t._format_was_set()) {\n t.format = this.#format;\n }\n\n if (!t._theme_was_set()) {\n t.theme = this.#theme;\n }\n\n t.ready();\n\n this.#transports.push(t);\n } else {\n this.#defaults[key] = value;\n }\n }", "function setDataInRedis(client, key, value) {\n client.set(key, value);\n}", "function set(context, key, value) {\n var userDefaults = getUserDefaults(context);\n userDefaults.setObject_forKey_(JSON.stringify(value), key);\n userDefaults.synchronize(); // save\n}", "function setOptions(key, value) {\n context.opts[key] = value;\n}", "addExtra(node, key, val) {\n if (!node) return;\n\n const extra = (node.extra = node.extra || {});\n extra[key] = val;\n }", "function updateValue (key, value) {\n var data = {};\n data[key] = value;\n return function (done) {\n this.user.specRequest(this.container._id)\n .send(data)\n .expect(200)\n .expectBody(key, value)\n .end(done);\n };\n }", "function setObject(customData, element, key, value) {\n // Get the id for the element\n if (element.nodeType == 1 /* Element */) {\n var id = getAndSetNodeId(customData, element);\n if (id != '') {\n // Get the values for the element\n if (!customData.dict[id]) {\n // First time dictionary creation\n customData.dict[id] = {};\n }\n customData.dict[id][key] = value;\n }\n }\n}", "function set(key, value, callback) {\n\tclient.set(key, value, callback);\n}", "function setData(ev) {\n const name = ev.currentTarget.name;\n const inputValue = ev.currentTarget.value;\n formData[name] = inputValue;\n updateCard();\n}", "setAttribute(key, value) {\n this.handleAttributeChange(key, value);\n\n if(isUndefined(value)) {\n delete this.$attributes[key];\n }\n else {\n this.$attributes[key] = value;\n }\n }", "set(key, value) {\n let index = this._hash(key);\n\n if (!this.data[index]) {\n this.data[index] = [];\n } else {\n for (let i = 0; i < this.data[index].length; i++) {\n //chech if the key exists\n if (this.data[index][i][0] == key) {\n this.data[index][i][1] = value;\n return;\n }\n }\n }\n this.data[index].push([key, value]);\n }", "setItem(key, value) {\n if (arguments.length < 2) {\n throw new TypeError('Not enough arguments to \\'setItem\\'');\n }\n this._nativeObject._nativeCall('add', {\n key: encode(key),\n value: encode(value)\n });\n }", "addAttribute(key, value) {\n this.attributes[key] = value;\n }", "set(key, value, options) {\n let serializedValue;\n if (typeof value === \"string\") {\n serializedValue = value;\n } else {\n let toStringValue = value.toString();\n if (toStringValue === Object.prototype.toString.call(value)) {\n serializedValue = JSON.stringify(value);\n } else {\n serializedValue = toStringValue;\n }\n }\n const serializeOptions = {};\n if (options) {\n Object.assign(serializeOptions, options);\n }\n this.#ensureOutgoingMap().set(key, [\n serializedValue,\n serialize(key, serializedValue, serializeOptions),\n true\n ]);\n if (this.#request[responseSentSymbol$2]) {\n throw new AstroError({\n ...AstroErrorData.ResponseSentError\n });\n }\n }", "async _set(key, value) {\r\n await super._set(key, value);\r\n this.localCache[key] = JSON.stringify(value);\r\n }", "async _set(key, value) {\r\n await super._set(key, value);\r\n this.localCache[key] = JSON.stringify(value);\r\n }", "extendStreamKey() {\n if ( !this._apikey || !this._ajax ) return;\n if ( !this._listenkey ) return;\n\n this._ajax.put( this.getPublicUrl( '/v1/userDataStream', { listenKey: this._listenkey } ), {\n type: 'json',\n headers: { 'X-MBX-APIKEY': this._apikey },\n\n success: ( xhr, status, response ) => {\n this.emit( 'user_listenkey', this._listenkey );\n },\n });\n }", "static setEvent(event) {\n contextEvent.set(event);\n }", "function userEventChange(key) {\n\tconsole.log(\"USER EVENT_KEY CHANGE TO \" + key);\n\tevent.key = key;\n\tinitialUpdateData();\n}", "function setContextData(event, linkTrackVars) {\n var eventAttributes = event.EventAttributes;\n for (var eventAttributeKey in eventAttributes) {\n if (eventAttributes.hasOwnProperty(eventAttributeKey)) {\n contextVariableMapping.forEach(function(contextVariableMap) {\n if (contextVariableMap.map === eventAttributeKey) {\n appMeasurement.contextData[contextVariableMap.value] =\n eventAttributes[eventAttributeKey];\n if (linkTrackVars) {\n linkTrackVars.push(\n 'contextData.' + contextVariableMap.value\n );\n }\n }\n });\n }\n }\n }", "handleEventChange(key, value) {\n let newEvents = this.state.events;\n let event = newEvents[this.state.index];\n event[key] = value;\n newEvents[this.state.index] = event;\n this.setState({events: newEvents});\n }", "setUserData(field, value) {\r\n\r\n // Get all user data\r\n var userData = this.getUserData()\r\n\r\n // Set new field\r\n userData[field] = value\r\n\r\n // Update entity\r\n Entities.editEntity(this.id, JSON.stringify(userData))\r\n\r\n }", "updateMeta(key, name, value) {\n let meta = get(this, 'meta');\n if(!get(meta, key)) {\n set(meta, key, Ember.Object.create());\n }\n\n set(meta, key+'.'+name, value);\n }", "set(key, data) {\n this.data[key] = data;\n //since this is not for a server I/O overhead is not much of an issue\n //so I could afford to use sync writeFile method. And I just don't want to use redux-thunk here :)\n fs.writeFileSync(this.path, JSON.stringify(this.data));\n }", "setString (name, value) {\n this.data[name] = value\n }", "setJsonValue(key, value) {\n this.storageService.secureStorage.setItem(key, value);\n }", "function setValue(object, key, value) {\n object[key] = value;\n}", "function setValue(object, key, value) {\n object[key] = value;\n}", "function setExtraInfo(){}", "attributeChangedCallback(key, o, n) {\n // assign attribute changes based on key\n this[`set${key}`](n)\n }", "async function setAnnounceProperty(discordChannel, twitchName, key, value) {\n \n let obj = getObjectForDB(discordChannel, twitchName);\n let change = {};\n change[key] = value;\n await db.discord_announcers.update(obj, change);\n\n}", "set userData(value) {}", "function handelchange (e) {\n const {name, value} = e.target;\n if (name && value) {\n setData ({\n ...data,\n [name]: value,\n });\n }\n }", "function setKnownProperty(appId, k, v, cb){\n common.readApp(appId, function(err, cfg){\n if (err) return cb(err);\n\n // the config object returned from readApp is not the expected format for app/update :-(\n var payload = { \"payload\": {\n \"app\": cfg.app.guid,\n \"inst\": appId,\n \"title\": cfg.inst.title,\n \"description\": cfg.inst.description,\n \"height\": cfg.inst.height,\n \"width\": cfg.inst.width,\n \"config\": cfg.inst.config,\n \"widgetConfig\": cfg.app.config\n }, \n \"context\": {}\n };\n \n // update the respective nv pair\n payload.payload[k] = v;\n\n fhreq.POST(fhreq.getFeedHenryUrl(), \"box/srv/1.1/ide/\" + fhc.domain + \"/app/update\", payload, function (err, remoteData, raw, response) {\n if (err) {\n log.error(\"Error updating app: \" + err);\n cb(err);\n }else {\n apps.message = \"Property set ok\";\n if (remoteData.status != 'ok') { \n apps.message = \"Error setting property: \" + remoteData.message;\n return cb(remoteData.messsage, remoteData);\n } \n return cb(undefined, remoteData); \n }\n });\n }); \n}", "function setPersistantData(socketId, dataKey, dataValue, callback) {\n if (typeof persistantData[socketId] === \"undefined\") persistantData[socketId] = {};\n\n persistantData[socketId][dataKey] = dataValue;\n\n typeof callback === 'function' && callback(false);\n return;\n }", "function _setEntry(context, address, stateValue) {\n //code here\n let msgBytes = encoder.encode(stateValue);\n let entries = {\n [address]: msgBytes\n };\n return context.setState(entries);\n}", "setOption(state, {key, value}) {\n state.options[key] = value;\n }", "function writeSetting(key, value) {\n // change key in global.sleeplog\n if (typeof global.sleeplog === \"object\") global.sleeplog[key] = value;\n // reread settings to only change key\n settings = Object.assign(settings, storage.readJSON(filename, true) || {});\n // change the value of key\n settings[key] = value;\n // write to storage\n storage.writeJSON(filename, settings);\n }", "saveData() {\n ipcRenderer.send('set', { 'key': this.type, 'value': this.data })\n }", "updateFeatureValue(key, evt) {\n var value = evt.currentTarget.innerHTML;\n if (\n (key === \"target_value\" && isValidTargetValue(value)) ||\n (key === \"spf\" && isNumber(value))\n ) {\n var obj = {};\n obj[key] = value;\n this.props.updateFeature(this.props.feature, obj);\n } else {\n alert(\"Invalid value\");\n }\n }", "function setItem(key, value, callback) {\n\tcallback = callback || noop;\n\ttry {\n\t\tJSON.parse(value); //ensuring that value is JSON\n\t\tstore[key] = value;\n\t} catch (e) {\n\t\tcallback(e);\n\t\treturn;\n\t}\n\tcallback(null);\n}", "function updateValue(key, newValue) {\n ticket[key] = newValue\n}", "addParam(key, value) {\n const aliasKeyName = key.toLowerCase();\n const propertyName = this.URL_PROPS_ALIAS.get(aliasKeyName);\n if (propertyName != null) {\n // if it is an URL alias then add to URL props\n this.urlProps.set(propertyName, value);\n } else {\n this.connectionProps.set(propertyName, value);\n }\n }", "emit(key, event) {\n //prevent infinite event loops by skipping already-notified keys\n if (!event.notifiedKeys.has(key)) {\n event.notifiedKeys.add(key);\n this.onchangeEmitter.emit(key, event);\n }\n }", "onUpdateUserDetails(key, value) {\n this.setState({\n editUser: {\n ...this.state.editUser,\n [key]: value,\n },\n });\n }", "set keyname(keyname) {\n this.setAttribute('keyname', keyname);\n }", "set(key, value) {\n this.store[key] = value;\n }", "set(key, value) {\n this.store[key] = value;\n }", "set(key, value) {\n this.store[key] = value;\n }", "set(key, value) {\n this.store[key] = value;\n }", "set(key, value) {\n this.store[key] = value;\n }", "function addMsgEntityPair(msgObj, key, value){\n\tvar pair = {};\n\tpair[key] = value;\n\tmsgObj.msgroot.entity.ep.push(pair);\n}", "function addRawAttr(list, key, value) {\n\t list[key] = value;\n\t }", "function onchange(key) {\n return (value) => {\n data[key] = value;\n save();\n };\n }", "setValue(k, v) {\n this._config[k] = v;\n }", "function handleAppSettingChange(data) {\n console.log(\"handleAppSettingChange\", data);\n let hudid = data.change.hudid\n let key = data.change.key\n let key_chain = data.change.key_chain\n let value = data.change.value\n let place = HDEF[hudid].app\n key_chain.forEach((item, i) => {\n place = place[item]\n });\n place = value\n sendToHud(\"lshud-settings\",{type:\"app_setting_change\", data:data.change, app:HDEF[hudid].app })\n sendToHud(hudid,{type:\"app_setting_change\", data:data.change, app:HDEF[hudid].app })\n}", "function addLevelDBData(key,value){\n console.log('Add data to level db ' + key + ' value ' + value);\n db.put(key, value, function(err) {\n if (err) return `Block ${key} submission failed: ${err}`;\n })\n}", "function setNewKey(_newKey) {\n\t\t\tif ( rangeName ) {\n\t\t\t\t/**\n\t\t\t\t * If the model has a range attribute, _newKey must be an object that contains\n\t\t\t\t * the hash and range attributes.\n\t\t\t\t */\n\t\t\t\t_.extend( changed, _newKey );\n\t\t\t} else {\n\t\t\t\t/**\n\t\t\t\t * If the model doesn't have a range attribute, _newKey must be the value of the hash attribute.\n\t\t\t\t */\n\t\t\t\tchanged[ hashName ] = _newKey;\n\t\t\t}\n\n\t\t\t// Add the new key attribute(s) to the Item to be sent to DynamoDB\n\t\t\t_.extend( params.Item, options.serializeDates === true ? serializeAllDates( model, _.clone( changed ) ) : changed );\n\t\t}", "function setEventData(kind, event) {\n\tvar data = JSON.parse(localStorage.getItem(kind + '-data'));\n\t\n\t$.each(data, function(index,value) {\n\t\tif(index == event) {\n\t\t\tsessionStorage.nightclub_id \t\t= value.id; \n\t\t\tsessionStorage.nightclub_name \t\t= value.name; \n\t\t\tsessionStorage.nightclub_short\t\t= value.short; \n\t\t\tsessionStorage.nightclub_long \t\t= value.long; \n\t\t\tsessionStorage.nightclub_address \t= value.address;\n\t\t\tsessionStorage.nightclub_latitude \t= value.latitude;\n\t\t\tsessionStorage.nightclub_longitude \t= value.longitude;\n\t\t}\n\t});\n}", "static set(key, value) {\n PStore.set(key, value);\n }", "function addLevelDBData(key,value){\n db.put(key, value, function(err) {\n if (err) return console.log('Block ' + key + ' submission failed', err);\n })\n}", "function addLevelDBData(key,value){\n db.put(key, value, function(err) {\n if (err) return console.log('Block ' + key + ' submission failed', err);\n })\n}", "function setKnownProperty(appId, k, v, cb){\n common.readApp(appId, function(err, cfg){\n if (err) return cb(err);\n\n // the config object returned from readApp is not the expected format for app/update :-(\n var payload = { \"payload\": {\n \"app\": cfg.app.guid,\n \"inst\": appId,\n \"title\": cfg.inst.title,\n \"description\": cfg.inst.description,\n \"height\": cfg.inst.height,\n \"width\": cfg.inst.width,\n \"config\": cfg.inst.config,\n \"widgetConfig\": cfg.app.config\n },\n \"context\": {}\n };\n\n // update the respective nv pair\n payload.payload[k] = v;\n\n fhreq.POST(fhreq.getFeedHenryUrl(), \"box/srv/1.1/ide/\" + fhc.curTarget + \"/app/update\", payload, function (err, remoteData) {\n if (err) {\n log.error(\"Error updating app: \" + err);\n cb(err);\n }else {\n update.message = \"Property set ok\";\n if (remoteData.status !== 'ok') {\n update.message = \"Error setting property: \" + remoteData.message;\n return cb(remoteData.messsage, remoteData);\n }\n return cb(undefined, remoteData);\n }\n });\n });\n}", "addData(key, value) {\n precondition.ensureNotNull('this.ctxPtr', this.ctxPtr);\n precondition.ensureByteArray('key', key);\n precondition.ensureByteArray('value', value);\n\n // Copy bytes from JS memory to the WASM memory.\n const keySize = key.length * key.BYTES_PER_ELEMENT;\n const keyPtr = Module._malloc(keySize);\n Module.HEAP8.set(key, keyPtr);\n\n // Create C structure vsc_data_t.\n const keyCtxSize = Module._vsc_data_ctx_size();\n const keyCtxPtr = Module._malloc(keyCtxSize);\n\n // Point created vsc_data_t object to the copied bytes.\n Module._vsc_data(keyCtxPtr, keyPtr, keySize);\n\n // Copy bytes from JS memory to the WASM memory.\n const valueSize = value.length * value.BYTES_PER_ELEMENT;\n const valuePtr = Module._malloc(valueSize);\n Module.HEAP8.set(value, valuePtr);\n\n // Create C structure vsc_data_t.\n const valueCtxSize = Module._vsc_data_ctx_size();\n const valueCtxPtr = Module._malloc(valueCtxSize);\n\n // Point created vsc_data_t object to the copied bytes.\n Module._vsc_data(valueCtxPtr, valuePtr, valueSize);\n\n try {\n Module._vscf_message_info_custom_params_add_data(this.ctxPtr, keyCtxPtr, valueCtxPtr);\n } finally {\n Module._free(keyPtr);\n Module._free(keyCtxPtr);\n Module._free(valuePtr);\n Module._free(valueCtxPtr);\n }\n }", "function set(key, value, customStore = defaultGetStore()) {\n return customStore('readwrite', (store) => {\n store.put(value, key);\n return promisifyRequest(store.transaction);\n });\n }", "set(key, value) {\n this.store[key] = value;\n }" ]
[ "0.6758972", "0.6590196", "0.6290849", "0.6105442", "0.6020751", "0.6020751", "0.6020751", "0.60145736", "0.5919148", "0.5892519", "0.58784556", "0.5853578", "0.5824539", "0.5804394", "0.579675", "0.57560325", "0.5722774", "0.57019013", "0.56052977", "0.55995727", "0.55995727", "0.55933666", "0.554358", "0.55139256", "0.55139256", "0.55115056", "0.5474255", "0.54694265", "0.5459946", "0.54412824", "0.54278654", "0.5422363", "0.5411943", "0.5401408", "0.5399217", "0.5394042", "0.5386886", "0.53377444", "0.5334373", "0.5332345", "0.5322658", "0.53128374", "0.53070384", "0.53019685", "0.530053", "0.5295781", "0.5291099", "0.5291099", "0.52721804", "0.52700496", "0.5268457", "0.5264051", "0.52365404", "0.5234864", "0.52226156", "0.52186656", "0.5211072", "0.5200919", "0.5200157", "0.5200157", "0.51967996", "0.5193371", "0.51889634", "0.51853156", "0.5183628", "0.5182559", "0.5182285", "0.51809084", "0.5174547", "0.51706177", "0.5151818", "0.5148832", "0.5148731", "0.51316786", "0.5120411", "0.51166457", "0.5114375", "0.51115406", "0.5109533", "0.5109533", "0.5109533", "0.5109533", "0.5109533", "0.5104007", "0.50892425", "0.50890666", "0.50884545", "0.5087285", "0.50866574", "0.50857425", "0.50857216", "0.5084607", "0.5083506", "0.5083506", "0.50782406", "0.50736123", "0.50705487", "0.5065186" ]
0.6732072
3
Set key:value that will be sent as tags data with the event. Can also be used to unset a tag, by passing `undefined`.
function setTag(key, value) { callOnHub('setTag', key, value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setTag(key, value) {\n\t getCurrentHub().setTag(key, value);\n\t}", "function setTag(key, value) {\n hub.getCurrentHub().setTag(key, value);\n}", "set tag(value) {}", "set tag(value) {}", "set tag(value) {}", "set tag(value) {}", "setAttribute(key, value) {\n this.handleAttributeChange(key, value);\n\n if(isUndefined(value)) {\n delete this.$attributes[key];\n }\n else {\n this.$attributes[key] = value;\n }\n }", "_setAll(attr, value) {\n this._forEach(event => {\n event[attr] = value;\n });\n }", "function BOT_set(topic,key,tag,value) {\r\n\tvar t = (typeof(topic) == \"string\") ? eval(topic) : topic;\r\n\tvar ta = BOT_getTopicAttribute(topic, key);\r\n\tif(ta == undefined) return false;\r\n\tvar val = BOT_getTopicAttributeTagValue(ta,tag);\r\n\tif(val == undefined) return false;\r\n\tif(BOT_getTopicAttributeIndex == -1 || BOT_getTopicAttributeTagValueIndex == -1) return false;\r\n\tt[BOT_getTopicAttributeIndex][BOT_getTopicAttributeTagValueIndex][1] = value;\r\n\treturn true\r\n}", "function changeTags(value){\n setTags(value)\n console.log(tags)\n }", "function onAddTag(e){\n console.log(\"onAddTag: \", e.detail);\n console.log(\"original input value: \", input.value)\n tagify.off('add', onAddTag) // exmaple of removing a custom Tagify event\n }", "function setMapTagName(tag, x, y) {\n\t\tthis.tagName = tag;\n\t\tthis.tagNameXPos = x == null ? 0 : eval(x);\n\t\tthis.tagNameYPos = y == null ? 0 : eval(y);\n\t}", "tagChange(tag) {\n let tagPos = this.tags.indexOf(tag);\n if (tagPos === this.tags.length-1 && (tag.name !== '' || tag.value !== '')) this.addEmptyTag();\n }", "function onTagChange($e,$data){\n\t\t\taddTag($data.item.value);\n\t\t}", "function set(t, k, v) {\n var prev = t[k];\n if(prev === v) return;\n set_prev(t, k);\n t[k] = v;\n}", "set(key, val, on_response = empty_fun) {\n this.httpPost('set', function(resp) {\n on_response(resp.isOk());\n }, [key, _raw_size(val), val].join('\\n'));\n\n }", "setAttribute(key, value) {\n this.attributes[key] = value;\n }", "setAttribute(key, value) {\n this.attributes[key] = value;\n }", "set(k, v) {\n let prevV = this.kvStore[k];\n this.kvStore[k] = v;\n if (k in this.listeners) {\n for (let f of this.listeners[k]) {\n f(prevV, v);\n }\n }\n }", "set(key: K, val: V) {\n this.tree.remove([key, null]);\n this.tree.insert([key, val]);\n }", "function setOrUnset(obj, key, value) {\n\t\t\t\tif (value === undefined)\n\t\t\t\t\tdelete obj[key];\n\t\t\t\telse\n\t\t\t\t\tobj[key] = value;\n\t\t\t}", "set (key, value, ttl) {\n this.data[key] = value\n setTimeout(() => {\n delete this.data[key]\n }, ttl)\n }", "function setTags(tags) {\n callOnHub('setTags', tags);\n}", "function setTags(tags) {\n callOnHub('setTags', tags);\n}", "function setTags(tags) {\n callOnHub('setTags', tags);\n}", "setValue(key, value) {\n var node = document.getElementById(key);\n if (node != null)\n node.value = value;\n }", "set() {\n\n let kv = this.getKeyValue();\n let config = this.readSteamerConfig({ isGlobal: this.isGlobal });\n\n config[kv.key] = kv.value;\n\n this.createSteamerConfig(config, {\n isGlobal: this.isGlobal,\n overwrite: true,\n });\n\n }", "function setMotionValue(visualElement, key, value) {\n if (visualElement.hasValue(key)) {\n visualElement.getValue(key).set(value);\n }\n else {\n visualElement.addValue(key, motionValue(value));\n }\n}", "function setMotionValue(visualElement, key, value) {\n if (visualElement.hasValue(key)) {\n visualElement.getValue(key).set(value);\n }\n else {\n visualElement.addValue(key, motionValue(value));\n }\n}", "function setOrUnset(obj, key, value) {\n if (value === undefined)\n delete obj[key];\n else\n obj[key] = value;\n }", "function setOrUnset(obj, key, value) {\n if (value === undefined)\n delete obj[key];\n else\n obj[key] = value;\n }", "function set_metadata(key, value) {\n metaData[key] = value;\n}", "set(key, value) {\n this.frame.set(to_key(key), value);\n }", "function set(key, value) {\n self.storage.setItem(key, JSON.stringify(value));\n }", "function set(key, value) {\n self.storage.setItem(key, JSON.stringify(value));\n }", "function setObject(customData, element, key, value) {\n // Get the id for the element\n if (element.nodeType == 1 /* Element */) {\n var id = getAndSetNodeId(customData, element);\n if (id != '') {\n // Get the values for the element\n if (!customData.dict[id]) {\n // First time dictionary creation\n customData.dict[id] = {};\n }\n customData.dict[id][key] = value;\n }\n }\n}", "set(key, data) {\n this.sset(key, data)\n this.lset(key, data)\n }", "static set(key, value) {\r\n Object.set(Config.data, key, value); \r\n }", "function setEvent(target, value, descriptor, receiver) {\n var node39 = descriptor.node;\n var event40 = descriptor.event;\n var hash = TARGETEVENTMAP.get(target);\n var listener = hash[event40];\n if (listener) {\n node39.removeEventListener(event40, listener, listener.options);\n };\n if (value) {\n value.isEventListener = true;\n var boundListener = value.bind(receiver);\n boundListener.options = value.options;\n node39.addEventListener(event40, boundListener, boundListener.options);\n return hash[event40] = boundListener;\n };\n}", "onTagsAdded(event, key) {\n if (event.keyCode === 13 || event.keyCode === 188) {\n event.preventDefault();\n const { value } = event.target;\n if (!key.value) {\n key.value = [];\n }\n key.value.push(value);\n }\n\n if (key.value.length && event.keyCode === 8) {\n if (_.includes(key.value, event.target.value) || !event.target.value) {\n this.removeTagsAdded(key.value, key.value.length - 1);\n }\n }\n this.forceUpdate();\n }", "function _setOrUnset(obj, key, value) {\n if (value === undefined) {\n delete obj[key];\n } else {\n obj[key] = value;\n }\n}", "function toggleTag(tag) {\n //writeDebug(\"called toggleTag(\"+tag+\")\");\n\n var currentValues = $input.val() || '';\n currentValues = currentValues.split(/\\s*,\\s*/);\n var found = false;\n var newValues = new Array();\n for (var i = 0; i < currentValues.length; i++) {\n var value = currentValues[i];\n if (!value) \n continue;\n if (value == tag) {\n found = true;\n } else {\n if (value.indexOf(tag) != 0) {\n newValues.push(value);\n }\n }\n }\n\n if (!found) {\n newValues.push(tag)\n }\n //writeDebug(\"newValues=\"+newValues);\n\n setTags(newValues);\n }", "function set(context, key, value) {\n var userDefaults = getUserDefaults(context);\n userDefaults.setObject_forKey_(JSON.stringify(value), key);\n userDefaults.synchronize(); // save\n}", "function setMotionValue(visualElement, key, value) {\n if (visualElement.hasValue(key)) {\n visualElement.getValue(key).set(value);\n }\n else {\n visualElement.addValue(key, (0,_value_index_js__WEBPACK_IMPORTED_MODULE_0__.motionValue)(value));\n }\n}", "function setMotionValue(visualElement, key, value) {\n if (visualElement.hasValue(key)) {\n visualElement.getValue(key).set(value);\n }\n else {\n visualElement.addValue(key, (0,_value_index_js__WEBPACK_IMPORTED_MODULE_0__.motionValue)(value));\n }\n}", "function setTags(tags) {\n\t getCurrentHub().setTags(tags);\n\t}", "function setTags(tags) {\n hub.getCurrentHub().setTags(tags);\n}", "onDeleteTag(e){\n\n const {tagsList} = this.props.value;\n const span = e.target;\n\n const newValue = {\n ...this.props.value,\n tagsList: removeTag(tagsList, span.innerHTML)\n };\n\n this.props.onChange({\n value: newValue\n })\n\n }", "set keyname(keyname) {\n this.setAttribute('keyname', keyname);\n }", "set(key, value = undefined) {\n if(isArray(key) || isObject(key)) {\n this.setAttributes(key);\n }\n else {\n this.setAttribute(key, value);\n }\n\n return this;\n }", "function setValue(object, key, value) {\n object[key] = value;\n}", "function setValue(object, key, value) {\n object[key] = value;\n}", "onIdentifierChange(value, text) {\r\n this.tagId = null;\r\n this.tagAuditId = null;\r\n this.stateSet({ identifierField: value });\r\n }", "setConfig(k, v) {\n this._data[k] = v;\n }", "tryToSetTag(tag) {\n if (this.validateTagString(tag.tag)) {\n if (this.hasTag(tag.tag)) {\n this.removeTag(tag.tag);\n }\n this.__tags[tag.tag] = tag.value;\n this.__combinedTagString += `${tag.tag}:${tag.value}` + ' ';\n return true;\n }\n return false;\n }", "function obj_set(obj, k, v) {\n// print(888, obj, k, v) \n if (v != null) {\n obj[k] = v\n }\n}", "function setViewState(key, value) {\n var viewState = jq(document).data(\"ViewState\");\n if (!viewState) {\n viewState = new Object();\n jq(document).data(\"ViewState\", viewState);\n }\n viewState[key] = value;\n}", "set(key, value) {\n let index = this._hash(key);\n\n if (!this.data[index]) {\n this.data[index] = [];\n } else {\n for (let i = 0; i < this.data[index].length; i++) {\n //chech if the key exists\n if (this.data[index][i][0] == key) {\n this.data[index][i][1] = value;\n return;\n }\n }\n }\n this.data[index].push([key, value]);\n }", "handleEventChange(key, value) {\n let newEvents = this.state.events;\n let event = newEvents[this.state.index];\n event[key] = value;\n newEvents[this.state.index] = event;\n this.setState({events: newEvents});\n }", "static reviver(key, value) {\n return key === \"\" ? Event.fromJSON(value) : value;\n }", "set(key, value) {\n const created = Date.now() / 1000;\n this.items[key] = { created, value };\n }", "function setTagOpt( id, opt, val ){\n \"use strict\";\n var el = document.getElementById(id);\n el[opt] = val;\n}", "function setExtra(key, extra) {\n callOnHub('setExtra', key, extra);\n}", "function setExtra(key, extra) {\n callOnHub('setExtra', key, extra);\n}", "function setExtra(key, extra) {\n callOnHub('setExtra', key, extra);\n}", "setInfoKey(key, value) {\n let pair = this.data.info.find((pair) => {\n return pair.key === key;\n });\n let encodedValue;\n switch (typeof value) {\n case 'string':\n encodedValue = this.textEncoder.encode(value);\n break;\n case 'boolean':\n encodedValue = new Uint8Array([value ? 1 : 0]);\n break;\n default:\n throw new TypeError('Invalid value type, expected string or boolean.');\n }\n if (!pair) {\n pair = { key, value: encodedValue };\n this.data.info.push(pair);\n }\n else {\n pair.value = encodedValue;\n }\n }", "async setItem(tagoRunURL, key, value) {\n const result = await this.doRequest({\n path: `/run/${tagoRunURL}/sdb/${key}`,\n method: \"POST\",\n body: value,\n });\n return result;\n }", "setTagIds(event) {\n let tagIds = null;\n if (event.value.length) {\n tagIds = [];\n for (let i = 0; i < event.value.length; i++) {\n tagIds.push(event.value[i].id);\n }\n }\n this.postsService.post.tag_ids = tagIds;\n }", "function statehandler(key, value) {\n // console.log(\"key:\",key,\"value:\",value)\n // console.log(\"old state:\", user)\n setUser({...user, [key]: value});\n // console.log(\"latest state:\", user)\n }", "set(key, value) {\n const stringValue = typeof value === 'object' ? JSON.stringify(value) : value;\n this.storageMechanism.setItem(key, stringValue);\n }", "removeAttribute(key) {\n this.setAttribute(key, undefined);\n }", "function onTagChange() {\n\n\t}", "function addTagInternal( tag ) {\n if( typeof tag === 'string' && attrs.tagTitleField ) {\n var tmp = {};\n tmp[attrs.tagTitleField] = tag;\n tag = tmp;\n }\n\n scope.tags.push( tag );\n scope.inputText = '';\n scope.selection = -1;\n }", "setOption(state, {key, value}) {\n state.options[key] = value;\n }", "function handleSelectChange(e, value) {\n\t\tsetDisplayTag(e.target.value)\n\t}", "onTagged(doclet, tag) {\n doclet._isVueDoc = true;\n doclet._vueEvent = doclet._vueEvent || [];\n doclet._vueEvent.push(tag.value || {});\n }", "setKey(key) {\n super.setKey(key);\n this._value.forEach(v => v.setKey(key));\n }", "function handleTagSearch() {\n const newValues = document.getElementById('search_input').value\n setNewTagOption(newValues)\n console.log('newValues: ', newValues)\n }", "set userData(value) {}", "function setOption(key, value) {\n\toptions[key] = value;\n}", "function setExtra(key, extra) {\n\t getCurrentHub().setExtra(key, extra);\n\t}", "trackCustomEvent(context, eventName, keyValuePair) {\n let message = context.message;\n let address = message.address || {};\n let conversation = address.conversation || {};\n let user = address.user || {};\n let item = {\n timestamp: message.timestamp,\n channel: address.channelId,\n conversationId: conversation.id,\n userId: user.id,\n userName: user.name\n };\n //merge the custom properties with the defaults\n let eventData = Object.assign(item, keyValuePair);\n this.trackEvent(eventName, eventData);\n }", "attributeChangedCallback(key, o, n) {\n // assign attribute changes based on key\n this[`set${key}`](n)\n }", "function commonSetValue(tag, value)\n{\n\n//alert(tag + '<<<>>>>' + value);\n\n var s = document.getElementById(tag);\n s.value = value;\n\n}", "setAttr(_id, _key, _value, _noCache) {\n if (this.isntNullOrUndefined(this._elements[_id])) {\n this._setAttrDirect(_id, _key, _value);\n }\n }", "setAttr(_id, _key, _value, _noCache) {\n if (this.isntNullOrUndefined(this._elements[_id])) {\n this._setAttrDirect(_id, _key, _value);\n }\n }", "set(key, value) {\n this.store[key] = value;\n }", "set(key, value) {\n this.store[key] = value;\n }", "set(key, value) {\n this.store[key] = value;\n }", "set(key, value) {\n this.store[key] = value;\n }", "set(key, value) {\n this.store[key] = value;\n }", "updateTags(event) {\n this.setState({\n tagFilter: event.target.value,\n });\n }", "set(key, value) {\n this.store[key] = value;\n }", "static set(key, value) {\n PStore.set(key, value);\n }", "handleAttrChanged(event) {\n this.handleKeyDown(event);\n\n var target = event.target;\n\n if(this.selection.hasAttribute(target.value)) {\n this.valInput.value = this.selection.getAttribute(target.value);\n } else {\n this.valInput.value = \"\";\n }\n }", "function setRaw(key, value, opts) {\n return set(key, value, null, opts);\n}", "function setOptions(key, value) {\n context.opts[key] = value;\n}", "function putData(node, key, value) {\n key = key.trim();\n value = value.trim();\n\n var idKey = `key-${key.hashCode()}`;\n\n var test = $(`#${idKey}`);\n\n var containerNode;\n var dataNode;\n\n if (test.length == 0) {\n dataNode = $('<div />').addClass(\"data-display-container\");\n containerNode = $(`<li id=\"${idKey}\"/>`)\n .addClass(\"data-display-container list-group-item\")\n .append(dataNode);\n } else {\n containerNode = test;\n dataNode = containerNode\n .children()\n .first();\n }\n\n dataNode.text(`${key} = ${value}`);\n node.append(containerNode);\n}" ]
[ "0.7388252", "0.7276539", "0.69813716", "0.69813716", "0.69813716", "0.69813716", "0.6094972", "0.5852529", "0.58091134", "0.5667114", "0.5666816", "0.55955905", "0.5497818", "0.54907686", "0.5485501", "0.5475914", "0.54723275", "0.54723275", "0.5461666", "0.5406284", "0.5396662", "0.53945476", "0.5312272", "0.5312272", "0.5312272", "0.53039545", "0.530232", "0.5289902", "0.5289902", "0.5286191", "0.5286191", "0.52765375", "0.527404", "0.52728397", "0.52728397", "0.52728105", "0.5259795", "0.5221005", "0.5214703", "0.52062124", "0.52054644", "0.5198245", "0.5168829", "0.5159409", "0.5159409", "0.51380646", "0.5135001", "0.513388", "0.5127626", "0.5120152", "0.51107943", "0.51107943", "0.5084651", "0.50715905", "0.50680315", "0.5063251", "0.50623894", "0.50584185", "0.5053856", "0.5047523", "0.5038574", "0.5037038", "0.50357836", "0.50357836", "0.50357836", "0.50325096", "0.50306857", "0.50242543", "0.5011279", "0.50097466", "0.50079197", "0.50076574", "0.4992634", "0.49847403", "0.49775952", "0.49604508", "0.49554732", "0.49541965", "0.49522486", "0.49406865", "0.493766", "0.49353218", "0.49333948", "0.49329257", "0.4923157", "0.4923157", "0.49231198", "0.49231198", "0.49231198", "0.49231198", "0.49231198", "0.49214214", "0.49175438", "0.4917372", "0.49081388", "0.4907003", "0.49042562", "0.49038133" ]
0.7494077
2
Updates user context information for future events.
function setUser(user) { callOnHub('setUser', user); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "updateContext(context) {\n this.context = context\n }", "componentDidUpdate() {\n console.log('got context');\n if (typeof this.context.user !== 'undefined' && this.context.user !== null && !this.state.gotContext) {\n console.log('got context');\n this.setState({\n gotContext: true,\n userFullName: this.context.user.firstname + ' ' + this.context.user.lastname,\n });\n }\n }", "function setUserData() {\n //TODO: for non-social logins - userService is handling this - not a current issue b/c there is no data for these right after reg, but needs to be consistent!\n authService.setUserCUGDetails();\n authService.setUserLocation();\n authService.setUserPreferences();\n authService.setUserBio();\n authService.setUserBookings();\n authService.setUserFavorites();\n authService.setUserReviews();\n authService.setSentryUserContext();\n authService.setSessionStackUserContext();\n\n //was a noop copied from register controller: vm.syncProfile();\n }", "static handleProfileUpdate(newUserData) {\n let data = this.currentUserValue;\n\n if (newUserData.name) {\n data.user.name = newUserData.name;\n }\n\n if (newUserData.email) {\n data.user.email = newUserData.email;\n }\n\n _currentUserSubject.next(data);\n }", "function updateContext(values) {\n setContext({\n ...context,\n ...values\n })\n }", "function handleUpdateUser(userInfo) {\n api.setUserInfo(userInfo, token)\n .then(res => { setCurrentUser({ name: res.data.name, about: res.data.about, avatar: res.data.avatar }) })\n .then(() => { closeAllPopups() })\n .catch(err => console.log(err))\n }", "async run(context) {\n await super.run(context);\n await this.conversationState.saveChanges(context, false);\n await this.userState.saveChanges(context, false);\n }", "function updateCurrentUserProfile() {\n\n\n Debug.trace(\"Refreshing user profile...\");\n\n sharedServices.getCurrentUserProfile()\n .success(function (data, status, headers, config) {\n\n\n vm.currentUserProfile = data; //Used to determine what is shown in the view based on user Role.\n currentUserRoleIndex = vm.platformRoles.indexOf(data.Role) //<-- use PLATFORM roles, NOT ACCOUNT roles! Role will indicate what editing capabilites are available.\n\n Debug.trace(\"Profile refreshed!\");\n Debug.trace(\"Role index = \" + currentUserRoleIndex);\n\n })\n .error(function (data, status, headers, config) {\n\n\n })\n\n }", "async run(context) {\n await super.run(context);\n\n // Save any state changes. The load happened during the execution of the Dialog.\n await this.userState.saveChanges(context, false);\n await this.conversationState.saveChanges(context, false);\n }", "update() {\n localStorage.setItem('user', JSON.stringify(user))\n\n dataStore.set('config', user.config)\n dataStore.set('palette', user.palette)\n dataStore.set('projectPalette', user.projectPalette)\n dataStore.set('log', user.log)\n\n Log.refresh()\n }", "function updateCurrentUserProfile() {\n\n Debug.trace(\"Refreshing user profile...\");\n\n sharedServices.getCurrentUserProfile()\n .success(function (data, status, headers, config) {\n\n vm.currentUserProfile = data; //Used to determine what is shown in the view based on user Role.\n currentUserRoleIndex = vm.platformRoles.indexOf(data.Role) //<-- use PLATFORM roles, NOT ACCOUNT roles!\n\n Debug.trace(\"Profile refreshed!\");\n Debug.trace(\"Role index = \" + currentUserRoleIndex);\n\n })\n .error(function (data, status, headers, config) {\n\n\n })\n\n }", "async run(context) {\n await super.run(context);\n // Save any state changes. The load happened during the execution of the Dialog.\n await this.conversationState.saveChanges(context, false);\n await this.userState.saveChanges(context, false);\n }", "function updateContext() {\n\t// Switch the background image of the data – using an image to improve performance\n\tupdateContextBackgroundImage();\n\n\t// Mark each species in the context view, colored by threat level\n\t//contextCircles();\n\t//contextBars();\n\t\n\t// Draw rects for each family in context view, colored by threat level\n\t//contextFamilies();\n\t\n\t// Label each order with a line and its name\n\tcontextOrders();\n\t\n\t// Update context label\n\td3.select(\".contextlabel\").text(\"BROWSE ALL \"+getSingularFormClassname().toUpperCase()+\" SPECIES\")\t\n\t\t.attr(\"x\", function(d, i) {\n\t\t\tcontextlabelwidth = d3.select(this).node().getBBox().width\n\t\t\treturn x0;\n\t\t\t//return (divwidth/2)-(contextlabelwidth/2)\n\t\t\t})\n\t\td3.select(\".contextlabelhelperrect\").attr(\"x\", function () {\n\t\treturn x0-3;\n\t\t//return ((divwidth/2)-(contextlabelwidth/2))-contextlabelhelperrectspace;\n\t\t})\n\t\t.attr(\"width\", function() {return contextlabelwidth+(2*contextlabelhelperrectspace);}).attr(\"fill\", \"white\")\n\n\t\n\n}", "_onUserUpdated() {\n UserActions.setIsUpdating(false);\n UserActions.setIsRequesting(false);\n }", "async function updateCurrentUser() {\n currentUser = await User.getLoggedInUser(\n currentUser.loginToken,\n currentUser.username\n );\n }", "async _onStorageEvent() {\r\n if (this._deleted) {\r\n return;\r\n }\r\n const user = await this.assertedPersistence.getCurrentUser();\r\n if (!this.currentUser && !user) {\r\n // No change, do nothing (was signed out and remained signed out).\r\n return;\r\n }\r\n // If the same user is to be synchronized.\r\n if (this.currentUser && user && this.currentUser.uid === user.uid) {\r\n // Data update, simply copy data changes.\r\n this._currentUser._assign(user);\r\n // If tokens changed from previous user tokens, this will trigger\r\n // notifyAuthListeners_.\r\n await this.currentUser.getIdToken();\r\n return;\r\n }\r\n // Update current Auth state. Either a new login or logout.\r\n // Skip blocking callbacks, they should not apply to a change in another tab.\r\n await this._updateCurrentUser(user, /* skipBeforeStateCallbacks */ true);\r\n }", "async run(context) {\n await super.run(context);\n\n // Save any state changes. The load happened during the execution of the Dialog.\n await this.conversationState.saveChanges(context, false);\n await this.userState.saveChanges(context, false);\n }", "edit({ email, name, password, image }) {\n let details = { email, name, password, image };\n for (const key in details)\n if (details[key]) {\n currentUser[key] = details[key];\n }\n callFuture(updateUserListeners);\n }", "update(event) {\n console.log(\"User update\");\n return new Promise(function (resolve, reject) {\n var user = JSON.parse(event.body);\n if (typeof user === \"string\") {\n user = JSON.parse(user); // stringified twice somewhere create object.\n }\n tokenManager.getCredentialsFromToken(event, function (err, credentials) {\n // get the user pool id from the request\n if (credentials) {\n\n var userPoolId = getUserPoolIdFromRequest(event);\n\n // update user data\n cognitoUsers.updateUser(credentials, user, userPoolId, configuration.aws_region)\n .then(function (updatedUser) {\n resolve(updatedUser);\n })\n .catch(function (err) {\n reject(\"Error updating user: \" + err.message);\n });\n } else {\n console.log('Error retrieving credentials: err=' );\n\t\t console.log(err);\n reject(err);\n }\n });\n });\n }", "function HttpUserEvent() { }", "function HttpUserEvent() { }", "function HttpUserEvent() { }", "updateUserDetails() {\n if (!activeUser()) return;\n $(conversations_area).find(`[data-user-id=\"${activeUser().id}\"] .sb-name,.sb-top > a`).html(activeUser().get('full_name'));\n $(conversations_area).find('.sb-user-details .sb-profile').setProfile();\n SBProfile.populate(activeUser(), $(conversations_area).find('.sb-profile-list'));\n }", "async _onStorageEvent() {\r\n if (this._deleted) {\r\n return;\r\n }\r\n const user = await this.assertedPersistence.getCurrentUser();\r\n if (!this.currentUser && !user) {\r\n // No change, do nothing (was signed out and remained signed out).\r\n return;\r\n }\r\n // If the same user is to be synchronized.\r\n if (this.currentUser && user && this.currentUser.uid === user.uid) {\r\n // Data update, simply copy data changes.\r\n this._currentUser._assign(user);\r\n // If tokens changed from previous user tokens, this will trigger\r\n // notifyAuthListeners_.\r\n await this.currentUser.getIdToken();\r\n return;\r\n }\r\n // Update current Auth state. Either a new login or logout.\r\n await this._updateCurrentUser(user);\r\n }", "function updateUserInfo(id, user) {\n}", "async getUserInfo(ctx) {\r\n const { name } = ctx.state.user;\r\n ctx.body = { name };\r\n }", "function updateInfo() {\n let newVals = grabFormValues();\n $.ajax({\n dataType: 'json',\n type: 'PUT',\n data: newVals,\n async: false,\n url: 'api/employees/' + curUser._id,\n success: function(response) {\n console.log(response);\n localStorage.setItem('currentUser', JSON.stringify(response));\n curUser = JSON.parse(localStorage.getItem('currentUser'));\n showInfo();\n },\n });\n }", "async doUserUpdate () {\n\t\tconst now = Date.now();\n\t\tconst op = {\n\t\t\t$set: {\n\t\t\t\tisRegistered: true,\n\t\t\t\tmodifiedAt: now,\n\t\t\t\tregisteredAt: now,\n\t\t\t\t\"preferences.acceptedTOS\": true\n\t\t\t}, \n\t\t\t$unset: {\n\t\t\t\tconfirmationCode: true,\n\t\t\t\tconfirmationAttempts: true,\n\t\t\t\tconfirmationCodeExpiresAt: true,\n\t\t\t\t'accessTokens.conf': true,\n\t\t\t\tinviteCode: true,\n\t\t\t\tneedsAutoReinvites: true,\n\t\t\t\tautoReinviteInfo: true\n\t\t\t}\n\t\t};\n\n\t\tif (this.passwordHash) {\n\t\t\top.$set.passwordHash = this.passwordHash;\n\t\t}\n\n\t\t['email', 'username', 'fullName', 'timeZone'].forEach(attribute => {\n\t\t\tif (this.data[attribute]) {\n\t\t\t\top.$set[attribute] = this.data[attribute];\n\t\t\t}\n\t\t});\n\t\tif (this.data.email) {\n\t\t\top.$set.searchableEmail = this.data.email.toLowerCase();\n\t\t}\n\n\t\tif ((this.user.get('teamIds') || []).length > 0) {\n\t\t\tif (!this.user.get('joinMethod')) {\n\t\t\t\top.$set.joinMethod = 'Added to Team';\t// for tracking\n\t\t\t}\n\t\t\tif (!this.user.get('primaryReferral')) {\n\t\t\t\top.$set.primaryReferral = 'internal';\n\t\t\t}\n\t\t\tif (\n\t\t\t\t!this.user.get('originTeamId') &&\n\t\t\t\tthis.teamCreator && \n\t\t\t\tthis.teamCreator.get('originTeamId')\n\t\t\t) {\n\t\t\t\top.$set.originTeamId = this.teamCreator.get('originTeamId');\n\t\t\t}\n\t\t}\n\n\t\tthis.request.transforms.userUpdate = await new ModelSaver({\n\t\t\trequest: this.request,\n\t\t\tcollection: this.request.data.users,\n\t\t\tid: this.user.id\n\t\t}).save(op);\n\t}", "async updateUser () {\n\t\tawait this.getFirstTeam();\t\t// get the first team the user is on, if needed, this becomes the \"origin\" team\n\t\tawait this.getTeamCreator();\t// get the creator of that team\n\t\tawait this.doUserUpdate();\t\t// do the actual update\n\t}", "updateUser (context, user) {\n context.commit('updateUser', user)\n }", "function HttpUserEvent() {}", "function HttpUserEvent() {}", "function directUserFromUpdateInfo () {\n if (nextStep == \"The role for an existing employee\") {\n updateEmployeeRole();\n }\n }", "function updateUserInformation(){\n\tconsole.log('function: updateUserInformation');\n\t$().SPServices({\n\t\toperation: \"UpdateListItems\",\n\t\twebURL: siteUrl,\n\t\taync: false,\n\t\tbatchCmd: \"Update\",\n\t\tlistName: \"ccUsers\",\n\t\tID: userId,\n\t\tvaluepairs:[\n\t\t\t\t\t\t[\"Title\", personInformation().pseudoName ], \n\t\t\t\t\t\t[\"PERSON_EMAIL\", personInformation().personEmail], \n\t\t\t\t\t\t[\"P_LAST_NAME\", personInformation().personLastName],\t\n\t\t\t\t\t\t[\"P_FIRST_NAME\", personInformation().personFirstName], \n\t\t\t\t\t\t[\"PERSON_ROLE\", personInformation().personRole], \n\t\t\t\t\t\t[\"PERSON_RANK\", personInformation().personRank], \n\t\t\t\t\t\t[\"PERSON_DIRECTORATE\", personInformation().personDirectorate],\n\t\t\t\t\t\t[\"PERSON_ACTIVE\", personInformation().personActive], \n\t\t\t\t\t\t[\"PERSON_ATTRIBUTES\", personAttributes()],\n\t\t\t\t\t\t[\"PERSON_TRAINING\", personTraining()]\n\t\t\t\t\t],\n\t\tcompletefunc: function(xData, Status){\n\t\t\tconsole.log('update user account succesfully');\n\t\t}\n\t});\n\tsetTimeout(function(){\n\t\tsetUserInformationRedirect(userId);\n\t}, 2000);\n}", "async function updateProfileEvents() {\n updateUserEventsParticipating();\n updateUserEventsVolunteering();\n await updateUserEventsHosting();\n setDefaultTab();\n}", "function api_updateuser(ctx, newuser) {\n newuser.a = 'up';\n res = api_req(newuser, ctx);\n}", "_updateUser() {\n\t\tconst user = UserStore.activeUser();\n\t\tconst authInfo = UserStore.activeAuthInfo();\n\t\tconst emails = user && user.UID ? UserStore.emails.get(user.UID) : null;\n\t\tconst primaryEmail = emails && !emails.Error ? emails.filter(e => e.Primary).map(e => e.Email)[0] : null;\n\n\t\tif (this._authInfo !== authInfo) {\n\t\t\tif (this._authInfo && this._authInfo.UID && (!authInfo || this._authInfo.UID !== authInfo.UID)) {\n\t\t\t\t// The user logged out or another user logged in on the same browser.\n\n\t\t\t\t// Distinguish between 2 users who log in from the same browser; see\n\t\t\t\t// https://github.com/amplitude/Amplitude-Javascript#logging-out-and-anonymous-users.\n\t\t\t\tif (this._amplitude) this._amplitude.regenerateDeviceId();\n\n\t\t\t\t// Prevent the next user who logs in (e.g., on a public terminal) from\n\t\t\t\t// seeing the previous user's Intercom messages.\n\t\t\t\tif (this._intercom) this._intercom(\"shutdown\");\n\n\t\t\t\tif (this._fullStory) this._fullStory.clearUserCookie();\n\t\t\t}\n\n\t\t\tif (authInfo) {\n\t\t\t\tif (this._amplitude && authInfo.Login) this._amplitude.setUserId(authInfo.Login || null);\n\t\t\t\tif (window.ga && authInfo.Login) window.ga(\"set\", \"userId\", authInfo.Login);\n\n\t\t\t\tif (this._telligent && authInfo.Login) this._telligent(\"setUserId\", authInfo.Login);\n\n\t\t\t\tif (authInfo.UID) this.setIntercomProperty(\"user_id\", authInfo.UID.toString());\n\t\t\t\tif (authInfo.IntercomHash) this.setIntercomProperty(\"user_hash\", authInfo.IntercomHash);\n\t\t\t\tif (this._fullStory && authInfo.Login) {\n\t\t\t\t\tthis._fullStory.identify(authInfo.Login);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (this._intercom) this._intercom(\"boot\", this._intercomSettings);\n\t\t}\n\t\tif (this._user !== user && user) {\n\t\t\tif (user.Name) this.setIntercomProperty(\"name\", user.Name);\n\t\t\tif (this._fullStory) this._fullStory.setUserVars({displayName: user.Name});\n\t\t\tif (user.RegisteredAt) {\n\t\t\t\tthis.setUserProperty(\"registered_at\", new Date(user.RegisteredAt).toDateString());\n\t\t\t\tthis.setIntercomProperty(\"created_at\", new Date(user.RegisteredAt).getTime() / 1000);\n\t\t\t}\n\t\t}\n\t\tif (this._primaryEmail !== primaryEmail) {\n\t\t\tif (primaryEmail) {\n\t\t\t\tthis.setUserProperty(\"email\", primaryEmail);\n\t\t\t\tthis.setIntercomProperty(\"email\", primaryEmail);\n\t\t\t\tif (this._fullStory) this._fullStory.setUserVars({email: primaryEmail});\n\t\t\t}\n\t\t}\n\n\t\tthis._user = user;\n\t\tthis._authInfo = authInfo;\n\t\tthis._primaryEmail = primaryEmail;\n\t}", "function setCurrUser(uId, fullName) {\r\n userId = uId;\r\n currFullName = fullName;\r\n eventBuildHref();\r\n drawCalendar(currDate, duration);\r\n pnlClose();\r\n}", "async function updateUserState(UserInfo) {\n let startTime = new Date();\n const user = await userModel.findById(UserInfo.id);\n\n if (!user) {\n const newUser = new userModel({\n _id: UserInfo.id,\n userName: UserInfo.member.username,\n startingTime: startTime,\n totalTime: 0,\n //connected on voice\n OnVoice: true,\n });\n await newUser.save().catch((e) => console.log(`Failed to save new user.`));\n //stop the execution\n return console.log(\"new user saved\");\n }\n\n //if user is in database\n user.startingTime = startTime;\n user.OnVoice = true;\n\n await user\n .save()\n .catch((e) => console.log(`Failed to update user state in DB ${e}`));\n return console.log(\"user updated saved\");\n}", "async function refreshContext() {\n // Clone context to avoid potential side effects\n freshContext = _.cloneDeep(context);\n // Accept streamQueries in JSON format for batchCalls\n freshContext.acceptStreamsQueryNonStringified = true;\n const access = freshContext.access;\n await freshContext.retrieveStreams(storageLayer);\n if (! access.isPersonal()) access.loadPermissions(freshContext.streams);\n }", "function updateCurrentUserProfile() {\n\n //Debug.trace(\"Refreshing user profile...\");\n\n sharedServices.getCurrentUserProfile()\n .success(function (data, status, headers, config) {\n\n vm.currentUserProfile = data; //Used to determine what is shown in the view based on user Role.\n currentUserRoleIndex = vm.userRoles.indexOf(data.Role) //<-- use ACCOUNT roles, NOT PLATFORM roles!\n\n if (vm.currentUserProfile.Id == \"\" || vm.currentUserProfile == null)\n {\n //Log user out if empty\n window.location.replace(\"/login\");\n }\n\n //Debug.trace(\"Profile refreshed!\");\n //Debug.trace(\"Role index = \" + currentUserRoleIndex);\n\n })\n .error(function (data, status, headers, config) {\n\n\n })\n\n }", "function updateCurrentUserProfile() {\n\n //Debug.trace(\"Refreshing user profile...\");\n\n sharedServices.getCurrentUserProfile()\n .success(function (data, status, headers, config) {\n\n vm.currentUserProfile = data; //Used to determine what is shown in the view based on user Role.\n currentUserRoleIndex = vm.userRoles.indexOf(data.Role) //<-- use ACCOUNT roles, NOT PLATFORM roles!\n\n if (vm.currentUserProfile.Id == \"\" || vm.currentUserProfile == null)\n {\n //Log user out if empty\n window.location.replace(\"/login\");\n }\n\n //Debug.trace(\"Profile refreshed!\");\n //Debug.trace(\"Role index = \" + currentUserRoleIndex);\n\n })\n .error(function (data, status, headers, config) {\n\n\n })\n\n }", "update(context, user){\n context.showAlert = false \n context.showSuccess = false \n HTTP.put(USERS, user)\n .then((resp) => {\n if (resp.status>= 200 && resp.status <=300){\n var id = resp.data.id\n context.showAlert = false \n }\n context.showSuccess = true\n context.successMsg = \"Users updated successfully\"\n })\n .catch((err) => {\n context.showAlert = true\n console.log(err)\n if (err.response) {\n context.errMsg = err.response.data\n console.log(err.response.data);\n console.log(err.response);\n context.showAlert = true \n }\n })\n }", "function updateCurrentUserProfile() {\n\n //Debug.trace(\"Refreshing user profile...\");\n\n sharedServices.getCurrentUserProfile()\n .success(function (data, status, headers, config) {\n\n vm.currentUserProfile = data; //Used to determine what is shown in the view based on user Role.\n currentUserRoleIndex = vm.accountRoles.indexOf(data.Role) //<-- use PLATFORM roles, NOT platform roles!\n\n if (vm.currentUserProfile.Id == \"\" || vm.currentUserProfile == null)\n {\n //Log user out if empty\n window.location.replace(\"/login\");\n }\n\n //Debug.trace(\"Profile refreshed!\");\n //Debug.trace(\"Role index = \" + currentUserRoleIndex);\n\n })\n .error(function (data, status, headers, config) {\n\n\n })\n\n }", "async onLoad(options) {\n console.log('profile-update', options)\n this.setData(options)\n this.initValidate()\n const user = wx.getStorageSync('current_user')\n console.log('id', user.user.id)\n this.setData({\n user: await getUserDetails(user.user.id)\n })\n }", "function update() {\n // PREPARE\n let uid = $rootScope.account.authData.uid;\n let profile = $rootScope.account.profile;\n\n // NEW USER ACTION\n if (profile.newUser) {\n instance.addAchievement(profile, ACHIEVEMENTS.PROFILE_COMPLETED);\n profile.newUser = false;\n }\n\n // UPDATE\n $rootScope.db.users.child(uid).update(profile);\n\n // NOTIFY\n BroadcastService.send(EVENTS.PROFILE_UPDATED, profile);\n }", "_notifyListenersIfCurrent(user) {\r\n if (user === this.currentUser) {\r\n this.notifyAuthListeners();\r\n }\r\n }", "_notifyListenersIfCurrent(user) {\r\n if (user === this.currentUser) {\r\n this.notifyAuthListeners();\r\n }\r\n }", "authUser (state, userData) {\n \t\tstate.idToken = userData.token\n \t\tstate.userId = userData.userId\n \t}", "function ApproveUserToWatchActivity(event) {\n\n\n // If it is, compile all user info into one object\n var ApproveUserToWatchActivityRecord = {\n 'ApprovedToWatchDate': localStorage.getItem('CurrentDate'),\n 'UserID': localStorage.getItem('UserIDtoApprove'),\n 'ActivityID': localStorage.getItem('CurrentActivity'),\n 'RequestStatus': 'approved',\n }\n\n\n // If they did, do our delete\n $.ajax({\n type: 'POST',\n data: ApproveUserToWatchActivityRecord,\n url: '/AppEngine/ApproveUserToWatchActivity/',\n dataType: 'JSON'\n }).done(function( response ) {\n \n\n });\n\n }", "static setEvent(event) {\n contextEvent.set(event);\n }", "_before(uid) {\n const context = this._contexts.get(uid);\n if (context !== undefined) {\n this._enterContext(context);\n }\n }", "function saveContext() {\n context.save();\n }", "myUpdates(parent, args, ctx, info) {\n if (!ctx.request.userId) {\n throw new Error(\"You must be logged in\");\n }\n // query parameters where author is the current user\n return ctx.db.query.updates(\n {\n where: {\n user: {\n id: ctx.request.userId,\n },\n },\n },\n info\n );\n }", "function handleUpdateUser(name, about) {\n api.changeUserInfo({ name, about })\n .then((userData) => {\n setCurrentUser(userData.data)\n })\n .then(closeAllPopups)\n .catch(err => console.log(\"Error: \" + err));\n }", "updateLoggingContext() {\n setCurrentRequestId(this.invokeId);\n }", "onConversationUpdateActivity(context) {\n return __awaiter(this, void 0, void 0, function* () {\n yield this.handle(context, 'ConversationUpdate', () => __awaiter(this, void 0, void 0, function* () {\n yield this.dispatchConversationUpdateActivity(context);\n }));\n });\n }", "async sendUser(ctx, value) {\n let options = {\n headers: {\n \"Content-Type\": \"application/json\",\n \"X-Master-Key\": ctx.state.apiKey, \n \"X-Bin-Versioning\": \"false\"\n }\n }\n try {\n let data = await ax.put(`${ctx.state.apiUrl}`, {\n events: ctx.state.events,\n user: value,\n }, options)\n console.log('data', data.data.data.events)\n ctx.commit('showEvents', data.data.record.events)\n\n } catch (error) {\n console.log(error)\n }\n }", "async postProcess () {\n\t\t// publish the now-registered-and-confirmed user to all the team members\n\t\tawait this.publishUserToTeams();\n\t\t\n\t\t// the confirm-helper might have its own post-request processing...\n\t\tawait this.helper.postProcess();\n\t}", "async refreshUser(context) {\n if (!context.getters.logined) return;\n\n if (!context.getters.offline) {\n const validate = await Auth.Yggdrasil.validate({\n accessToken: context.state.accessToken,\n clientToken: context.state.clientToken,\n }, context.getters.authService);\n\n if (validate) {\n context.dispatch('checkLocation');\n return;\n }\n try {\n const result = await Auth.Yggdrasil.refresh({\n clientToken: context.state.clientToken,\n accessToken: context.state.accessToken,\n });\n context.commit('login', { auth: result });\n context.dispatch('checkLocation');\n context.dispatch('refreshInfo').catch(_ => _);\n } catch (e) {\n context.commit('logout');\n }\n }\n\n context.dispatch('refreshSkin').catch(_ => _);\n }", "function ApproveUserToManageActivity(event) {\n\n\n // If it is, compile all user info into one object\n var ApproveUserToManageActivityRecord = {\n 'ApprovedToManageDate': localStorage.getItem('CurrentDate'),\n 'UserID': localStorage.getItem('UserIDtoApprove'),\n 'ActivityID': localStorage.getItem('CurrentActivity'),\n 'RequestStatus': 'approved',\n }\n\n\n // If they did, do our delete\n $.ajax({\n type: 'POST',\n data: ApproveUserToManageActivityRecord,\n url: '/AppEngine/ApproveUserToManageActivity/',\n dataType: 'JSON'\n }).done(function( response ) {\n \n\n });\n\n }", "handleUpdatingUserMeta(key, value) {\n let uid = this.state.user.metadata.uid;\n this.props.updateUserMetadata(uid, key, value);\n }", "setUserData(state, user){\n console.log(\"[DEUG] setUserData: \", user)\n state.user = user;\n }", "async function update(data) {\n console.debug(\"Update\");\n const user = await JoblyApi.updateUserInfo(currentUser.username, data);\n setCurrentUser(user);\n }", "triggerContextUpdate() {\n if (typeof this.setState !== 'function') {\n throw new Error(\n '[ProviderStore.triggerContextUpdate()] setState() is not configured: Unable to trigger a context update'\n );\n }\n\n this.setState(this.clone());\n }", "function updateUser() {\n try {\n selectedUser.username = $usernameFld.val();\n selectedUser.password = $passwordFld.val();\n selectedUser.firstName = $firstNameFld.val();\n selectedUser.lastName = $lastNameFld.val();\n selectedUser.role = $roleFld.val();\n userService.updateUser(selectedUserId, selectedUser)\n .then(function (userServerInfo) {\n users[editIndex] = selectedUser;\n renderUsers(users);\n resetInputFields();\n clearSelected();\n });\n }\n // In future could catch null error or could grey out checkmark icon.\n catch (err) {\n console.log(err.name + \": \" + err.message);\n }\n }", "[Type.CHANGE_USER_INFO](state, payload) {\n state.userInfo = payload\n }", "runAuthChangeHandler() {\n for (var i = 0; i < this.authObservers_.length; i++) {\n this.authObservers_[i](this['currentUser']);\n }\n }", "function editUser(event) {\n var editButton = $(event.currentTarget);\n var userId = editButton\n .parent()\n .parent()\n .parent()\n .attr('id');\n userId = parseInt(userId);\n currentUserID = userId;\n userService\n .findUserById(userId)\n .then(renderUser);\n }", "updateAuthenticatedUser() {\n if (__WEBPACK_IMPORTED_MODULE_1__Client__[\"a\" /* client */].enableOauth)\n this.resetToken();\n else\n this.updateCredentials();\n }", "runIdTokenChangeHandler() {\n for (var i = 0; i < this.idTokenObservers_.length; i++) {\n this.idTokenObservers_[i](this['currentUser']);\n }\n }", "UPDATE_USER_INFO (state, payload) {\n const userInfo = {\n token : payload.access_token,\n expiry : (new Date()).getTime() + payload.expires_in,\n user : payload.user\n }\n // Store data in localStorage\n localStorage.setItem('userInfo', JSON.stringify(userInfo))\n\n }", "function setContext() {\n\n $context = $( Config.get( 'context' ) );\n\n }", "async setUserData() {\n\t\tvar userinfo;\n\t\tawait AppX.fetch('User', 'self').then(async result => {\n\t\t\tvar info = result.data;\n\t\t\tglobal.userLogin = info.login;\n\n\t\t\tawait AppX.fetch('OrganizationDetail', info.organizationUid).then(result => {\n\t\t\t\tglobal.userOrgName = result.data.name;\n\t\t\t});\n\n\t\t});\n\t}", "set_user(on) { store.dispatch(hpUser(on)); }", "function handleUserChangeSuccess() {\n var user = userState.user();\n $scope.userNickname = user ? user.nickname : undefined;\n updateCanShowRootOperations();\n }", "function setUser(response, notify) {\n if (notify == null) {\n notify = true;\n }\n if (response == null) {\n user = null;\n }\n else {\n user = formatUserData(response);\n usersFactory.updateUser(user);\n displayTypesFactory.updateConfig(response.notifications.internal);\n }\n if (CONFIG.dev) {\n cozenEnhancedLogs.info.functionCalled('userFactory', 'setUser');\n console.log(response);\n }\n if (notify) {\n _notify();\n }\n }", "function userEventChange(key) {\n\tconsole.log(\"USER EVENT_KEY CHANGE TO \" + key);\n\tevent.key = key;\n\tinitialUpdateData();\n}", "function applyTemporaryUserData() {\n $.extend(true, mUserData, mUserDataChangeTemp);\n $.extend(true, mUserDataChange, mUserDataChangeTemp);\n clearTemporaryUserData();\n }", "setUser(state, newUser) {\n state.user = newUser;\n }", "setCurrentUser (user, id) {\n resourceCache.addItem('users', user)\n }", "updateUserID (e) {\n let id\n id = e.target.parentElement.parentElement.children[1].children[4].lastChild.data\n localStorage.setItem(\"currentUserId\", JSON.stringify(id));\n }", "function updateCurrentUser(){\n console.log(\"update\");\n firebase.database().ref(\"/users\").child(thisUserId).update({\n sessions: thisSession,\n ipAddresses: ips\n });\n}", "function addUsernameToContextIfNeeded(bot, update, next) {\n const userText = update.message.text;\n const watsonUpdate = update.watsonUpdate;\n\n const changeUsernameIntentCondition = (watsonUpdate.intents.length > 0) &&\n (watsonUpdate.intents[0].intent === 'setUsername') &&\n (watsonUpdate.intents[0].confidence > 0.5);\n\n if ((!update.context.username || changeUsernameIntentCondition) &&\n watsonUpdate.output.text && watsonUpdate.output.text.join('').indexOf('{\"username\"}') > -1) {\n //return \"John....\";\n update.context.username = userText;\n store.updateContext(update.sender.id, update.context);\n console.log(\"are we heading here...\");\n next();\n \n /*\n return externalServices.nameExtractor.getNameFromText(userText)\n\n .then((nameBody) => {\n if (nameBody.Name) {\n update.context.username = nameBody.Name.coveredText;\n } else {\n // if we couldn't find the name, we fallback to entire first message'\n update.context.username = userText;\n }\n\n store.updateContext(update.sender.id, update.context);\n next();\n });\n */\n }\n\n return next();\n}", "showUserInfo(event, userId){\n var self = this;\n console.log(userId);\n self.props.appContext.setState({contentDetails:self.props.appContext.loading})\n axios.get(self.props.appContext.apiBaseUrl+ 'user/' + userId,{})\n .then(function (response) {\n var shiftEditor = <UserDetails appContext={self.props.appContext} data={response.data} userId={self.userId}/>;\n self.props.appContext.setState({contentDetails:shiftEditor})\n\n });\n }", "AUTH_USER (state, userData) {\n state.idToken = userData.token\n state.userId = userData.userId\n }", "dispatchConversationUpdateActivity(context) {\n return __awaiter(this, void 0, void 0, function* () {\n if (context.activity.membersAdded && context.activity.membersAdded.length > 0) {\n yield this.handle(context, 'MembersAdded', this.defaultNextEvent(context));\n }\n else if (context.activity.membersRemoved && context.activity.membersRemoved.length > 0) {\n yield this.handle(context, 'MembersRemoved', this.defaultNextEvent(context));\n }\n else {\n yield this.defaultNextEvent(context)();\n }\n });\n }", "auth_user_data(state, user){\n state.auth_user = user\n }", "mergeUserDataWithCurrentState(stateChange) {\n return Object.assign(this.props.user, stateChange);\n }", "function updateUsers() {\n\tupdateUsersFunc(function() {\n\t});\n}", "function updateAllUsersLS() {\n\tif(DEBUG) console.info(\"Updating Last Seen info of everybody.\");\n\t\n\tfor (var i in usersOnThisPage) {\n\t\tgetUserOptions(i);\n\t}\n}", "function ContextAPI() {\n }", "function doRefresh() {\n\n\t\t\t//** rewrite to update profile\n\n\t\t\tconsole.log($scope.authData);\n\t\t\tif ($scope.authData.hasOwnProperty('uid')) { // when logged in\n\t\t\t\tProfile.getProfile($scope.authData.uid).then(\n\t\t\t\t\tfunction (userData) {\n\t\t\t\t\t\t$scope.userData = userData;\n\t\t\t\t\t\tconsole.log(userData)\n\t\t\t\t\t},\n\t\t\t\t\tfunction (error) {\n\t\t\t\t\t\tCodes.handleError(error);\n\t\t\t\t\t}\n\t\t\t\t)\n\t\t\t}\n\n\t\t\t$scope.$broadcast('$rootScope.refresh', {});\n\n\t\t}", "function UserProfile() {\n const { language } = useContext(LangContext);\n const [user, setUser] = useState([]);\n\n /**\n * Calls Api function to get logged in user and sets as current user\n */\n const getUser = () => {\n UserApi.getLoggedInUser().then((res) => {\n setUser(res.data);\n });\n };\n\n /**\n * When loading user profile page, calls Api function to get logged in user and sets as current user\n */\n useEffect(() => {\n getUser();\n }, []);\n\n /**\n *\n * @param {String} address\n * Calls Api to update address of the current user and \n * if update successful alerts the user that address is updated\n */\n function updatedAddress(address) {\n UserApi.updateAddress(address)\n .then((res) => {\n alert(language.Address_Updated);\n })\n .catch((err) => console.log(err));\n }\n\n /**\n *\n * @param {String} phoneno\n * Calls Api to update phoneno of the current user and \n * if update successful alerts the user that phoneno is updated\n */\n function updatedPhoneno(phoneno) {\n UserApi.updatePhoneno(phoneno)\n .then((res) => {\n alert(language.Phoneno_Updated);\n })\n .catch((err) => console.log(err));\n }\n\n /**\n * \n * @param {String} image \n * Calls Api to update profile picture url of the current user and \n * if update successful alerts the user that profile picture is updated\n */\n function updatedPic(image) {\n UserApi.updateProfilepic(image)\n .then((res) => {\n alert(language.Profile_picture_Updated);\n setUser(res.data);\n })\n .catch((err) => console.log(err));\n }\n\n return (\n <div>\n <UserProfileForm\n user={user}\n onUpdateAddressClick={updatedAddress}\n onUpdatePhoneClick={updatedPhoneno}\n onUpdatePicClick={updatedPic}\n />\n </div>\n );\n}", "function updateDisplay() {\n UserService.getUserInfo().then(function(response) {\n displayLogs();\n })\n }", "updateContext (state, { key, value }) {\n if (value) {\n Vue.set(state.context, key, {...state.context[key], ...value})\n } else {\n Vue.delete(state.context, key)\n }\n }", "async setUsersStatusToLoggedIn(user) {\n const hoursToStayLoggedIn = 24;\n const now = new Date();\n user.loggedInUntil = now.setHours(now.getHours() + hoursToStayLoggedIn);\n await this.chatDAO.updateUser(user);\n }", "function authUser() {\n FB.Event.subscribe('auth.statusChange', handleStatusChange);\n}", "function _notify() {\n $rootScope.$emit('userFactoryUserChanged');\n }", "setUser(newUser) {\n this.user = newUser\n }", "function success(contextFactor) {\n updateAndSetActive(store, contextFactor, ContextFactor, 'contextFactor')\n}" ]
[ "0.6369064", "0.59410673", "0.5883571", "0.5823498", "0.58158994", "0.5797714", "0.5773172", "0.5585451", "0.5561918", "0.55434614", "0.5541032", "0.5539337", "0.5529001", "0.5509531", "0.55050945", "0.5501049", "0.54961145", "0.5471879", "0.5470844", "0.5469577", "0.5469577", "0.5469577", "0.5469495", "0.5452825", "0.5449015", "0.54167587", "0.5399564", "0.5392842", "0.53859615", "0.53850806", "0.53732866", "0.53732866", "0.5365505", "0.5363287", "0.5360468", "0.53389794", "0.53008497", "0.52825516", "0.5281216", "0.5280408", "0.52770805", "0.52770805", "0.52750933", "0.526404", "0.5257093", "0.5256919", "0.52550036", "0.52550036", "0.52511966", "0.52502596", "0.52486", "0.52308017", "0.52257466", "0.52043235", "0.51737857", "0.5159242", "0.5155221", "0.5151175", "0.51467836", "0.51444805", "0.51399535", "0.5136617", "0.5126629", "0.5125603", "0.51223814", "0.5121043", "0.51209074", "0.5110196", "0.51076674", "0.5106876", "0.51051307", "0.51014805", "0.5095105", "0.50853395", "0.50742877", "0.5070097", "0.5065914", "0.50605917", "0.5056957", "0.5056926", "0.5050279", "0.5040146", "0.5036818", "0.50300026", "0.50288635", "0.5023807", "0.502334", "0.5013986", "0.5002412", "0.50020456", "0.500094", "0.49975133", "0.49869114", "0.49752223", "0.49748194", "0.49606496", "0.49547493", "0.49542606", "0.49530274", "0.49425697", "0.4942402" ]
0.0
-1
Creates a new scope with and executes the given operation within. The scope is automatically removed once the operation finishes or throws. This is essentially a convenience function for: pushScope(); callback(); popScope();
function withScope(callback) { callOnHub('withScope', callback); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function withScope(callback) {\r\n callOnHub('withScope', callback);\r\n}", "function withScope(callback) {\n\t getCurrentHub().withScope(callback);\n\t}", "function withScope(callback) {\n getCurrentHub().withScope(callback);\n }", "function withScope(callback) {\n hub.getCurrentHub().withScope(callback);\n}", "function Scope(fn, context, priority, name, onExecuteCb, onExecuteContext) {\n _.extend(this, {\n fn: fn,\n context: context,\n priority: priority,\n 'Name': name,\n onExecuteCb: onExecuteCb,\n onExecuteContext: onExecuteContext,\n subScopes: []\n });\n}", "addScopeListener(callback) {\n this._scopeListeners.push(callback);\n }", "addScopeListener(callback) {\n this._scopeListeners.push(callback);\n }", "addScopeListener(callback) {\n\t this._scopeListeners.push(callback);\n\t }", "addOperation(operation) {\n this.operations.push(async () => {\n try {\n this.actives++;\n await operation();\n this.actives--;\n this.completed++;\n this.parallelExecute();\n }\n catch (error) {\n this.emitter.emit(\"error\", error);\n }\n });\n }", "addOperation(operation) {\n this.operations.push(async () => {\n try {\n this.actives++;\n await operation();\n this.actives--;\n this.completed++;\n this.parallelExecute();\n }\n catch (error) {\n this.emitter.emit(\"error\", error);\n }\n });\n }", "function configureScope(callback) {\r\n callOnHub('configureScope', callback);\r\n}", "function configureScope(callback) {\n callOnHub('configureScope', callback);\n}", "function configureScope(callback) {\n callOnHub('configureScope', callback);\n}", "function configureScope(callback) {\n callOnHub('configureScope', callback);\n}", "function configureScope(callback) {\n callOnHub('configureScope', callback);\n}", "function configureScope(callback) {\n\t getCurrentHub().configureScope(callback);\n\t}", "function configureScope(callback) {\n hub.getCurrentHub().configureScope(callback);\n}", "function leave(node) {\n if (createsNewScope(node)) {\n let currentScope = scopeChain.pop();\n printScope(currentScope, node);\n programScopes.push(currentScope);\n }\n}", "function operation(cm, f) {\n\t\t return function() {\n\t\t if (cm.curOp) { return f.apply(cm, arguments) }\n\t\t startOperation(cm);\n\t\t try { return f.apply(cm, arguments) }\n\t\t finally { endOperation(cm); }\n\t\t }\n\t\t }", "function operation(cm, f) {\n return function() {\n if (cm.curOp) { return f.apply(cm, arguments) }\n startOperation(cm);\n try { return f.apply(cm, arguments) }\n finally { endOperation(cm); }\n }\n }", "function operation(cm, f) {\n return function() {\n if (cm.curOp) { return f.apply(cm, arguments) }\n startOperation(cm);\n try { return f.apply(cm, arguments) }\n finally { endOperation(cm); }\n }\n }", "function operation(cm, f) {\n return function() {\n if (cm.curOp) { return f.apply(cm, arguments) }\n startOperation(cm);\n try { return f.apply(cm, arguments) }\n finally { endOperation(cm); }\n }\n }", "function operation(cm, f) {\n return function() {\n if (cm.curOp) { return f.apply(cm, arguments) }\n startOperation(cm);\n try { return f.apply(cm, arguments) }\n finally { endOperation(cm); }\n }\n }", "function operation(cm, f) {\n return function() {\n if (cm.curOp) { return f.apply(cm, arguments) }\n startOperation(cm);\n try { return f.apply(cm, arguments) }\n finally { endOperation(cm); }\n }\n }", "function operation(cm, f) {\n return function() {\n if (cm.curOp) { return f.apply(cm, arguments) }\n startOperation(cm);\n try { return f.apply(cm, arguments) }\n finally { endOperation(cm); }\n }\n }", "function operation(cm, f) {\n return function() {\n if (cm.curOp) { return f.apply(cm, arguments) }\n startOperation(cm);\n try { return f.apply(cm, arguments) }\n finally { endOperation(cm); }\n }\n }", "function operation(cm, f) {\n return function() {\n if (cm.curOp) { return f.apply(cm, arguments) }\n startOperation(cm);\n try { return f.apply(cm, arguments) }\n finally { endOperation(cm); }\n }\n }", "function operation(cm, f) {\n return function() {\n if (cm.curOp) { return f.apply(cm, arguments) }\n startOperation(cm);\n try { return f.apply(cm, arguments) }\n finally { endOperation(cm); }\n }\n }", "function operation(cm, f) {\n return function() {\n if (cm.curOp) { return f.apply(cm, arguments) }\n startOperation(cm);\n try { return f.apply(cm, arguments) }\n finally { endOperation(cm); }\n }\n }", "function operation(cm, f) {\n return function() {\n if (cm.curOp) { return f.apply(cm, arguments) }\n startOperation(cm);\n try { return f.apply(cm, arguments) }\n finally { endOperation(cm); }\n }\n }", "function operation(cm, f) {\n return function() {\n if (cm.curOp) { return f.apply(cm, arguments) }\n startOperation(cm);\n try { return f.apply(cm, arguments) }\n finally { endOperation(cm); }\n }\n }", "function operation(cm, f) {\n return function() {\n if (cm.curOp) { return f.apply(cm, arguments) }\n startOperation(cm);\n try { return f.apply(cm, arguments) }\n finally { endOperation(cm); }\n }\n }", "function operation(cm, f) {\n return function() {\n if (cm.curOp) { return f.apply(cm, arguments) }\n startOperation(cm);\n try { return f.apply(cm, arguments) }\n finally { endOperation(cm); }\n }\n }", "function operation(cm, f) {\n return function() {\n if (cm.curOp) { return f.apply(cm, arguments) }\n startOperation(cm);\n try { return f.apply(cm, arguments) }\n finally { endOperation(cm); }\n }\n }", "function operation(cm, f) {\n return function() {\n if (cm.curOp) { return f.apply(cm, arguments) }\n startOperation(cm);\n try { return f.apply(cm, arguments) }\n finally { endOperation(cm); }\n }\n }", "function operation(cm, f) {\n return function() {\n if (cm.curOp) { return f.apply(cm, arguments) }\n startOperation(cm);\n try { return f.apply(cm, arguments) }\n finally { endOperation(cm); }\n }\n }", "function operation(cm, f) {\n return function() {\n if (cm.curOp) { return f.apply(cm, arguments) }\n startOperation(cm)\n try { return f.apply(cm, arguments) }\n finally { endOperation(cm) }\n }\n}", "function operation(cm, f) {\n return function() {\n if (cm.curOp) { return f.apply(cm, arguments) }\n startOperation(cm)\n try { return f.apply(cm, arguments) }\n finally { endOperation(cm) }\n }\n}", "function processScope(scope) {\n if (!isObject(scope) || scope._bsontype === 'ObjectID') {\n return scope;\n }\n\n var keys = Object.keys(scope);\n var i = keys.length;\n var key;\n var new_scope = {};\n\n while (i--) {\n key = keys[i];\n if ('function' === typeof scope[key]) {\n new_scope[key] = new Code(String(scope[key]));\n } else {\n new_scope[key] = processScope(scope[key]);\n }\n }\n\n return new_scope;\n}", "function processScope (scope) {\n if(!isObject(scope) || scope._bsontype == 'ObjectID') {\n return scope;\n }\n\n var keys = Object.keys(scope);\n var i = keys.length;\n var key;\n var new_scope = {};\n\n while (i--) {\n key = keys[i];\n if ('function' == typeof scope[key]) {\n new_scope[key] = new Code(String(scope[key]));\n } else {\n new_scope[key] = processScope(scope[key]);\n }\n }\n\n return new_scope;\n}", "function operation(cm, f) {\n\t return function() {\n\t if (cm.curOp) return f.apply(cm, arguments);\n\t startOperation(cm);\n\t try { return f.apply(cm, arguments); }\n\t finally { endOperation(cm); }\n\t };\n\t }", "function operation(cm, f) {\n\t return function() {\n\t if (cm.curOp) return f.apply(cm, arguments);\n\t startOperation(cm);\n\t try { return f.apply(cm, arguments); }\n\t finally { endOperation(cm); }\n\t };\n\t }", "function operation(cm, f) {\n\t return function() {\n\t if (cm.curOp) return f.apply(cm, arguments);\n\t startOperation(cm);\n\t try { return f.apply(cm, arguments); }\n\t finally { endOperation(cm); }\n\t };\n\t }", "function operation(cm, f) {\n return function() {\n if (cm.curOp) { return f.apply(cm, arguments) }\n startOperation(cm);\n try { return f.apply(cm, arguments) }\n finally { endOperation(cm); }\n }\n}", "function operation(cm, f) {\n return function() {\n if (cm.curOp) { return f.apply(cm, arguments) }\n startOperation(cm);\n try { return f.apply(cm, arguments) }\n finally { endOperation(cm); }\n }\n}", "function operation(cm, f) {\n return function() {\n if (cm.curOp) { return f.apply(cm, arguments) }\n startOperation(cm);\n try { return f.apply(cm, arguments) }\n finally { endOperation(cm); }\n }\n}", "function operation(cm, f) {\n return function() {\n if (cm.curOp) { return f.apply(cm, arguments) }\n startOperation(cm);\n try { return f.apply(cm, arguments) }\n finally { endOperation(cm); }\n }\n}", "function operation(cm, f) {\n return function() {\n if (cm.curOp) { return f.apply(cm, arguments) }\n startOperation(cm);\n try { return f.apply(cm, arguments) }\n finally { endOperation(cm); }\n }\n}", "function operation(cm, f) {\n return function() {\n if (cm.curOp) { return f.apply(cm, arguments) }\n startOperation(cm);\n try { return f.apply(cm, arguments) }\n finally { endOperation(cm); }\n }\n}", "function operation(cm, f) {\n return function() {\n if (cm.curOp) { return f.apply(cm, arguments) }\n startOperation(cm);\n try { return f.apply(cm, arguments) }\n finally { endOperation(cm); }\n }\n}", "function operation(cm, f) {\n return function() {\n if (cm.curOp) { return f.apply(cm, arguments) }\n startOperation(cm);\n try { return f.apply(cm, arguments) }\n finally { endOperation(cm); }\n }\n}", "function operation(cm, f) {\n return function() {\n if (cm.curOp) { return f.apply(cm, arguments) }\n startOperation(cm);\n try { return f.apply(cm, arguments) }\n finally { endOperation(cm); }\n }\n}", "function operation(cm, f) {\n return function() {\n if (cm.curOp) { return f.apply(cm, arguments) }\n startOperation(cm);\n try { return f.apply(cm, arguments) }\n finally { endOperation(cm); }\n }\n}", "function operation(cm, f) {\n return function() {\n if (cm.curOp) { return f.apply(cm, arguments) }\n startOperation(cm);\n try { return f.apply(cm, arguments) }\n finally { endOperation(cm); }\n }\n}", "function operation(cm, f) {\n\t\t return function() {\n\t\t if (cm.curOp) return f.apply(cm, arguments);\n\t\t startOperation(cm);\n\t\t try { return f.apply(cm, arguments); }\n\t\t finally { endOperation(cm); }\n\t\t };\n\t\t }", "function operation(cm, f) {\n return function() {\n if (cm.curOp) return f.apply(cm, arguments);\n startOperation(cm);\n try { return f.apply(cm, arguments); }\n finally { endOperation(cm); }\n };\n }", "function operation(cm, f) {\n return function() {\n if (cm.curOp) return f.apply(cm, arguments);\n startOperation(cm);\n try { return f.apply(cm, arguments); }\n finally { endOperation(cm); }\n };\n }", "function operation(cm, f) {\n return function() {\n if (cm.curOp) return f.apply(cm, arguments);\n startOperation(cm);\n try { return f.apply(cm, arguments); }\n finally { endOperation(cm); }\n };\n }", "function operation(cm, f) {\n return function() {\n if (cm.curOp) return f.apply(cm, arguments);\n startOperation(cm);\n try { return f.apply(cm, arguments); }\n finally { endOperation(cm); }\n };\n }", "function operation(cm, f) {\n return function() {\n if (cm.curOp) return f.apply(cm, arguments);\n startOperation(cm);\n try { return f.apply(cm, arguments); }\n finally { endOperation(cm); }\n };\n }", "function operation(cm, f) {\n return function() {\n if (cm.curOp) return f.apply(cm, arguments);\n startOperation(cm);\n try { return f.apply(cm, arguments); }\n finally { endOperation(cm); }\n };\n }", "function operation(cm, f) {\n return function() {\n if (cm.curOp) return f.apply(cm, arguments);\n startOperation(cm);\n try { return f.apply(cm, arguments); }\n finally { endOperation(cm); }\n };\n }", "function operation(cm, f) {\n return function() {\n if (cm.curOp) return f.apply(cm, arguments);\n startOperation(cm);\n try { return f.apply(cm, arguments); }\n finally { endOperation(cm); }\n };\n }", "function processScope(scope) {\n if (!isObject(scope) || scope._bsontype === 'ObjectID') {\n return scope;\n }\n\n const keys = Object.keys(scope);\n let key;\n const new_scope = {};\n\n for (let i = keys.length - 1; i >= 0; i--) {\n key = keys[i];\n if ('function' === typeof scope[key]) {\n new_scope[key] = new Code(String(scope[key]));\n } else {\n new_scope[key] = processScope(scope[key]);\n }\n }\n\n return new_scope;\n}", "function processScope(scope) {\n if (!isObject(scope) || scope._bsontype === 'ObjectID') {\n return scope;\n }\n\n const keys = Object.keys(scope);\n let key;\n const new_scope = {};\n\n for (let i = keys.length - 1; i >= 0; i--) {\n key = keys[i];\n if ('function' === typeof scope[key]) {\n new_scope[key] = new Code(String(scope[key]));\n } else {\n new_scope[key] = processScope(scope[key]);\n }\n }\n\n return new_scope;\n}", "function operation(cm, f) {\r\n return function() {\r\n if (cm.curOp) { return f.apply(cm, arguments) }\r\n startOperation(cm);\r\n try { return f.apply(cm, arguments) }\r\n finally { endOperation(cm); }\r\n }\r\n}", "_patchOperation(collection, operation, getCurrentHub) {\n if (!(operation in collection.prototype)) return;\n\n const getSpanContext = this._getSpanContextFromOperationArguments.bind(this);\n\n fill(collection.prototype, operation, function (orig) {\n return function ( ...args) {\n const lastArg = args[args.length - 1];\n const scope = getCurrentHub().getScope();\n const parentSpan = _optionalChain([scope, 'optionalAccess', _2 => _2.getSpan, 'call', _3 => _3()]);\n\n // Check if the operation was passed a callback. (mapReduce requires a different check, as\n // its (non-callback) arguments can also be functions.)\n if (typeof lastArg !== 'function' || (operation === 'mapReduce' && args.length === 2)) {\n const span = _optionalChain([parentSpan, 'optionalAccess', _4 => _4.startChild, 'call', _5 => _5(getSpanContext(this, operation, args))]);\n const maybePromiseOrCursor = orig.call(this, ...args);\n\n if (isThenable(maybePromiseOrCursor)) {\n return maybePromiseOrCursor.then((res) => {\n _optionalChain([span, 'optionalAccess', _6 => _6.finish, 'call', _7 => _7()]);\n return res;\n });\n }\n // If the operation returns a Cursor\n // we need to attach a listener to it to finish the span when the cursor is closed.\n else if (isCursor(maybePromiseOrCursor)) {\n const cursor = maybePromiseOrCursor ;\n\n try {\n cursor.once('close', () => {\n _optionalChain([span, 'optionalAccess', _8 => _8.finish, 'call', _9 => _9()]);\n });\n } catch (e) {\n // If the cursor is already closed, `once` will throw an error. In that case, we can\n // finish the span immediately.\n _optionalChain([span, 'optionalAccess', _10 => _10.finish, 'call', _11 => _11()]);\n }\n\n return cursor;\n } else {\n _optionalChain([span, 'optionalAccess', _12 => _12.finish, 'call', _13 => _13()]);\n return maybePromiseOrCursor;\n }\n }\n\n const span = _optionalChain([parentSpan, 'optionalAccess', _14 => _14.startChild, 'call', _15 => _15(getSpanContext(this, operation, args.slice(0, -1)))]);\n\n return orig.call(this, ...args.slice(0, -1), function (err, result) {\n _optionalChain([span, 'optionalAccess', _16 => _16.finish, 'call', _17 => _17()]);\n lastArg(err, result);\n });\n };\n });\n }", "function applyScope() {\n\t\t\t\tif (!scope.$$phase) {\n\t\t\t\t\tscope.$apply();\n\t\t\t\t}\n\t\t\t}", "function operation(cm, f) {\r\n return function() {\r\n if (cm.curOp) return f.apply(cm, arguments);\r\n startOperation(cm);\r\n try { return f.apply(cm, arguments); }\r\n finally { endOperation(cm); }\r\n };\r\n }", "function asScope(scope) {\n if (scope == null) {\n throw new Error(\"Scope must not be null or undefined.\");\n }\n return function (target) {\n target[symbols_1.AutoBindAsScopeKey] =\n scope !== undefined ? scope : predefined_1.SelfIdentifiedScope;\n };\n}", "function Scope() {\r\n this._disposables = {};\r\n this._lastDisposableId = 0;\r\n }", "function Scope() {\r\n this._disposables = {};\r\n this._lastDisposableId = 0;\r\n }", "function Scope() {\n this._disposables = {};\n this._lastDisposableId = 0;\n }", "function execOp()\n {\n if (opDefStack.length > 0 && isOpFinish == true) { \n var def = popOpDef();\n var func = popOpFunc();\n var args = popOpArgs();\n\n var funcDef = func.apply(obj, args);\n isOpFinish = false;\n\n funcDef.done(function(){ \n def.resolve.apply(def, arguments);\n \n isOpFinish = true;\n execOp();\n });\n \n funcDef.fail(function(){ \n def.reject.apply(def, arguments);\n isOpFinish = true;\n \n execOp();\n }); \n }\n }", "async execEval(operations, scope) { // eslint-disable-line require-await\n return Promise.all(operations.map(op => this.exec(op, scope))).then(scopes => {\n return scopes.map(scopedValue => scopedValue.value)\n })\n }", "addNewOp(opName, opId, opCode, parentPart, opIntervals, isSequential) {\n if (!isSequential) isSequential = false;\n return ops.create({\n opId: opId,\n opCode: opCode,\n opName: opName,\n parentPartId: parentPart,\n intervals: opIntervals,\n isSequential: isSequential\n });\n }", "function promisedOperation(op) {\n if (!op.then) {\n return PromiseFactory.create(function(resolve, reject) {\n op.oncomplete = function(e) {\n resolve(e.target.result);\n };\n op.onerror = function(e) {\n reject(e);\n };\n });\n }\n return op;\n }", "function scopeExample (num1, num2) {\n var added = num1 + num2;\n return added;\n}", "exitScope() {\n // Free up all the identifiers used in the previous scope\n this.scopes.pop().free(this.context);\n this.scope = this.scopes[this.scopes.length - 1];\n }", "function program(){\n\t//initialize hashmap of scopes\n\tthis._scopes = {};\n\t//create start block (right now pass no scope owner)\n\tvar start = new block(null);\n\t//create finalizing block (right now pass no scope owner)\n\tvar end = new block(null);\n\t//create and assign global scope\n\tthis._scopes[scope.__nextId] = new scope(\n\t\tnull,\t//no parent\n\t\tSCOPE_TYPE.GLOBAL,\t//global scope type\n\t\tnull,\t//not function declaration\n\t\tnull,\t//not type object declaration\n\t\tstart,\t//pass in first block\n\t\tend,\t//pass in last block\n\t\tstart,\t//set start as the current\n\t\t{}\t//no symbols right now are defined (may change later)\n\t);\n\t//set owner for start and end blocks\n\tstart._owner = this._scopes[scope.__nextId - 1];\n\tend._owner = this._scopes[scope.__nextId - 1];\n}", "function withScope(f){\r\n return function(scope, state, k){\r\n return f(scope)(scope, state, k);\r\n }\r\n}", "function emitScopeProc (env, args) {\n var scope = env.proc('scope', 3);\n env.batchId = 'a2';\n\n var shared = env.shared;\n var CURRENT_STATE = shared.current;\n\n emitContext(env, scope, args.context);\n\n if (args.framebuffer) {\n args.framebuffer.append(env, scope);\n }\n\n sortState(Object.keys(args.state)).forEach(function (name) {\n var defn = args.state[name];\n var value = defn.append(env, scope);\n if (isArrayLike(value)) {\n value.forEach(function (v, i) {\n scope.set(env.next[name], '[' + i + ']', v);\n });\n } else {\n scope.set(shared.next, '.' + name, value);\n }\n });\n\n emitProfile(env, scope, args, true, true)\n\n ;[S_ELEMENTS, S_OFFSET, S_COUNT, S_INSTANCES, S_PRIMITIVE].forEach(\n function (opt) {\n var variable = args.draw[opt];\n if (!variable) {\n return\n }\n scope.set(shared.draw, '.' + opt, '' + variable.append(env, scope));\n });\n\n Object.keys(args.uniforms).forEach(function (opt) {\n var value = args.uniforms[opt].append(env, scope);\n if (Array.isArray(value)) {\n value = '[' + value.join() + ']';\n }\n scope.set(\n shared.uniforms,\n '[' + stringStore.id(opt) + ']',\n value);\n });\n\n Object.keys(args.attributes).forEach(function (name) {\n var record = args.attributes[name].append(env, scope);\n var scopeAttrib = env.scopeAttrib(name);\n Object.keys(new AttributeRecord()).forEach(function (prop) {\n scope.set(scopeAttrib, '.' + prop, record[prop]);\n });\n });\n\n if (args.scopeVAO) {\n scope.set(shared.vao, '.targetVAO', args.scopeVAO.append(env, scope));\n }\n\n function saveShader (name) {\n var shader = args.shader[name];\n if (shader) {\n scope.set(shared.shader, '.' + name, shader.append(env, scope));\n }\n }\n saveShader(S_VERT);\n saveShader(S_FRAG);\n\n if (Object.keys(args.state).length > 0) {\n scope(CURRENT_STATE, '.dirty=true;');\n scope.exit(CURRENT_STATE, '.dirty=true;');\n }\n\n scope('a1(', env.shared.context, ',a0,', env.batchId, ');');\n }", "function saveAndAlertOperation(operation) {\n transactions.push(operation);\n alert(operation.getOperation());\n}", "_patchOperation(collection, operation, getCurrentHub) {\n if (!(operation in collection.prototype)) return;\n\n const getSpanContext = this._getSpanContextFromOperationArguments.bind(this);\n\n utils.fill(collection.prototype, operation, function (orig) {\n return function ( ...args) {\n const lastArg = args[args.length - 1];\n const scope = getCurrentHub().getScope();\n const parentSpan = _optionalChain([scope, 'optionalAccess', _2 => _2.getSpan, 'call', _3 => _3()]);\n\n // Check if the operation was passed a callback. (mapReduce requires a different check, as\n // its (non-callback) arguments can also be functions.)\n if (typeof lastArg !== 'function' || (operation === 'mapReduce' && args.length === 2)) {\n const span = _optionalChain([parentSpan, 'optionalAccess', _4 => _4.startChild, 'call', _5 => _5(getSpanContext(this, operation, args))]);\n const maybePromise = orig.call(this, ...args) ;\n\n if (utils.isThenable(maybePromise)) {\n return maybePromise.then((res) => {\n _optionalChain([span, 'optionalAccess', _6 => _6.finish, 'call', _7 => _7()]);\n return res;\n });\n } else {\n _optionalChain([span, 'optionalAccess', _8 => _8.finish, 'call', _9 => _9()]);\n return maybePromise;\n }\n }\n\n const span = _optionalChain([parentSpan, 'optionalAccess', _10 => _10.startChild, 'call', _11 => _11(getSpanContext(this, operation, args.slice(0, -1)))]);\n return orig.call(this, ...args.slice(0, -1), function (err, result) {\n _optionalChain([span, 'optionalAccess', _12 => _12.finish, 'call', _13 => _13()]);\n lastArg(err, result);\n });\n };\n });\n }", "static apply(template) {\n const scope = Scope.newRootScope();\n scope.ingest(template);\n return scope;\n }", "static apply(template) {\n const scope = Scope.newRootScope();\n scope.ingest(template);\n return scope;\n }", "function emitScopeProc (env, args) {\n var scope = env.proc('scope', 3);\n env.batchId = 'a2';\n\n var shared = env.shared;\n var CURRENT_STATE = shared.current;\n\n emitContext(env, scope, args.context);\n\n if (args.framebuffer) {\n args.framebuffer.append(env, scope);\n }\n\n sortState(Object.keys(args.state)).forEach(function (name) {\n var defn = args.state[name];\n var value = defn.append(env, scope);\n if (isArrayLike(value)) {\n value.forEach(function (v, i) {\n scope.set(env.next[name], '[' + i + ']', v);\n });\n } else {\n scope.set(shared.next, '.' + name, value);\n }\n });\n\n emitProfile(env, scope, args, true, true)\n\n ;[S_ELEMENTS, S_OFFSET, S_COUNT, S_INSTANCES, S_PRIMITIVE].forEach(\n function (opt) {\n var variable = args.draw[opt];\n if (!variable) {\n return\n }\n scope.set(shared.draw, '.' + opt, '' + variable.append(env, scope));\n });\n\n Object.keys(args.uniforms).forEach(function (opt) {\n scope.set(\n shared.uniforms,\n '[' + stringStore.id(opt) + ']',\n args.uniforms[opt].append(env, scope));\n });\n\n Object.keys(args.attributes).forEach(function (name) {\n var record = args.attributes[name].append(env, scope);\n var scopeAttrib = env.scopeAttrib(name);\n Object.keys(new AttributeRecord()).forEach(function (prop) {\n scope.set(scopeAttrib, '.' + prop, record[prop]);\n });\n });\n\n function saveShader (name) {\n var shader = args.shader[name];\n if (shader) {\n scope.set(shared.shader, '.' + name, shader.append(env, scope));\n }\n }\n saveShader(S_VERT);\n saveShader(S_FRAG);\n\n if (Object.keys(args.state).length > 0) {\n scope(CURRENT_STATE, '.dirty=true;');\n scope.exit(CURRENT_STATE, '.dirty=true;');\n }\n\n scope('a1(', env.shared.context, ',a0,', env.batchId, ');');\n }", "function emitScopeProc (env, args) {\n var scope = env.proc('scope', 3);\n env.batchId = 'a2';\n\n var shared = env.shared;\n var CURRENT_STATE = shared.current;\n\n emitContext(env, scope, args.context);\n\n if (args.framebuffer) {\n args.framebuffer.append(env, scope);\n }\n\n sortState(Object.keys(args.state)).forEach(function (name) {\n var defn = args.state[name];\n var value = defn.append(env, scope);\n if (isArrayLike(value)) {\n value.forEach(function (v, i) {\n scope.set(env.next[name], '[' + i + ']', v);\n });\n } else {\n scope.set(shared.next, '.' + name, value);\n }\n });\n\n emitProfile(env, scope, args, true, true)\n\n ;[S_ELEMENTS, S_OFFSET, S_COUNT, S_INSTANCES, S_PRIMITIVE].forEach(\n function (opt) {\n var variable = args.draw[opt];\n if (!variable) {\n return\n }\n scope.set(shared.draw, '.' + opt, '' + variable.append(env, scope));\n });\n\n Object.keys(args.uniforms).forEach(function (opt) {\n scope.set(\n shared.uniforms,\n '[' + stringStore.id(opt) + ']',\n args.uniforms[opt].append(env, scope));\n });\n\n Object.keys(args.attributes).forEach(function (name) {\n var record = args.attributes[name].append(env, scope);\n var scopeAttrib = env.scopeAttrib(name);\n Object.keys(new AttributeRecord()).forEach(function (prop) {\n scope.set(scopeAttrib, '.' + prop, record[prop]);\n });\n });\n\n function saveShader (name) {\n var shader = args.shader[name];\n if (shader) {\n scope.set(shared.shader, '.' + name, shader.append(env, scope));\n }\n }\n saveShader(S_VERT);\n saveShader(S_FRAG);\n\n if (Object.keys(args.state).length > 0) {\n scope(CURRENT_STATE, '.dirty=true;');\n scope.exit(CURRENT_STATE, '.dirty=true;');\n }\n\n scope('a1(', env.shared.context, ',a0,', env.batchId, ');');\n }", "function emitScopeProc (env, args) {\n var scope = env.proc('scope', 3);\n env.batchId = 'a2';\n\n var shared = env.shared;\n var CURRENT_STATE = shared.current;\n\n emitContext(env, scope, args.context);\n\n if (args.framebuffer) {\n args.framebuffer.append(env, scope);\n }\n\n sortState(Object.keys(args.state)).forEach(function (name) {\n var defn = args.state[name];\n var value = defn.append(env, scope);\n if (isArrayLike(value)) {\n value.forEach(function (v, i) {\n scope.set(env.next[name], '[' + i + ']', v);\n });\n } else {\n scope.set(shared.next, '.' + name, value);\n }\n });\n\n emitProfile(env, scope, args, true, true)\n\n ;[S_ELEMENTS, S_OFFSET, S_COUNT, S_INSTANCES, S_PRIMITIVE].forEach(\n function (opt) {\n var variable = args.draw[opt];\n if (!variable) {\n return\n }\n scope.set(shared.draw, '.' + opt, '' + variable.append(env, scope));\n });\n\n Object.keys(args.uniforms).forEach(function (opt) {\n scope.set(\n shared.uniforms,\n '[' + stringStore.id(opt) + ']',\n args.uniforms[opt].append(env, scope));\n });\n\n Object.keys(args.attributes).forEach(function (name) {\n var record = args.attributes[name].append(env, scope);\n var scopeAttrib = env.scopeAttrib(name);\n Object.keys(new AttributeRecord()).forEach(function (prop) {\n scope.set(scopeAttrib, '.' + prop, record[prop]);\n });\n });\n\n function saveShader (name) {\n var shader = args.shader[name];\n if (shader) {\n scope.set(shared.shader, '.' + name, shader.append(env, scope));\n }\n }\n saveShader(S_VERT);\n saveShader(S_FRAG);\n\n if (Object.keys(args.state).length > 0) {\n scope(CURRENT_STATE, '.dirty=true;');\n scope.exit(CURRENT_STATE, '.dirty=true;');\n }\n\n scope('a1(', env.shared.context, ',a0,', env.batchId, ');');\n }", "function emitScopeProc (env, args) {\n var scope = env.proc('scope', 3);\n env.batchId = 'a2';\n\n var shared = env.shared;\n var CURRENT_STATE = shared.current;\n\n emitContext(env, scope, args.context);\n\n if (args.framebuffer) {\n args.framebuffer.append(env, scope);\n }\n\n sortState(Object.keys(args.state)).forEach(function (name) {\n var defn = args.state[name];\n var value = defn.append(env, scope);\n if (isArrayLike(value)) {\n value.forEach(function (v, i) {\n scope.set(env.next[name], '[' + i + ']', v);\n });\n } else {\n scope.set(shared.next, '.' + name, value);\n }\n });\n\n emitProfile(env, scope, args, true, true)\n\n ;[S_ELEMENTS, S_OFFSET, S_COUNT, S_INSTANCES, S_PRIMITIVE].forEach(\n function (opt) {\n var variable = args.draw[opt];\n if (!variable) {\n return\n }\n scope.set(shared.draw, '.' + opt, '' + variable.append(env, scope));\n });\n\n Object.keys(args.uniforms).forEach(function (opt) {\n scope.set(\n shared.uniforms,\n '[' + stringStore.id(opt) + ']',\n args.uniforms[opt].append(env, scope));\n });\n\n Object.keys(args.attributes).forEach(function (name) {\n var record = args.attributes[name].append(env, scope);\n var scopeAttrib = env.scopeAttrib(name);\n Object.keys(new AttributeRecord()).forEach(function (prop) {\n scope.set(scopeAttrib, '.' + prop, record[prop]);\n });\n });\n\n function saveShader (name) {\n var shader = args.shader[name];\n if (shader) {\n scope.set(shared.shader, '.' + name, shader.append(env, scope));\n }\n }\n saveShader(S_VERT);\n saveShader(S_FRAG);\n\n if (Object.keys(args.state).length > 0) {\n scope(CURRENT_STATE, '.dirty=true;');\n scope.exit(CURRENT_STATE, '.dirty=true;');\n }\n\n scope('a1(', env.shared.context, ',a0,', env.batchId, ');');\n }", "function emitScopeProc (env, args) {\n var scope = env.proc('scope', 3);\n env.batchId = 'a2';\n\n var shared = env.shared;\n var CURRENT_STATE = shared.current;\n\n emitContext(env, scope, args.context);\n\n if (args.framebuffer) {\n args.framebuffer.append(env, scope);\n }\n\n sortState(Object.keys(args.state)).forEach(function (name) {\n var defn = args.state[name];\n var value = defn.append(env, scope);\n if (isArrayLike(value)) {\n value.forEach(function (v, i) {\n scope.set(env.next[name], '[' + i + ']', v);\n });\n } else {\n scope.set(shared.next, '.' + name, value);\n }\n });\n\n emitProfile(env, scope, args, true, true)\n\n ;[S_ELEMENTS, S_OFFSET, S_COUNT, S_INSTANCES, S_PRIMITIVE].forEach(\n function (opt) {\n var variable = args.draw[opt];\n if (!variable) {\n return\n }\n scope.set(shared.draw, '.' + opt, '' + variable.append(env, scope));\n });\n\n Object.keys(args.uniforms).forEach(function (opt) {\n scope.set(\n shared.uniforms,\n '[' + stringStore.id(opt) + ']',\n args.uniforms[opt].append(env, scope));\n });\n\n Object.keys(args.attributes).forEach(function (name) {\n var record = args.attributes[name].append(env, scope);\n var scopeAttrib = env.scopeAttrib(name);\n Object.keys(new AttributeRecord()).forEach(function (prop) {\n scope.set(scopeAttrib, '.' + prop, record[prop]);\n });\n });\n\n function saveShader (name) {\n var shader = args.shader[name];\n if (shader) {\n scope.set(shared.shader, '.' + name, shader.append(env, scope));\n }\n }\n saveShader(S_VERT);\n saveShader(S_FRAG);\n\n if (Object.keys(args.state).length > 0) {\n scope(CURRENT_STATE, '.dirty=true;');\n scope.exit(CURRENT_STATE, '.dirty=true;');\n }\n\n scope('a1(', env.shared.context, ',a0,', env.batchId, ');');\n }", "function emitScopeProc (env, args) {\n var scope = env.proc('scope', 3);\n env.batchId = 'a2';\n\n var shared = env.shared;\n var CURRENT_STATE = shared.current;\n\n emitContext(env, scope, args.context);\n\n if (args.framebuffer) {\n args.framebuffer.append(env, scope);\n }\n\n sortState(Object.keys(args.state)).forEach(function (name) {\n var defn = args.state[name];\n var value = defn.append(env, scope);\n if (isArrayLike(value)) {\n value.forEach(function (v, i) {\n scope.set(env.next[name], '[' + i + ']', v);\n });\n } else {\n scope.set(shared.next, '.' + name, value);\n }\n });\n\n emitProfile(env, scope, args, true, true)\n\n ;[S_ELEMENTS, S_OFFSET, S_COUNT, S_INSTANCES, S_PRIMITIVE].forEach(\n function (opt) {\n var variable = args.draw[opt];\n if (!variable) {\n return\n }\n scope.set(shared.draw, '.' + opt, '' + variable.append(env, scope));\n });\n\n Object.keys(args.uniforms).forEach(function (opt) {\n scope.set(\n shared.uniforms,\n '[' + stringStore.id(opt) + ']',\n args.uniforms[opt].append(env, scope));\n });\n\n Object.keys(args.attributes).forEach(function (name) {\n var record = args.attributes[name].append(env, scope);\n var scopeAttrib = env.scopeAttrib(name);\n Object.keys(new AttributeRecord()).forEach(function (prop) {\n scope.set(scopeAttrib, '.' + prop, record[prop]);\n });\n });\n\n function saveShader (name) {\n var shader = args.shader[name];\n if (shader) {\n scope.set(shared.shader, '.' + name, shader.append(env, scope));\n }\n }\n saveShader(S_VERT);\n saveShader(S_FRAG);\n\n if (Object.keys(args.state).length > 0) {\n scope(CURRENT_STATE, '.dirty=true;');\n scope.exit(CURRENT_STATE, '.dirty=true;');\n }\n\n scope('a1(', env.shared.context, ',a0,', env.batchId, ');');\n }", "function emitScopeProc (env, args) {\n var scope = env.proc('scope', 3);\n env.batchId = 'a2';\n\n var shared = env.shared;\n var CURRENT_STATE = shared.current;\n\n emitContext(env, scope, args.context);\n\n if (args.framebuffer) {\n args.framebuffer.append(env, scope);\n }\n\n sortState(Object.keys(args.state)).forEach(function (name) {\n var defn = args.state[name];\n var value = defn.append(env, scope);\n if (isArrayLike(value)) {\n value.forEach(function (v, i) {\n scope.set(env.next[name], '[' + i + ']', v);\n });\n } else {\n scope.set(shared.next, '.' + name, value);\n }\n });\n\n emitProfile(env, scope, args, true, true)\n\n ;[S_ELEMENTS, S_OFFSET, S_COUNT, S_INSTANCES, S_PRIMITIVE].forEach(\n function (opt) {\n var variable = args.draw[opt];\n if (!variable) {\n return\n }\n scope.set(shared.draw, '.' + opt, '' + variable.append(env, scope));\n });\n\n Object.keys(args.uniforms).forEach(function (opt) {\n scope.set(\n shared.uniforms,\n '[' + stringStore.id(opt) + ']',\n args.uniforms[opt].append(env, scope));\n });\n\n Object.keys(args.attributes).forEach(function (name) {\n var record = args.attributes[name].append(env, scope);\n var scopeAttrib = env.scopeAttrib(name);\n Object.keys(new AttributeRecord()).forEach(function (prop) {\n scope.set(scopeAttrib, '.' + prop, record[prop]);\n });\n });\n\n function saveShader (name) {\n var shader = args.shader[name];\n if (shader) {\n scope.set(shared.shader, '.' + name, shader.append(env, scope));\n }\n }\n saveShader(S_VERT);\n saveShader(S_FRAG);\n\n if (Object.keys(args.state).length > 0) {\n scope(CURRENT_STATE, '.dirty=true;');\n scope.exit(CURRENT_STATE, '.dirty=true;');\n }\n\n scope('a1(', env.shared.context, ',a0,', env.batchId, ');');\n }", "static apply(template) {\n const scope = new Scope();\n scope.ingest(template);\n return scope;\n }", "static apply(template) {\n const scope = new Scope();\n scope.ingest(template);\n return scope;\n }", "addScope(scope) {\r\n // If not already added, add scope to list.\r\n if (!this.scopes.includes(scope)) {\r\n this.scopes.push(scope);\r\n }\r\n return this;\r\n }", "addScope(scope) {\r\n // If not already added, add scope to list.\r\n if (!this.scopes.includes(scope)) {\r\n this.scopes.push(scope);\r\n }\r\n return this;\r\n }" ]
[ "0.55512184", "0.55467296", "0.5428396", "0.53062046", "0.52923465", "0.52188104", "0.520685", "0.5150295", "0.49946928", "0.49946928", "0.49750724", "0.49675876", "0.49675876", "0.49675876", "0.49675876", "0.4943023", "0.48917052", "0.48783162", "0.4853314", "0.48382655", "0.48382655", "0.48382655", "0.48382655", "0.48382655", "0.48382655", "0.48382655", "0.48382655", "0.48382655", "0.48382655", "0.48382655", "0.48382655", "0.48382655", "0.48382655", "0.48382655", "0.48382655", "0.48382655", "0.48081177", "0.48081177", "0.47968447", "0.4796411", "0.47901356", "0.47901356", "0.47901356", "0.47818473", "0.47818473", "0.47818473", "0.47818473", "0.47818473", "0.47818473", "0.47818473", "0.47818473", "0.47818473", "0.47818473", "0.47818473", "0.47750428", "0.47698557", "0.47698557", "0.47698557", "0.47698557", "0.47698557", "0.47698557", "0.47698557", "0.47698557", "0.4757864", "0.4757864", "0.47287083", "0.47226384", "0.47167587", "0.4711211", "0.4702997", "0.46968305", "0.46968305", "0.4695985", "0.4612326", "0.46001142", "0.45906147", "0.453892", "0.45358038", "0.45098376", "0.4495585", "0.44727278", "0.44562882", "0.44503003", "0.44466943", "0.443124", "0.443124", "0.4431212", "0.4431212", "0.4431212", "0.4431212", "0.4431212", "0.4431212", "0.4431212", "0.44282448", "0.44282448", "0.4426715", "0.4426715" ]
0.5571814
3
Calls a function on the latest client. Use this with caution, it's meant as in "internal" helper so we don't need to expose every possible function in the shim. It is not guaranteed that the client actually implements the function.
function _callOnClient(method) { var args = []; for (var _i = 1; _i < arguments.length; _i++) { args[_i - 1] = arguments[_i]; } callOnHub.apply(void 0, Object(tslib_es6["e" /* __spread */])(['_invokeClient', method], args)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _callOnClient(method) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n callOnHub.apply(void 0, tslib_1.__spread(['invokeClient', method], args));\n}", "function _callOnClient(method) {\r\n var args = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n args[_i - 1] = arguments[_i];\r\n }\r\n callOnHub.apply(void 0, Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__spread\"])(['_invokeClient', method], args));\r\n}", "function _callOnClient(method) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n callOnHub.apply(void 0, tslib_1.__spread(['_invokeClient', method], args));\n}", "getClientCalls() {\n\n }", "function _callOnClient(method) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n callOnHub.apply(void 0, tslib__WEBPACK_IMPORTED_MODULE_0__[\"__spread\"](['_invokeClient', method], args));\n}", "function patchClient() {\n const plugin = this;\n return (original) => {\n plugin._logger.debug('patching client');\n return function makeClientConstructor(methods, serviceName, options) {\n const client = original.call(this, methods, serviceName, options);\n shimmer.massWrap(client.prototype, utils_1.getMethodsToWrap.call(plugin, client, methods), utils_1.getPatchedClientMethods.call(plugin));\n return client;\n };\n };\n}", "function clientCode(facade) {\n // ...\n console.log(facade.operation());\n // ...\n}", "promisifyClient(client) {\n Object.keys(Object.getPrototypeOf(client)).forEach((methodName) => {\n const methodFunction = client[methodName];\n if (methodFunction.requestStream == false && methodFunction.responseStream == false) {\n client[methodName + \"Async\"] = util.promisify(methodFunction).bind(client);\n }\n });\n return client;\n }", "withClients(fn) { this.clients.forEach(fn) }", "_withClient(callback) {\n const { scope, client } = this.getStackTop();\n if (client) {\n callback(client, scope);\n }\n }", "_withClient(callback) {\n\t const { scope, client } = this.getStackTop();\n\t if (client) {\n\t callback(client, scope);\n\t }\n\t }", "async Invoke(stub) {\n let ret = stub.getFunctionAndParameters();\n console.info(ret);\n\n let method = this[ret.fcn];\n if (!method) {\n console.error('no function of name:' + ret.fcn + ' found');\n throw new Error('Received unknown function ' + ret.fcn + ' invocation');\n }\n try {\n let payload = await method(stub, ret.params);\n return shim.success(payload);\n } catch (err) {\n console.log(err);\n return shim.error(err);\n }\n }", "async Invoke(stub) {\n let ret = stub.getFunctionAndParameters();\n console.info(ret);\n\n let method = this[ret.fcn];\n if (!method) {\n console.error('no function of name:' + ret.fcn + ' found');\n throw new Error('Received unknown function ' + ret.fcn + ' invocation');\n }\n try {\n let payload = await method(stub, ret.params);\n return shim.success(payload);\n } catch (err) {\n console.log(err);\n return shim.error(err);\n }\n }", "async Invoke(stub) {\n let ret = stub.getFunctionAndParameters();\n console.info(ret);\n\n let method = this[ret.fcn];\n if (!method) {\n console.error('no function of name:' + ret.fcn + ' found');\n throw new Error('Received unknown function ' + ret.fcn + ' invocation');\n }\n try {\n let payload = await method(stub, ret.params);\n return shim.success(payload);\n } catch (err) {\n console.log(err);\n return shim.error(err);\n }\n }", "async Invoke(stub) {\n let ret = stub.getFunctionAndParameters();\n console.info(ret);\n\n let method = this[ret.fcn];\n if (!method) {\n console.error('no function of name:' + ret.fcn + ' found');\n throw new Error('Received unknown function ' + ret.fcn + ' invocation');\n }\n try {\n let payload = await method(stub, ret.params);\n return shim.success(payload);\n } catch (err) {\n console.log(err);\n return shim.error(err);\n }\n }", "async Invoke(stub) \n {\n let ret = stub.getFunctionAndParameters();\n console.info(ret);\n\n let method = this[ret.fcn];\n if (!method) \n {\n console.error('Function::' + ret.fcn + ' not found');\n throw new Error('Unkonw' + ret.fcn + ' invoke');\n }\n try \n {\n let payload = await method(stub, ret.params);\n return shim.success(payload);\n } catch (err) \n {\n console.log(err);\n return shim.error(err);\n }\n }", "async Invoke(stub) {\n let ret = stub.getFunctionAndParameters();\n console.info(ret);\n\n let method = this[ret.fcn];\n if (!method) {\n console.error('no function of name:' + ret.fcn + ' found');\n throw new Error('Received unknown function ' + ret.fcn + ' invocation');\n }\n try {\n let payload = await method(stub, ret.params, this);\n return shim.success(payload);\n } catch (err) {\n console.log(err);\n return shim.error(err);\n }\n }", "async Invoke(stub) {\n let ret = stub.getFunctionAndParameters();\n console.info(ret);\n\n let method = this[ret.fcn];\n if (!method) {\n console.error('no function of name:' + ret.fcn + ' found');\n throw new Error('Received unknown function ' + ret.fcn + ' invocation');\n }\n try {\n let payload = await method(stub, ret.params);\n return shim.success(payload);\n } catch (err) {\n console.info(err);\n return shim.error(err);\n }\n }", "_withClient(callback) {\n const { scope, client } = this.getStackTop();\n if (client) {\n callback(client, scope);\n }\n }", "call(moduleName, functionName, params) {\n const override = this.runtime.config(['services', moduleName, 'url'].join('.'));\n const token = this.runtime.service('session').getAuthToken();\n let client;\n if (override) {\n client = new GenericClient({\n module: moduleName,\n url: override,\n token: token\n });\n } else {\n client = new DynamicService({\n url: this.runtime.config('services.service_wizard.url'),\n token: token,\n module: moduleName\n });\n }\n return client.callFunc(functionName, [params]).catch((err) => {\n console.error(\n 'err',\n err instanceof Error,\n err instanceof exceptions.CustomError,\n err instanceof exceptions.AjaxError,\n err instanceof exceptions.ServerError\n );\n if (err instanceof exceptions.AjaxError) {\n console.error('AJAX Error', err);\n throw new utils.JGISearchError('ajax', err.code, err.message, null, {\n originalError: err\n });\n } else if (err instanceof exceptions.RpcError) {\n console.error('RPC Error', err);\n throw new utils.JGISearchError('ajax', err.name, err.message, null, {\n originalError: err\n });\n } else {\n throw new utils.JGISearchError('rpc-call', err.name, err.message, null, {\n originalError: err\n });\n }\n });\n }", "async callFunction(name, ...args) {\n // See https://github.com/mongodb/stitch-js-sdk/blob/master/packages/core/sdk/src/services/internal/CoreStitchServiceClientImpl.ts\n const body = {\n name,\n arguments: this.argsTransformation ? this.argsTransformation(args) : args\n };\n\n if (this.serviceName) {\n body.service = this.serviceName;\n }\n\n const appRoute = this.fetcher.appRoute;\n\n return this.fetcher.fetchJSON({\n method: 'POST',\n path: appRoute.functionsCall().path,\n body\n });\n }", "async function callStatic(func, args) {\n //Create a new contract instance that we can interact with\n const contract = await client.getContractInstance(contractSource, {\n contractAddress\n });\n //Make a call to get data of smart contract func, with specefied arguments\n console.log(\"Contract : \", contract)\n const calledGet = await contract.call(func, args, {\n callStatic: true\n }).catch(e => console.error(e));\n //Make another call to decode the data received in first call\n console.log(\"Called get found: \", calledGet)\n const decodedGet = await calledGet.decode().catch(e => console.error(e));\n console.log(\"catching errors : \", decodedGet)\n return decodedGet;\n}", "async function callStatic(func, args) {\r\n //Create a new contract instance that we can interact with\r\n const contract = await client.getContractInstance(contractSource, {\r\n contractAddress\r\n });\r\n \r\n const calledGet = await contract.call(func, args, {\r\n callStatic: true\r\n }).catch(e => console.error(e));\r\n \r\n const decodedGet = await calledGet.decode().catch(e => console.error(e));\r\n \r\n return decodedGet;\r\n}", "get client() {\n throw new Error('Not implemented');\n }", "function ensureMemoized(clientInstance) {\n if (clientInstance.__hasBeenMemoized === true) {\n return clientInstance;\n }\n \n // Look for async methods on the client instance\n let proto = Object.getPrototypeOf(clientInstance);\n Object.getOwnPropertyNames(proto).forEach(propName => {\n let prop = proto[propName];\n if (typeof prop === 'function' && propName.endsWith('Async')) {\n let newFn = memoize(prop.bind(clientInstance), { normalizer: normalizeAsyncServiceCall, primitive: true });\n newFn = wrapMemoizedServiceCallWithInvalidation(newFn);\n proto[propName] = newFn;\n }\n });\n \n clientInstance.__hasBeenMemoized = true;\n return clientInstance;\n}", "_getClient () {\n return _client\n }", "async function callStatic(func, args) {\n //Create a new contract instance that we can interact with\n const contract = await client.getContractInstance(contractSource, {contractAddress});\n //Make a call to get data of smart contract func, with specefied arguments\n console.log(\"Contract : \", contract)\n const calledGet = await contract.call(func, args, {callStatic: true}).catch(e => console.error(e));\n //Make another call to decode the data received in first call\n console.log(\"Called get found: \", calledGet)\n const decodedGet = await calledGet.decode().catch(e => console.error(e));\n console.log(\"catching errors : \", decodedGet)\n return decodedGet;\n}", "function ClientCallHandler(socketFromClient, handler) {\n let socket = (this.socket = upgradeSocket(socketFromClient));\n this.handler = handler;\n serverFn.forEach((name) => {\n socket.upgraded.on(`${namespace}:${name}`, (data, respond) =>\n this[name](data, respond)\n );\n });\n }", "async function callStatic(func, args) {\nconst contract = await client.getContractInstance(contractSource, {contractAddress});\n const calledGet = await contract.call(func, args, {callStatic: true}).catch(e => console.error(e));\n const decodedGet = await calledGet.decode().catch(e => console.error(e));\n return decodedGet;\n}", "function callServerMethod (aFunction, aCB, aScope, bEnsureRepoSession)\n// ---------------------------------------------------------------------\n{\n checkParam (aFunction, \"function\");\n checkParamNull (aCB, \"function\");\n checkParamNull (aScope, \"object\");\n \n if (bEnsureRepoSession !== false)\n {\n bEnsureRepoSession = true;\n }\n\n // perform the ajax request\n Ext.Ajax.request\n (\n {\n url:\"proxy\",\n method:\"POST\",\n params:\n {\n type: \"serverMethod\",\n ensureRepoSession: bEnsureRepoSession,\n params: Ext.encode\n (\n {\n // Pass a string representation of the function\n fn: aFunction.toString()\n }\n )\n },\n // We use the dialog as scope for the callbacks\n scope: aScope,\n // On success we handle the return data\n success: aCB\n }\n );\n}", "getClientVersion() {\n const query_params = {\n key: this.apiKey\n }\n\n return fetch(BASE_URL + DOTA_VERSION + 'GetClientVersion/v1/?' + handleQueryParams(query_params))\n .then(response => responseHandler(response))\n .catch(e => e)\n }", "async function callStatic(func, args) {\r\n //Create a new contract instance that we can interact with\r\n const contract = await client.getContractInstance(contractSource, {contractAddress});\r\n //Make a call to get data of smart contract func, with specefied arguments\r\n const calledGet = await contract.call(func, args, {callStatic: true}).catch(e => console.error(e));\r\n //Make another call to decode the data received in first call\r\n const decodedGet = await calledGet.decode().catch(e => console.error(e));\r\n\r\n return decodedGet;\r\n}", "async function callStatic(func, args) {\r\n //Create a new contract instance that we can interact with\r\n const contract = await client.getContractInstance(contractSource, {contractAddress});\r\n //Make a call to get data of smart contract func, with specefied arguments\r\n const calledGet = await contract.call(func, args, {callStatic: true}).catch(e => console.error(e));\r\n //Make another call to decode the data received in first call\r\n const decodedGet = await calledGet.decode().catch(e => console.error(e));\r\n\r\n return decodedGet;\r\n}", "function ElstrServerRpcCallsAdmin (){}", "function sdk_wrap(fn) {\n return wrap(fn)();\n}", "function descCaller()\r\n{\r\n var t = genStackTrace(new Error());\r\n if (t.length == 0) return \"no client function\";\r\n t.shift(); // remove the call to descCaller() itself\r\n if (t.length == 0) return \"no caller function\";\r\n t.shift(); // remove the call to client function\r\n if (t.length == 0) return \"undefined caller function\";\r\n return \"caller: \" + t[0];\r\n}", "function getCurrentFrontend() {\n return shim_1.getCurrentClient();\n}", "function StrictProtoCaller(proto, method) {\r\n\tProtoCaller.call(this,proto, method, true);\r\n}", "function cmdAsInternalClient(cmd) {\n const command =\n {[cmd]: 1, internalClient: {minWireVersion: NumberInt(0), maxWireVersion: NumberInt(7)}};\n const connInternal = new Mongo(adminDB.getMongo().host);\n const res = assert.commandWorked(connInternal.adminCommand(command));\n connInternal.close();\n return res;\n}", "function justInvoke(fn){\n return fn()\n}//justInvoke", "function justInvoke(fn) {\n return fn();\n}", "_call_local_service(name, fun, args, cb) {\n if (name in this.services) {\n const rq = {\n type: 'call',\n fun: fun,\n args: args,\n };\n\n return this._req(this.service_socks[name], rq, (rsp) => {\n if (rsp.status != 'ok') return cb(rsp.status);\n return cb(null, rsp.ret);\n });\n }\n return cb('err: no service');\n }", "async contractCallProxy(msg) {\n let response = await contractCallProxy(this, msg)\n return response\n }", "init() {\n module_utils.patchModule(\n 'redis',\n 'internal_send_command',\n redisClientWrapper,\n redis => redis.RedisClient.prototype\n );\n }", "function executeFunction(func) {\n return func.call();\n }", "function runTest(downgradeFCV, downgradeWireVersion, maxWireVersion, cmd) {\n // When the featureCompatibilityVersion is upgrading, running hello/isMaster with internalClient\n // returns a response with minWireVersion == maxWireVersion.\n assert.commandWorked(\n adminDB.system.version.update({_id: \"featureCompatibilityVersion\"},\n {$set: {version: downgradeFCV, targetVersion: latestFCV}}));\n let res = cmdAsInternalClient(cmd);\n assert.eq(res.minWireVersion, res.maxWireVersion, tojson(res));\n assert.eq(maxWireVersion, res.maxWireVersion, tojson(res));\n\n // When the featureCompatibilityVersion is downgrading, running hello/isMaster with\n // internalClient returns a response with minWireVersion == maxWireVersion.\n assert.commandWorked(adminDB.system.version.update(\n {_id: \"featureCompatibilityVersion\"},\n {$set: {version: downgradeFCV, targetVersion: downgradeFCV, previousVersion: latestFCV}}));\n res = cmdAsInternalClient(cmd);\n assert.eq(res.minWireVersion, res.maxWireVersion, tojson(res));\n assert.eq(maxWireVersion, res.maxWireVersion, tojson(res));\n\n // When the featureCompatibilityVersion is equal to the downgrade version, running\n // hello/isMaster with internalClient returns a response with minWireVersion + 1 ==\n // maxWireVersion.\n assert.commandWorked(adminDB.runCommand({setFeatureCompatibilityVersion: downgradeFCV}));\n res = cmdAsInternalClient(cmd);\n assert.eq(downgradeWireVersion, res.minWireVersion, tojson(res));\n assert.eq(maxWireVersion, res.maxWireVersion, tojson(res));\n\n // When the internalClient field is missing from the hello/isMaster command, the response\n // returns the full wire version range from minWireVersion == 0 to maxWireVersion == latest\n // version, even if the featureCompatibilityVersion is equal to the upgrade version.\n assert.commandWorked(adminDB.runCommand({setFeatureCompatibilityVersion: latestFCV}));\n res = adminDB.runCommand({[cmd]: 1});\n assert.commandWorked(res);\n assert.eq(res.minWireVersion, 0, tojson(res));\n assert.lt(res.minWireVersion, res.maxWireVersion, tojson(res));\n assert.eq(maxWireVersion, res.maxWireVersion, tojson(res));\n}", "function testClient(payload, callback){\n client.request('pingRPC', payload, function(err, response) {\n if(err){\n return callback(err,err)\n }\n return callback(err,response)\n })\n}", "function client() {\n return new Client()\n}", "async [kClientHello](alpn, servername, ciphers) {\n const internalState = this[kInternalState];\n return internalState.clientHelloHandler?.(alpn, servername, ciphers);\n }", "function callOnMe() { return 'called' }", "function getImplementation( cb ){\n\n }", "function callOnHub(method) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var hub = hub_1.getCurrentHub();\n if (hub && hub[method]) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return hub[method].apply(hub, tslib_1.__spread(args));\n }\n throw new Error(\"No hub defined or \" + method + \" was not found on the hub, please open a bug report.\");\n}", "_call_remote_service(remote, name, fun, args, cb) {\n this._find_remote(remote, (err, rn) => {\n if (err) return cb(err);\n rn.call(name, fun, args, (err, ret) => {\n if (err) return cb(err);\n return cb(null, ret);\n });\n });\n }", "function callOnHub(method) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var hub = hub_1.getCurrentHub();\n if (hub && hub[method]) {\n // tslint:disable-next-line:no-unsafe-any\n return hub[method].apply(hub, tslib_1.__spread(args));\n }\n throw new Error(\"No hub defined or \" + method + \" was not found on the hub, please open a bug report.\");\n}", "function killClient(client, fn, time) {\n\t\t\treturn killClients([client], fn, time);\n\t\t}", "function ClientBusObject(busAtt, busObjectPath) {\n\n this.proxyBusObject = new AllJoyn.ProxyBusObject(busAtt, WELL_KNOWN_NAME, OBJECT_PATH, sessionId);\n\n /* Calls the 'cat' method of the service with two string arguments */\n this.callPingMethod = function callPingMethod() {\n var callerMessage = \"Hello from the Client!\";\n var arg = new AllJoyn.MsgArg(\"s\", new Array(callerMessage));\n\n var serviceInterface = this.proxyBusObject.getInterface(SECURE_INTERFACE_NAME);\n\n var pingMember = serviceInterface.getMember(\"Ping\");\n this.proxyBusObject.methodCallAsync(pingMember, new Array(arg), null, 1000, 0).then(function (callResult) {\n // This executes when the service has received the method call and is replying with\n // its own message\n var message = callResult.message;\n if (message.type == AllJoyn.AllJoynMessageType.message_METHOD_RET) {\n var returnMsg = message.getArg(0).value;\n var sender = message.sender;\n\n OutputLine(\"//////////////////////////////////////////////////////////////////\");\n OutputLine(\"'\" + sender + \"' return the value: '\" + returnMsg + \"'.\");\n OutputLine(\"\");\n } else {\n OutputLine(\"Authentication was unsuccessful or the 'Ping' method call returned errors.\");\n }\n startClientClick(); //shut down the client\n });\n OutputLine(\"Called the 'Ping' method with value '\" + callerMessage + \"'.\");\n }\n}", "call(args, callback) {\n const options = {\n returnStubValue: true, // (5)\n throwStubExceptions: true // (6)\n }\n Meteor.apply(this.name, [args], options, callback);\n }", "function refreshClients()\n{\n clientIO.removeClients();\n clientIO.addClients(clients);\n}", "function callOnHub(method) {\r\n var args = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n args[_i - 1] = arguments[_i];\r\n }\r\n var hub = Object(_sentry_hub__WEBPACK_IMPORTED_MODULE_1__[\"getCurrentHub\"])();\r\n if (hub && hub[method]) {\r\n // tslint:disable-next-line:no-unsafe-any\r\n return hub[method].apply(hub, Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__spread\"])(args));\r\n }\r\n throw new Error(\"No hub defined or \" + method + \" was not found on the hub, please open a bug report.\");\r\n}", "subscribeToEvents(client, updateOnSdkUpdate, updateOnSdkTimedout, updateOnSdkReady) {\n if (!client.isReady) { // client is not ready\n /**\n * client still might be ready if it was created before using `getClientWithStatus` function\n * (for example if the client was instantiated outside SplitClient),\n * thus we have to use the ready() promise instead of an event listener.\n */\n client.ready().then(() => {\n // Update isReady if the client was not changed and updateOnSdkReady is true\n if (this.state.client === client && updateOnSdkReady) {\n this.setState({ isReady: true, isTimedout: false, lastUpdate: Date.now() });\n }\n }, () => {\n // Update isTimedout if the client was not changed and updateOnSdkTimedout is true\n if (this.state.client === client) {\n if (updateOnSdkTimedout) {\n this.setState({ isTimedout: true, lastUpdate: Date.now() });\n }\n // register a listener for SDK_READY event, that might trigger after a timeout\n client.once(client.Event.SDK_READY, () => {\n // Update isReady if the client was not changed and updateOnSdkReady is true\n if (this.state.client === client && updateOnSdkReady) {\n this.setState({ isReady: true, isTimedout: false, lastUpdate: Date.now() });\n }\n });\n }\n });\n }\n // register a listener for SDK_UPDATE event\n if (updateOnSdkUpdate) {\n client.on(client.Event.SDK_UPDATE, this.sdkUpdate);\n }\n }", "function OperationsImpl(client) {\n this.client = client;\n }", "async function contractCall(func, args, value) {\r\n const contract = await client.getContractInstance(contractSource, {contractAddress});\r\n //Make a call to write smart contract func, with aeon value input\r\n const calledSet = await contract.call(func, args, {amount: value}).catch(e => console.error(e));\r\n\r\n return calledSet;\r\n}", "async function contractCall(func, args, value) {\r\n const contract = await client.getContractInstance(contractSource, {contractAddress});\r\n //Make a call to write smart contract func, with aeon value input\r\n const calledSet = await contract.call(func, args, {amount: value}).catch(e => console.error(e));\r\n\r\n return calledSet;\r\n}", "call(event, ...payload) {\n debug('Triggering callback \"%s\" with payload: %o', event, payload);\n\n const fn = this.coreSyncedAnswerers.get(event);\n\n if (!fn) {\n throw kerror.get(\n \"core\",\n \"fatal\",\n \"assertion_failed\",\n `the requested callback event '${event}' doesn't have an answerer`\n );\n }\n\n const response = fn(...payload);\n\n getWildcardEvents(event).forEach((ev) =>\n super.emit(ev, {\n args: payload,\n response,\n })\n );\n\n return response;\n }", "function behCall( funcType ) {\r\n if ( funcType.op !== \"anytimeFn\" )\r\n throw new Error();\r\n var result = {};\r\n result.inType = typeTimes( funcType, funcType.demand );\r\n result.outType = funcType.response;\r\n result.install = function ( context, inWires, outWires ) {\r\n var inWireFunc = inWires.first.leafInfo;\r\n var inWireParam = inWires.second;\r\n context.onBegin( function () {\r\n // TODO: See if we end up entering an infinite loop with\r\n // this.\r\n if ( !inWireFunc.isConnected() )\r\n return !\"wasAbleToFinish\";\r\n \r\n var delayMillis = 0;\r\n var innerContext =\r\n makeSubcontext( context, context.startMillis );\r\n inWireFunc.doStaticInvoke( innerContext.context,\r\n delayMillis, inWireParam, outWires );\r\n innerContext.begin();\r\n \r\n return !!\"wasAbleToFinish\";\r\n } );\r\n };\r\n return result;\r\n}", "sinceFunction() {}", "async function contractCall(func, args, value) {\n const contract = await client.getContractInstance(contractSource, {contractAddress});\n console.log(\"Contract:\", contract)\n const calledSet = await contract.call(func, args, {amount:value}).catch(e => console.error(e));\n console.log(\"CalledSet\", calledSet)\n return calledSet;\n}", "callService(endpoint, question, top) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.queryQnaService(endpoint, question, { top });\n });\n }", "function callFunction(func){\n func();\n}", "patchKnexClient() {\n const query = MonkeyPatchable_1.MonkeyPatchable.Client.prototype.query;\n /* istanbul ignore next */\n MonkeyPatchable_1.MonkeyPatchable.Client.prototype.query = function (connection, obj) {\n var _a;\n if (typeof obj === 'string') {\n obj = { sql: obj };\n }\n if (((_a = obj.bindings) !== null && _a !== void 0 ? _a : []).length > 0) {\n return query.call(this, connection, obj);\n }\n // eslint-disable-next-line @typescript-eslint/naming-convention\n const { __knexUid, __knexTxId } = connection;\n this.emit('query', Object.assign({ __knexUid, __knexTxId }, obj));\n return MonkeyPatchable_1.MonkeyPatchable.QueryExecutioner.executeQuery(connection, obj, this);\n };\n MonkeyPatchable_1.MonkeyPatchable.TableCompiler.prototype.raw = function (query) {\n this.pushQuery(query);\n };\n }", "function callOnHub(method) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var hub = Object(_sentry_hub__WEBPACK_IMPORTED_MODULE_1__[\"getCurrentHub\"])();\n if (hub && hub[method]) {\n // tslint:disable-next-line:no-unsafe-any\n return hub[method].apply(hub, tslib__WEBPACK_IMPORTED_MODULE_0__[\"__spread\"](args));\n }\n throw new Error(\"No hub defined or \" + method + \" was not found on the hub, please open a bug report.\");\n}", "bridge() {\n return __awaiter(this, void 0, void 0, function* () {\n this.connector = new discord_js_1.Client();\n });\n }", "function cProxy(\n)\n{\n\n\n}", "getClient() {\n return __awaiter(this, void 0, void 0, function* () {\n // check if client is connected\n if (this.client) {\n return Promise.resolve(this.client);\n }\n // check if client is connecting\n if (this.clientPromise) {\n return this.clientPromise;\n }\n return this.makeClient();\n });\n }", "function proxyMethod(name){ // Wrap to always call the current version\n\tvar proxiedMethod=function proxiedMethod(){if(typeof current[name]==='function'){return current[name].apply(this,arguments);}}; // Copy properties of the original function, if any\n\t(0,_assign2.default)(proxiedMethod,current[name]);proxiedMethod.toString=proxyToString(name);return proxiedMethod;}", "function proxyMethod(name){ // Wrap to always call the current version\n\tvar proxiedMethod=function proxiedMethod(){if(typeof current[name]==='function'){return current[name].apply(this,arguments);}}; // Copy properties of the original function, if any\n\t(0,_assign2.default)(proxiedMethod,current[name]);proxiedMethod.toString=proxyToString(name);return proxiedMethod;}", "call(args, callback) {\n const options = {\n returnStubValue: true,\n throwStubExceptions: true\n }\n\n Meteor.apply(this.name, [args], options, callback);\n }", "call(args, callback) {\n const options = {\n returnStubValue: true,\n throwStubExceptions: true\n }\n\n Meteor.apply(this.name, [args], options, callback);\n }", "call(args, callback) {\n const options = {\n returnStubValue: true,\n throwStubExceptions: true\n }\n\n Meteor.apply(this.name, [args], options, callback);\n }", "call(args, callback) {\n const options = {\n returnStubValue: true,\n throwStubExceptions: true\n }\n\n Meteor.apply(this.name, [args], options, callback);\n }", "function getF5Client(opts) {\n // setEnvs();\n const newOpts = {};\n // build F5Client options\n if (opts === null || opts === void 0 ? void 0 : opts.port) {\n newOpts.port = opts.port;\n }\n if (opts === null || opts === void 0 ? void 0 : opts.provider) {\n newOpts.provider = opts.provider;\n }\n // return new F5Client(\n // localDev.host,\n // localDev.user,\n // localDev.password,\n // newOpts\n // );\n return new f5Client_1.F5Client((opts === null || opts === void 0 ? void 0 : opts.ipv6) ? exports.ipv6Host : exports.defaultHost, exports.defaultUser, exports.defaultPassword, newOpts ? newOpts : undefined);\n}", "function getClient(id){\n return clients[findClientByID(id)];\n}", "async invoke(hub, method, ...args) {\n var conn = this.connections[hub]\n\n var argsArray = Array.prototype.slice.call(arguments)\n conn.hub.invoke\n .apply(conn.hub, argsArray.slice(1))\n .then(result => {\n console.log(\n 'invocation completed successfully' +\n (result === null || !result ? '' : ' :' + result)\n )\n })\n .catch(err => {\n console.log(err)\n })\n }", "function wrap(scloud) { // scloud will be either sigfox-gcloud or sigfox-aws, depending on platform.\n // Wrap the module into a function so that all we defer loading of dependencies,\n // and ensure that cloud resources are properly disposed. For AWS, wrap() is called after\n // all dependencies have been loaded.\n let wrapCount = 0; // Count how many times the wrapper was reused.\n\n // List all require() here because AutoInstall has loaded our dependencies. Don't include sigfox-gcloud or sigfox-aws, they are added by AutoInstall.\n const stringify = require('json-stringify-safe');\n\n function getRoute(req) {\n // Fetch the route from the Google Cloud Metadata store, which is easier\n // to edit. Previously we used a hardcoded route.\n // Refresh the route every 10 seconds in case it has been updated.\n // Returns a promise.\n\n // Return the cached route if not expired.\n if (defaultRoute && defaultRouteExpiry >= Date.now()) return Promise.resolve(defaultRoute);\n // Extend the expiry temporarily so we don't have 2 concurrent requests to fetch the route.\n if (defaultRoute) defaultRouteExpiry = Date.now() + routeExpiry;\n let authClient = null;\n let metadata = null;\n // Get authorisation to access the metadata.\n return scloud.authorizeFunctionMetadata(req)\n .then((res) => { authClient = res; })\n // Get the project metadata.\n .then(() => scloud.getFunctionMetadata(req, authClient))\n .then((res) => { metadata = res; })\n // Return the default route from the metadata.\n .then(() => metadata[defaultRouteKey] || metadata[defaultRouteKey.toUpperCase()])\n .then((res) => {\n // Cache for 10 seconds.\n // result looks like 'decodeStructuredMessage,sendToDatabase'\n // Convert to ['decodeStructuredMessage', 'sendToDatabase']\n const result = (res || '').split(' ').join('').split(','); // Remove spaces.\n if (scloud.isAWS) {\n // TODO: For AWS we start with sigfox.received and end with sigfox.devices.all.\n // Last route for AWS is always \"all\".\n if (result.indexOf('all') < 0) result.push('all');\n }\n defaultRoute = result;\n defaultRouteExpiry = Date.now() + routeExpiry;\n scloud.log(req, 'getRoute', { result, device: req.device });\n return result;\n })\n .catch((error) => {\n scloud.log(req, 'getRoute', { error, device: req.device });\n // In case of error, reuse the previous route if any.\n if (defaultRoute) return defaultRoute;\n throw error;\n });\n }\n\n function routeMessage(req, device, body, msg0) {\n // Set the message route according to the map and device ID.\n // message = { device, type, body, query }\n // Returns a promise.\n const msg = Object.assign({}, msg0);\n return getRoute(req)\n .then((route) => {\n // Must clone the route because it might be mutated accidentally.\n msg.route = JSON.parse(stringify(route || []));\n const result = msg;\n scloud.log(req, 'routeMessage', { result, route, device, body, msg });\n return result;\n })\n .catch((error) => {\n scloud.log(req, 'routeMessage', { error, device, body, msg });\n throw error;\n });\n }\n\n function task(req, device, body, msg) {\n // The task for this Cloud Function: Set the route for the Sigfox message.\n // The route is saved into the \"route\" field of the Sigfox message.\n scloud.log(req, 'task', { device, body, msg, wrapCount }); wrapCount += 1; // Count how many times the wrapper was reused.\n return routeMessage(req, device, body, msg)\n .catch((error) => {\n scloud.log(req, 'task', { error, device, body, msg });\n throw error;\n });\n }\n\n // Expose these functions outside of the wrapper. \"task\" is called to execute the\n // wrapped function when the dependencies and the wrapper have been loaded.\n return { task };\n}", "init() {\n module_utils.patchModule(\n 'cassandra-driver/lib/client',\n 'execute',\n cassandraClientWrapper,\n cassandra => cassandra.prototype\n );\n }", "function newClientStub() {\n return new dgraph.DgraphClientStub(\"134.209.99.184:9080\", grpc.credentials.createInsecure());\n}", "call() {\n const now = (new Date()).getTime() / 1000.0;\n const args = Array.from(arguments);\n const command = args.shift();\n return this.load()\n .then((sha) => {\n logger.debug('Calling %s', command, { now, args });\n return this.redis.evalshaAsync([sha, 0, command, now].concat(args));\n })\n .then((response) => {\n logger.debug('Response: %s', response);\n return response;\n })\n .catch((err) => {\n throw new QlessError(err);\n });\n }", "_createNewClient() {\n if (this.client) {\n this.client.off(\"tokensUpdated\", this._onTokensUpdated);\n }\n this._onTokensUpdated = () => {\n this.updateTokens(this.client.accessToken, this.client.refreshToken, false);\n };\n this._client = new MyButtercupClient(this._clientID, this._clientSecret, this.accessToken, this.refreshToken);\n this._client.on(\"tokensUpdated\", this._onTokensUpdated);\n /**\n * On client updated\n * @event MyButtercupDatasource#updatedClient\n * @type {Object}\n */\n this.emit(\"updatedClient\", this._client);\n }", "function clientsStartup(){\n clients = clientIO.getClients();\n}", "function fnCaller(callback) {\n callback()\n}", "function callIt(func) {\n func();\n}", "function onPeUpdate( callback ) {\n clients.push(callback);\n}", "function getClient(clientNum) {\n switch (clientNum) {\n case ROBOOT_1:\n return robot1;\n break;\n case ROBOOT_2:\n return robot2;\n break;\n case CAMERA:\n return camera;\n break;\n case COMMAND_CENTER:\n return commandCenter;\n break;\n default:\n return null;\n break;\n }\n}", "patchDynamicMethodCall() {\n this.patchNonMethodCall();\n }", "function Latest(callback){\n callback({\"err\": \"not implemented by chain.\"}, null);\n }", "function handleClient(client) {\n //TODO make this less intrusive\n //replace client.send with anti-exception version\n const oldSend = client.send.bind(client);\n client.send = function sendGuarded(data) {\n try {\n console.log('send', data);\n oldSend(data);\n } catch (error) {\n fail(new MyaError('client.send is not allowed to throw exceptions', 'DEADBEEF', error));\n }\n };\n\n //listen to when the client closes, to prevent messages from sending after\n let closed = false;\n client.once('close', () => closed = true);\n\n /**\n * Handles a message from the client\n * @param message the message\n * @throws COMMAND_NOT_FOUND when the command does not exist\n * It can also throw errors when the command fails to run\n */\n function handleMessage(message) {\n if (closed)\n fail(new Error('Client cannot send messages after being closed'));\n\n //TODO for debugging purposes\n pubsub.emit('message', message);\n\n const commandName = message.command;\n delete message.command;\n\n //look for command in list of commands and check if exists\n const commandModule = commands[commandName];\n if (commandModule) {\n //TODO move this into the command modules\n //check params\n try {\n ow(message, commandModule.paramType);\n } catch (error) {\n throw new MyaError(`Invalid arguments passed to ${commandModule}`, 'INVALID_ARGUMENTS', error);\n }\n\n //run the command\n commandModule.run(client, message);\n } else {\n throw new MyaError(`Command ${commandName} does not exist`, 'COMMAND_NOT_FOUND');\n }\n }\n client.on('message', function handleMessageError(message) {\n //catch failed commands and send the error to the client\n try {\n handleMessage(message);\n } catch (error) {\n client.send({\n command: 'ERROR',\n error,\n });\n }\n });\n }", "function wrapCloudEventFunction(userFunction) {\n return (req, res) => {\n const callback = process.domain.bind(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (err, result) => {\n if (res.locals.functionExecutionFinished) {\n console.log('Ignoring extra callback call');\n }\n else {\n res.locals.functionExecutionFinished = true;\n if (err) {\n console.error(err.stack);\n }\n sendResponse(result, err, res);\n }\n });\n let cloudevent = req.body;\n if (cloudevents_1.isBinaryCloudEvent(req)) {\n cloudevent = cloudevents_1.getBinaryCloudEventContext(req);\n cloudevent.data = req.body;\n }\n // Callback style if user function has more than 2 arguments.\n if (userFunction.length > 2) {\n const fn = userFunction;\n return fn(cloudevent, callback);\n }\n const fn = userFunction;\n Promise.resolve()\n .then(() => {\n const result = fn(cloudevent);\n return result;\n })\n .then(result => {\n callback(null, result);\n }, err => {\n callback(err, undefined);\n });\n };\n}", "function __cfclient_empty_func()\n{\n\t\n}", "function cycleAPI(restart) {\n var c = 0\n for (i of config.clients) {\n if (config.clientURL == config.clients[i]) {\n c = i\n break;\n }\n }\n if (c == config.clients.length - 1) {\n c = -1\n }\n config.clientURL = config.clients[c + 1]\n console.log('Using APIURL: ', config.clientURL)\n client = new hive.Client(config.clientURL)\n if(restart)exit(plasma.hashLastIBlock, 'API Changed')\n}", "init() {\n module_utils.patchModule(\n 'mqtt',\n 'MqttClient',\n mqttClientWrapper,\n mqttModule => mqttModule\n );\n }" ]
[ "0.6239003", "0.6218275", "0.6150677", "0.6061531", "0.6041756", "0.549602", "0.53594613", "0.5320927", "0.52879894", "0.51359195", "0.51179075", "0.50855476", "0.50855476", "0.5081607", "0.5081607", "0.50780964", "0.50689805", "0.5064234", "0.50615853", "0.49998537", "0.49427292", "0.4936902", "0.49223632", "0.49143276", "0.489418", "0.48804352", "0.48623797", "0.4852739", "0.4836117", "0.4833006", "0.4832595", "0.48214635", "0.48214635", "0.48132512", "0.48103118", "0.47952124", "0.47757602", "0.4755434", "0.4741169", "0.4689479", "0.4683139", "0.46825722", "0.4679794", "0.46783534", "0.4664094", "0.46620572", "0.4661471", "0.46367246", "0.4634377", "0.46321803", "0.46319938", "0.46312806", "0.46266213", "0.4617394", "0.46153867", "0.4603667", "0.45938152", "0.45828626", "0.4573874", "0.45718947", "0.45661622", "0.4553671", "0.4553671", "0.4551101", "0.45480683", "0.45355746", "0.45298073", "0.45243263", "0.45190865", "0.45177007", "0.4506165", "0.45057455", "0.44869807", "0.4485303", "0.44755495", "0.44755495", "0.44718993", "0.44718993", "0.44718993", "0.44718993", "0.44653648", "0.44576275", "0.44519922", "0.44425523", "0.44424224", "0.4428132", "0.44192436", "0.44182792", "0.4415729", "0.44127357", "0.44019833", "0.44016695", "0.43933383", "0.438819", "0.43793485", "0.43791732", "0.43760768", "0.4372306", "0.43701857", "0.43608373" ]
0.6369153
0
Instruments the given function and sends an event to Sentry every time the function throws an exception.
function wrap(fn, options, before) { if (options === void 0) { options = {}; } if (typeof fn !== 'function') { return fn; } try { // We don't wanna wrap it twice if (fn.__sentry__) { return fn; } // If this has already been wrapped in the past, return that wrapped function if (fn.__sentry_wrapped__) { return fn.__sentry_wrapped__; } } catch (e) { // Just accessing custom props in some Selenium environments // can cause a "Permission denied" exception (see raven-js#495). // Bail on wrapping and return the function as-is (defers to window.onerror). return fn; } /* eslint-disable prefer-rest-params */ // eslint-disable-next-line @typescript-eslint/no-explicit-any var sentryWrapped = function () { var args = Array.prototype.slice.call(arguments); try { if (before && typeof before === 'function') { before.apply(this, arguments); } // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access var wrappedArguments = args.map(function (arg) { return wrap(arg, options); }); if (fn.handleEvent) { // Attempt to invoke user-land function // NOTE: If you are a Sentry user, and you are seeing this stack frame, it // means the sentry.javascript SDK caught an error invoking your application code. This // is expected behavior and NOT indicative of a bug with sentry.javascript. // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access return fn.handleEvent.apply(this, wrappedArguments); } // Attempt to invoke user-land function // NOTE: If you are a Sentry user, and you are seeing this stack frame, it // means the sentry.javascript SDK caught an error invoking your application code. This // is expected behavior and NOT indicative of a bug with sentry.javascript. return fn.apply(this, wrappedArguments); } catch (ex) { ignoreNextOnError(); withScope(function (scope) { scope.addEventProcessor(function (event) { var processedEvent = Object(tslib_es6["a" /* __assign */])({}, event); if (options.mechanism) { Object(misc["b" /* addExceptionTypeValue */])(processedEvent, undefined, undefined); Object(misc["a" /* addExceptionMechanism */])(processedEvent, options.mechanism); } processedEvent.extra = Object(tslib_es6["a" /* __assign */])(Object(tslib_es6["a" /* __assign */])({}, processedEvent.extra), { arguments: args }); return processedEvent; }); captureException(ex); }); throw ex; } }; /* eslint-enable prefer-rest-params */ // Accessing some objects may throw // ref: https://github.com/getsentry/sentry-javascript/issues/1168 try { for (var property in fn) { if (Object.prototype.hasOwnProperty.call(fn, property)) { sentryWrapped[property] = fn[property]; } } } catch (_oO) { } // eslint-disable-line no-empty fn.prototype = fn.prototype || {}; sentryWrapped.prototype = fn.prototype; Object.defineProperty(fn, '__sentry_wrapped__', { enumerable: false, value: sentryWrapped, }); // Signal that this function has been wrapped/filled already // for both debugging and to prevent it to being wrapped/filled twice Object.defineProperties(sentryWrapped, { __sentry__: { enumerable: false, value: true, }, __sentry_original__: { enumerable: false, value: fn, }, }); // Restore original function name (not all browsers allow that) try { var descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name'); if (descriptor.configurable) { Object.defineProperty(sentryWrapped, 'name', { get: function () { return fn.name; }, }); } // eslint-disable-next-line no-empty } catch (_oO) { } return sentryWrapped; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function catcher () { return fn }", "function t(fn) { fn().catch(()=>{}); }", "function registerErrorInstrumentation() {\n utils_1.addInstrumentationHandler({\n callback: errorCallback,\n type: 'error',\n });\n utils_1.addInstrumentationHandler({\n callback: errorCallback,\n type: 'unhandledrejection',\n });\n}", "function registerErrorInstrumentation() {\n utils.addInstrumentationHandler('error', errorCallback);\n utils.addInstrumentationHandler('unhandledrejection', errorCallback);\n}", "function registerErrorInstrumentation() {\n\t addInstrumentationHandler('error', errorCallback);\n\t addInstrumentationHandler('unhandledrejection', errorCallback);\n\t}", "function registerErrorInstrumentation() {\n addInstrumentationHandler('error', errorCallback);\n addInstrumentationHandler('unhandledrejection', errorCallback);\n }", "function executeWithRaygunHandling(fn) {\n try {\n fn();\n } catch (e) {\n Raygun.send(e);\n }\n}", "function wrap(fn) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var before = arguments.length > 2 ? arguments[2] : undefined;\n\n if (!Object(_sentry_utils_is__WEBPACK_IMPORTED_MODULE_4__[\"isFunction\"])(fn)) {\n return fn;\n }\n\n try {\n // We don't wanna wrap it twice\n if (fn.__sentry__) {\n return fn;\n } // If this has already been wrapped in the past, return that wrapped function\n\n\n if (fn.__sentry_wrapped__) {\n return fn.__sentry_wrapped__;\n }\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n // Bail on wrapping and return the function as-is (defers to window.onerror).\n return fn;\n }\n\n var sentryWrapped = function sentryWrapped() {\n var that = this;\n\n if (before && Object(_sentry_utils_is__WEBPACK_IMPORTED_MODULE_4__[\"isFunction\"])(before)) {\n before.apply(that, arguments);\n }\n\n var args = Array.prototype.slice.call(arguments);\n\n try {\n // Attempt to invoke user-land function\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n // means Raven caught an error invoking your application code. This is\n // expected behavior and NOT indicative of a bug with Raven.js.\n var wrappedArguments = args.map(function (arg) {\n return wrap(arg, options);\n });\n\n if (fn.handleEvent) {\n return fn.handleEvent.apply(that, wrappedArguments);\n } else {\n return fn.apply(that, wrappedArguments);\n }\n } catch (ex) {\n ignoreNextOnError();\n Object(_sentry_core__WEBPACK_IMPORTED_MODULE_3__[\"withScope\"])(\n /*#__PURE__*/\n function () {\n var _ref = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2___default()(\n /*#__PURE__*/\n _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee2(scope) {\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n scope.addEventProcessor(\n /*#__PURE__*/\n function () {\n var _ref2 = _babel_runtime_helpers_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2___default()(\n /*#__PURE__*/\n _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee(event) {\n var processedEvent;\n return _babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n processedEvent = _objectSpread({}, event);\n\n if (options.mechanism) {\n processedEvent.exception = processedEvent.exception || {};\n processedEvent.exception.mechanism = options.mechanism;\n }\n\n processedEvent.extra = _objectSpread({}, processedEvent.extra, {\n arguments: Object(_sentry_utils_object__WEBPACK_IMPORTED_MODULE_5__[\"serializeObject\"])(args, 2)\n });\n return _context.abrupt(\"return\", processedEvent);\n\n case 4:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }));\n\n return function (_x2) {\n return _ref2.apply(this, arguments);\n };\n }());\n Object(_sentry_core__WEBPACK_IMPORTED_MODULE_3__[\"captureException\"])(ex);\n\n case 2:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2);\n }));\n\n return function (_x) {\n return _ref.apply(this, arguments);\n };\n }());\n throw ex;\n }\n }; // Accessing some objects may throw\n // ref: https://github.com/getsentry/sentry-javascript/issues/1168\n\n\n try {\n for (var property in fn) {\n if (Object.prototype.hasOwnProperty.call(fn, property)) {\n sentryWrapped[property] = fn[property];\n }\n }\n } catch (_oO) {\n 1;\n } // tslint:disable-line:no-empty\n\n\n sentryWrapped.prototype = fn.prototype;\n fn.__sentry_wrapped__ = sentryWrapped; // Signal that this function has been wrapped/filled already\n // for both debugging and to prevent it to being wrapped/filled twice\n\n sentryWrapped.__sentry__ = true;\n sentryWrapped.__sentry_original__ = fn;\n return sentryWrapped;\n}", "__init7() {this.instrumenter = 'sentry';}", "__init7() {this.instrumenter = 'sentry';}", "__init7() {this.instrumenter = 'sentry';}", "function p() {\n try { f(); } catch (e) {\n var ua = \"\" + navigator.userAgent;\n window.trackEvent && trackEvent(\"Error\", name + \" :: \" + ua, e.stack || e.message);\n throw e;\n }\n }", "function captureException(exception) {\r\n var syntheticException;\r\n try {\r\n throw new Error('Sentry syntheticException');\r\n } catch (exception) {\r\n syntheticException = exception;\r\n }\r\n return callOnHub('captureException', exception, {\r\n originalException: exception,\r\n syntheticException: syntheticException\r\n });\r\n}", "function exceptionHandler(event) {\n\t\talert(\"Exception: \" + event.code + \"::\" + event.message);\n\t}", "function wrap(fn, options, before) {\n if (options === void 0) { options = {}; }\n // tslint:disable-next-line:strict-type-predicates\n if (typeof fn !== 'function') {\n return fn;\n }\n try {\n // We don't wanna wrap it twice\n if (fn.__sentry__) {\n return fn;\n }\n // If this has already been wrapped in the past, return that wrapped function\n if (fn.__sentry_wrapped__) {\n return fn.__sentry_wrapped__;\n }\n }\n catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n // Bail on wrapping and return the function as-is (defers to window.onerror).\n return fn;\n }\n var sentryWrapped = function () {\n var args = Array.prototype.slice.call(arguments);\n // tslint:disable:no-unsafe-any\n try {\n // tslint:disable-next-line:strict-type-predicates\n if (before && typeof before === 'function') {\n before.apply(this, arguments);\n }\n var wrappedArguments = args.map(function (arg) { return wrap(arg, options); });\n if (fn.handleEvent) {\n // Attempt to invoke user-land function\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n // means the sentry.javascript SDK caught an error invoking your application code. This\n // is expected behavior and NOT indicative of a bug with sentry.javascript.\n return fn.handleEvent.apply(this, wrappedArguments);\n }\n // Attempt to invoke user-land function\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n // means the sentry.javascript SDK caught an error invoking your application code. This\n // is expected behavior and NOT indicative of a bug with sentry.javascript.\n return fn.apply(this, wrappedArguments);\n // tslint:enable:no-unsafe-any\n }\n catch (ex) {\n ignoreNextOnError();\n Object(_sentry_core__WEBPACK_IMPORTED_MODULE_1__[\"withScope\"])(function (scope) {\n scope.addEventProcessor(function (event) {\n var processedEvent = tslib__WEBPACK_IMPORTED_MODULE_0__[\"__assign\"]({}, event);\n if (options.mechanism) {\n Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_2__[\"addExceptionTypeValue\"])(processedEvent, undefined, undefined);\n Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_2__[\"addExceptionMechanism\"])(processedEvent, options.mechanism);\n }\n processedEvent.extra = tslib__WEBPACK_IMPORTED_MODULE_0__[\"__assign\"]({}, processedEvent.extra, { arguments: args });\n return processedEvent;\n });\n Object(_sentry_core__WEBPACK_IMPORTED_MODULE_1__[\"captureException\"])(ex);\n });\n throw ex;\n }\n };\n // Accessing some objects may throw\n // ref: https://github.com/getsentry/sentry-javascript/issues/1168\n try {\n for (var property in fn) {\n if (Object.prototype.hasOwnProperty.call(fn, property)) {\n sentryWrapped[property] = fn[property];\n }\n }\n }\n catch (_oO) { } // tslint:disable-line:no-empty\n fn.prototype = fn.prototype || {};\n sentryWrapped.prototype = fn.prototype;\n Object.defineProperty(fn, '__sentry_wrapped__', {\n enumerable: false,\n value: sentryWrapped,\n });\n // Signal that this function has been wrapped/filled already\n // for both debugging and to prevent it to being wrapped/filled twice\n Object.defineProperties(sentryWrapped, {\n __sentry__: {\n enumerable: false,\n value: true,\n },\n __sentry_original__: {\n enumerable: false,\n value: fn,\n },\n });\n // Restore original function name (not all browsers allow that)\n try {\n var descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name');\n if (descriptor.configurable) {\n Object.defineProperty(sentryWrapped, 'name', {\n get: function () {\n return fn.name;\n },\n });\n }\n }\n catch (_oO) {\n /*no-empty*/\n }\n return sentryWrapped;\n}", "onError(fn) {\n\n this.eventEmitter.on(settings.socket.error, (data) => {\n\n fn(data)\n });\n }", "function captureException(exception) {\n var syntheticException;\n try {\n throw new Error('Sentry syntheticException');\n }\n catch (exception) {\n syntheticException = exception;\n }\n return callOnHub('captureException', exception, {\n originalException: exception,\n syntheticException: syntheticException,\n });\n}", "function captureException(exception) {\n var syntheticException;\n try {\n throw new Error('Sentry syntheticException');\n }\n catch (exception) {\n syntheticException = exception;\n }\n return callOnHub('captureException', exception, {\n originalException: exception,\n syntheticException: syntheticException,\n });\n}", "function exceptionHandler(event) {\n\talert(\"Exception: \" + event.code + \"::\" + event.message);\n}", "function UncaughtExceptionHandler(err){\n console.log(\"Uncaught Exception Encountered!!\");\n console.log(\"err: \", err);\n console.log(\"Stack trace: \", err.stack);\n setInterval(function(){}, 1000);\n}", "function wrap(fn, options, before) {\r\n if (options === void 0) {\r\n options = {};\r\n }\r\n // tslint:disable-next-line:strict-type-predicates\r\n if (typeof fn !== 'function') {\r\n return fn;\r\n }\r\n try {\r\n // We don't wanna wrap it twice\r\n if (fn.__sentry__) {\r\n return fn;\r\n }\r\n // If this has already been wrapped in the past, return that wrapped function\r\n if (fn.__sentry_wrapped__) {\r\n return fn.__sentry_wrapped__;\r\n }\r\n } catch (e) {\r\n // Just accessing custom props in some Selenium environments\r\n // can cause a \"Permission denied\" exception (see raven-js#495).\r\n // Bail on wrapping and return the function as-is (defers to window.onerror).\r\n return fn;\r\n }\r\n var sentryWrapped = function () {\r\n // tslint:disable-next-line:strict-type-predicates\r\n if (before && typeof before === 'function') {\r\n before.apply(this, arguments);\r\n }\r\n var args = Array.prototype.slice.call(arguments);\r\n // tslint:disable:no-unsafe-any\r\n try {\r\n // Attempt to invoke user-land function\r\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\r\n // means Raven caught an error invoking your application code. This is\r\n // expected behavior and NOT indicative of a bug with Raven.js.\r\n var wrappedArguments = args.map(function (arg) {\r\n return wrap(arg, options);\r\n });\r\n if (fn.handleEvent) {\r\n return fn.handleEvent.apply(this, wrappedArguments);\r\n }\r\n return fn.apply(this, wrappedArguments);\r\n // tslint:enable:no-unsafe-any\r\n } catch (ex) {\r\n ignoreNextOnError();\r\n Object(_sentry_core__WEBPACK_IMPORTED_MODULE_1__[\"withScope\"])(function (scope) {\r\n scope.addEventProcessor(function (event) {\r\n var processedEvent = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__assign\"])({}, event);\r\n if (options.mechanism) {\r\n Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_2__[\"addExceptionTypeValue\"])(processedEvent, undefined, undefined, options.mechanism);\r\n }\r\n processedEvent.extra = Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__assign\"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__[\"__assign\"])({}, processedEvent.extra), { arguments: Object(_sentry_utils__WEBPACK_IMPORTED_MODULE_2__[\"normalize\"])(args, 3) });\r\n return processedEvent;\r\n });\r\n Object(_sentry_core__WEBPACK_IMPORTED_MODULE_1__[\"captureException\"])(ex);\r\n });\r\n throw ex;\r\n }\r\n };\r\n // Accessing some objects may throw\r\n // ref: https://github.com/getsentry/sentry-javascript/issues/1168\r\n try {\r\n for (var property in fn) {\r\n if (Object.prototype.hasOwnProperty.call(fn, property)) {\r\n sentryWrapped[property] = fn[property];\r\n }\r\n }\r\n } catch (_oO) {} // tslint:disable-line:no-empty\r\n fn.prototype = fn.prototype || {};\r\n sentryWrapped.prototype = fn.prototype;\r\n Object.defineProperty(fn, '__sentry_wrapped__', {\r\n enumerable: false,\r\n value: sentryWrapped\r\n });\r\n // Signal that this function has been wrapped/filled already\r\n // for both debugging and to prevent it to being wrapped/filled twice\r\n Object.defineProperties(sentryWrapped, {\r\n __sentry__: {\r\n enumerable: false,\r\n value: true\r\n },\r\n __sentry_original__: {\r\n enumerable: false,\r\n value: fn\r\n }\r\n });\r\n // Restore original function name (not all browsers allow that)\r\n try {\r\n Object.defineProperty(sentryWrapped, 'name', {\r\n get: function () {\r\n return fn.name;\r\n }\r\n });\r\n } catch (_oO) {\r\n /*no-empty*/\r\n }\r\n return sentryWrapped;\r\n}", "function exceptionHandler(event) {\n alert(\"Exception: \" + event.code + \"::\" + event.message);\n }", "function guarded_call(func) {\n try {\n func();\n } catch (e) {\n print(e.name + \" : \" + e.message);\n }\n}", "function mapTryCatch(onThrow, f, __trace) {\n return self => mapTryCatch_(self, onThrow, f, __trace);\n}", "function _catch(tag, k, f, __trace) {\n return self => P.catchAll_(self, e => {\n if (typeof e === \"object\" && e !== null && tag in e && e[tag] === k) {\n return f(e);\n }\n\n return P.fail(e);\n });\n}", "_handleException(error) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('[Replay]', error);\n\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && this._options._experiments && this._options._experiments.captureExceptions) {\n captureException(error);\n }\n }", "function catchAll(f, __trace) {\n return self => catchAll_(self, f, __trace);\n}", "function lock(func) {\n\t\t\t\t\tvar id = currentTest\n\t\t\t\t\tvar start = Date.now()\n\t\t\t\t\ttry {\n\t\t\t\t\t\tthrow new Error()\n\t\t\t\t\t} catch (trace) {\n\t\t\t\t\t\treturn function() {\n\t\t\t\t\t\t\t// This *will* cause a test failure.\n\t\t\t\t\t\t\tif (id != null && id !== currentTest) {\n\t\t\t\t\t\t\t\tid = undefined\n\t\t\t\t\t\t\t\ttrace.message = \"called \" +\n\t\t\t\t\t\t\t\t\t(Date.now() - start) + \"ms after test end\"\n\t\t\t\t\t\t\t\tconsole.error(trace.stack)\n\t\t\t\t\t\t\t\to(\"in test\").equals(\"not in test\")\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn func.apply(this, arguments)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "exceptionHandler(fn) {\n if (_.isUndefined(fn)) {\n return this._exceptionHandler\n }\n this._exceptionHandler = fn\n return this\n }", "recordException(_exception, _time) { }", "function ErrorHandler() {}", "function runNearStackLimit(f) {\n function t() {\n try {\n t();\n } catch (e) {\n f();\n }\n };\n try {\n t();\n } catch (e) {\n }\n}", "function catchErrors(fn){\n return function(...args){\n console.log(fn)\n return fn(...args).catch((err) => {\n console.error('There was an error');\n console.error(err);\n });\n }\n}", "function attempt(func, errorFunc) {\n try {\n func();\n } catch (exception) {\n if (errorFunc) {\n errorFunc();\n }\n }\n }", "function attempt(func, errorFunc) {\n try {\n func();\n } catch (exception) {\n if (errorFunc) {\n errorFunc();\n }\n }\n }", "function attempt(func, errorFunc) {\n try {\n func();\n } catch (exception) {\n if (errorFunc) {\n errorFunc();\n }\n }\n }", "function attempt(func, errorFunc) {\n try {\n func();\n } catch (exception) {\n if (errorFunc) {\n errorFunc();\n }\n }\n }", "function attempt(func, errorFunc) {\n try {\n func();\n } catch (exception) {\n if (errorFunc) {\n errorFunc();\n }\n }\n }", "function attempt(func, errorFunc) {\n try {\n func();\n } catch (exception) {\n if (errorFunc) {\n errorFunc();\n }\n }\n }", "function attempt(func, errorFunc) {\n try {\n func();\n } catch (exception) {\n if (errorFunc) {\n errorFunc();\n }\n }\n }", "function attempt(func, errorFunc) {\n try {\n func();\n } catch (exception) {\n if (errorFunc) {\n errorFunc();\n }\n }\n }", "function attempt(func, errorFunc) {\n try {\n func();\n } catch (exception) {\n if (errorFunc) {\n errorFunc();\n }\n }\n }", "function withErrorHandler(func) {\n return function (/*arguments*/) {\n try {\n return func.apply(this, arguments);\n } catch (e) {\n var message = 'Error in Page Speed content script:\\n ' + e.stack;\n alert(message + '\\n\\nPlease file a bug at\\n' +\n 'http://code.google.com/p/page-speed/issues/');\n chrome.extension.sendRequest({kind: 'error', message: message});\n }\n };\n}", "async function logEvent$1(gtagFunction, initializationPromise, eventName, eventParams, options) {\r\n if (options && options.global) {\r\n gtagFunction(\"event\" /* EVENT */, eventName, eventParams);\r\n return;\r\n }\r\n else {\r\n const measurementId = await initializationPromise;\r\n const params = Object.assign(Object.assign({}, eventParams), { 'send_to': measurementId });\r\n gtagFunction(\"event\" /* EVENT */, eventName, params);\r\n }\r\n}", "function fail() {\n Logger.log(\"fail\");\n}", "catchExceptions(){\n process.on('uncaughtException', function (err) {\n Logger.fatal(err);\n //var stack = new Error().stack;\n //Logger.exception(stack);\n });\n }", "function _catch(tag, k, f, __trace) {\n return self => catchAll_(self, e => {\n if (tag in e && e[tag] === k) {\n return f(e);\n }\n\n return (0, _fail.fail)(e);\n }, __trace);\n}", "function attempt(func, errorFunc) {\n\t try {\n\t func();\n\t } catch (exception) {\n\t if (errorFunc) {\n\t errorFunc();\n\t }\n\t }\n\t }", "onerror() {}", "onerror() {}", "function logException(functionName, errorMessage) {\n console.log(`Error in ${functionName} is ${errorMessage}`);\n}", "trackException(telemetry) {\n this.defaultClient.trackException(telemetry);\n }", "function catchTag(k, f, __trace) {\n return self => catchTag_(self, k, f, __trace);\n}", "function catch_(self, tag, k, f, __trace) {\n return catchAll_(self, e => {\n if (tag in e && e[tag] === k) {\n return f(e);\n }\n\n return (0, _fail.fail)(e);\n }, __trace);\n}", "function catchTag(k, f, __trace) {\n return self => catchTag_(self, k, f);\n}", "function catchTag_(self, k, f, __trace) {\n return catchAll_(self, e => {\n if (\"_tag\" in e && e[\"_tag\"] === k) {\n return f(e);\n }\n\n return (0, _fail.fail)(e);\n }, __trace);\n}", "function catchAll(f, __trace) {\n return effect => catchAll_(effect, f, __trace);\n}", "function addOneErrorEvent() {\n window.onerror = function (message, url, lineNo, columnNo, errorObj) {\n console.log(message, url, lineNo, columnNo, errorObj);\n var oneErrorParams = {\n message: (errorObj === null || errorObj === void 0 ? void 0 : errorObj.message) || message,\n lineNo: lineNo,\n columnNo: columnNo,\n url: url,\n type: getOnerrorType(message)\n };\n computedErrorObject(oneErrorParams);\n };\n}", "function catch_(self, tag, k, f) {\n return P.catchAll_(self, e => {\n if (typeof e === \"object\" && e !== null && tag in e && e[tag] === k) {\n return f(e);\n }\n\n return P.fail(e);\n });\n}", "function testForUnHandledException() {\n let loggerConfig = {\n \"log-level\": customLogger.LOG_LEVEL.verbose\n }\n\n customLogger.setConfig(loggerConfig);\n customLogger.logMessage(\"tion\", customLogger.LOG_LEVEL.error, \"some-business-tag\", txnID);\n\n}", "onError() {}", "function runWithDebugger(myfunction) {\n debugger;\n myfunction();\n}", "function setErrorHandler (func) {\n throwIfAlreadyStarted('Cannot call \"setErrorHandler\" when fastify instance is already started!')\n\n this[kErrorHandler] = buildErrorHandler(this[kErrorHandler], func.bind(this))\n return this\n }", "function logTheArgument(someFunction) {\r\n someFunction();\r\n}", "function captureException(exception, captureContext) {\n var syntheticException;\n try {\n throw new Error('Sentry syntheticException');\n }\n catch (exception) {\n syntheticException = exception;\n }\n return callOnHub('captureException', exception, {\n captureContext: captureContext,\n originalException: exception,\n syntheticException: syntheticException,\n });\n}", "function captureException(exception, captureContext) {\n var syntheticException;\n try {\n throw new Error('Sentry syntheticException');\n }\n catch (exception) {\n syntheticException = exception;\n }\n return callOnHub('captureException', exception, {\n captureContext: captureContext,\n originalException: exception,\n syntheticException: syntheticException,\n });\n}", "function logGreeting(fn) {\n fn();\n}", "function myThrowFunction() {\n console.log('I\\'m still throwing my top hat!');\n}", "function test(desc, fn) {\n try {\n fn();\n } catch (e) {\n console.error(`Failed to ${desc}`);\n throw e;\n }\n}", "function handleCrash(event) {\n }", "function logGreeting(fn){\n fn();\n}", "function tapCause_(self, f) {\n return catchAllCause_(self, c => core.chain_(f(c), () => (0, _halt.halt)(c)));\n}", "exceptionTrack(properties) {\n const description = properties.event || properties.description || properties;\n appInsights.trackException(description);\n }", "eventTimer() {throw new Error('Must declare the function')}", "function logException(state, exception, context) {\n let handler = state.facet(exceptionSink);\n if (handler.length)\n handler[0](exception);\n else if (window.onerror)\n window.onerror(String(exception), context, undefined, undefined, exception);\n else if (context)\n console.error(context + \":\", exception);\n else\n console.error(exception);\n}", "function errorHandler(options) {\n return function sentryErrorMiddleware(error, _req, res, next) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n var shouldHandleError = (options && options.shouldHandleError) || defaultShouldHandleError;\n if (shouldHandleError(error)) {\n core_1.withScope(function (_scope) {\n // For some reason we need to set the transaction on the scope again\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n var transaction = res.__sentry_transaction;\n if (transaction && _scope.getSpan() === undefined) {\n _scope.setSpan(transaction);\n }\n var client = core_1.getCurrentHub().getClient();\n if (client && sdk_1.isAutoSessionTrackingEnabled(client)) {\n // Check if the `SessionFlusher` is instantiated on the client to go into this branch that marks the\n // `requestSession.status` as `Crashed`, and this check is necessary because the `SessionFlusher` is only\n // instantiated when the the`requestHandler` middleware is initialised, which indicates that we should be\n // running in SessionAggregates mode\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n var isSessionAggregatesMode = client._sessionFlusher !== undefined;\n if (isSessionAggregatesMode) {\n var requestSession = _scope.getRequestSession();\n // If an error bubbles to the `errorHandler`, then this is an unhandled error, and should be reported as a\n // Crashed session. The `_requestSession.status` is checked to ensure that this error is happening within\n // the bounds of a request, and if so the status is updated\n if (requestSession && requestSession.status !== undefined)\n requestSession.status = types_1.RequestSessionStatus.Crashed;\n }\n }\n var eventId = core_1.captureException(error);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n res.sentry = eventId;\n next(error);\n });\n return;\n }\n next(error);\n };\n}", "function retryIfServerError(fn) {\n return Object(tslib__WEBPACK_IMPORTED_MODULE_2__[\"__awaiter\"])(this, void 0, void 0, function () {\n var result;\n return Object(tslib__WEBPACK_IMPORTED_MODULE_2__[\"__generator\"])(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, fn()];\n case 1:\n result = _a.sent();\n if (result.status >= 500 && result.status < 600) {\n // Internal Server Error. Retry request.\n return [2 /*return*/, fn()];\n }\n return [2 /*return*/, result];\n }\n });\n });\n}", "function wrap(fn) {\n\n return function () {\n try {\n return fn.apply(this, arguments);\n }\n catch (err) {\n log(err);\n }\n };\n}", "function wrap(socket, f) {\n try {\n return (data) => f(data)\n } catch (err) {\n console.error(err) //print traceback here\n socket.emit('server-error')\n }\n}", "function handlerError(token, ex) {\n //store the exception\n token.result.exception = ex;\n finalizeTest(token, ex);\n }", "function runTryCatch(func) {\n try {\n return func()\n }\n catch (e) {\n }\n}", "function log(s) {\r\n logFn && logFn(s);\r\n }", "function catchIt() {\n try {\n throwIt();\n } catch (e) {\n console.log(e.stack); // print stack trace\n }\n}", "function announceErrorWrapper(req, res, fun){\n\treturn function(){\n\t\ttry{\n\t\t\tfun.apply(this, arguments);\n\t\t}catch(err){\n\t\t\tres.send(Bencode.encode({\n\t\t\t\t\"failure reason\": err.message\n\t\t\t}));\n\n\t\t\tlogger.error(\"announce [%d] failed: %s\\n%s\", req.requestId, err.message, err.stack);\n\t\t}\n\t}\n}", "function logException(state, exception, context) {\n var handler = state.facet(exceptionSink);\n if (handler.length) handler[0](exception);else if (window.onerror) window.onerror(String(exception), context, undefined, undefined, exception);else if (context) console.error(context + \":\", exception);else console.error(exception);\n}", "function Catch( onerr, ap ) {\r\n}", "function logEvent(string) {\n Logger.log(\"[EVENT] \" + string);\n}", "function a(f) { throw f; }", "function retryIfServerError(fn) {\n return (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__awaiter)(this, void 0, void 0, function () {\n var result;\n return (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__generator)(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, fn()];\n case 1:\n result = _a.sent();\n if (result.status >= 500 && result.status < 600) {\n // Internal Server Error. Retry request.\n return [2 /*return*/, fn()];\n }\n return [2 /*return*/, result];\n }\n });\n });\n}", "function strap_log_event(evtText, appId) {\n\n var strap_params = {\n app_id : appId,\n resolution : \"144x168\",\n useragent : \"PEBBLE/2.0\"\n };\n\n var e = {\n \"payload\" : {\n \"51000\" : encodeURIComponent(evtText)\n }\n };\n\n // -------------------------\n // Strap API inclusion in appmessage\n // This allows Strap to process Strap-related messages\n // DO NOT EDIT\n // -------------------------\n if (strap_api_can_handle_msg(e.payload)) {\n clearTimeout(strap_api_timer_send);\n var params = strap_api_clone(strap_params);\n strap_api_log(e.payload, 200, params);\n strap_api_timer_send = setTimeout(function() {\n strap_api_log({}, 0, params);\n }, 10 * 1000);\n }\n // -------------------------\n\n}", "function retryIfServerError(fn) {\r\n return Object(__WEBPACK_IMPORTED_MODULE_2_tslib__[\"__awaiter\"])(this, void 0, void 0, function () {\r\n var result;\r\n return Object(__WEBPACK_IMPORTED_MODULE_2_tslib__[\"__generator\"])(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, fn()];\r\n case 1:\r\n result = _a.sent();\r\n if (result.status >= 500 && result.status < 600) {\r\n // Internal Server Error. Retry request.\r\n return [2 /*return*/, fn()];\r\n }\r\n return [2 /*return*/, result];\r\n }\r\n });\r\n });\r\n}", "function retryIfServerError(fn) {\r\n return Object(__WEBPACK_IMPORTED_MODULE_2_tslib__[\"__awaiter\"])(this, void 0, void 0, function () {\r\n var result;\r\n return Object(__WEBPACK_IMPORTED_MODULE_2_tslib__[\"__generator\"])(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, fn()];\r\n case 1:\r\n result = _a.sent();\r\n if (result.status >= 500 && result.status < 600) {\r\n // Internal Server Error. Retry request.\r\n return [2 /*return*/, fn()];\r\n }\r\n return [2 /*return*/, result];\r\n }\r\n });\r\n });\r\n}", "function tryCatch(f, onThrow, __trace) {\n return (0, _fromEffect.fromEffect)(T.tryCatch(f, onThrow), __trace);\n}", "function onFail(message){\n console.log('Failed because: ' + message);\n}", "function mapTryCatch_(self, onThrow, f, __trace) {\n return (0, _foldM.foldM_)(self, e => core.fail(e), a => tryCatch(() => f(a), onThrow), __trace);\n}", "function tryCatch(handler){\n return async (req,res,next)=>{\n try{\n console.log(\"inside handler\");\n await handler(req,res);\n }catch(ex){\n console.log(\"iaide error\");\n handleError(ex ,res); // if exception then calling handleError middleware\n }\n }\n}", "async function handleEvent(event) {\n\n console.log(JSON.stringify(event));\n path.n = 'Path: ';\n \n //Start of one function\n if(master.checkDynamoDB(event)){\n \n path.n += 'DB';\n let convertedEvent = master.dbConverter(event);\n\n //Extra console.log statements for testing ===================================\n if (convertedEvent.ResourceName) {\n console.log(`\"${convertedEvent.ResourceName}\" is being inspected----------`);\n } else {\n console.log(`\"${event.Records[0].dynamodb.Keys.ResourceName.S}\" is being inspected----------`);\n }\n //==================================================\n if (convertedEvent.ResourceType == \"User\" && event.Records[0].eventName == 'REMOVE'){\n\n path.n += '1';\n try{\n let tags = await iam.listUserTags({UserName: convertedEvent.ResourceName}).promise();\n\n if (!(master.tagVerification(tags.Tags))) {\n path.n += '2';\n await remediateDynamo(event, convertedEvent);\n } \n }\n catch(e){\n if (e.code == 'NoSuchEntity') {\n console.log(e);\n path.n += '!!';\n console.log(path.n);\n console.log(\"**************NoSuchEntity error caught**************\");\n return e;\n } \n } \n } else {\n path.n += '6';\n console.log('Remediation could not be performed, event didn\\'t meet standards----------')\n }\n console.log(path.n);\n return;\n }\n //End of the function\n\n //Start of the function\n //Checks the event log for any previous errors. Stops the function if there is an error. \n if (master.errorInLog(event)) {\n path.n += 'Error in log';\n console.log(path.n);\n return; \n }\n //End of the function\n \n console.log(`\"${event.detail.requestParameters.userName}\" is being inspected----------`);\n console.log(`Event action is ${event.detail.eventName}---------- `);\n\n //Conditionals to stop the function from continuing\n if (master.selfInvoked(event)) {\n path.n += 'Self Invoked';\n console.log(path.n);\n return; \n }\n \n if (!(master.checkKeyUser(event, 'userName'))) {\n path.n += 'Key Not Found';\n console.log(path.n);\n return;\n }\n\n //Checks if the event is invalid. If it is invalid, then remediate. Else check for tags and add to the table with a TTL\n if (master.invalid(event)) {\n path.n += '1';\n improperLaunch = true;\n await remediate(event);\n if(event.detail.eventName == 'CreateUser' || event.detail.eventName == 'AddUserToGroup'){\n console.log(path.n);\n return;\n }\n }else if(event.detail.eventName.includes('Delete')){\n path.n += '2';\n if(master.isConsole(event)){\n path.n += '3';\n improperLaunch = true;\n console.log(\"Action was delete and done through console.\");\n await remediate(event);\n }else{\n path.n += 'X';\n } \n }\n //End of the function\n \n await checkTagsAndAddsToTable(event);\n console.log(path.n);\n}", "function debug_handle(exception) {\n\tenvironment_stack.push(exception.environment);\n\tconsole.warn(\"Debugger environment initialised.\");\n\n\tif (debug_handler) {\n\t\tdebug_handler(exception.line);\n\t}\n}", "function catchTag_(self, k, f) {\n return P.catchAll_(self, e => {\n if (\"_tag\" in e && e[\"_tag\"] === k) {\n return f(e);\n }\n\n return P.fail(e);\n });\n}", "emerg(...any){}" ]
[ "0.59350646", "0.57681316", "0.55631185", "0.554062", "0.5518073", "0.55165154", "0.550899", "0.5461436", "0.5387365", "0.5387365", "0.5387365", "0.5244417", "0.52369356", "0.52211416", "0.51921606", "0.5165513", "0.5158118", "0.5158118", "0.51268613", "0.5113226", "0.5107809", "0.5093893", "0.5088016", "0.5083348", "0.5036324", "0.50344443", "0.5032757", "0.50324047", "0.5025346", "0.5024172", "0.5018447", "0.50137585", "0.5008225", "0.49965623", "0.49965623", "0.49965623", "0.49965623", "0.49965623", "0.49965623", "0.49965623", "0.49965623", "0.49965623", "0.49894512", "0.49827534", "0.49633405", "0.49581578", "0.49339882", "0.49337035", "0.4913558", "0.4913558", "0.49095082", "0.4900813", "0.48981273", "0.48970145", "0.4891056", "0.4882777", "0.48783642", "0.48514614", "0.48336354", "0.48275337", "0.48268163", "0.48236293", "0.48209688", "0.48124114", "0.48120153", "0.48120153", "0.48103628", "0.48041338", "0.4803374", "0.4801732", "0.47960633", "0.47933134", "0.47875774", "0.47861263", "0.4783966", "0.47798768", "0.47788373", "0.4778054", "0.47777116", "0.47776642", "0.47768265", "0.4772616", "0.4770724", "0.47649544", "0.47395632", "0.47382572", "0.47270194", "0.4726569", "0.47248593", "0.4720634", "0.47110978", "0.47110978", "0.47092307", "0.4708825", "0.47067013", "0.47046223", "0.46909904", "0.46791488", "0.46773222", "0.46739694" ]
0.50680155
24
Injects the Report Dialog script
function injectReportDialog(options) { if (options === void 0) { options = {}; } if (!options.eventId) { logger.error("Missing eventId option in showReportDialog call"); return; } if (!options.dsn) { logger.error("Missing dsn option in showReportDialog call"); return; } var script = document.createElement('script'); script.async = true; script.src = new api_API(options.dsn).getReportDialogEndpoint(options); if (options.onLoad) { // eslint-disable-next-line @typescript-eslint/unbound-method script.onload = options.onLoad; } (document.head || document.body).appendChild(script); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function openAppSpecificReportDialog() {\n var dialogHeight = 870;\n var dialogWidth = 1150;\n var frameSource = PageNavUserInfo.webAppContextPath + PageNavUserInfo.homeTabHtmlFragment.replace('.html', '-rpt.html');\n\n var dialogElement = $('#reportingDialog');\n dialogElement.attr('title','Graphics Sectors Report');\n dialogElement.attr('style','padding: 0');\n dialogElement.html('<iframe id=\"asb-report-frame\" src=\"' + frameSource + '\" width=\"99%\" height=\"99%\"></iframe>');\n\n dialogElement.dialog({ modal: true, autoOpen: false, draggable: false, width: 500 });\n var uiDialogTitle = $('.ui-dialog-title');\n $(uiDialogTitle).css('width', '75%');\n // TODO localize buttonlabel\n $(uiDialogTitle).after('<button class=\"ui-widget\" id=\"reportButton\" type=\"button\" onClick=\"onReportButtonClick(event);\" ' +\n 'style=\"float:right;margin-right:30px;\">' + 'Run Report' + '</button>' );\n dialogElement.dialog( 'option', \"position\", {my:\"right top\", at:\"right-10 top\"} );\n dialogElement.dialog( 'option', \"height\", dialogHeight );\n dialogElement.dialog( 'option', \"width\", dialogWidth );\n dialogElement.dialog('open');\n}", "function showReportDialog(options = {}, hub = core.getCurrentHub()) {\n // doesn't work without a document (React Native)\n if (!helpers.WINDOW.document) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && utils.logger.error('Global document not defined in showReportDialog call');\n return;\n }\n\n const { client, scope } = hub.getStackTop();\n const dsn = options.dsn || (client && client.getDsn());\n if (!dsn) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && utils.logger.error('DSN not configured for showReportDialog call');\n return;\n }\n\n if (scope) {\n options.user = {\n ...scope.getUser(),\n ...options.user,\n };\n }\n\n if (!options.eventId) {\n options.eventId = hub.lastEventId();\n }\n\n const script = helpers.WINDOW.document.createElement('script');\n script.async = true;\n script.src = core.getReportDialogEndpoint(dsn, options);\n\n if (options.onLoad) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n script.onload = options.onLoad;\n }\n\n const injectionPoint = helpers.WINDOW.document.head || helpers.WINDOW.document.body;\n if (injectionPoint) {\n injectionPoint.appendChild(script);\n } else {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && utils.logger.error('Not injecting report dialog. No injection point found in HTML');\n }\n}", "function showReportDialog(options = {}, hub = getCurrentHub()) {\n\t // doesn't work without a document (React Native)\n\t if (!WINDOW$1.document) {\n\t (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('Global document not defined in showReportDialog call');\n\t return;\n\t }\n\n\t const { client, scope } = hub.getStackTop();\n\t const dsn = options.dsn || (client && client.getDsn());\n\t if (!dsn) {\n\t (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('DSN not configured for showReportDialog call');\n\t return;\n\t }\n\n\t if (scope) {\n\t options.user = {\n\t ...scope.getUser(),\n\t ...options.user,\n\t };\n\t }\n\n\t if (!options.eventId) {\n\t options.eventId = hub.lastEventId();\n\t }\n\n\t const script = WINDOW$1.document.createElement('script');\n\t script.async = true;\n\t script.src = getReportDialogEndpoint(dsn, options);\n\n\t if (options.onLoad) {\n\t // eslint-disable-next-line @typescript-eslint/unbound-method\n\t script.onload = options.onLoad;\n\t }\n\n\t const injectionPoint = WINDOW$1.document.head || WINDOW$1.document.body;\n\t if (injectionPoint) {\n\t injectionPoint.appendChild(script);\n\t } else {\n\t (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('Not injecting report dialog. No injection point found in HTML');\n\t }\n\t}", "function launchReport(script) {\n Launch(script, 'Report', 800, 550);\n}", "function Install_InsertReport()\n{\n var typeid;\n if( _gr_isIE )\n typeid = 'classid=\"clsid:25240C9A-6AA5-416c-8CDA-801BBAF03928\" ';\n else\n typeid = 'type=\"application/x-grplugin-report\" ';\n typeid += gr_CodeBase;\n\tdocument.write('<object id=\"_ReportOK\" ' + typeid);\n\tdocument.write(' width=\"0\" height=\"0\" VIEWASTEXT>');\n\tdocument.write('</object>');\n}", "function showReportDialog() {\n return;\n}", "function loadForm() {\n var $this = $(this),\n type = $this.attr('id').split('-')[2],\n opts = options[type];\n\n if (windowManager) {\n windowManager.openWindow(reportDialog);\n } else {\n function ReportDialog(config) {\n ReportDialog.super.call(this, config);\n }\n OO.inheritClass(ReportDialog, OO.ui.ProcessDialog);\n\n ReportDialog.static.name = 'report-dialog';\n ReportDialog.static.title = opts.buttonText;\n ReportDialog.static.actions = [\n { label: 'Cancel', flags: ['safe', 'close'] },\n { label: 'Submit', action: 'submit', flags: ['secondary'] },\n ];\n\n // initialise dialog, append content\n ReportDialog.prototype.initialize = function () {\n ReportDialog.super.prototype.initialize.apply(this, arguments);\n this.content = new OO.ui.PanelLayout({\n padded: true,\n expanded: true\n });\n this.content.$element.append(opts.form);\n this.$body.append(this.content.$element);\n this.$content.addClass('vstf-ui-Dialog');\n this.$content.addClass('soap-reports');\n };\n\n // Handle actions\n ReportDialog.prototype.getActionProcess = function (action) {\n if (action === 'submit') {\n var dialog = this;\n dialog.pushPending();\n dialog.actions.others[0].pushPending();\n submitForm(opts).then(function() {\n dialog.popPending();\n dialog.actions.others[0].popPending();\n }); // disable the Submit button\n }\n return ReportDialog.super.prototype.getActionProcess.call(this, action);\n };\n\n // Create the Dialog and add the window manager.\n windowManager = new OO.ui.WindowManager({\n classes: ['vstf-windowManager']\n });\n $(document.body).append(windowManager.$element);\n // Create a new dialog window.\n reportDialog = new ReportDialog({\n size: 'larger'\n });\n // Add window and open\n windowManager.addWindows([reportDialog]);\n windowManager.openWindow(reportDialog);\n\n // Close dialog when clicked outside the dialog\n reportDialog.$frame.parent().on('click', function (e) {\n if (!$(e.target).closest('.vstf-ui-Dialog').length) {\n reportDialog.close();\n }\n });\n\n // Expand dialog when socks is clicked\n $('#socks, label[for=socks]').on('click', function (e) {\n setTimeout(function(){\n reportDialog.updateSize();\n }, 600);\n });\n\n mw.hook('soap.reportsform').fire();\n }\n }", "function openReportDialog() {\n // Change cursor to reports\n changeCursor('reports');\n\n // Open the reports dialog box\n $(\"#createReports\").dialog({\n title: 'Reports',\n width: 300,\n height: 400,\n position: [$(window).width() - 330, $(window).height() - 520]\n });\n\n // Re-position the dialog of window is resized\n dojo.connect(dijit.byId('map'), 'resize', function () {\n $(\"#createReports\").dialog({\n position: [$(window).width() - 330, $(window).height() - 520]\n });\n });\n}", "function\nASSERT_Reporter_Viewer(){\n/*m)private void*/this.setDisplay=function(\n/*a)string*/content\n){\nthis.widget.document.getElementById('report').innerHTML += content;\n}\t//---setDisplay\n\n/*m)private void*/this.setClear=function(){\nif(!this.isReportClosed()) this.widget.document.getElementById('report').innerHTML = '';\n}\t//---setClear\n\n/*m)protected void*/this.setClose=function(){\nif(!this.isReportClosed()) this.widget.close();\n}\t//---setClose\n\n/*m)private void*/this.getViewer = function () {\n if (this.isReportClosed()) this.widget = window.open(REPORTER_URL, 'REPORTER',\n\t'width=' + REPORTER_WIDTH + ',height=' + REPORTER_HEIGHT + ',left=' + REPORTER_LEFT + ',top=' + REPORTER_TOP + ',dependent=1,scrollbars=1');\n} \t//---getViewer\n\n/*m)private boolean*/this.isReportClosed=function(){\nreturn !this.widget || this.widget.closed;\n}\t//---isReportClosed\n\n/*m)private window*/this.widget = null;\n}", "function showReportDialog(options) {\n if (options === void 0) { options = {}; }\n if (!options.eventId) {\n options.eventId = hub_getCurrentHub().lastEventId();\n }\n var client = hub_getCurrentHub().getClient();\n if (client) {\n client.showReportDialog(options);\n }\n}", "function projectPendInvReport() {\n window.open(\n 'Report?' +\n 'id=' +\n projectID +\n '&type=Project PendInv Report ' +\n '~' +\n $('#pendingInvoiceSelector2').val()\n );\n}", "function runreport(url, container) \r\n{\r\n url += \"&reportico_template=\";\r\n url += \"&reportico_ajax_called=1\";\r\n reportico_jquery(container).closest(\"#reportico_container\").addClass(\"loading\");\r\n reportico_jquery.ajax({\r\n type: \"POST\",\r\n contentType: \"text/html; charset=utf-8\",\r\n url: url,\r\n dataType: \"html\",\r\n error: function(XMLHttpRequest, textStatus, errorThrown) {\r\n alert (\"Ajax Error: \" + XMLHttpRequest.responseText + \"\\nTextStatus: \" + textStatus + \"\\nErrorThrown: \" + errorThrown);\r\n },\r\n success: function(data, status) {\r\n reportico_jquery(container).closest(\"#reportico_container\").removeClass(\"loading\");\r\n fillDialog(data,container);\r\n }\r\n });\r\n}", "function showReportDialog(options) {\r\n if (options === void 0) {\r\n options = {};\r\n }\r\n if (!options.eventId) {\r\n options.eventId = Object(_sentry_core__WEBPACK_IMPORTED_MODULE_0__[\"getCurrentHub\"])().lastEventId();\r\n }\r\n var client = Object(_sentry_core__WEBPACK_IMPORTED_MODULE_0__[\"getCurrentHub\"])().getClient();\r\n if (client) {\r\n client.showReportDialog(options);\r\n }\r\n}", "function onReportClick() {\n\tcommonFunctions.sendScreenshot();\n}", "function showReportDialog(options) {\n if (options === void 0) { options = {}; }\n if (!options.eventId) {\n options.eventId = Object(_sentry_core__WEBPACK_IMPORTED_MODULE_0__[\"getCurrentHub\"])().lastEventId();\n }\n var client = Object(_sentry_core__WEBPACK_IMPORTED_MODULE_0__[\"getCurrentHub\"])().getClient();\n if (client) {\n client.showReportDialog(options);\n }\n}", "navigateToReportPage() {\n return this._navigate(this.buttons.report, 'reportPage.js');\n }", "function generateTeamReport() {\n var dialog1 = {\n 'title': 'Response Form',\n 'customTitle': false,\n 'subText': 'Would you like to generate a team report?'\n };\n \n var dialog2 = {\n 'title': 'Enter Time Tracking Response Link',\n 'subText': 'Please enter the response link to generate team report:'\n };\n \n reportDialog(dialog1, createTeamReport, dialog2);\n}", "function fn_showpassreport(type)\n{\t\n\tsetTimeout('removesections(\"#reports-password\");',500);\n\tvar val = $('#districtid').val()+\"~\"+$('#schoolid').val()+\"~\"+type;\n\t$.Zebra_Dialog('Download the report as ', {\n 'type': 'question',\n\t'custom_class': 'myclass',\n 'title': 'Export Users report',\n\t'overlay_close':false,\n 'buttons': [\n {caption: 'PDF', callback: function() { \n\t\t\t\t\toper=\"userpassword\";\n\t\t\t\t\tfilename=$(\"#hidpassname\").val()+new Date().getTime();\n ajaxloadingalert('Loading, please wait.');\n\t\t\t\t\tsetTimeout('showpageswithpostmethod(\"reports-pdfviewer\",\"reports/reports-pdfviewer.php\",\"id='+val+'&oper='+oper+'&filename='+filename+'\");',500);\n\t\t\t\t\t\n\t\t\t\t\t}},\n {caption: 'Excel', callback: function() { \n\t\t\t\t\twindow.open(\"reports/password/reports-password-excelviewer.php?id=\"+val);\n\t\t\t\t\t}},\n\t\t\t\t\t {caption: 'Cancel', callback: function() { \n\t\t\t\t\t}}\n\t\t\t\t\t]\n});\n}", "addNewReport() {\n \n }", "function reportClicked() {\n chrome.runtime.sendMessage({ \"button\": \"report\", \"id\": data[currentIndex]._id });\n}", "function buildDialog() {\n const dashboard = tableau.extensions.dashboardContent.dashboard;\n\n dashboard.worksheets.forEach(function (worksheet) {\n $(\"#selectWorksheet\").append(\"<option value='\" + worksheet.name + \"'>\" + worksheet.name + \"</option>\");\n }); \n\n var worksheetName = tableau.extensions.settings.get(\"selectWorksheet\");\n if (worksheetName != undefined) {\n $(\"#selectWorksheet\").val(worksheetName);\n columnsUpdate();\n } \n\n $('#selectWorksheet').on('change', '', function () {\n columnsUpdate();\n });\n $('#cancel').click(closeDialog);\n $('#save').click(saveButton);\n\n }", "function init() {\n triggerPrintDialog();\n }", "function sendReport() {\r\n\t framework.sendReport(); \r\n}", "function GenerateReport(GenfromSavedFilters, Withemail) {\n //$('.loading').hide();\n //SetLoadingImageVisibility(false);\n hasExcelData = true;\n GenerateReportAddCall();\n}", "function GenerateReport(GenfromSavedFilters, Withemail) {\n //$('.loading').hide();\n //SetLoadingImageVisibility(false);\n hasExcelData = true;\n GenerateReportAddCall();\n}", "function OpenReport(url) {\n setTimeout(function () {\n var dialogStyle = \"dialogWidth: 600px; dialogHeight: 500px; resizable: yes\";\n var returnValue = showModalDialog(url, null, dialogStyle);\n }\n , 100);\n}", "function CreateResultWindow(report)\n{\n return window.open('ReportResult.aspx?file=' + report, \"\", \"\"); \n}", "function showDialog() {\n var ui = HtmlService.createTemplateFromFile('Dialog')\n .evaluate()\n .setWidth(400)\n .setHeight(150);\n DocumentApp.getUi().showModalDialog(ui, DIALOG_TITLE);\n}", "function ajax_generate_report(dataSent){ //Report\n\t\t$.ajax({\n type:\"POST\",\n\t\t\tasync:false, // the key to open new windows when success\n url:urlModuleController + \"ajax_generate_report\",\t\t\t\n data:dataSent,\n\t\t\tbeforeSend: function(){\n\t\t\t\t$('#boxProcessing').text('Procesando...');\n\t\t\t},\n success: function(data){\n\t\t\t\tswitch(data){\n\t\t\t\t\tcase '1000'://CLIENTES\n\t\t\t\t\t\topen_in_new_tab(urlModuleController+'vreport_ins_or_outs');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '998'://VENDEDORES\n\t\t\t\t\t\topen_in_new_tab(urlModuleController+'vreport_transfers');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault://ITEMS\n\t\t\t\t\t\topen_in_new_tab(urlModuleController+'vreport_ins_and_outs');\n\t\t\t\t\t\tbreak;\t\n\t\t\t\t}\n\t\t\t\t$('#boxProcessing').text('');\n\t\t\t},\n\t\t\terror:function(data){\n\t\t\t\tshowGrowlMessage('error', 'Vuelva a intentarlo.');\n\t\t\t\t$('#boxProcessing').text('');\n\t\t\t}\n });\n\t}", "function NewScriptDialogHelp() {\n\tgetNewScript().showDialog('Sheeter-DialogHelp.html', project_name + ' Help');\n}", "function load_report_page() {\n page = 'user_help';\n load_page();\n}", "function showstockreport(reportmsg,title){\n\t//var defer = $.Deferred();,\n\t$(\"#reportdiv\").remove()\n\t//$myDialog=\"\";\n\t$myDialog=$(\"<div id='reportdiv'>\"+reportmsg+\"</div>\");\n\t$myDialog.dialog({\n\t appendTo: \"#stockpage-container\",\n\t title: title, \n\t zIndex: 10000,\n\t autoOpen: true,\n resizable: false,\n height:600,\n\t width:1000,\n modal: true,\n buttons: {\n \"طباعة\": function() {\n\t\t\t//$( this ).confirmed= true;\n\t\t\tdata=$(\"#reportdiv\").html()\n\t\t\tspecific_css=\"<style>.repcontainer{width:100%;font-family: sans-serif;background-color:#FFF;\t}.repheader{margin:10px 3px;\t}.reptable{padding:5px;border:solid #999 1px;\t}.boxer { display: table; border-collapse: collapse; width:950px; } .boxer .box-row { display: table-row; float:right; margin:0px 2px; width:100%;} .boxer .box { display: table-cell; text-align: center; vertical-align:middle; border: 1px solid #999; float:right; padding:3px; min-height:120px; font-size:18px;}.tblhead .box { display: table-cell; text-align: center; vertical-align:middle; border: 1px solid #999; float:right; padding:3px; min-height:50px; font-size:18px;}.tblcode{width:25px;\t}.tblitmname{width:105px;\t}.tblsold{\twidth:55px;}.tblbought{\twidth:55px;}.tblspoil{\twidth:55px;}.tbltrans{\twidth:57px;}.tblcorrbal{\twidth:55px;}.tblunit{\twidth:40px;}.tblnotes{width:150px;\t}.tblbal{width:100px;\t}.tbldat{width:100px;\t}.bld{\tfont-weight:bold;}.tblhead{background-color:#CCC;height:59px;\t}.opn{\tbackground-color:#F0F0F0;}.headertitle{width:100%;font-size:24px;height:80px;text-align:right;direction:rtl;\t}.headrow{\tfloat:right;\twidth:100%;}.headtxttitle{\tfont-weight:bold;\tdisplay:inline-block;\tfloat:right;\tmargin:5px;}.headtxt{\tdisplay:inline-block;\tfloat:right;\tmargin:5px;}</style>\"\n\t\t\tPopup(data,specific_css)\n\t\t\t //callbackdialog(true,object,option)\n //$( this ).dialog( \"close\" );\n\t\t \n },\n \"اغلاق\": function() {\n\t\t\t//$( this ).confirmed=false;\n\t\t\t//callbackdialog(false,object,option)\n $( this ).dialog( \"close\" );\n\t\t\n }\n }\n });/// end of dialog\t\n}////end of func", "function _makeReport() {\n document.getElementById(\"reportTable\").hidden = false;\n document.getElementById(\"chartContainer\").hidden = false;\n updateReportFromDB();\n}", "function GenerateReport(GenfromSavedFilters, Withemail) {\n\n //$('.loading').hide();\n //SetLoadingImageVisibility(false);\n hasExcelData = true;\n\n var isPageValid = ValidateScreen();\n\n if (!isPageValid)\n return false;\n\n GenerateReportAddCall();\n\n}", "function PrintReport()\n{\n try {\n debugger;\n\n $(\".buttons-excel\").trigger('click');\n\n\n }\n catch (e)\n {\n notyAlert('error', e.message);\n }\n}", "function ApplyReportPlugin(jSONReportResult, htmlDivId){\n\n //Plugin configuration\n var pluginOptions = { \n ReportResult : jSONReportResult,\n ReportTemplatesDir : _reports_ReportTemplatesDir,\n FlashChartDir : _reports_FlashChartDir,\n ReportId : jSONReportResult.ResultId,\n ReportName : jSONReportResult.ResultName,\n GlobalParameters : GetReportParameters(),\n HoursDay : TryParseInt($(\"#hidHoursDay\").val(), 8)\n }; \n\n\n //Apply the correct plugin\n switch(jSONReportResult.ResultName){\n\n case \"His_Sw_CycleTimeSummary\":\n $(\"#\" + htmlDivId).BizRep_Sw_CycleTimeSummary(pluginOptions);\n break;\n\n case \"His_Sw_LevelOfService\":\n $(\"#\" + htmlDivId).BizRep_Sw_LevelOfService(pluginOptions);\n break;\n\n case \"His_Sw_DurationTrend_Single\":\n $(\"#\" + htmlDivId).BizRep_Sw_DurationTrend_Single(pluginOptions);\n break;\n\n case \"His_Sw_ActivationClosingTrend_Single\":\n $(\"#\" + htmlDivId).BizRep_Sw_ActivationAndClosingTrend_Single(pluginOptions);\n break;\n\n case \"His_Sw_DurationHistogram_Single\":\n $(\"#\" + htmlDivId).BizRep_Sw_DurationHistogram_Single(pluginOptions);\n break;\n\n case \"His_Sw_CycleTimeSummary_Single\":\n $(\"#\" + htmlDivId).BizRep_Sw_CycleTimeSummary_Single(pluginOptions);\n break;\n\n case \"His_Sw_LevelOfService_Single\":\n $(\"#\" + htmlDivId).BizRep_Sw_LevelOfService_Single(pluginOptions);\n break;\n\n case \"His_Count_Summary\":\n $(\"#\" + htmlDivId).BizRep_Count_Summary(pluginOptions);\n break;\n\n case \"His_Count_Summary_Single\":\n $(\"#\" + htmlDivId).BizRep_Count_Summary_Single(pluginOptions);\n break;\n\n case \"His_Count_Instances\":\n $(\"#\" + htmlDivId).BizRep_Count_Instances(pluginOptions);\n break;\n\n case \"His_Count_ActivationTrend_Single\":\n $(\"#\" + htmlDivId).BizRep_Count_ActivationTrend_Single(pluginOptions);\n break;\n\n case \"His_Count_Absolute_Summary\":\n $(\"#\" + htmlDivId).BizRep_AbsoluteCount_Summary(pluginOptions);\n break;\n \n case \"His_Count_Absolute_Instances\":\n $(\"#\" + htmlDivId).BizRep_AbsoluteCount_Instances(pluginOptions);\n break;\n\n case \"His_Count_Absolute_Summary_Single\":\n $(\"#\" + htmlDivId).BizRep_AbsoluteCount_Summary_Single(pluginOptions);\n break;\n\n case \"His_Count_Absolute_ActivationTrend_Single\":\n $(\"#\" + htmlDivId).BizRep_AbsoluteCount_ActivationTrend_Single(pluginOptions);\n break;\n\n case \"Onl_Res_WorkInProgress\":\n $(\"#\" + htmlDivId).BizRep_Onl_Res_WorkInProgress(pluginOptions);\n break;\n\n case \"Onl_Res_WorkInProgressByUser\":\n $(\"#\" + htmlDivId).BizRep_Onl_Res_WorkInProgressByUser(pluginOptions);\n break;\n \n default:\n break;\n } \n}", "function enterReport(proj_name, proj_address, proj_city, proj_county, proj_state, proj_desc, bldg_size, proj_mgr, proj_sup, architect, civil_eng, mech_eng, elec_eng, plumb_eng, land_arch, int_design, sched_start, sched_compl, actual_start, actual_compl, sched_reason, init_budget, final_budget, budget_reason, sector, const_type, awards, proj_challenges, proj_strengths, UserId) {\n var UserId = currentUser.id;\n // function enterReport(pers_spir, pers_emot, pers_health, pers_pr_req) {\n $.post(\"/api/reportentry\", {\n proj_name: proj_name,\n proj_address: proj_address,\n proj_city: proj_city,\n proj_county: proj_county,\n proj_state: proj_state,\n proj_desc: proj_desc,\n bldg_size: bldg_size,\n proj_mgr: proj_mgr,\n proj_sup: proj_sup,\n architect: architect,\n civil_eng: civil_eng,\n mech_eng: mech_eng,\n elec_eng: elec_eng,\n plumb_eng: plumb_eng,\n land_arch: land_arch,\n int_design: int_design,\n sched_start: sched_start,\n sched_compl: sched_compl,\n actual_start: actual_start,\n actual_compl: actual_compl,\n sched_reason: sched_reason,\n init_budget: init_budget,\n final_budget: final_budget,\n budget_reason: budget_reason,\n sector: sector,\n const_type: const_type,\n awards: awards,\n proj_challenges: proj_challenges,\n proj_strengths: proj_strengths,\n UserId: UserId\n\n }).then(function (data) {\n console.log(\"abcde\")\n window.location.replace(data);\n // If there's an error, handle it by throwing up a bootstrap alert\n }).catch(handleLoginErr);\n }", "selectReport(report) {\n this.$scope.reportHash = report;\n this.setMode('report');\n }", "function onStart() {\n var openerController = View.getOpenerView().controllers.get(\"confirmRoomReservController\");\n var columns = initColumns();\n var rows = openerController.rows;\n \n\tvar localFormatRows = rows;\n\t\n\t// localization data format. \n\tfor (var i = 0; i < rows.length; i++) {\n\t\t// Date format\n\t\tlocalFormatRows[i].col1 = ABRV_ISODate2UserDate(rows[i].col1);\t\t\n\t\t\n\t\t// Time format\n\t\tlocalFormatRows[i].col7 = ABRV_convert12H(rows[i].col7);\n\t\tlocalFormatRows[i].col8 = ABRV_convert12H(rows[i].col8);\n\t}\n\t\n var panel = View.getControl('', 'rm_report');\n if (panel == null) {\n View.showMessage(getMessage(\"errNotFound\"));\n return;\n }\n \n var configObj = new Ab.view.ConfigObject();\n configObj['rows'] = localFormatRows; \n configObj['columns'] = columns;\n \n var grid = new Ab.grid.ReportGrid('rm_report_grid', configObj);\n grid.sortEnabled = false;\n if (rows.length == 0) {\n grid.hasNoRecords = true;\n }\n\t\n grid.build();\n}", "function processGenerateReportButton() \n{ \n\t//console.log(\"Entereed generateReport\");\n\t//console.log(currentPage);\n\t\n\tif (currentPage == \"Campus\")\n\t{\n\t\tinitCampusReportGeneration();\n\t}\n\telse\n\t{ \n\t\tinitBuildingReportGeneration(currentPage);\n\t}\n\t\n}", "function trapExcelReportGeneration(){\n\ttrapReportCreating('excelReport');\n}", "function showReportPropertyDialog(options) {\n return spReportPropertyDialog.showModalDialog(options);\n }", "function configure() {\r\n \r\n const popupUrl = `${window.location.origin}/tableau-extension-sunburst/dialog.html`;\r\n //const popupUrl = `${window.location.origin}/dialog.html`;\r\n\r\n let input = \"\";\r\n\r\n tableau.extensions.ui.displayDialogAsync(popupUrl, input, { height: 540, width: 800 }).then((closePayload) => {\r\n // The close payload is returned from the popup extension via the closeDialog method.\r\n $('#interval').text(closePayload);\r\n }).catch((error) => {\r\n // One expected error condition is when the popup is closed by the user (meaning the user\r\n // clicks the 'X' in the top right of the dialog). This can be checked for like so:\r\n switch (error.errorCode) {\r\n case tableau.ErrorCodes.DialogClosedByUser:\r\n console.log(\"Dialog was closed by user\");\r\n break;\r\n default:\r\n console.error(error.message);\r\n }\r\n });\r\n }", "function ExportReportData() {\n debugger;\n //$('.excelExport').show();\n //OnServerCallBegin();\n BindOrReloadEnquiryReportTable('Export');\n}", "function showDialog() {\r\n \r\n // create dialog\r\n var dialogWindow = new Window('dialog', 'Auf PRINT-Artboard kopieren'); \r\n\r\n\r\n // choose number of columns for print\r\n dialogWindow.add('statictext', undefined, \"Spaltenanzahl\");\r\n dialogWindow.columnSelect = dialogWindow.add('dropdownlist', undefined, [1,2,3,4]);\r\n dialogWindow.columnSelect.selection = 0;\r\n\r\n\r\n // choose title, source, author \r\n dialogWindow.headerFooterBar = dialogWindow.add(\"panel\", undefined, \"Kopf- und Fusszeile\");\r\n dialogWindow.headerFooterBar.add('statictext', undefined, \"Titel\");\r\n dialogWindow.headerFooterBar.title = dialogWindow.headerFooterBar.add(\"edittext\", { x: 0, y: 0, width: 200, height: 20 }, titleTextFrame.contents);\r\n dialogWindow.headerFooterBar.add('statictext', undefined, \"Quellen\");\r\n dialogWindow.headerFooterBar.sources = dialogWindow.headerFooterBar.add(\"edittext\", { x: 0, y: 0, width: 200, height: 20 }, sourcesTextFrame.contents);\r\n dialogWindow.headerFooterBar.add('statictext', undefined, \"Kürzel\");\r\n dialogWindow.headerFooterBar.author = dialogWindow.headerFooterBar.add(\"edittext\", { x: 0, y: 0, width: 200, height: 20 }, authorTextFrame.contents);\r\n\r\n // choose font conversion\r\n dialogWindow.convertFonts = dialogWindow.add('checkbox', undefined, \"Alle enthaltenen Schriftelemente zu Univers Condensed/8pt konvertieren\");\r\n dialogWindow.convertFontsToBlack = dialogWindow.add('checkbox', undefined, \"Schriftelemente zusätzlich schwarz einfärben\");\r\n\r\n // add okay button and add listener\r\n dialogWindow.button = dialogWindow.add('button', undefined, \"Import for Print\");\r\n dialogWindow.button.onClick = importForPrint;\r\n dialogWindow.show(); \r\n function importForPrint() {\r\n var numColumns = dialogWindow.columnSelect.selection + 1;\r\n var title = dialogWindow.headerFooterBar.title.text;\r\n var sources = dialogWindow.headerFooterBar.sources.text;\r\n var author = dialogWindow.headerFooterBar.author.text;\r\n var convertFonts = dialogWindow.convertFonts.value;\r\n var convertFontsToBlack = dialogWindow.convertFontsToBlack.value;\r\n dialogWindow.close();\r\n\r\n updatePrintTextFrames(title, sources, author);\r\n duplicateToPrintArtboard(numColumns);\r\n if (convertFonts === true) {\r\n convertCount = convertPrintTextFramesToUnivers(printGraphicGroup, convertFontsToBlack, 0);\r\n alert(convertCount + \" Schriftelemente wurden in der Grafik gefunden und zu Univers Condensed/8pt konvertiert.\")\r\n }\r\n alert(\"Grafik wurde erfolgreich auf dem PRINT-Artboard eingefügt\")\r\n }\r\n\r\n}", "function getReport(){\n\n }", "function showDialog(file, title)\n{\n \tvar html = HtmlService.createTemplateFromFile(file).evaluate();\n\tSpreadsheetApp.getUi().showModalDialog(html, title);\n}", "function PrintReport() {\n try {\n $(\".buttons-excel\").trigger('click');\n\n }\n catch (e) {\n notyAlert('error', e.message);\n }\n}", "function PrintReport() {\n try {\n $(\".buttons-excel\").trigger('click');\n\n }\n catch (e) {\n notyAlert('error', e.message);\n }\n}", "function showDialog() {\n printDebugMsg(\"Show dialog\");\n var ui = HtmlService.createTemplateFromFile('Dialog')\n .evaluate()\n .setWidth(400)\n .setHeight(190)\n .setSandboxMode(HtmlService.SandboxMode.IFRAME);\n SpreadsheetApp.getUi().showModalDialog(ui, DIALOG_TITLE);\n}", "function exportReport(exportType) {\r\n\tvar network_id = $('#selectbox_agency').val();\r\n\tvar title= $('#selectbox_agency option:selected').text();\r\n\tvar loadingUrl = rootUrl + '/GenerateJasperReport' + '?export_type='\r\n\t\t\t+ exportType + '&jrxml=daily_vlmo&p_end_date='\r\n\t\t\t+ selectEndDate.format('yyyy-mm-dd') + '&p_start_date='\r\n\t\t\t+ selectStartDate.format('yyyy-mm-dd') + '&path=vlmo'\r\n\t\t\t+ \"&p_network_id=\" + network_id+\"&p_title=\"+title;\r\n\twindow.open(loadingUrl);\r\n}", "function SWEShowReportPopup (url, strReportName)\n{ \n if (url == \"\")\n {\n if ( typeof(s_SWEReport ) != \"undefined\" )\n {\n s_SWEReport.options[0].selected = true;\n }\n return;\n }\n \n if (strReportName == null)\n {\n strReportName = \"\";\n }\n \n var strCurrentFrame = Top()._swescript.GetCurrentAppletName();\n if (strCurrentFrame == null)\n {\n strCurrentFrame = \"\";\n }\n \n //propSet string like : @0`0`2`0``0`CurrentFrameName`<CurrentFrame>`ReportExecutableName`<ReportName>`\n //Some of them will not be used, but still we add them.\n var propSet = \"@0`0`2`0``0`\";\n propSet = propSet + \"CurrentFrameName`\" + strCurrentFrame + \"`\";\n propSet = propSet + \"ReportExecutableName`\" + strReportName + \"`\";\n \n url = SWEAppendArgsToURL(url, \"SWEIPS\", propSet);\n \n var bFromPopup = IsSWEPopup(this);\n if (pendingChanges(bFromPopup) && StopForSavingData(bFromPopup))\n {\n if ( typeof(s_SWEReport ) != \"undefined\" )\n {\n s_SWEReport.options[0].selected = true;\n }\n return;\n }\n\n \n SWEShowPopup(url);\n \n if ( typeof(s_SWEReport ) != \"undefined\" )\n {\n s_SWEReport.options[0].selected = true;\n }\n}", "function showTemplateDialog() {\n\tvar dialog = document.getElementById('my-dialog');\n\t\n\tif (dialog) {\n\t\tdialog.show();\n\t\t} else {\n\t\tons.createElement('dialog.html', { append: true })\n\t\t.then(function(dialog) {\n\t\t\tdialog.show();\n\t\t});\n\t}\n}", "function addReport(){\r\n var text = \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur ac nisi eu elit rhoncus mattis dignissim vel sem. Donec bibendum augue velit, nec gravida turpis ornare eget. Mauris eu sapien bibendum, blandit risus at, pretium tellus. Donec volutpat non sem a efficitur. Curabitur turpis magna, elementum ac felis nec, congue finibus massa. Quisque laoreet tincidunt quam, sed mollis augue varius egestas. Curabitur quis sollicitudin diam, non tempus tortor. Nam condimentum arcu sed lacus rhoncus, id tincidunt lectus vehicula.\";\r\n var group = 1; //changeable\r\n \r\n //sample populator for report\r\n var ctr = 1;\r\n for(var i = 1; i < 10; i++,ctr++){\r\n if(ctr > 3){\r\n ctr = 1;\r\n }\r\n group = ctr;\r\n document.getElementById(\"report-container\").innerHTML +='<div data-toggle=\"modal\" data-target=\"#report-full\" class=\"card report-card mb-3 \" style=\"min-width:100%\"><div class=\"row no-gutters\"><div class=\"col\"><div class=\"card-body text-wrap\"><span class=\"badge badge-pill\" style=\"background-color:'+colors[group-1]+'\">Group '+ group+'</span><p class=\"text-truncate\">'+text+'</p></div></div></div></div>';\r\n }\r\n}", "function buildDialogs() {\n\t\tajaxHelper.getUsers(pageData.songId);//set initial user list as something to fall back on\n\n\t\t/* \n\t\tThis dialog is shared between the add and change instrument functions (they just update the title etc)\n\t\t*/\n\t\t$('.instrument-dialog').dialog({\n\t\t\tmodal : true,\n\t\t\ttitle : 'Add Instrument',\n\t\t\tautoOpen : false,\n\t\t\tbuttons : [{text : 'OK', click : function() {\n\t\t\t\t//need to work out the instrument to add/change\n\t\t\t\tvar familyIndex = parseInt($('select#instrument-class').val());//the family of instrument\n\t\t\t\tvar instrumentIndex = parseInt($('select#instrument-choice').val());\n\n\t\t\t\t//calls either add or change instrument (depending on dialog) with the selected instrument as an argument\n\t\t\t\tpageData.instrumentFunction(familyIndex * 8 + instrumentIndex);\n\t\t\t\t$('.instrument-dialog').dialog(\"close\");\n\t\t\t}},\n\t\t\t{text : 'Cancel', click : function() {\n\t\t\t\t$('.instrument-dialog').dialog(\"close\");\n\t\t\t}}]\n\t\t});\n\n\t\t$('select#instrument-class').change(function() {\n\t\t\tvar index = $(this).val();\n\t\t\t$('select#instrument-choice').empty();//remove any current entries\n\t\t\tfor(var i = 0; i < 8; i++) {//loop through family of instruments and append to lower select box\n\t\t\t\tvar instrumentNo = index * 8 + i;\n\t\t\t\t$('select#instrument-choice').append(\"<option value='\" + i + \"'>\" + midiHelper.getInstrumentName(instrumentNo) + \"</option>\");\n\t\t\t}\n\t\t});\n\t\t$('select#instrument-class').change();//call it once to set fill it in initially\n\n\t\t$('button.add-instrument').click(function() {//set up dialog to work for add instrument\n\t\t\tif($('.tab-content').children().length >= pageData.maxTabs) {\n\t\t\t\treturn;//we have reached maximum number of tabs\n\t\t\t}\n\t\t\t$('.ui-dialog-titlebar').html(\"Add Instrument\");\n\t\t\tpageData.instrumentFunction = addInstrument;\n\t\t\t$('.instrument-dialog').removeClass('no-display');\n\t\t\t$('.instrument-dialog').dialog('open');\n\t\t});\n\n\t\t$('button.change-instrument').click(function() {//set up dialof to work for change instrument\n\t\t\t$('.ui-dialog-titlebar').html(\"Change Instrument\");\n\t\t\tpageData.instrumentFunction = changeInstrument;\n\t\t\t$('.instrument-dialog').removeClass('no-display');\n\t\t\t$('.instrument-dialog').dialog('open');\n\t\t});\n\n\t\t/*\n\t\tCreate invite friends dialog\n\t\t*/\n\t\t$('div.invite-dialog').dialog({\n\t\t\tmodal : true,\n\t\t\ttitle : 'Invite friends to collaborate',\n\t\t\tautoOpen : false,\n\t\t\tbuttons : [{text : 'Cancel', click : function() {\n\t\t\t\t$('.invite-dialog').dialog(\"close\");\n\t\t\t}}],\n\t\t\topen : function() {\n\t\t\t\tajaxHelper.getUsers(pageData.songId);//update list of users\n\t\t\t\t$(this).removeClass(\"no-display\");\n\t\t\t}\n\t\t});\n\n\t\t$('.invite-button').click(function() {\n\t\t\t$('div.invite-dialog').dialog(\"open\");\n\t\t\t$('.ui-dialog-titlebar').html(\"Invite friends to collaborate\");\n\t\t});\n\n\n\t\t$('input.name-bar').keyup(function(){\n\t\t\t//compare name entered to list of users whenever user types something \n\t\t\t//and draw a list of matches below with invite buttons for each one\n\t\t\tvar name = $(this).val();\n\t\t\tvar matches = searchForPossibleUser(name);\n\n\t\t\tif(!matches || matches.length === 0) {\n\t\t\t\t$('table.results-table tbody').empty();\n\t\t\t\t$('span.invite-info').html(\"No results\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$('span.invite-info').html(\"Results\");\n\t\t\t$('table.results-table tbody').empty();//get rid of previous matches \n\t\t\tfor(var i = 0; i < matches.length; i++) {\n\t\t\t\tvar html = '<tr><td>' + matches[i].username + '</td><td><button class=\"btn btn-primary fresh\" id=\"match' +\n\t\t\t\tmatches[i].user_id + '\">Invite' + '</button></td></tr>';\n\n\t\t\t\t$('table.results-table tbody').append(html);\n\t\t\t\t$('button.fresh').click(function() {//fresh tag used to mark button out to register callback\n\t\t\t\t\tajaxHelper.sendInvite(pageData.songId,$(this).attr('id').substring(5), ajaxFailure);\n\t\t\t\t\t$(this).html(\"Added\").attr(\"disabled\",\"disabled\");\n\t\t\t\t});\n\t\t\t\t$('button.fresh').removeClass('fresh');//get rid of tag after used to register callback\n\t\t\t}\n\t\t});\n\t}", "function setOptions() {\n if(typeof window.dev === 'undefined' || typeof window.dev.i18n === 'undefined') {\n importScriptPage('MediaWiki:I18n-js/code.js', 'dev');\n }\n mw.hook('dev.i18n').add(function(i18no) {\n i18no.loadMessages('u:vstf:MediaWiki:Custom-Reports/i18n.json').done(function(i18n) {\n options = {\n\n /* \n //BEGIN EXAMPLE\n example: {\n page: 'Page name the form is for',\n buttonText: 'Text for button to open form',\n form: 'HTML form for reporting users. Each input/textarea should have an id. any optional inputs should be marked with the `optional` class. If any attributes need URI encoding, the relevant inputs should have the `data-encode` attribute set to `true`.',\n // this is where the input ids in the form are matched to numbers\n // for use in the summary/submitted text\n formParams: {\n '$1': 'foo',\n '$2': 'bar'\n },\n submitText: 'Text to submit to the page. Any form parameters can be inserted via the key names in `formParams`',\n summary: 'Text used for the edit summary. Any form parameters can be inserted via the key names in `formParams`',\n sectionTitle: 'Text used as the section title. Any form parameters can be inserted via the key names in `formParams`'\n },\n // END EXAMPLE\n */\n\n profile: {\n page: 'Report:User_profile_headers',\n buttonText: i18n.msg(\"buttonProfile\").escape(),\n form: '<form class=\"WikiaForm ReportForm\" method=\"\" name=\"\" id=\"profile\">' +\n '<fieldset>' +\n '<div class=\"rf-wrapper\">' +\n '<div class=\"rf-section\" style=\"color:#F00;font-size:16px;\"><b>' + i18n.msg(\"formSocial\").escape() + '</b></div>' +\n '<div class=\"rf-section\"><div class=\"rf-section-title\"><b>' + i18n.msg(\"formWikiName\").escape() + '</b></div>' +\n '<input id=\"wikiname\" class=\"rf-wikiname optional\" type=\"text\" placeholder=\"CJRichards and Applemasterexpert Wiki\"/>' +\n '</div>' + \n '<div class=\"rf-section\"><div class=\"rf-section-title\"><b>' + i18n.msg(\"formWikiURL\").escape() + '</b></div>' +\n '<input id=\"wikiurl\" class=\"rf-wikiurl\" type=\"text\" placeholder=\"chrichards-and-applemasterexpert.fandom.com\"/>' +\n '</div>' +\n '<div class=\"rf-section\"><div class=\"rf-section-title\"><b>' + i18n.msg(\"formUsername\").escape() + '</b> ' + i18n.msg(\"formOfBadUser\").escape() + ' (' + i18n.msg(\"formMultipleUsers\").escape() + ')</div>' +\n '<textarea name=\"\" id=\"user\" class=\"rf-wikiuser\" type=\"text\" placeholder=\"LightHouse38\\nCJRichards\"></textarea>' +\n '</div>' +\n '<div class=\"rf-section\"><div class=\"rf-section-title\"><b>' + i18n.msg(\"formReason\").escape() + '</b></div>' +\n '<textarea name=\"\" id=\"comment\" placeholder=\"' + i18n.msg(\"formphReason\").escape() + '\" class=\"optional\"></textarea>' +\n '</div>' +\n '<div class=\"rf-section\">' +\n '<div class=\"rf-checkbox rf-socks\"><input type=\"checkbox\" id=\"socks\" class=\"option-input optional\"/><label for=\"socks\">' + i18n.msg(\"formSockpuppet\").escape() + '</label>' + \n '<div class=\"rf-section rf-socks-box\"><div class=\"rf-section-title\"><b>' + i18n.msg(\"formUsername\").escape() + '</b> ' + i18n.msg(\"formOfSock\").escape() +\n '<textarea name=\"\" id=\"sockusers\" class=\"rf-socks optional\" type=\"text\" placeholder=\"Apple\\nSTuNsPoRe\"></textarea>' +\n '</div>' +\n '</div>' +\n '</div>' + \n '</div>' +\n '</fieldset>' +\n '</form>',\n formParams: {\n '$1': 'wikiurl',\n '$2': 'wikiname',\n '$3': 'user',\n '$4': 'comment',\n '$5': 'user', // for different styling\n '$7': 'socks',\n '$8': 'sockusers'\n },\n submitText: '{{Report profile|$1\\n' +\n '|$4\\n' +\n '|$3\\n' +\n '$7$8' +\n '|' + c.wgUserName + '|' + '~~' + '~~' + '~}}',\n summary: 'New profile report ($2, $5)',\n sectionTitle: '$2'\n },\n vandalism: {\n page: 'Report:Vandalism',\n buttonText: i18n.msg(\"buttonVandalism\").escape(),\n form: '<form class=\"WikiaForm ReportForm\" method=\"\" name=\"\" id=\"vandalism\">' +\n '<fieldset>' +\n '<div class=\"rf-wrapper\">' +\n '<div class=\"rf-section\"><div class=\"rf-section-title\"><b>' + i18n.msg(\"formWikiName\").escape() + '</b></div>' +\n '<input id=\"wikiname\" class=\"rf-wikiname optional\" type=\"text\" placeholder=\"CJRichards and Applemasterexpert Wiki\"/>' +\n '</div>' + \n '<div class=\"rf-section\"><div class=\"rf-section-title\"><b>' + i18n.msg(\"formWikiURL\").escape() + '</b></div>' +\n '<input id=\"wikiurl\" class=\"rf-wikiurl\" type=\"text\" placeholder=\"cjrichards-and-applemasterexpert.fandom.com\"/>' +\n '</div>' +\n '<div class=\"rf-section\"><div class=\"rf-section-title\"><b>' + i18n.msg(\"formUsername\").escape() + '</b> ' + i18n.msg(\"formOfBadUser\").escape() + ' (' + i18n.msg(\"formMultipleUsers\").escape() + ')</div>' +\n '<textarea name=\"\" id=\"user\" class=\"rf-wikiuser\" type=\"text\" placeholder=\"Applemasterexpert\\nRaZoRLeAf\"></textarea>' +\n '</div>' +\n '<div class=\"rf-section\"><div class=\"rf-section-title\"><b>' + i18n.msg(\"formReason\").escape() + '</b></div>' +\n '<textarea name=\"\" id=\"comment\" placeholder=\"' + i18n.msg(\"formphReason\").escape() + '\" class=\"optional\"></textarea>' +\n '</div>' +\n '<div class=\"rf-section\">' +\n '<div class=\"rf-checkbox\"><input type=\"checkbox\" id=\"crosswiki\" class=\"option-input optional\"/><label for=\"crosswiki\">' + i18n.msg(\"formCrossWiki\").escape() + '</label></div>' +\n '</div>' + \n '<div class=\"rf-section\">' +\n '<div class=\"rf-checkbox rf-socks\"><input type=\"checkbox\" id=\"socks\" class=\"option-input optional\"/><label for=\"socks\">' + i18n.msg(\"formSockpuppet\").escape() + '</label>' + \n '<div class=\"rf-section rf-socks-box\"><div class=\"rf-section-title\"><b>' + i18n.msg(\"formUsername\").escape() + '</b> ' + i18n.msg(\"formOfSock\").escape() +\n '<textarea name=\"\" id=\"sockusers\" class=\"rf-socks optional\" type=\"text\" placeholder=\"GHe\\nApplerGamers\"></textarea>' +\n '</div>' +\n '</div>' +\n '</div>' + \n '</div>' +\n '</fieldset>' +\n '</form>',\n formParams: {\n '$1': 'wikiurl',\n '$2': 'wikiname',\n '$3': 'user',\n '$4': 'comment',\n '$5': 'user', // for different styling\n '$6': 'crosswiki',\n '$7': 'socks',\n '$8': 'sockusers'\n },\n submitText: '{{Report vandalism|$1\\n' +\n '|$4\\n' +\n '|$3\\n' +\n '$6$7$8' +\n '|' + c.wgUserName + '|' + '~~' + '~~' + '~}}',\n summary: 'New vandalism report ($1, $5)',\n sectionTitle: '$5 at $2'\n },\n spam: {\n page: 'Report:Spam',\n buttonText: i18n.msg(\"buttonSpam\").escape(),\n form: '<form class=\"WikiaForm ReportForm\" method=\"\" name=\"\" id=\"spam\">' +\n '<fieldset>' +\n '<div class=\"rf-wrapper\">' +\n '<div class=\"rf-section\"><div class=\"rf-section-title\"><b>' + i18n.msg(\"formWikiName\").escape() + '</b></div>' +\n '<input id=\"wikiname\" class=\"rf-wikiname optional\" type=\"text\" placeholder=\"CJRichards and Applemasterexpert Wiki\"/>' +\n '</div>' +\n '<div class=\"rf-section\"><div class=\"rf-section-title\"><b>' + i18n.msg(\"formWikiURL\").escape() + '</b></div>' +\n '<input id=\"wikiurl\" class=\"rf-wikiurl\" type=\"text\" placeholder=\"cjrichards-and-applemasterexpert.fandom.com\"/>' +\n '</div>' +\n '<div class=\"rf-section\"><div class=\"rf-section-title\"><b>' + i18n.msg(\"formUsername\").escape() + '</b> ' + i18n.msg(\"formOfBadUser\").escape() + ' (' + i18n.msg(\"formMultipleUsers\").escape() + ')</div>' +\n '<textarea name=\"\" id=\"user\" class=\"rf-wikiuser\" type=\"text\" placeholder=\"6 times 9\\nChoircutie\"></textarea>' +\n '</div>' +\n '<div class=\"rf-section\"><div class=\"rf-section-title\"><b>' + i18n.msg(\"formReason\").escape() + '</b></div>' +\n '<textarea name=\"\" id=\"comment\" placeholder=\"' + i18n.msg(\"formphReason\").escape() + '\" class=\"optional\"></textarea>' +\n '</div>' +\n '<div class=\"rf-section\">' +\n '<div class=\"rf-checkbox\"><input type=\"checkbox\" id=\"crosswiki\" class=\"option-input optional\"/><label for=\"crosswiki\">' + i18n.msg(\"formCrossWiki\").escape() + '</label></div>' +\n '</div>' + \n '</div>' +\n '</fieldset>' +\n '</form>',\n formParams: {\n '$1': 'wikiurl',\n '$2': 'wikiname',\n '$3': 'user',\n '$4': 'comment',\n '$5': 'user', // for different styling\n '$6': 'crosswiki',\n },\n submitText: '{{Report spam|$1\\n' +\n '|$4\\n' +\n '|$3\\n' +\n '$6' +\n '|' + c.wgUserName + '|' + '~~' + '~~' + '~}}',\n summary: 'New spam report ($1, $5)',\n sectionTitle: '$5 at $2'\n },\n phalanx: {\n page: 'Report:AbuseFilter',\n buttonText: i18n.msg(\"buttonFalsePositive\").escape(),\n form: '<form class=\"WikiaForm ReportForm\" method=\"\" name=\"\" id=\"phalanx\">' +\n '<fieldset>' +\n '<div class=\"rf-wrapper\">' +\n '<div class=\"rf-section\"><div class=\"rf-section-title\"><b>' + i18n.msg(\"formWikiName\").escape() + '</b></div>' +\n '<input id=\"wikiname\" class=\"rf-wikiname optional\" type=\"text\" placeholder=\"CJRichards and Applemasterexpert Wiki\"/>' +\n '</div>' + \n '<div class=\"rf-section\"><div class=\"rf-section-title\"><b>' + i18n.msg(\"formWikiPage\").escape() + '</b></div>' +\n '<input id=\"wikiurl\" class=\"rf-wikiurl\" type=\"text\" placeholder=\"cjrichards-and-applemasterexpert.fandom.com\"/>' +\n '<span class=\"rf-httpend\">/wiki/</span>' +\n '<input id=\"wikipage\" class=\"rf-wikiurl\" type=\"text\" placeholder=\"Report:AbuseFilter\"/>' +\n '</div>' +\n '<div class=\"rf-section\"><div class=\"rf-section-title\"><b>' + i18n.msg(\"formBlockID\").escape() + '</b></div>' +\n '<input id=\"blockid\" class=\"rf-wikiurl\" type=\"text\" placeholder=\"6\" data-encode=\"true\"/>' +\n '</div>' +\n '<div class=\"rf-section\"><div class=\"rf-section-title\"><b>' + i18n.msg(\"formPhalanxReason\").escape() + '</b></div>' +\n '<textarea name=\"\" id=\"comment\" placeholder=\"' + i18n.msg(\"formphReason\").escape() + '\" class=\"optional\"></textarea>' +\n '</div>' +\n '</div>' +\n '</fieldset>' +\n '</form>',\n formParams: {\n '$1': 'wikiurl',\n '$2': 'wikiname',\n '$5': 'wikipage',\n '$3': 'blockid',\n '$4': 'comment'\n },\n submitText: '{{Report filter|$1\\n' +\n '|$5\\n' +\n '|$3\\n' + \n '|$4\\n' + \n '|' + c.wgUserName + '|' + '~~' + '~~' + '~}}',\n summary: 'New filter report ($2, #$3)',\n sectionTitle: 'Block #$3 on $2'\n },\n wiki: {\n page: 'Report:Wiki',\n buttonText: i18n.msg(\"buttonWiki\").escape(),\n form: '<form class=\"WikiaForm ReportForm\" method=\"\" name=\"\" id=\"wiki\">' +\n '<fieldset>' +\n '<div class=\"rf-wrapper\">' +\n '<div class=\"rf-section\"><div class=\"rf-section-title\"><b>' + i18n.msg(\"formWikiName\").escape() + '</b></div>' +\n '<input id=\"wikiname\" class=\"rf-wikiname optional\" type=\"text\" placeholder=\"CJRichards and Applemasterexpert Wiki\"/>' +\n '</div>' + \n '<div class=\"rf-section\"><div class=\"rf-section-title\"><b>' + i18n.msg(\"formWikiURL\").escape() + '</b></div>' +\n '<input id=\"wikiurl\" class=\"rf-wikiurl\" type=\"text\" placeholder=\"cjrichards-and-applemasterexpert.fandom.com\"/>' +\n '</div>' +\n '<div class=\"rf-section\"><div class=\"rf-section-title\"><b>' + i18n.msg(\"formReason\").escape() + '</b></div>' +\n '<input name=\"\" id=\"comment\" placeholder=\"' + i18n.msg(\"formphReason\").escape() + '\" class=\"optional\"></input>' +\n '</div>' +\n '<div class=\"rf-section\"><div class=\"rf-section-title\"><b>N.B.; Guidelines:</b></div>' +\n 'Please add to this list if you believe a wiki violates Fandom\\'s <a href=\"https://www.fandom.com/terms-of-use\">Terms of Use</a>.<br />' +\n '<ol><li>1. Do not use this page to report <a href=\"https://www.fandom.com/community-creation-policy\">duplicate wikis</a>.</li>' +\n '<li>2. Do not add wikis just because you feel that they are \"unproductive.\" This list is for <a href=\"https://www.fandom.com/terms-of-use\">Terms of Use</a> violations only -- advertisement spam, harassment wikis, or obscene and illegal content.</li>' +\n '<li>3. Do not add wikis where you feel the administrators are being unfair. Please <a href=\"/Special:Contact/general\">contact Staff</a> about bad admins.</li>' +\n '<li>4. New entries may be added to the <a href=\"#New reports (To be VSTF checked)\">non-VSTF checked section</a> only. Check to ensure you are not duplicating an entry already there.</li></ol>' +\n '</div>' +\n '</div>' +\n '</fieldset>' +\n '</form>',\n formParams: {\n '$1': 'wikiname',\n '$2': 'wikiurl',\n '$3': 'comment'\n },\n submitText: '{{badwiki|$2|$3}}',\n summary: 'New bad wiki report ([[w:c:$2|$1]], comment: $3)',\n sectionTitle: ''\n },\n };\n reportDropdown = '<div class=\"wds-dropdown\">' + \n '<div class=\"wds-dropdown__toggle wds-button\">' + \n '<span>' + i18n.msg(\"buttonReport\").escape() + '</span>' + \n '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" class=\"wds-icon wds-icon-tiny wds-dropdown__toggle-chevron\"><path d=\"M1 3h10L6 9z\"></path></svg>' + \n '</div>' + \n '<div class=\"wds-dropdown__content\">' + \n '<ul class=\"wds-list wds-is-linked\" id=\"rf-dropdown-list\">' + \n '</ul>' + \n '</div>' + \n '</div>'\n }).done(init);\n });\n }", "function TRiotDialog(){\r\n\r\n }", "function OpenReportOption()\n{\n var currentVisibleFields = \"\";\n var currentVisibleFieldsWithWidth = \"\";\n \n if(OBSettings.SQL_GROUP_BY == \"NONE\" ) {\n currentVisibleFields = GetCurrentVisibleFieldNames();\n currentVisibleFieldsWithWidth = GetCurrentVisibleFieldNamesWithWidth();\n }\n else {\n currentVisibleFields = OBSettings.SQL_SELECT;\n\n //currentVisibleFields = GetCurrentVisibleFieldNamesWithWidth();\n if (OBSettings.ACTIVE_GRID == 'DETAIL_GRID') {\n currentVisibleFields = GetCurrentVisibleFieldNames();\n currentVisibleFieldsWithWidth = GetCurrentVisibleFieldNamesWithWidth();\n }\n\n \n }\n \n if(OBSettings.COLOR_MODE == 1)\n {\n OpenChild('./Report/common_template.html?isGroupColoredID=1&fields='+currentVisibleFields+'&fieldswidth='+currentVisibleFieldsWithWidth, 'PDFReportOptions', true, 330, 150, 'no', 'no');\n }\n else\n {\n OpenChild('./Report/common_template.html?isGroupColoredID=null&fields='+currentVisibleFields+'&fieldswidth='+currentVisibleFieldsWithWidth, 'PDFReportOptions', true, 330, 150, 'no', 'no');\n }\n}", "function setOptions() {\n if(typeof window.dev === 'undefined' || typeof window.dev.i18n === 'undefined') {\n importScriptPage('MediaWiki:I18n-js/code.js', 'dev');\n }\n mw.hook('dev.i18n').add(function(i18no) {\n i18no.loadMessages('u:soap:MediaWiki:Custom-Reports/i18n.json').done(function(i18n) {\n options = {\n\n /* \n //BEGIN EXAMPLE\n example: {\n page: 'Page name the form is for',\n buttonText: 'Text for button to open form',\n form: 'HTML form for reporting users. Each input/textarea should have an id. any optional inputs should be marked with the `optional` class. If any attributes need URI encoding, the relevant inputs should have the `data-encode` attribute set to `true`.',\n // this is where the input ids in the form are matched to numbers\n // for use in the summary/submitted text\n formParams: {\n '$1': 'foo',\n '$2': 'bar'\n },\n submitText: 'Text to submit to the page. Any form parameters can be inserted via the key names in `formParams`',\n summary: 'Text used for the edit summary. Any form parameters can be inserted via the key names in `formParams`',\n sectionTitle: 'Text used as the section title. Any form parameters can be inserted via the key names in `formParams`'\n },\n // END EXAMPLE\n */\n\n profile: {\n page: 'Report:User_profile_headers',\n buttonText: i18n.msg(\"buttonProfile\").escape(),\n form: '<form class=\"WikiaForm ReportForm\" method=\"\" name=\"\" id=\"profile\">' +\n '<fieldset>' +\n '<div class=\"rf-wrapper\">' +\n '<div class=\"rf-section\" style=\"color:#F00;font-size:16px;\"><b>' + i18n.msg(\"formSocial\").escape() + '</b></div>' +\n '<div class=\"rf-section\"><div class=\"rf-section-title\"><b>' + i18n.msg(\"formWikiName\").escape() + '</b></div>' +\n '<input id=\"wikiname\" class=\"rf-wikiname optional\" type=\"text\" placeholder=\"' + i18n.msg(\"formphWikiName\").escape() + '\"/>' +\n '</div>' + \n '<div class=\"rf-section\"><div class=\"rf-section-title\"><b>' + i18n.msg(\"formWikiURL\").escape() + '</b></div>' +\n '<input id=\"wikiurl\" class=\"rf-wikiurl\" type=\"text\" placeholder=\"soap.fandom.com\"/>' +\n '</div>' +\n '<div class=\"rf-section\"><div class=\"rf-section-title\"><b>' + i18n.msg(\"formUsername\").escape() + '</b> ' + i18n.msg(\"formOfBadUser\").escape() + ' (' + i18n.msg(\"formMultipleUsers\").escape() + ')</div>' +\n '<textarea name=\"\" id=\"user\" class=\"rf-wikiuser\" type=\"text\" placeholder=\"Rappy 4187\\nDucksoup\"></textarea>' +\n '</div>' +\n '<div class=\"rf-section\"><div class=\"rf-section-title\"><b>' + i18n.msg(\"formReason\").escape() + '</b></div>' +\n '<textarea name=\"\" id=\"comment\" placeholder=\"' + i18n.msg(\"formphReason\").escape() + '\" class=\"optional\"></textarea>' +\n '</div>' +\n '<div class=\"rf-section\">' +\n '<div class=\"rf-checkbox rf-socks\"><input type=\"checkbox\" id=\"socks\" class=\"option-input optional\"/><label for=\"socks\">' + i18n.msg(\"formSockpuppet\").escape() + '</label>' + \n '<div class=\"rf-section rf-socks-box\"><div class=\"rf-section-title\"><b>' + i18n.msg(\"formUsername\").escape() + '</b> ' + i18n.msg(\"formOfSock\").escape() +\n '<textarea name=\"\" id=\"sockusers\" class=\"rf-socks optional\" type=\"text\" placeholder=\"Rappy 4187\\nDucksoup\"></textarea>' +\n '</div>' +\n '</div>' +\n '</div>' + \n '<div class=\"rf-section\" style=\"color:#F00; font-size:16px; display:none;\" id=\"formAnon\"><b>' + i18n.msg(\"formAnon\").escape() + '</b></div>' +\n '</div>' +\n '</fieldset>' +\n '</form>',\n formParams: {\n '$1': 'wikiurl',\n '$2': 'wikiname',\n '$3': 'user',\n '$4': 'comment',\n '$5': 'user', // for different styling\n '$7': 'socks',\n '$8': 'sockusers'\n },\n submitText: '{{Report profile|$1\\n' +\n '|$4\\n' +\n '|$3\\n' +\n '$7$8' +\n '|' + c.wgUserName + '|' + '~~' + '~~' + '~}}',\n summary: 'New profile report ($2, $5)',\n sectionTitle: '$2'\n },\n vandalism: {\n page: 'Report:Vandalism',\n buttonText: i18n.msg(\"buttonVandalism\").escape(),\n form: '<form class=\"WikiaForm ReportForm\" method=\"\" name=\"\" id=\"vandalism\">' +\n '<fieldset>' +\n '<div class=\"rf-wrapper\">' +\n '<div class=\"rf-section\"><div class=\"rf-section-title\"><b>' + i18n.msg(\"formWikiName\").escape() + '</b></div>' +\n '<input id=\"wikiname\" class=\"rf-wikiname optional\" type=\"text\" placeholder=\"SOAP Wiki\"/>' +\n '</div>' + \n '<div class=\"rf-section\"><div class=\"rf-section-title\"><b>' + i18n.msg(\"formWikiURL\").escape() + '</b></div>' +\n '<input id=\"wikiurl\" class=\"rf-wikiurl\" type=\"text\" placeholder=\"soap.fandom.com\"/>' +\n '</div>' +\n '<div class=\"rf-section\"><div class=\"rf-section-title\"><b>' + i18n.msg(\"formUsername\").escape() + '</b> ' + i18n.msg(\"formOfBadUser\").escape() + ' (' + i18n.msg(\"formMultipleUsers\").escape() + ')</div>' +\n '<textarea name=\"\" id=\"user\" class=\"rf-wikiuser\" type=\"text\" placeholder=\"Merrystar\\nBertH\"></textarea>' +\n '</div>' +\n '<div class=\"rf-section\"><div class=\"rf-section-title\"><b>' + i18n.msg(\"formReason\").escape() + '</b></div>' +\n '<textarea name=\"\" id=\"comment\" placeholder=\"' + i18n.msg(\"formphReason\").escape() + '\" class=\"optional\"></textarea>' +\n '</div>' +\n '<div class=\"rf-section\">' +\n '<div class=\"rf-checkbox\"><input type=\"checkbox\" id=\"crosswiki\" class=\"option-input optional\"/><label for=\"crosswiki\">' + i18n.msg(\"formCrossWiki\").escape() + '</label></div>' +\n '</div>' + \n '<div class=\"rf-section\">' +\n '<div class=\"rf-checkbox rf-socks\"><input type=\"checkbox\" id=\"socks\" class=\"option-input optional\"/><label for=\"socks\">' + i18n.msg(\"formSockpuppet\").escape() + '</label>' + \n '<div class=\"rf-section rf-socks-box\"><div class=\"rf-section-title\"><b>' + i18n.msg(\"formUsername\").escape() + '</b> ' + i18n.msg(\"formOfSock\").escape() +\n '<textarea name=\"\" id=\"sockusers\" class=\"rf-socks optional\" type=\"text\" placeholder=\"Rappy 4187\\nDucksoup\"></textarea>' +\n '</div>' +\n '</div>' +\n '</div>' + \n '<div class=\"rf-section\" style=\"color:#F00; font-size:16px; display:none;\" id=\"formAnon\"><b>' + i18n.msg(\"formAnon\").escape() + '</b></div>' +\n '</div>' +\n '</fieldset>' +\n '</form>',\n formParams: {\n '$1': 'wikiurl',\n '$2': 'wikiname',\n '$3': 'user',\n '$4': 'comment',\n '$5': 'user', // for different styling\n '$6': 'crosswiki',\n '$7': 'socks',\n '$8': 'sockusers'\n },\n submitText: '{{Report vandalism|$1\\n' +\n '|$4\\n' +\n '|$3\\n' +\n '$6$7$8' +\n '|' + c.wgUserName + '|' + '~~' + '~~' + '~}}',\n summary: 'New vandalism report ($1, $5)',\n sectionTitle: '$5 at $2'\n },\n spam: {\n page: 'Report:Spam',\n buttonText: i18n.msg(\"buttonSpam\").escape(),\n form: '<form class=\"WikiaForm ReportForm\" method=\"\" name=\"\" id=\"spam\">' +\n '<fieldset>' +\n '<div class=\"rf-wrapper\">' +\n '<div class=\"rf-section\"><div class=\"rf-section-title\"><b>' + i18n.msg(\"formWikiName\").escape() + '</b></div>' +\n '<input id=\"wikiname\" class=\"rf-wikiname optional\" type=\"text\" placeholder=\"' + i18n.msg(\"formphWikiName\").escape() + '\"/>' +\n '</div>' + \n '<div class=\"rf-section\"><div class=\"rf-section-title\"><b>' + i18n.msg(\"formWikiURL\").escape() + '</b></div>' +\n '<input id=\"wikiurl\" class=\"rf-wikiurl\" type=\"text\" placeholder=\"soap.fandom.com\"/>' +\n '</div>' +\n '<div class=\"rf-section\"><div class=\"rf-section-title\"><b>' + i18n.msg(\"formUsername\").escape() + '</b> ' + i18n.msg(\"formOfBadUser\").escape() + ' (' + i18n.msg(\"formMultipleUsers\").escape() + ')</div>' +\n '<textarea name=\"\" id=\"user\" class=\"rf-wikiuser\" type=\"text\" placeholder=\"Rappy 4187\\nDucksoup\"></textarea>' +\n '</div>' +\n '<div class=\"rf-section\"><div class=\"rf-section-title\"><b>' + i18n.msg(\"formReason\").escape() + '</b></div>' +\n '<textarea name=\"\" id=\"comment\" placeholder=\"' + i18n.msg(\"formphReason\").escape() + '\" class=\"optional\"></textarea>' +\n '</div>' +\n '<div class=\"rf-section\">' +\n '<div class=\"rf-checkbox\"><input type=\"checkbox\" id=\"crosswiki\" class=\"option-input optional\"/><label for=\"crosswiki\">' + i18n.msg(\"formCrossWiki\").escape() + '</label></div>' +\n '</div>' + \n '<div class=\"rf-section\" style=\"color:#F00; font-size:16px; display:none;\" id=\"formAnon\"><b>' + i18n.msg(\"formAnon\").escape() + '</b></div>' +\n '</div>' +\n '</fieldset>' +\n '</form>',\n formParams: {\n '$1': 'wikiurl',\n '$2': 'wikiname',\n '$3': 'user',\n '$4': 'comment',\n '$5': 'user', // for different styling\n '$6': 'crosswiki',\n },\n submitText: '{{Report spam|$1\\n' +\n '|$4\\n' +\n '|$3\\n' +\n '$6' +\n '|' + c.wgUserName + '|' + '~~' + '~~' + '~}}',\n summary: 'New spam report ($1, $5)',\n sectionTitle: '$5 at $2'\n },\n phalanx: {\n page: 'Report:Spam_filter_problems',\n buttonText: i18n.msg(\"buttonFalsePositive\").escape(),\n form: '<form class=\"WikiaForm ReportForm\" method=\"\" name=\"\" id=\"phalanx\">' +\n '<fieldset>' +\n '<div class=\"rf-wrapper\">' +\n '<div class=\"rf-section\"><div class=\"rf-section-title\"><b>' + i18n.msg(\"formWikiName\").escape() + '</b></div>' +\n '<input id=\"wikiname\" class=\"rf-wikiname optional\" type=\"text\" placeholder=\"' + i18n.msg(\"formphWikiName\").escape() + '\"/>' +\n '</div>' + \n '<div class=\"rf-section\"><div class=\"rf-section-title\"><b>' + i18n.msg(\"formWikiPage\").escape() + '</b></div>' +\n '<input id=\"wikiurl\" class=\"rf-wikiurl\" type=\"text\" placeholder=\"soap.fandom.com\"/>' +\n '<span class=\"rf-httpend\">/wiki/</span>' +\n '<input id=\"wikipage\" class=\"rf-wikiurl\" type=\"text\" placeholder=\"Report:Spam_filter_problems\"/>' +\n '</div>' +\n '<div class=\"rf-section\"><div class=\"rf-section-title\"><b>' + i18n.msg(\"formBlockID\").escape() + '</b></div>' +\n '<input id=\"blockid\" class=\"rf-wikiurl\" type=\"text\" placeholder=\"12345\" data-encode=\"true\"/>' +\n '</div>' +\n '<div class=\"rf-section\"><div class=\"rf-section-title\"><b>' + i18n.msg(\"formPhalanxReason\").escape() + '</b></div>' +\n '<textarea name=\"\" id=\"comment\" placeholder=\"' + i18n.msg(\"formphReason\").escape() + '\" class=\"optional\"></textarea>' +\n '</div>' +\n '<div class=\"rf-section\" style=\"color:#F00; font-size:16px; display:none;\" id=\"formAnon\"><b>' + i18n.msg(\"formAnon\").escape() + '</b></div>' +\n '</div>' +\n '</fieldset>' +\n '</form>',\n formParams: {\n '$1': 'wikiurl',\n '$2': 'wikiname',\n '$5': 'wikipage',\n '$3': 'blockid',\n '$4': 'comment'\n },\n submitText: '{{Report filter|$1\\n' +\n '|$5\\n' +\n '|$3\\n' + \n '|$4\\n' + \n '|' + c.wgUserName + '|' + '~~' + '~~' + '~}}',\n summary: 'New filter report ($2, #$3)',\n sectionTitle: 'Block #$3 on $2'\n },\n wiki: {\n page: 'Report:Wiki',\n buttonText: i18n.msg(\"buttonWiki\").escape(),\n form: '<form class=\"WikiaForm ReportForm\" method=\"\" name=\"\" id=\"wiki\">' +\n '<fieldset>' +\n '<div class=\"rf-wrapper\">' +\n '<div class=\"rf-section\"><div class=\"rf-section-title\"><b>' + i18n.msg(\"formWikiName\").escape() + '</b></div>' +\n '<input id=\"wikiname\" class=\"rf-wikiname optional\" type=\"text\" placeholder=\"' + i18n.msg(\"formphWikiName\").escape() + '\"/>' +\n '</div>' + \n '<div class=\"rf-section\"><div class=\"rf-section-title\"><b>' + i18n.msg(\"formWikiURL\").escape() + '</b></div>' +\n '<input id=\"wikiurl\" class=\"rf-wikiurl\" type=\"text\" placeholder=\"soap.fandom.com\"/>' +\n '</div>' +\n '<div class=\"rf-section\"><div class=\"rf-section-title\"><b>' + i18n.msg(\"formReason\").escape() + '</b></div>' +\n '<input name=\"\" id=\"comment\" type=\"text\" placeholder=\"' + i18n.msg(\"formphReason\").escape() + '\" class=\"optional\"></input>' +\n '</div>' +\n '<div class=\"rf-section\"><div class=\"rf-section-title\"><b>' + i18n.msg(\"GuidelinesTitle\").plain() + '</b></div>' +\n i18n.msg(\"GuidelinesText\").plain() +\n '</div>' +\n '<div class=\"rf-section\" style=\"color:#F00; font-size:16px; display:none;\" id=\"formAnon\"><b>' + i18n.msg(\"formAnon\").escape() + '</b></div>' +\n '</div>' +\n '</fieldset>' +\n '</form>',\n formParams: {\n '$1': 'wikiname',\n '$2': 'wikiurl',\n '$3': 'comment'\n },\n submitText: '{{badwiki|$2|$3}}',\n summary: 'New bad wiki report ([[w:c:$2|$1]], comment: $3)',\n sectionTitle: ''\n },\n };\n reportDropdown = '<div class=\"wds-dropdown\">' + \n '<div class=\"wds-dropdown__toggle wds-button\">' + \n '<span>' + i18n.msg(\"buttonReport\").escape() + '</span>' + \n '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" class=\"wds-icon wds-icon-tiny wds-dropdown__toggle-chevron\"><path d=\"M1 3h10L6 9z\"></path></svg>' + \n '</div>' + \n '<div class=\"wds-dropdown__content\">' + \n '<ul class=\"wds-list wds-is-linked\" id=\"rf-dropdown-list\">' + \n '</ul>' + \n '</div>' + \n '</div>'\n }).done(init);\n });\n }", "function OnGUI (){\n\tif(showJanelaReport)\n\t\twindowRect = GUI.Window (100, windowRect, WindowFunction_Report, \"Staff Report\");\n}", "function programReports( programInstanceId )\r\n{\r\n\t$('#programReportDiv').load(\"getProgramReportHistory.action\", {programInstanceId:programInstanceId});\r\n}", "function previewExcelReport() {\r\n if (usrSubmitIsValid(false)) {\r\n var reportId = nlapiGetFieldValues('custpage_fmt_reports_select');\r\n if (reportId.length == 1) {\r\n var url = nlapiResolveURL('SUITELET', 'customscript_loec_ssu_setreportspage', 'customdeploy_loec_ssu_setreportspage');\r\n url += '&ispreview=T&select=' + reportId;\r\n url += '&selname=' + encodeURIComponent(nlapiGetFieldText('custpage_fmt_reports_select'));\r\n url += '&costcenter=' + nlapiGetFieldValue('custpage_fmt_reports_costcenter');\r\n url += '&year=' + nlapiGetFieldValue('custpage_fmt_reports_year');\r\n url += '&postingperiod=' + nlapiGetFieldValue('custpage_fmt_reports_postingperiod');\r\n url += '&date=' + nlapiGetFieldValue('custpage_fmt_reports_date');\r\n url += '&ppfrom=' + nlapiGetFieldValue('custpage_fmt_reports_ppfrom');\r\n url += '&ppto=' + nlapiGetFieldValue('custpage_fmt_reports_ppto');\r\n window.open(url, '_blank', 'toolbar=0,location=0,menubar=0');\r\n } else {\r\n alert('You can only preview one report at a time, please go back and make sure only one report is selected in the Report Name Field.');\r\n nlapiSetFieldValues('custpage_fmt_reports_select', ['']);\r\n }\r\n }\r\n}", "function showReportFlag(iId){\n //center the dialog\n var left = ($(document).width()/2) - ($('#flagdialog').width()/2);\n var top = ($('html').height()/2) - ($('#flagdialog').height()/2);\n $('#flagdialog').css('top', \"\" + top + \"px\");\n $('#flagdialog').css('left', \"\" + left + \"px\");\n \n //show the dialog and put the shade\n $('#flagdialog').fadeIn('normal');\n $('#glassloading').slideToggle('normal');\n \n //put the right values in the file hidden fields\n $('#reasonshidden').val(iId);\n \n}", "function generateReport(id, name)\r\n{\r\n\t//Tracker#13895.Removing the invalid Record check and the changed fields check(Previous logic).\r\n\r\n // Tracker#: 13709 ADD ROW_NO FIELD TO CONSTRUCTION_D AND CONST_MODEL_D\r\n\t// Check for valid record to execute process(New logic).\r\n \tif(!isValidRecord(true))\r\n\t{\r\n\t\treturn;\r\n\t}\r\n\r\n\t//Tracker# 13972 NO MSG IS SHOWN TO THE USER IF THERE ARE CHANGES ON THE SCREEN WHEN USER CLICKS ON THE REPORT LINK\r\n\t//Check for the field data modified or not.\r\n\tvar objHtmlData = _getWorkAreaDefaultObj().checkForNavigation();\r\n\r\n\tif(objHtmlData!=null && objHtmlData.hasUserModifiedData()==true)\r\n {\r\n //perform save operation\r\n objHtmlData.performSaveChanges(_defaultWorkAreaSave);\r\n }\r\n else\r\n {\r\n\t\tvar str = 'report.do?id=' + id + '&reportname=' + name;\r\n \toW('report', str, 800, 650);\r\n }\r\n\r\n}", "function createReport(individual, reportId) {\n\t\tif (reportId !== undefined) {\n\t\t\t$('[resource=\"'+individual.id+'\"]').find(\"#createReport\").dropdown('toggle');\n\t\t\tredirectToReport(individual, reportId);\n\t\t} else {\n\t\t\tvar s = new veda.SearchModel(\"'rdf:type' == 'v-s:ReportsForClass' && 'v-ui:forClass' == '\"+individual[\"rdf:type\"][0].id+\"'\", null);\n\t\t\tif (Object.getOwnPropertyNames(s.results).length == 0) {\n\t\t\t\talert('Нет отчета. Меня жизнь к такому не готовила.');\n\t\t\t} else if (Object.getOwnPropertyNames(s.results).length == 1) {\n\t\t\t\t$('[resource=\"'+individual.id+'\"]').find(\"#createReport\").dropdown('toggle');\n\t\t\t\tredirectToReport(individual, Object.getOwnPropertyNames(s.results)[0]);\n\t\t\t} else {\n\t\t\t\tvar reportsDropdown = $('[resource=\"'+individual.id+'\"]').find(\"#chooseReport\");\n\t\t\t\tif (reportsDropdown.html()== '') {\n\t\t\t\t\tObject.getOwnPropertyNames(s.results).forEach( function (res_id) {\n\t\t\t\t\t\t$(\"<li/>\", {\n\t\t\t \t\t\t \"style\" : \"cursor:pointer\", \n\t \t \"text\" : report['rdfs:label'][0],\n\t \t \"click\": (function (e) {\n\t \t\t redirectToReport(individual, Object.getOwnPropertyNames(res_id)[0]);\n\t \t })\n\t \t}).appendTo(reportsDropdown);\n\t\t\t\t\t});\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function addReportingToolForEvent() {\n var inputField = $('#add-tool-to-event-input');\n var typeField = $('#add-tool-to-event-type');\n var ruleHTML = buildHTMLForEventReport(inputField.val(), typeField.val());\n var reportingBody = $('#reporting-body');\n console.log(reportingBody.html());\n reportingBody.html(reportingBody.html() + ruleHTML);\n}", "function getFormDVAT31Report(record) { \n if (!isProdBuild) {\n getFormDVAT31ReportDynamicLoad(record);\n } else {\n if (Wtf.ReportScriptLoadedFlag.formDVAT31Report) {\n getFormDVAT31ReportDynamicLoad(record);\n } else {\n ScriptMgr.load({\n scripts: ['../../scripts/Reports/DVATForm31Report.js'],\n callback: function () {\n getFormDVAT31ReportDynamicLoad(record);\n Wtf.ReportScriptLoadedFlag.formDVAT31Report = true\n },\n scope: this\n });\n }\n }\n}", "function init(){\n getReportData();\n }", "function generaReportErm(){\n\t\n\twindow.location.href= \"/CruscottoAuditAtpoWebWeb/jsonATPO/getReportErmPDF\";\n\t\n}", "function startDialog() {\r\n\t// set server to appropriate value\r\n\tserver = window.arguments[0];\r\n\t\r\n\t// generate step list\r\n\tsetSteps();\r\n\t\r\n\t// move to center of parent window\r\n\tcenterWindowOnScreen();\r\n}", "function embedCustomLayoutReport() {\n\n // Load custom layout report properties into session\n LoadLayoutShowcaseReportIntoSession().then(function () {\n\n // Get models. models contains enums that can be used\n const models = window['powerbi-client'].models;\n\n // Get embed application token from session\n var accessToken = GetSession(SessionKeys.AccessToken);\n\n // Get embed URL from session\n var embedUrl = GetSession(SessionKeys.EmbedUrl);\n\n // Get report Id from session\n var embedReportId = GetSession(SessionKeys.EmbedId);\n\n // We give the user View permissions\n var permissions = models.Permissions.View;\n\n // Embed configuration used to describe the what and how to embed\n // This object is used when calling powerbi.embed\n // This also includes settings and options such as filters\n // You can find more information at https://github.com/Microsoft/PowerBI-JavaScript/wiki/Embed-Configuration-Details\n var config= {\n type: 'report',\n tokenType: models.TokenType.Embed,\n accessToken: accessToken,\n embedUrl: embedUrl,\n id: embedReportId,\n permissions: permissions,\n settings: {\n filterPaneEnabled: false,\n navContentPaneEnabled: false\n }\n };\n\n // Get a reference to the embedded report HTML element\n var embedContainer = $('#embedContainer')[0];\n\n // Embed the report and display it within the div container\n LayoutShowcaseState.layoutReport = powerbi.embed(embedContainer, config);\n\n // Report.on will add an event handler for report loaded event\n LayoutShowcaseState.layoutReport.on(\"loaded\", function() {\n\n // After report is loaded, we find the active page and get all the visuals on it\n // Retrieve the page collection\n LayoutShowcaseState.layoutReport.getPages().then(function (pages) {\n\n // Retrieve active page\n let activePage = jQuery.grep(pages, function (page) { return page.isActive })[0];\n\n // Set layoutPageName to active page name\n LayoutShowcaseState.layoutPageName = activePage.name;\n\n // Retrieve active page visuals.\n activePage.getVisuals().then(function (visuals) {\n var reportVisuals = visuals.map(function (visual) {\n return {\n name: visual.name,\n title: visual.title,\n checked: true\n };\n });\n\n // Create visuals array from the visuals of the active page\n createVisualsArray(reportVisuals);\n });\n });\n });\n });\n}", "function triggerPrintDialog() {\n window.print();\n }", "function onDlgLoad()\n{\n\ttry\n\t{\n\t\tplugin = window.arguments[0];\n\n\t\tuploadMethod = new UploadMethod();\n\t\tscriptExecDialog = new ScriptExecDialog();\n\n\t\tdocument.getElementById(\"temp-download-folder-button\").addEventListener(\"command\", tempDownloadFolder_onCommand, true);\n\t\tdocument.getElementById(\"path-rar-button\").addEventListener(\"command\", pathRarButton_onCommand, true);\n\t\tdocument.getElementById(\"path-utorrent-button\").addEventListener(\"command\", function(e) { doBrowseForFile(\"path-utorrent\", \"Find uTorrent.exe\"); }, true);\n\t\tupdateMenulist = new Menulist(\"update-menulist\", updateMenulist_idToValue);\n\n\t\tuploadMethod.onDlgLoad();\n\t\tscriptExecDialog.onDlgLoad();\n\n\t\tinitializeOptions(plugin.options);\n\t}\n\tcatch (ex)\n\t{\n\t\talert(\"Got an exception in onDlgLoad(): \" + ex);\n\t}\n\n\treturn true;\n}", "function initPowerDialog(diag,html2Load,todo){\n\t$(\"#\"+diag).dialog({\n\t\tmodal: true,\n\t\twidth: \"auto\",\n\t\tautoResize: true,\n\t\tmaxHeight: \"auto\",\n\t});\t\n\t$(\"#\"+diag).empty().load(html2Load, function(){\n\t\teval(todo);\n\t});\n}", "function settingDialog(exportInfo) {\r\n\r\n dlgMain = new Window(\"dialog\", strTitle);\r\n\r\n\tdlgMain.orientation = 'column';\r\n\tdlgMain.alignChildren = 'left';\r\n\t\r\n\t// -- top of the dialog, first line\r\n dlgMain.add(\"statictext\", undefined, strLabelDestination);\r\n\r\n\t// -- two groups, one for left and one for right ok, cancel\r\n\tdlgMain.grpTop = dlgMain.add(\"group\");\r\n\tdlgMain.grpTop.orientation = 'row';\r\n\tdlgMain.grpTop.alignChildren = 'top';\r\n\tdlgMain.grpTop.alignment = 'fill';\r\n\r\n\t// -- group contains four lines\r\n\tdlgMain.grpTopLeft = dlgMain.grpTop.add(\"group\");\r\n\tdlgMain.grpTopLeft.orientation = 'column';\r\n\tdlgMain.grpTopLeft.alignChildren = 'left';\r\n\tdlgMain.grpTopLeft.alignment = 'fill';\r\n\t\r\n\t// -- the second line in the dialog\r\n\tdlgMain.grpSecondLine = dlgMain.grpTopLeft.add(\"group\");\r\n\tdlgMain.grpSecondLine.orientation = 'row';\r\n\tdlgMain.grpSecondLine.alignChildren = 'center';\r\n\r\n dlgMain.etDestination = dlgMain.grpSecondLine.add(\"edittext\", undefined, exportInfo.destination.toString());\r\n dlgMain.etDestination.preferredSize.width = StrToIntWithDefault( stretDestination, 160 );\r\n\r\n dlgMain.btnBrowse= dlgMain.grpSecondLine.add(\"button\", undefined, strButtonBrowse);\r\n dlgMain.btnBrowse.onClick = btnBrowseOnClick;\r\n\r\n // -- the third line in the dialog\r\n dlgMain.grpThirdLine = dlgMain.grpTopLeft.add(\"statictext\", undefined, strLabelStyle);\r\n\r\n // -- the fourth line in the dialog\r\n dlgMain.etStyle = dlgMain.grpTopLeft.add(\"edittext\", undefined, exportInfo.style.toString());\r\n dlgMain.etStyle.alignment = 'fill';\r\n dlgMain.etStyle.preferredSize.width = StrToIntWithDefault( stretDestination, 160 );\r\n\r\n\t// -- the fifth line in the dialog\r\n dlgMain.cbSelection = dlgMain.grpTopLeft.add(\"checkbox\", undefined, strCheckboxSelectionOnly);\r\n dlgMain.cbSelection.value = exportInfo.selectionOnly;\r\n\r\n\t// the right side of the dialog, the ok and cancel buttons\r\n\tdlgMain.grpTopRight = dlgMain.grpTop.add(\"group\");\r\n\tdlgMain.grpTopRight.orientation = 'column';\r\n\tdlgMain.grpTopRight.alignChildren = 'fill';\r\n\t\r\n\tdlgMain.btnRun = dlgMain.grpTopRight.add(\"button\", undefined, strButtonRun );\r\n dlgMain.btnRun.onClick = btnRunOnClick;\r\n\r\n\tdlgMain.btnCancel = dlgMain.grpTopRight.add(\"button\", undefined, strButtonCancel );\r\n dlgMain.btnCancel.onClick = function() { \r\n\t\tvar d = this;\r\n\t\twhile (d.type != 'dialog') {\r\n\t\t\td = d.parent;\r\n\t\t}\r\n\t\td.close(cancelButtonID); \r\n\t}\r\n\r\n\tdlgMain.defaultElement = dlgMain.btnRun;\r\n\tdlgMain.cancelElement = dlgMain.btnCancel;\r\n\r\n\tdlgMain.grpBottom = dlgMain.add(\"group\");\r\n\tdlgMain.grpBottom.orientation = 'column';\r\n\tdlgMain.grpBottom.alignChildren = 'left';\r\n\tdlgMain.grpBottom.alignment = 'fill';\r\n \r\n dlgMain.pnlHelp = dlgMain.grpBottom.add(\"panel\");\r\n dlgMain.pnlHelp.alignment = 'fill';\r\n\r\n dlgMain.etHelp = dlgMain.pnlHelp.add(\"statictext\", undefined, strHelpText, {multiline:true});\r\n dlgMain.etHelp.alignment = 'fill';\r\n\r\n // in case we double clicked the file\r\n app.bringToFront();\r\n\r\n dlgMain.center();\r\n \r\n var result = dlgMain.show();\r\n \r\n if (cancelButtonID == result) {\r\n return result;\r\n }\r\n \r\n // get setting from dialog\r\n exportInfo.destination = dlgMain.etDestination.text;\r\n exportInfo.style = dlgMain.etStyle.text;\r\n exportInfo.selectionOnly = dlgMain.cbSelection.value;\r\n\r\n return result;\r\n}", "function createReports() {\r\n var RawDataReport = AdWordsApp.report(\"SELECT Domain, Clicks \" + \"FROM AUTOMATIC_PLACEMENTS_PERFORMANCE_REPORT \" + \"WHERE Clicks > 0 \" + \"AND Conversions < 1 \" + \"DURING LAST_7_DAYS\");\r\n RawDataReport.exportToSheet(RawDataReportSheet);\r\n}", "function callTestMailWindow() {\n if (!isProdBuild) {\n callTestMailWindowDynamicLoad();\n } else {\n if (Wtf.ReportScriptLoadedFlag.productbranddiscountwin) {\n callTestMailWindowDynamicLoad();\n } else {\n ScriptMgr.load({\n scripts: ['../../scripts/Reports/TestMailWindow.js'],\n callback: function () {\n callTestMailWindowDynamicLoad();\n Wtf.ReportScriptLoadedFlag.testmailwindow = true\n },\n scope: this\n });\n }\n }\n}", "function ViewMarkup() {\n\n $('#ViewMarkupPopup').load(baseURL + \"Invoice/Create/\" + \"?CallSlipId=\" + $('#CallSlipId').val());\n $('#ViewMarkupPopup').dialog({\n title: 'Mark up Details',\n resizable: true,\n width: 650,\n modal: true,\n buttons: [\n {\n text: \"Close\",\n id: \"Close Purchase Order\",\n click: function () {\n $(this).dialog('close');\n }\n }],\n close: function (event, ui) {\n $(this).dialog('destroy');\n $('#ViewMarkupPopup').html(\"\");\n }\n });\n}", "function onDocX(){\n\tvar controller = View.controllers.get('abRepmLsadminPropProfileCtrl');\n\t/*\n\t * KB 3029212 Ioan don't export if there is no data available\n\t */\n\tvar objOverviewPanel = View.panels.get(overviewPanelId);\n\tif (objOverviewPanel.gridRows.length == 0) {\n\t\tView.showMessage(getMessage('msg_docx_nodata'));\n\t\treturn;\n\t}\n\tvar reportConfig = {\n\t\ttitle: getMessage('msg_report_title'),\n\t\tfileName: 'ab-repm-lsadmin-prop-profile-rpt',\n\t\tcallerView: 'ab-repm-lsadmin-prop-profile.axvw',\n\t\tdataSource: 'abRepmLsadminPropProfile_ds_grid',\n\t\tprintableRestriction: controller.printableRestriction,\n\t\tfiles:[]\n\t};\n\tvar consoleRestr = \tcontroller.restriction;\n\tvar parameters = controller.parameters;\n\tvar restriction = new Ab.view.Restriction();\n\trestriction.addClause('property.pr_id', '', 'IS NOT NULL', ')AND(', false);\n\tvar rptFileCfg = new RptFileConfig(\n\t\t'ab-repm-lsadmin-prop-profile-details-rpt.axvw',\n\t\t{permanent: consoleRestr, temporary: restriction, parameters: parameters},\n\t\t'property.pr_id',\n\t\t{parameters :[\n\t\t\t\t{name: 'prId', type: 'value', value: 'property.pr_id'},\n\t\t\t\t{name: 'owned', type: 'text', value: getMessage(\"owned\")},\n\t\t\t\t{name: 'leased', type: 'text', value: getMessage(\"leased\")},\n\t\t\t\t{name: 'neither', type: 'text', value: getMessage(\"neither\")}]},\n\t\tnull\n\t);\n\treportConfig.files.push(rptFileCfg);\n\t\n\tonPaginatedReport(reportConfig);\n}", "function createDialogWithPartData(title,templateName,width) { \n var ui = SpreadsheetApp.getUi();\n var createUi = HtmlService.createTemplateFromFile(templateName).evaluate().getContent();\n var html = HtmlService.createTemplate(createUi+\n \"<script>\\n\" +\n \"var data = \"+getInvData()+\n \"</script>\")\n .evaluate()\n .setSandboxMode(HtmlService.SandboxMode.IFRAME)\n .setWidth(width);\n \n var ss = SpreadsheetApp.getActiveSpreadsheet();\n ui.showModalDialog(html,title);\n}", "function OnFinish(selProj, selObj)\n{\n\tvar oCM;\n\ttry\n\t{\n\t\toCM\t= selProj.CodeModel;\n\n\t\tvar strShortName = wizard.FindSymbol(\"SHORT_NAME\");\n\t\tvar L_TRANSACTION_Text = \"Add ATL Dialog \";\n\t\toCM.StartTransaction(L_TRANSACTION_Text + strShortName);\n\n\t\tvar strUpperShortName\t= strShortName.toUpperCase();\n\t\twizard.AddSymbol(\"UPPER_SHORT_NAME\", strUpperShortName);\n\t\tvar strHeaderFile\t\t= wizard.FindSymbol(\"HEADER_FILE\");\n\t\tvar strImplFile\t\t\t= wizard.FindSymbol(\"IMPL_FILE\");\n\t\tvar strTemplatePath\t\t= wizard.FindSymbol(\"TEMPLATES_PATH\");\n\n\t\tvar strProjectRC\t\t= GetProjectFile(selProj, \"RC\", true, false);\n\n\t\tvar strDLGID = \"IDD_\" + strUpperShortName;\n\n\t\tvar oResHelper = wizard.ResourceHelper;\n\t\toResHelper.OpenResourceFile(strProjectRC);\n\t\tvar bDBCSCodePage;\n\t\tvar strCodePage = wizard.FindSymbol(\"CODE_PAGE\");\n\t\tif (strCodePage == \"932\" || strCodePage == \"936\" || strCodePage == \"950\" || strCodePage == \"949\")\n\t\t\tbDBCSCodePage = true; //VS-supported codedepages that require FontSize 9\n\t\telse\n\t\t\tbDBCSCodePage = false; //all the rest and unsupported codepages: Fontsize 8 \n\t\tvar strRCTemplFile = strTemplatePath + (!bDBCSCodePage ? \"\\\\dialog.rc\" : \"\\\\dlg_dbcs.rc\");\n\t\tvar strSymbolValue = oResHelper.AddResource(strDLGID, strRCTemplFile, \"DIALOG\");\n\t\twizard.AddSymbol(\"IDD_DIALOGID\", strSymbolValue.split(\"=\").shift());\n\t\toResHelper.CloseResourceFile();\n\n\t\t// Add header\n\t\tRenderAddTemplate(\"dialog.h\", strHeaderFile, selProj, true);\n\n\t\t// Add CPP\n\t\tRenderAddTemplate(\"dialog.cpp\", strImplFile, selProj, false);\n\n\t\toCM.CommitTransaction();\n\t\t\n\t\toCM.Classes.Find(wizard.FindSymbol(\"CLASS_NAME\")).StartPoint.TryToShow(vsPaneShowTop);\n\t}\n\tcatch(e)\n\t{\n\t\tif (oCM)\n\t\t\toCM.AbortTransaction();\n\n\t\tif (e.description.length != 0)\n\t\t\tSetErrorInfo(e);\n\t\treturn e.number\n\t}\n}", "function info_shield (axis_list){\n\n// var wait_id = 'wait_dialog_id_' + core.util.randomness(10);\n// var html_string = 'Creating dialog...';\n// var wait_text = '<div id=\"' + wait_id + '\">' + html_string + '</div>';\n\n// jQuery(\"body\").append(jQuery(wait_text)); \n// jQuery(\"#\" + wait_id ).dialog({\n// \tbgiframe: true,\n// \tautoOpen: false,\n// \theight: 300,\n// \twidth: 500,\n// \tmodal: true,\n// \tclose: function(){\n// \t}\n// });\n// jQuery('#' + wait_id).dialog('open');\n\n\n widgets.start_wait(\"Processing...\");\n \n //\n cart.reset_map();\n\n // Generate shield HTML.\n // Create the shield\n var shield_html = info_html(axis_list);\n new org.bbop.amigo.ui.shield.set(shield_html);\n cart.bind('cart-bindable');\n\n widgets.finish_wait();\n\n //jQuery('#' + wait_id).dialog('close');\n}", "function onSchedule_() {\n FormApp.getUi().showModalDialog(\n HtmlService.createHtmlOutputFromFile(\"Main\").setWidth(600).setHeight(675), \"Schedule\");\n}", "function initReports() {\n // Setup the report task\n gpReports = new esri.tasks.Geoprocessor(configOptions.reportsTask);\n\n // If application hasn't loaded yet\n if (initialLoad == false) {\n // Display reports button on toolbar\n $(\"#btnReports\").css('display', 'block');\n $(\"#lblReports\").css('display', 'block');\n\n // Click handlers for when reports button is clicked\n $(\"#btnReports\").bind(\"click\", function () {\n // Enable if scale is below certain level\n var currentScale = app.map.getScale();\n if (currentScale > configOptions.maxidentifyscale) {\n alert(\"Identify functionality is available from 1:\" + configOptions.maxidentifyscale);\n }\n else {\n openReportDialog();\n }\n });\n\n $(\"#lblReports\").bind(\"click\", function () {\n // Enable if scale is below certain level\n var currentScale = app.map.getScale();\n if (currentScale > configOptions.maxidentifyscale) {\n alert(\"Identify functionality is available from 1:\" + configOptions.maxidentifyscale);\n }\n else {\n openReportDialog();\n }\n });\n\n // Handler for ID text box change\n $('#propertyID').on('input', function () {\n // If at least one character then enable submit button\n if ($('#propertyID').val().replace(/ /g, '').length > 0) {\n // Enable reports button\n $('#reportsButton').attr('disabled', 'disabled').button('enable');\n }\n else {\n // Disable reports button\n $('#reportsButton').attr('disabled', 'disabled').button('disable');\n }\n })\n\n // Load in reports checkboxes from config\n $('#reportsList').append(\"<input type='checkbox' class='reportsAll'\" + \"' id='reportAll' title='All'/><font size=\\\"2\\\">All</font><br/>\");\n // Check all by default\n $(\"#reportAll\").prop(\"checked\", true);\n $.each(configOptions.reports, function () {\n // Add checkbox\n $('#reportsList').append(\"<input type='checkbox' class='reports' disabled='true'\" + \"' id='report\" + replaceAll(this.name, ' ', '_') + \"' title='\" + this.name + \"'/><font size=\\\"2\\\">\" + this.name + \"</font><br/>\");\n // Add scale\n $('#reportsList').append(\"Scale: <input type='text' class='reportScales' disabled='true'\" + \"' id='reportScale\" + replaceAll(this.name, ' ', '_') + \"' title='\" + this.name + \"' style='width:50px;'/><br/><br/>\");\n });\n\n // Handler for all checkbox change\n $(\"#reportAll\").bind(\"click\", function () {\n // If checkbox checked or not\n if (this.checked == true) {\n // Disable all report checkboxes and scales\n $(\"input.reports\").attr(\"disabled\", true);\n $(\"input.reportScales\").attr(\"disabled\", true);\n }\n else {\n // Enable all report checkboxes and scales\n $(\"input.reports\").removeAttr(\"disabled\");\n $(\"input.reportScales\").removeAttr(\"disabled\");\n }\n });\n\n // Click handlers for when report submit button is clicked\n $(\"#reportsButton\").bind(\"click\", function () {\n generateReports();\n });\n }\n}", "function configure() {\n\n const popupUrl = `${window.location.origin}/dialog.html`;\n\n let input = \"\";\n\n tableau.extensions.ui.displayDialogAsync(popupUrl, input, { height: 540, width: 800 }).then((closePayload) => {\n // The close payload is returned from the popup extension via the closeDialog method.\n $('#interval').text(closePayload);\n }).catch((error) => {\n // One expected error condition is when the popup is closed by the user (meaning the user\n // clicks the 'X' in the top right of the dialog). This can be checked for like so:\n switch (error.errorCode) {\n case tableau.ErrorCodes.DialogClosedByUser:\n console.log(\"Dialog was closed by user\");\n break;\n default:\n console.error(error.message);\n }\n });\n }", "function displayPDF_stmtAccountTrxCharges(currentPageRef,reportUrl)\n{\n\t////////////////////////////////////\n\t//object works IE8, does not work in FireFox\n\t//var chooseLanguageDivContent = '<div id=\"openPDFDivId\"><object data=\"' + certificateReportUrl + '\" type=\"application/pdf\" width=\"100%\" height=\"100%\"> <p>cannot open PDF</a></p> </object></div>';\n\n\t//IFrame works on FireFox , does not work on IE8\n\t//var chooseLanguageDivContent = '<div id=\"openPDFDivId\"><iframe src=\"' + certificateReportUrl + '\" width=\"100%\" height=\"100%\"> </iframe></div>';\n\n\t//Embed works IE8, does not work on FireFox\n\t//var chooseLanguageDivContent = '<div id=\"openPDFDivId\"><embed src=\"' + certificateReportUrl + '\" width=\"100%\" height=\"100%\"></div>';\n\n\tvar openPDFDiv = null;\n\n\tif ($.browser.msie) \n\t{\n\t\topenPDFDiv = '<div id=\"openPDFDivId_'+ currentPageRef +'\"><embed src=\"' + reportUrl + '\" width=\"100%\" height=\"100%\"></div>';\n\t} else \n\t{\n\t\topenPDFDiv = '<div id=\"openPDFDivId_'+ currentPageRef +'\"><iframe src=\"' + reportUrl + '\" width=\"100%\" height=\"100%\"> </iframe></div>';\n\t}\n\n\tvar openPDFDivElement = $(openPDFDiv);\n\n\t$('body').append(openPDFDivElement);\n\n\topenPDFDivElement.dialog( {\n\t\tmodal : true,\n\t\ttitle : stat_of_account_key,\n\t\tautoOpen : false,\n\t\t//show : 'slide',\n\t\tposition : 'center',\n\t\twidth : returnMaxWidth(950),\n\t\theight : returnMaxHeight(750),\n\t\tclose : function() \n\t\t{\n\t\t\tif ($(\"#openPDFDivId\")) \n\t\t\t{\n\t\t\t\t$(\"#openPDFDivId_\"+ currentPageRef).dialog(\"destroy\");\n\t\t\t\t$(\"#openPDFDivId_\"+ currentPageRef).remove();\n\t\t\t}\n\t\t}\n\t});\n\n\t$(openPDFDivElement).dialog(\"open\");\n\t\t\n}", "constructor(options) {\n\t options._metadata = options._metadata || {};\n\t options._metadata.sdk = options._metadata.sdk || {\n\t name: 'sentry.javascript.browser',\n\t packages: [\n\t {\n\t name: 'npm:@sentry/browser',\n\t version: SDK_VERSION,\n\t },\n\t ],\n\t version: SDK_VERSION,\n\t };\n\n\t super(options);\n\n\t if (options.sendClientReports && WINDOW$1.document) {\n\t WINDOW$1.document.addEventListener('visibilitychange', () => {\n\t if (WINDOW$1.document.visibilityState === 'hidden') {\n\t this._flushOutcomes();\n\t }\n\t });\n\t }\n\t }", "function construirDialogoGeneral() \r\n{ \r\n $(\"body\").append(\"<div id='dialogoGenaralDiv'><span/><\\/div>\");\r\n $(\"#dialogoGenaralDiv\").dialog(\r\n { \r\n autoOpen:false, modal:true, width:\"50%\", resizable:false, draggable:false, \r\n buttons: \r\n {\r\n \"Aceptar\": function() \r\n {\r\n $(this).dialog(\"close\"); \r\n }\r\n },\r\n \r\n open: function() \r\n {\r\n $('.ui-dialog-buttonpane').find('button:contains(\"Aceptar\")').button({icons: {primary: 'ui-icon-check'}});\r\n }\r\n });\r\n}//construirDialogoGeneral", "function _callLineBoardReport()\r\n{\r\n\tvar htmlAreaObj = _getWorkAreaDefaultObj();\r\n\tvar objHTMLData = htmlAreaObj.getHTMLDataObj();\r\n var changeFields = objHTMLData.getChangeFields();\r\n var objAjax = htmlAreaObj.getHTMLAjax();\r\n bShowMsg = true;\r\n //when user doesn't enter anything and clicks on the report button for the\r\n //first time this check is done\r\n if(objHTMLData.hasUserModifiedData()==false)\r\n {\r\n var htmlErrors = objAjax.error();\r\n objAjax.error().addError(\"errorInfo\", 'Must enter values for: Season', true);\r\n messagingDiv(htmlErrors);\r\n return;\r\n }\r\n\tvar url = 'lineboardreport';// report action method name\r\n\t\r\n\tobjAjax.setActionMethod(url);\r\n\tobjAjax.setActionURL('lineboardreport.do');\r\n\tobjAjax.setProcessHandler(_loadLineBoardReport);\r\n\tobjHTMLData.performSaveChanges(_loadLineBoardReport, objAjax);\r\n}", "function createReportWindow(arg) {\n const reportWin = new BrowserWindow({\n width: 900,\n height: 650,\n x: 20,\n y: 30,\n resizable: true,\n webPreferences: {\n nodeIntegration: true\n },\n show: false\n });\n\n reportWin.loadFile(\"./src/resultsWindow/index.html\");\n reportWin.once(\"ready-to-show\", () => {\n reportWin.webContents.send(\"load_results\", arg);\n reportWin.show();\n });\n // reportWin.webContents.openDevTools();\n}", "function showDialogBarcodeCreation() {\n var title = 'Generate and Export Barcodes'; \n var templateName = 'barcodes'; \n var width = 800; \n \n createDialog(title,templateName,width);\n}", "function pipingExplanation() {\r\n\t// Get content via ajax\r\n\t$.get(app_path_webroot+'DataEntry/piping_explanation.php',{},function(data){\r\n\t\tvar json_data = jQuery.parseJSON(data);\r\n\t\tsimpleDialog(json_data.content,json_data.title,'piping_explain_popup',800);\r\n\t\tfitDialog($('#piping_explain_popup'));\r\n\t});\r\n}", "function onLoad() {\r\n onRestore();\r\n $('release-notes').addEventListener('click', onVisitReleaseNotes, false)\r\n $('button-save').addEventListener('click', onSave, false);\r\n $('button-close').addEventListener('click', onClose, false);\r\n $('exclusion-filter-list-add').addEventListener('click', onFilterListAdd, false);\r\n $('exclusion-filter-list-remove').addEventListener('click', onFilterListRemove, false);\r\n $('exclusion-filter-list-remove-all').addEventListener('click', onFilterListRemoveAll, false);\r\n \r\n $('inclusion-filter-list-add').addEventListener('click', onFilterListAdd, false);\r\n $('inclusion-filter-list-remove').addEventListener('click', onFilterListRemove, false);\r\n $('inclusion-filter-list-remove-all').addEventListener('click', onFilterListRemoveAll, false);\r\n \r\n $('visit-extensions').addEventListener('click', onVisitExtension, false);\r\n \r\n exlusionDialog = new DialogController('exclusion-add-filter-dialog');\r\n exlusionDialog.addEventListener('click', onDialogOk);\r\n exlusionDialog.addEventListener('load', onDialogLoad);\r\n exlusionDialog.setTemplate({header: 'Filter Text', ok: 'Add'});\r\n exlusionDialog.init();\r\n \r\n inclusionDialog = new DialogController('inclusion-add-filter-dialog');\r\n inclusionDialog.addEventListener('click', onDialogOk);\r\n inclusionDialog.addEventListener('load', onDialogLoad);\r\n inclusionDialog.setTemplate({header: 'Filter Text', ok: 'Add'});\r\n inclusionDialog.init();\r\n}", "function openBBReport(id, level, name , method)\r\n{\r\n var str = 'report?id=' + id + '&method='+ method + '&level=' + level + '&reportname=' + name ;\r\n oW('report', str, 800, 650);\r\n}", "function installDialog() {\r\n iframe.src = chrome.runtime.getURL('search.html');\r\n dialog.appendChild(iframe);\r\n document.body.appendChild(dialog);\r\n}", "function addPayPeriod(){\n var htmlDlg = HtmlService.createHtmlOutputFromFile('pp')\n .setSandboxMode(HtmlService.SandboxMode.IFRAME)\n .setWidth(450)\n .setHeight(135);\n SpreadsheetApp.getUi()\n .showModalDialog(htmlDlg, 'New Pay Period');\n}", "function showImport(){\n $(\"#import-dialog\").show();\n}", "function importDesign() {\n showModalDialog({\n type : 'import-design'\n }, 'import-validation');\n}", "function reportarImagenOpenModal(){\n // Abre el modal a través de la variable modalReportarImagen\n // en el archivo modales.js de public\n window.modalReportarImagen()\n\n}", "function show_report(e, report_id){\n e.preventDefault();\n var url = \"controllers/script/report-script.php\";\n\n $.ajax(url, {\n method : \"POST\",\n data : {\n \"operation\" : \"show\",\n \"report\" : report_id\n },\n dataType : \"html\",\n success: function(response){\n $(\"#report_container\").fadeOut(500, function(){\n $(\"#report_content\").remove();\n $(\"#report_container\").append(response);\n $(\"#report_container\").fadeIn();\n });\n },\n error: function(xhr) {\n alert(\"ERROR: \" + xhr.responseText + xhr.status);\n }\n });\n}" ]
[ "0.6951744", "0.67207104", "0.6643555", "0.6617118", "0.65269184", "0.6522248", "0.64529985", "0.6307707", "0.6228531", "0.61412483", "0.60982347", "0.6086603", "0.59964097", "0.593034", "0.58954036", "0.5849465", "0.58185464", "0.57974195", "0.5766553", "0.5758476", "0.57139474", "0.56819797", "0.566432", "0.56588155", "0.56588155", "0.5655396", "0.56347996", "0.5617701", "0.5587601", "0.5572638", "0.5552132", "0.5549568", "0.5547518", "0.5527787", "0.5518849", "0.55051947", "0.546448", "0.54597807", "0.54395515", "0.54221565", "0.54092705", "0.5394626", "0.5389133", "0.53717136", "0.5369401", "0.53609467", "0.5357474", "0.53350145", "0.53350145", "0.53276443", "0.53244674", "0.5318599", "0.5306382", "0.53044474", "0.5301143", "0.5298239", "0.5282406", "0.52677804", "0.5249556", "0.52483636", "0.5243686", "0.5233957", "0.5231102", "0.5216704", "0.52115184", "0.51975054", "0.519515", "0.51927066", "0.51881814", "0.5185004", "0.51833016", "0.5171647", "0.5167571", "0.5164323", "0.516123", "0.5158578", "0.5151754", "0.51391846", "0.5136824", "0.5132614", "0.51308286", "0.5129564", "0.51232785", "0.5112545", "0.5110096", "0.51060426", "0.51054883", "0.5101082", "0.5097507", "0.5089185", "0.50863856", "0.5082464", "0.50801194", "0.5078007", "0.5065583", "0.5059809", "0.50530016", "0.50470257", "0.50433487", "0.5035986" ]
0.7575301
0
Add handler that will be called when given type of instrumentation triggers. Use at your own risk, this might break without changelog notice, only used internally.
function addInstrumentationHandler(handler) { if (!handler || typeof handler.type !== 'string' || typeof handler.callback !== 'function') { return; } handlers[handler.type] = handlers[handler.type] || []; handlers[handler.type].push(handler.callback); instrument(handler.type); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addInstrumentationHandler(type, callback) {\n handlers[type] = handlers[type] || [];\n (handlers[type] ).push(callback);\n instrument(type);\n }", "function addInstrumentationHandler(type, callback) {\n handlers[type] = handlers[type] || [];\n (handlers[type] ).push(callback);\n instrument(type);\n}", "function addInstrumentationHandler(type, callback) {\n\t handlers$1[type] = handlers$1[type] || [];\n\t (handlers$1[type] ).push(callback);\n\t instrument(type);\n\t}", "function addInstrumentationHandler(handler) {\n // tslint:disable-next-line:strict-type-predicates\n if (!handler || typeof handler.type !== 'string' || typeof handler.callback !== 'function') {\n return;\n }\n handlers[handler.type] = handlers[handler.type] || [];\n handlers[handler.type].push(handler.callback);\n instrument(handler.type);\n}", "function addHandlers(type, handlers) {\n for (var i = 0; i < handlers.length; i++) {\n var handler = handlers[i];\n handler.spec.method = type;\n addMethod(appHandler, handler.action, handler.spec);\n }\n}", "addHandler (handler, type) {\n\t\tthis.handlers.push(handler)\n\t}", "on(type, handler) {\n if (!this.handlers[type]) {\n this.handlers[type] = [handler];\n }\n else {\n this.handlers[type].push(handler);\n }\n return this;\n }", "function on(type, fn) {\n get_event_storage_by_type(type).push(fn);\n}", "on(type, fn, context = this) {\n\t\tif (!this.events[type]) {\n\t\t\tthis.events[type] = [];\n\t\t}\n\n\t\tthis.events[type].push([fn, context]);\n\t}", "on(eventType, handler) {\n // Register the handler\n this.handlers[eventType].push(handler);\n // If this is the first handler for an event type and the cache for this event type is not empty\n if (this.handlers[eventType].length === 1 && this._cache[eventType] >= 0) {\n // Fire the handler for each item in the cache\n this._cache[eventType].forEach(payload => {\n __processEvent(eventType, payload);\n });\n // Clear the cache\n this._cache[eventType] = [];\n }\n }", "on(type, handler) {\n const name = this.eventName(type),\n h = this._handlers,\n i = this._handlerIndex(h[name], type, handler);\n\n if (i < 0) {\n eventListenerCheck(this, type);\n (h[name] || (h[name] = [])).push({\n type: type,\n handler: handler\n });\n }\n\n return this;\n }", "registerInteractionHandler(evtType,handler) {\n debug(LOG,'registerInteractionHandler',{evtType,handler})\n this._updateEventListener(evtType,handler)\n }", "function addHandler(obj, type, fn) {\n 'use strict';\n if (obj && obj.addEventListener) {\n obj.addEventListener(type, fn, false);\n } else if (obj && obj.attachEvent) {\n obj.attachEvent('on' + type, fn);\n }\n}", "on(type, fn) {\n if (this.eventEmitter[type]) {\n this.eventEmitter[type].push(fn)\n } else {\n this.eventEmitter[type] = [fn];\n }\n }", "function _updateMicLevelListeners(actionType, handler){\r\n\t\t\t//add to plugin-listener-list\r\n\t\t\tif(actionType=== 'added'){\r\n\t\t\t\tasrPlugin.onMicLevelChanged(handler);\r\n\t\t\t}\r\n\t\t\t//remove from plugin-listener-list\r\n\t\t\telse if(actionType === 'removed'){\r\n\t\t\t\tasrPlugin.offMicLevelChanged(handler);\r\n\t\t\t}\r\n\t\t}", "function _updateMicLevelListeners(actionType, handler){\r\n\t\t\t//add to plugin-listener-list\r\n\t\t\tif(actionType=== 'added'){\r\n\t\t\t\tasrPlugin.onMicLevelChanged(handler);\r\n\t\t\t}\r\n\t\t\t//remove from plugin-listener-list\r\n\t\t\telse if(actionType === 'removed'){\r\n\t\t\t\tasrPlugin.offMicLevelChanged(handler);\r\n\t\t\t}\r\n\t\t}", "function createHandler(eventType) {\n xhr['on' + eventType] = function (event) {\n copyLifecycleProperties(lifecycleProps, xhr, fakeXHR);\n dispatchEvent(fakeXHR, eventType, event);\n };\n }", "handlerWillAdd (event, when, handler) {\n\n }", "onTrigger(eventType, handler) {\n this.internal.on(eventType, handler);\n }", "function createUploadHandler(eventType) {\n if (xhr.upload && fakeXHR.upload && fakeXHR.upload['on' + eventType]) {\n xhr.upload['on' + eventType] = function (event) {\n dispatchEvent(fakeXHR.upload, eventType, event);\n };\n }\n }", "on(messageType, handler) {\n assert.string(messageType, 'messageType')\n assert.func(handler, 'handler')\n this._eventEmitter.on(messageType, handler)\n }", "function makeCallback( type ) {\n\t\t\tvar stopKey;\n\n\t\t\tswitch (type) {\n\t\t\tcase 'click':\n\t\t\tcase 'dblclick':\n\t\t\t\tstopKey = 'stopClick';\n\t\t\t\tbreak;\n\t\t\tcase 'mousedown':\n\t\t\tcase 'touchstart': // ?\n\t\t\t\tstopKey = 'stopDown';\n\t\t\t\tbreak;\n\t\t\tcase 'mouseup':\n\t\t\t\tstopKey = 'stopUp';\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (stopKey) {\n\t\t\t\treturn function(feature) {\n\t\t\t\t\tthis.handler_[stopKey] = this.trigger(type, {\n\t\t\t\t\t\tdata: feature.attributes,\n\t\t\t\t\t\teventType: type\n\t\t\t\t\t});\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\treturn function(feature) {\n\t\t\t\t\tthis.trigger(type, {\n\t\t\t\t\t\tdata: feature.attributes,\n\t\t\t\t\t\teventType: type\n\t\t\t\t\t});\n\t\t\t\t};\n\t\t\t}\n\t\t}", "function addEvent(target,type,handler) {\n if (target.addEventListener)\n target.addEventListener(type,handler,false);\n else\n target.attachEvent(\"on\"+type,function(event){\n return handler.call(target,event);\n });\n}", "function triggerEvent(type, evt, data) {\n var newEvent = $.Event(type, { originalEvent: evt });\n $(evt.target).trigger(newEvent, data);\n }", "function triggerEvent(type, evt, data) {\n var newEvent = $.Event(type, { originalEvent: evt });\n $(evt.target).trigger(newEvent, data);\n }", "function registerValueHandler (handlers, type, handler) {\n let typeofType = typeof type;\n\n if (typeofType !== 'function' && typeofType !== 'string') {\n throw new Error(\"type must be a class constructor or string\");\n }\n\n if (typeof handler !== 'function') {\n throw new Error(\"handler must be a function\");\n }\n\n for (let typeHandler of handlers) {\n if (typeHandler.type === type) {\n typeHandler.handler = handler;\n\n return;\n }\n }\n\n handlers.push({\n type: type,\n handler: handler,\n });\n}", "defineRequestType(name, handler) {\n this.types[name] = handler\n }", "function dean_addEvent(element, type, handler) {\n if (element.addEventListener) {\n element.addEventListener(type, handler, false);\n } else {\n\n // assign each event handler a unique ID\n if (!handler.$$guid) {\n handler.$$guid = dean_addEvent.guid++;\n }\n\n // create a hash table of event types for the element\n if (!element.events) {\n element.events = {};\n }\n\n // create a hash table of event handlers for each element/event pair\n var handlers = element.events[type];\n if (!handlers) {\n handlers = element.events[type] = {};\n\n // store the existing event handler (if there is one)\n if (element[\"on\" + type]) {\n handlers[0] = element[\"on\" + type];\n }\n }\n\n // store the event handler in the hash table\n handlers[handler.$$guid] = handler;\n\n // assign a global event handler to do all the work\n element[\"on\" + type] = handleEvent;\n }\n}", "function addListener(element, type, handler){\n if (document.addEventListener) {\n element.addEventListener(type, handler, false);\n }\n // IE\n else if (document.attachEvent) {\n element.attachEvent(\"on\"+type, handler);\n }\n else {\n element[\"on\"+type] = handler;\n }\n}", "function onEvent(type, data) {\n eventsBuffer.push({type: type, data: data});\n }", "function dean_addEvent(element, type, handler) {\n\tif (element.addEventListener) {\n\t\telement.addEventListener(type, handler, false);\n\t} else {\n\t\t// assign each event handler a unique ID\n\t\tif (!handler.$$guid) handler.$$guid = dean_addEvent.guid++;\n\t\t// create a hash table of event types for the element\n\t\tif (!element.events) element.events = {};\n\t\t// create a hash table of event handlers for each element/event pair\n\t\tvar handlers = element.events[type];\n\t\tif (!handlers) {\n\t\t\thandlers = element.events[type] = {};\n\t\t\t// store the existing event handler (if there is one)\n\t\t\tif (element[\"on\" + type]) {\n\t\t\t\thandlers[0] = element[\"on\" + type];\n\t\t\t}\n\t\t}\n\t\t// store the event handler in the hash table\n\t\thandlers[handler.$$guid] = handler;\n\t\t// assign a global event handler to do all the work\n\t\telement[\"on\" + type] = handleEvent;\n\t}\n}", "function dean_addEvent(element, type, handler) {\n\tif (element.addEventListener) {\n\t\telement.addEventListener(type, handler, false);\n\t} else {\n\t\t// assign each event handler a unique ID\n\t\tif (!handler.$$guid) handler.$$guid = dean_addEvent.guid++;\n\t\t// create a hash table of event types for the element\n\t\tif (!element.events) element.events = {};\n\t\t// create a hash table of event handlers for each element/event pair\n\t\tvar handlers = element.events[type];\n\t\tif (!handlers) {\n\t\t\thandlers = element.events[type] = {};\n\t\t\t// store the existing event handler (if there is one)\n\t\t\tif (element[\"on\" + type]) {\n\t\t\t\thandlers[0] = element[\"on\" + type];\n\t\t\t}\n\t\t}\n\t\t// store the event handler in the hash table\n\t\thandlers[handler.$$guid] = handler;\n\t\t// assign a global event handler to do all the work\n\t\telement[\"on\" + type] = handleEvent;\n\t}\n}", "function addEventHandler(element, type, handler) {\n element.attachEvent(type, handler);\n // store the handler so it can be detached later\n eventHandlers.push(arguments);\n}", "onDatabaseEvent(changeType, recordType, record, causedBy) {\n const dataTypesArray = causedBy === 'sync' ? this.props.dataTypesSynchronised\n : this.props.dataTypesLinked;\n if ((dataTypesArray && dataTypesArray.indexOf(recordType) >= 0) ||\n (recordType === this.props.finalisableDataType && record.isFinalised)) {\n this.props.refreshData();\n }\n }", "function addEvent(element, type, handler) {\n\tif (element.addEventListener) {\n\t\telement.addEventListener(type, handler, false);\n\t} else {\n\t\tif (!handler.$$guid) handler.$$guid = addEvent.guid++;\n\t\tif (!element.events) element.events = {};\n\t\tvar handlers = element.events[type];\n\t\tif (!handlers) {\n\t\t\thandlers = element.events[type] = {};\n\t\t\tif (element['on' + type]) handlers[0] = element['on' + type];\n\t\t\telement['on' + type] = handleEvent;\n\t\t}\n\t\thandlers[handler.$$guid] = handler;\n\t}\n}", "function dean_addEvent(element, type, handler) {\r\n\tif (element.addEventListener) {\r\n\t\telement.addEventListener(type, handler, false);\r\n\t} else {\r\n\t\t// assign each event handler a unique ID\r\n\t\tif (!handler.$$guid) handler.$$guid = dean_addEvent.guid++;\r\n\t\t// create a hash table of event types for the element\r\n\t\tif (!element.events) element.events = {};\r\n\t\t// create a hash table of event handlers for each element/event pair\r\n\t\tvar handlers = element.events[type];\r\n\t\tif (!handlers) {\r\n\t\t\thandlers = element.events[type] = {};\r\n\t\t\t// store the existing event handler (if there is one)\r\n\t\t\tif (element[\"on\" + type]) {\r\n\t\t\t\thandlers[0] = element[\"on\" + type];\r\n\t\t\t}\r\n\t\t}\r\n\t\t// store the event handler in the hash table\r\n\t\thandlers[handler.$$guid] = handler;\r\n\t\t// assign a global event handler to do all the work\r\n\t\telement[\"on\" + type] = handleEvent;\r\n\t}\r\n}", "function adviceApi(type) {\n\t\treturn function(target, method, adviceFunc) {\n\t\t\tvar aspect = {};\n\n\t\t\tif(arguments.length === 2) {\n\t\t\t\taspect[type] = method;\n\t\t\t\treturn meld(target, aspect);\n\t\t\t} else {\n\t\t\t\taspect[type] = adviceFunc;\n\t\t\t\treturn meld(target, method, aspect);\n\t\t\t}\n\t\t};\n\t}", "subscribe(actionType, handler) {\n if (this.subscribers[actionType] === undefined) {\n this.subscribers[actionType] = [];\n }\n\n this.subscribers[actionType].push(handler);\n }", "function triggerEvent(type, evt, data) {\r\n\t var newEvent = $.Event(type, { originalEvent: evt });\r\n\t $(evt.target).trigger(newEvent, data);\r\n\t }", "function addEvent (elem, type, eventHandle) {\r\n\t\tif (elem == null || elem == undefined) return;\r\n\t\tif ( elem.addEventListener ) {\r\n\t\t\telem.addEventListener( type, eventHandle, false );\r\n\t\t} else if ( elem.attachEvent ) {\r\n\t\t\telem.attachEvent( \"on\" + type, eventHandle );\r\n\t\t} else {\r\n\t\t\telem[\"on\"+type]=eventHandle;\r\n\t\t}\r\n\t}", "function addEvent(el, type, handler) {\r\n if (el.attachEvent) el.attachEvent('on' + type, handler);\r\n else el.addEventListener(type, handler);\r\n }", "handlerFunctionFor (activityType , filePath ) {\n activityType = kebabcase(activityType)\n const result = this.handlerFunctions[activityType]\n if (!result) {\n var errorText = `unknown activity type: ${red(\n activityType\n )}\\nAvailable activity types:\\n`\n for (let actionName of Object.keys(this.handlerFunctions).sort()) {\n errorText += `* ${actionName}\\n`\n }\n errorText += `\\nTo create a new \"${activityType}\" activity type,\\n`\n errorText += `run \"text-run add ${activityType}\"\\n`\n this.formatter.startFile(filePath)\n throw new UnprintedUserError(errorText)\n }\n return result\n }", "function addEvent(element, type, handler) {\r\n\tif (element.addEventListener) {\r\n\t\telement.addEventListener(type, handler, false);\r\n\t} else {\r\n\t\t// assign each event handler a unique ID\r\n\t\tif (!handler.$$guid) handler.$$guid = addEvent.guid++;\r\n\t\t// create a hash table of event types for the element\r\n\t\tif (!element.events) element.events = {};\r\n\t\t// create a hash table of event handlers for each element/event pair\r\n\t\tvar handlers = element.events[type];\r\n\t\tif (!handlers) {\r\n\t\t\thandlers = element.events[type] = {};\r\n\t\t\t// store the existing event handler (if there is one)\r\n\t\t\tif (element[\"on\" + type]) {\r\n\t\t\t\thandlers[0] = element[\"on\" + type];\r\n\t\t\t}\r\n\t\t}\r\n\t\t// store the event handler in the hash table\r\n\t\thandlers[handler.$$guid] = handler;\r\n\t\t// assign a global event handler to do all the work\r\n\t\telement[\"on\" + type] = handleEvent;\r\n\t}\r\n}", "addHandler(handler) {\n handlers.push(handler);\n }", "middleware(type, callback) {\n if(!this._middleware[type]) this._middleware[type] = [];\n this._middleware[type].push(callback);\n }", "function fireTag(type, params) {\n if(checkTag(type, params)) {\n log(\"fireTag: Type: \" + type + \" Params: \" + JSON.stringify(params));\n window.utag[type](params);\n }\n }", "on(name, handler) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n this[EVENT_NAME_TO_HANDLER_NAME[name]] = handler;\n }", "function putzolo_eventFire(el, etype){\n if (el.fireEvent) {\n el.fireEvent('on' + etype);\n } else {\n var evObj = document.createEvent('Events');\n evObj.initEvent(etype, true, false);\n el.dispatchEvent(evObj);\n }\n }", "static addEventListener(type, handler) {\n handler = type || handler;\n Linking.unlisten = history.listenBefore(handler);\n }", "function triggerCustomEvent( obj, eventType, event ) {\n\t\tvar originalType = event.type;\n\t\tevent.type = eventType;\n\t\t$.event.handle.call( obj, event );\n\t\tevent.type = originalType;\n\t}", "function collectCustomHooksForSignature(type) {\n var signature = allSignaturesByType.get(type);\n if (signature !== undefined) computeFullKey(signature);\n }", "function addHandler(name, o) {\n // adds a handler for a particular type of exception\n var handler = $.extend({}, defaultHandler, o || {});\n reportHandlers[name] = handler;\n }", "function fakeEvent(el, type) {\n var event;\n\n if (document.createEvent) {\n event = document.createEvent('HTMLEvents');\n event.initEvent(type, true, true);\n } else {\n event = document.createEventObject();\n event.eventType = 'on' + type;\n }\n\n if (document.createEvent) {\n el.dispatchEvent(event);\n } else {\n el.fireEvent(event.eventType, event);\n }\n }", "function selfEmit(type){//registrationFailed handler is invoked with two arguments. Allow event handlers to be invoked with a variable no. of arguments\nreturn self.emit.bind(self,type);}// Set Accepted Body Types", "function fire(type) {\n if (can_fake_events()) {\n var e = make_event(type);\n\n if (D.dispatchEvent) {\n // modern browsers\n D.dispatchEvent(e);\n } else if (D.fireEvent) {\n // ie<9\n D.fireEvent('on' + type);\n } else {\n // pathological and/or old browser\n throw 'fire() failed';\n }\n } else if (D['on' + type]) {\n // browser does not support fake events, but it does have\n // a handler defined on the document, so call that instead\n D['on' + type]();\n } else {\n // don't do anything\n }\n }", "function collectCustomHooksForSignature(type) {\n {\n var signature = allSignaturesByType.get(type);\n if (signature !== undefined) {\n computeFullKey(signature);\n }\n }\n }", "$trigger (types, ...args) {\n xeach(types, (type) => {\n const events = $events.get(this)\n if (events) events.trigger(this, type, args)\n })\n }", "function on(eventType, handler) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n getEventListenersTarget().addEventListener(eventType, handler, options);\n listeners.push({\n eventType: eventType,\n handler: handler,\n options: options\n });\n }", "function bind(type, fn) {\n\n\t\tif (!fn) {\n\t\t\tfor (var eventName in type) {\n\t\t\t\tif ( type.hasOwnProperty( eventName ) ){\n\t\t\t\t\tfn = type[eventName];\n\t\t\t\t\teventsHash[eventName] = eventsHash[eventName] || [];\n\t\t\t\t\teventsHash[eventName].push(fn);\n\t\t\t\t\tcheckCachedEvents(eventName, fn);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\teventsHash[type] = eventsHash[type] || [];\n\t\t\teventsHash[type].push(fn);\n\t\t\tcheckCachedEvents(type, fn);\n\t\t}\n\t}", "function send_ad_analytics(type, ad, content) {\r\n\r\n ga('set', 'dimension3', content.media);\r\n ga('set', 'dimension4', ad.customer_id);\r\n ga('set', 'dimension5', ad.ad_id);\r\n\r\n ga('send', 'event', 'advertisement', type, 'SINGLE_ACTION');\r\n\r\n// ga('send', 'event', 'advertisement', type, 'customer_' + ad.customer_id);\r\n// ga('send', 'event', 'advertisement', type, 'ad_' + ad.ad_id + '[customer_'+ad.customer_id+']');\r\n// ga('send', 'event', 'advertisement', type, 'uid_' + content.uid);\r\n// ga('send', 'event', 'advertisement', type, 'media_' + content.media);\r\n// ga('send', 'event', 'advertisement', type, 'title_' + content.title);\r\n// ga('send', 'event', 'advertisement', type, 'username_' + frenetic['user'].username);\r\n\r\n for (var i = 0; i < eval(content.tags).length; i++) {\r\n ga('send', 'event', 'advertisement', type, 'tag_' + content.tags[i]);\r\n }\r\n\r\n if (type === 'hover') {\r\n ga('send', 'event', 'advertisement', type, 'duration_' + ad.duration);\r\n }\r\n\r\n}", "function handleTypeChange(e){\n //update the selectedType object\n publicAPI.$npcSelectedType = $(this);\n // update the available skills to select based on the new matrix\n //debug string\n console.log(`Type changed to ${publicAPI.$npcSelectedType.val()}`);\n updateAvailableSkillsSelectors();\n }", "function bind(type, fn) {\n var list = eventTypesBindings[type] || (eventTypesBindings[type] = []);\n\n // This fn is not a function\n if (typeof fn !== 'function') {\n return;\n }\n\n list.push(fn);\n }", "function listener(context, handler) {\n return function(evt) {\n var target = evt.target,\n item = target.__data__;\n evt.vegaType = evt.type;\n item = Array.isArray(item) ? item[0] : item;\n handler.call(context._obj, evt, item);\n };\n }", "if (handlers[event].indexOf(handler) === -1) {\n handlers[event].push(handler);\n }", "function addHandler(elementSelector, eventType, eventHandler) {\n $elements = $(elementSelector);\n for (var i = 0; i < $elements.length; i++) {\n $($elements[i]).on(eventType, eventHandler);\n }\n }", "function on(eventType, handler) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n getEventListenersTarget().addEventListener(eventType, handler, options);\n listeners.push({\n eventType: eventType,\n handler: handler,\n options: options\n });\n }", "on(eventName, handler) {\n this.eventsMap[eventName] = handler;\n }", "function selfEmit(type) {\n //registrationFailed handler is invoked with two arguments. Allow event handlers to be invoked with a variable no. of arguments\n return self.emit.bind(self, type);\n }", "on(eventName, handler) {\n // Note: this method only exists to define the types; we delegate the impl\n // to EventEmitter.\n return super.on(eventName, handler);\n }", "function addEvent(element, type, handler) {\r\n /// <summary>\r\n /// 为元素注册事件\r\n /// </summary>\r\n /// <param name=\"element\">\r\n /// 元素\r\n /// </param>\r\n /// <param name=\"type\">\r\n // 事件类型\r\n /// </param>\r\n /// <param name=\"handler\">\r\n /// 处理事件回调\r\n /// </param>\r\n if (element.addEventListener) {\r\n element.addEventListener(type, handler, false);\r\n } else {\r\n // 为每一个事件处理函数赋予一个独立的ID\r\n if (!handler.$$guid) handler.$$guid = addEvent.guid++;\r\n // 为元素建立一个事件类型的散列表\r\n if (!element.events) element.events = {};\r\n // 为每对元素/事件建立一个事件处理函数的哈希表\r\n var handlers = element.events[type];\r\n if (!handlers) {\r\n handlers = element.events[type] = {};\r\n // 储存已有的事件处理函数(如果已存在一个)\r\n if (element[\"on\" + type]) {\r\n handlers[0] = element[\"on\" + type];\r\n }\r\n }\r\n // 在哈希表中储存该事件处理函数\r\n handlers[handler.$$guid] = handler;\r\n // 赋予一个全局事件处理函数来处理所有工作\r\n element[\"on\" + type] = handleEvent;\r\n }\r\n }", "function trigger(type, event) {\n if (isNaN(type)) {\n // trigger event turtle type\n log.info(\"TURTLES - Trigger event (\" + event + \") for type: \" + type);\n _(instances).each(function(instance, id) {\n if (instance.type == type) {\n if (typeof instance.collection == \"object\")\n instance.collection.trigger(event);\n if (typeof instance.view == \"object\")\n instance.view.trigger(event);\n }\n });\n }else {\n // trigger event for turtle id\n log.info(\"TURTLES - Trigger event (\" + event + \") for #\" + type);\n if (instances[type] == null){\n log.error(\"TURTLES - Unknown instance: #\" + id);\n return;\n }\n\n var instance = instances[type];\n\n if (typeof instance.collection == \"object\")\n instance.collection.trigger(event);\n if (typeof instance.view == \"object\")\n instance.view.trigger(event);\n }\n }", "addLogsHandler(logsHandler) {\n this.logsHandlers.push(logsHandler);\n }", "function eventListenerCheck(handler, type) {\n eventBundle(type).forEach(_ => addEventListener(handler, _));\n}", "on(test, handler) {\n if (test == null) {\n throw TypeError('test must be provided');\n }\n\n if (!(test instanceof RegExp) &&\n typeof test != 'string' &&\n typeof test != 'function') {\n throw TypeError('test must be a regular expression, a string or a function');\n }\n\n if (handler == null) {\n throw TypeError('handler must be provided');\n }\n\n if (typeof handler != 'function') {\n throw TypeError('handler must be a function');\n }\n\n let handlers = this._events.get(test);\n\n if (handlers == null) {\n handlers = new Map();\n this._events.set(test, handlers);\n }\n\n handlers.set(handler, handler);\n }", "function addEvent(element, type, handler) {\n\t\tif (element.addEventListener) {\n\t\t\telement.addEventListener(type, handler, false);\n\t\t} else {\n\t\t\t// assign each event handler a unique ID\n\t\t\tif (!handler.$$guid) {\n\t\t\t\thandler.$$guid = addEvent.guid++;\n\t\t\t}\n\t\t\t// create a hash table of event types for the element\n\t\t\tif (!element.events) {\n\t\t\t\telement.events = {};\n\t\t\t}\n\t\t\t// create a hash table of event handlers for each element/event pair\n\t\t\tvar handlers = element.events[type];\n\t\t\tif (!handlers) {\n\t\t\t\thandlers = element.events[type] = {};\n\t\t\t\t// store the existing event handler (if there is one)\n\t\t\t\tif (element['on' + type]) {\n\t\t\t\t\thandlers[0] = element['on' + type];\n\t\t\t\t}\n\t\t\t}\n\t\t\t// store the event handler in the hash table\n\t\t\thandlers[handler.$$guid] = handler;\n\t\t\t// assign a global event handler to do all the work\n\t\t\telement['on' + type] = function(event) {\n\t\t\t\tvar returnValue = true;\n\t\t\t\t// grab the event object (IE uses a global event object)\n\t\t\t\tevent = event || fixEvent(((this.ownerDocument || this.document || this).parentWindow || window).event);\n\t\t\t\t// get a reference to the hash table of event handlers\n\t\t\t\tvar handlers = this.events[event.type];\n\t\t\t\t// execute each event handler\n\t\t\t\tfor (var i in handlers) {\n\t\t\t\t\tif (handlers.hasOwnProperty(i)) {\n\t\t\t\t\t\tthis.$$handleEvent = handlers[i];\n\t\t\t\t\t\tif (this.$$handleEvent(event) === false) {\n\t\t\t\t\t\t\treturnValue = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn returnValue;\n\t\t\t};\n\t\t}\n\t}", "function selfEmit(type) {\n //registrationFailed handler is invoked with two arguments. Allow event handlers to be invoked with a variable no. of arguments\n return self.emit.bind(self, type);\n }", "__configureAnalyticsHandler (handler) {\n\n\t\tconst handlerId = handler.getHandlerId();\n\n\t\t// Doesn't make sense to allow more than one analytics handler to be configured.\n\t\tif (this.analytics[handlerId]) {\n\t\t\tthrow new Error(`You have already configured the \"${handlerId}\" analytics handler.`);\n\t\t}\n\n\t\tthis.analytics[handlerId] = handler;\n\n\t\t// Inject dependencies.\n\t\thandler.inject(`sharedLogger`, sharedLogger);\n\n\t}", "function deviceListener(type, updatedDevice) {\n // Okay, this is a bit unnecessary but it allows us to get rid of an\n // ugly switch statement and return to the original style.\n privateTracker.emit(type, updatedDevice)\n }", "function runHandler() {\r\n var trigger, triggerName, paras;\r\n if(arguments.length > 0){\r\n triggerName = arguments[0];\r\n [].splice.call(arguments, 0, 1);\r\n paras = arguments;\r\n }else{\r\n return;\r\n }\r\n trigger = this._triggerHandlers[triggerName];\r\n if(trigger){\r\n trigger.forEach(function(fn, idx){\r\n fn.apply(this, paras); \r\n }); \r\n }\r\n }", "function _reportEvent(type, record) {\n var bucket = buckets[type];\n\n if(_.isUndefined(bucket)) {\n winston.error('when reporting an event, bucket type ' + type + ' not found');\n return;\n }\n\n general_util.runInBackground(function() {\n record.timestamp = new Date().valueOf();\n bucket.report(record);\n });\n}", "function logEvent(eventType) {}", "addResolvedHandler(lifecycle, action, handler) {\n const handlers = this.getActionHandlers(lifecycle, action);\n if (handlers) {\n handlers.add(handler);\n }\n else {\n this.hooks[lifecycle].set(action, new Set([handler]));\n }\n }", "function registerChange( changeType ) {\n if ( ! self.cfg.registerChangeEnabled )\n return;\n pushChangeHistory(changeType);\n if ( ! hasChanged )\n for ( var n=0; n<self.cfg.onFirstChange.length; n++ )\n self.cfg.onFirstChange[n]();\n for ( var m=0; m<self.cfg.onChange.length; m++ )\n self.cfg.onChange[m]();\n hasChanged = true;\n }", "function addEventHandler(node, type, handler, removeFunc) {\n function wrapHandler(event) {\n handler(normalizeEvent(event || window.event));\n }\n if (typeof node.addEventListener == \"function\") {\n node.addEventListener(type, wrapHandler, false);\n if (removeFunc) {return function() {node.removeEventListener(type, wrapHandler, false);};}\n }\n else {\n node.attachEvent(\"on\" + type, wrapHandler);\n if (removeFunc) {return function() {node.detachEvent(\"on\" + type, wrapHandler);};}\n }\n}", "function addEvent(el, type, handler) {\n if (el.attachEvent) el.attachEvent('on'+type, handler); else el.addEventListener(type, handler);\n}", "on(type, cb) {\n if(type === 'connect') return cb();\n if(type === 'error') return cb('error');\n\n this.listeners[type] = cb\n }", "function on_activate(event_type) { status_update_event_type = event_type; }", "triggerEvent(el, type) {\n // IE9+ and other modern browsers\n if ('createEvent' in document) {\n const event = document.createEvent('HTMLEvents');\n event.initEvent(type, false, true);\n el.dispatchEvent(event);\n } else {\n // IE8\n const event = document.createEventObject();\n event.eventType = type;\n el.fireEvent('on' + event.eventType, event);\n }\n }", "function Add(trigger, handler, tag) {\n if (tag === void 0) { tag = null; }\n if (trigger instanceof Events.StatusChanged) {\n var predicate_1 = trigger;\n trigger = function () {\n return predicate_1.changed;\n };\n }\n customEvents.push({\n hasUpdate: trigger,\n invoke: handler,\n name: tag\n });\n if (!started) {\n setInterval(backgroundInternal, 10);\n started = true;\n TypeScript.logging.log(\"Start background worker...\", TypeScript.ConsoleColors.DarkBlue);\n }\n }", "function record(type) {\r\n\tvar id = typeof type === 'function' ? identifier(type, true) : type +'';\r\n\treturn this.registry[id];\r\n}", "function addEvent(elements, type, functionality, value) {\n if (value != undefined && elements.length > 1) {\n elements.forEach(function(element) {\n element.addEventListener(type, function() { functionality(value) });\n });\n }\n if (value == undefined) {\n elements.addEventListener(type, function() { functionality() });\n }\n if (value == 'event') {\n elements.addEventListener(type, function(event) { functionality(event) });\n }\n if (value != undefined && value != 'event' && elements.length == undefined) {\n elements.addEventListener(type, function() { functionality(value) });\n }\n }", "function listener(context, handler) {\n return function(evt) {\n var target = evt.target,\n item = target.__data__;\n evt.vegaType = evt.type;\n item = Array.isArray(item) ? item[0] : item;\n handler.call(context._obj, evt, item);\n };\n}", "function listener(context, handler) {\n return function(evt) {\n var target = evt.target,\n item = target.__data__;\n evt.vegaType = evt.type;\n item = Array.isArray(item) ? item[0] : item;\n handler.call(context._obj, evt, item);\n };\n}", "track({eventType, args}) {\n this.handleEvent(eventType, args);\n }", "function bind(elem, type, handler) {\n\tvar id = elem[guidStr] = elem[guidStr] || guid++,\n\t\telData = cache[id] = cache[id] || {},\n\t\tevents = elData.events,\n\t\thandle = elData.handle\n\t\n\tif (!events) {\n\t\telData.events = events = {}\n\t}\n\t\n\tif (!handle) {\n\t\telData.handle = handle = function(e) {\n\t\t\teventHandler.call(handle.elem, e)\n\t\t}\n\t}\n\t\n\thandle.elem = elem\n\thandlers = events[type]\n\t\t\n\tif (!handlers) {\n\t\thandlers = events[type] = []\n\t\tif (elem.addEventListener) {\n\t\t\telem.addEventListener(type, handle, false)\n\t\t} else {\n\t\t\telem.attachEvent('on'+type, handle)\n\t\t}\n\t}\n\t\n\thandlers.push(handler)\n\telem = null\n}", "use (...handlers) { this.handlers = this.handlers.concat(handlers) }", "function triggerEvents (line) {\n var type = line.getAttribute('_type');\n\n // line event\n trigger('line', line, [line]);\n\n // line type event\n trigger(type, line, [line]);\n\n // highlight event\n if (line.getAttribute('highlight') === 'true') {\n trigger('line:highlight', line, [line]);\n }\n\n // fire events for all elements in the line\n var els = line.querySelectorAll('*');\n for (var i = 0, l = els.length; i < l; i++) {\n triggerElementEvents(els[i], line);\n }\n }", "addHandler(handler) {\n if (Handler.validate(handler)) {\n this.handlers[handler.id] = handler;\n }\n }", "function registerHandler (handler) {\n app[handler.method]( handler.path, handler.func() );\n }" ]
[ "0.78104407", "0.77739877", "0.76422834", "0.69640326", "0.6535237", "0.64611316", "0.60909736", "0.5883711", "0.57714427", "0.5737557", "0.57342017", "0.5613012", "0.5592782", "0.55570316", "0.5514413", "0.5514413", "0.54595834", "0.54228336", "0.53521204", "0.533264", "0.5285004", "0.5256779", "0.5250849", "0.5239904", "0.5223371", "0.5219274", "0.5214005", "0.51720995", "0.51674587", "0.5162559", "0.5149803", "0.5149803", "0.5104318", "0.5089773", "0.5080676", "0.50803256", "0.5065744", "0.50654626", "0.50276655", "0.5000844", "0.49989274", "0.49920118", "0.4989013", "0.49624413", "0.49406406", "0.49236855", "0.4896838", "0.48909426", "0.48738417", "0.48392832", "0.48368526", "0.4811262", "0.48098955", "0.48049727", "0.4797402", "0.4788646", "0.47746363", "0.47679082", "0.47658724", "0.47650743", "0.47574928", "0.47493252", "0.4748751", "0.4745346", "0.47442904", "0.4742227", "0.47318864", "0.47314832", "0.47308147", "0.4708702", "0.4705774", "0.4702081", "0.46998245", "0.46948007", "0.4691331", "0.46898165", "0.46849802", "0.46826133", "0.46818924", "0.4663989", "0.4663898", "0.4654403", "0.4651576", "0.46509662", "0.46392974", "0.46298313", "0.46102798", "0.46049803", "0.4602439", "0.46018395", "0.46003386", "0.4600208", "0.4600208", "0.45960015", "0.45871338", "0.45851153", "0.45668602", "0.45643693", "0.45635492" ]
0.69751596
4
Extract `url` from fetch call arguments
function getFetchUrl(fetchArgs) { if (fetchArgs === void 0) { fetchArgs = []; } if (typeof fetchArgs[0] === 'string') { return fetchArgs[0]; } if ('Request' in instrument_global && Object(is["g" /* isInstanceOf */])(fetchArgs[0], Request)) { return fetchArgs[0].url; } return String(fetchArgs[0]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getFetchUrl(fetchArgs = []) {\n if (typeof fetchArgs[0] === 'string') {\n return fetchArgs[0];\n }\n if ('Request' in WINDOW$4 && isInstanceOf(fetchArgs[0], Request)) {\n return fetchArgs[0].url;\n }\n return String(fetchArgs[0]);\n }", "function getFetchUrl(fetchArgs) {\n if (fetchArgs === void 0) { fetchArgs = []; }\n if (typeof fetchArgs[0] === 'string') {\n return fetchArgs[0];\n }\n if ('Request' in global && is_1.isInstanceOf(fetchArgs[0], Request)) {\n return fetchArgs[0].url;\n }\n return String(fetchArgs[0]);\n}", "function getFetchUrl(fetchArgs) {\n if (fetchArgs === void 0) { fetchArgs = []; }\n if (typeof fetchArgs[0] === 'string') {\n return fetchArgs[0];\n }\n if ('Request' in global && Object(_is__WEBPACK_IMPORTED_MODULE_1__[\"isInstanceOf\"])(fetchArgs[0], Request)) {\n return fetchArgs[0].url;\n }\n return String(fetchArgs[0]);\n}", "function getFetchUrl(fetchArgs = []) {\n if (typeof fetchArgs[0] === 'string') {\n return fetchArgs[0];\n }\n if ('Request' in WINDOW && is.isInstanceOf(fetchArgs[0], Request)) {\n return fetchArgs[0].url;\n }\n return String(fetchArgs[0]);\n}", "function getFetchUrl(fetchArgs = []) {\n\t if (typeof fetchArgs[0] === 'string') {\n\t return fetchArgs[0];\n\t }\n\t if ('Request' in WINDOW$3 && isInstanceOf(fetchArgs[0], Request)) {\n\t return fetchArgs[0].url;\n\t }\n\t return String(fetchArgs[0]);\n\t}", "async function fetch(url) {\n return url;\n}", "function getUrlFromData(data, url) {\n if (Object(_javascript_utils_is_type__WEBPACK_IMPORTED_MODULE_0__[\"isFetchResponse\"])(data)) {\n url = url || data.url;\n } else if (Object(_javascript_utils_is_type__WEBPACK_IMPORTED_MODULE_0__[\"isFileReadable\"])(url)) {\n // File or Blob\n url = url.name;\n }\n // Strip any query string\n return typeof url === 'string' ? url.replace(/\\?.*/, '') : url;\n}", "function process_url(url) {\n\tconsole.log(\" @@@ DEPRICATED process_url() \");\n\t// split up the url to host, path and get parameters\n\tvar re = /^(https?:\\/\\/[^\\/]+)([^?&]*)(.*)$/;\n\tvar matches = re.exec(url);\n\tvar param = \"\";\n\tvar host = \"\";\n\tvar path = \"\";\n\tif (matches[1]) {\n\t\thost = matches[1];\n\t}\n\tif (matches[2]) {\n\t\tpath = matches[2];\n\t}\n\t// the get parameter string\n\tif (matches[3] && typeof matches[3] == \"string\") {\n\t\tparam = matches[3].substr(1);\n\t}\n\n\t// pull out the get parameters and decode them\n\tgparams = {};\n\tif (matches.length > 2) {\n\t\tgparams = get_url_params(matches[3]);\n\t}\n\n\treturn {\"host\":host, \"path\":path, \"gparamstr\":param, \"gparams\":gparams};\n}", "static getContextStringForUrl(url) {\n let initialUrl = url;\n if (url.startsWith(\"http://\")) {\n url = url.substr(7)\n } else if (url.startsWith(\"https://\")) {\n url = url.substr(8)\n }\n\n let host = url.substr(0, url.indexOf(\"/\"));\n\n console.log(\"picking host=\" + host + \" for url \" + initialUrl);\n return host\n }", "function extractUrlFromRule(importRule) {\n const urlValue = importRule.import;\n const unpackedUrlMatch = urlValue.match(unpackUrlPattern);\n const unpackedValue = unpackedUrlMatch ? unpackedUrlMatch[1] : urlValue;\n const quotesMatch = unpackedValue.match(betweenQuotesPattern);\n return quotesMatch ? quotesMatch[2] : unpackedValue;\n}", "function extractUrl(url) {\n\t\t\tvar pos = url.indexOf('url='),\n\t\t\t\tpos2 = url.indexOf('ibm.com/links');\n\n\t\t\tif (pos !== -1 && pos2 !== -1 && pos2 < pos) {\n\t\t\t\turl = url.substr(pos + 4);\n\t\t\t}\n\n\t\t\treturn decodeURIComponent(url);\n\t\t}", "function parseURL(url) {\n\n /** URL pattern in GitHub\n * new:\t<SERVER>/<user>/<repo>/new/<branch>/<fpath>\n * edit:\t<SERVER>/<user>/<repo>/edit/<branch>/<fpath>\n * delete:\t<SERVER>/<user>/<repo>/delete/<branch>/<fpath>\n * upload:\t<SERVER>/<user>/<repo>/upload/<branch>/<fpath>\n * merge:\t<SERVER>/<user>/<repo>/pull/<pr#>\n **/\n\n /** URL pattern in GitLab\n * new:\t<SERVER>/<user>/<repo>/-/new/<branch>/<fpath>\n * edit:\t<SERVER>/<user>/<repo>/-/edit/<branch>/<fpath>\n * delete:\t<SERVER>/<user>/<repo>/-/blob/<branch>/<fpath>\n * upload:\t<SERVER>/<user>/<repo>/-/tree/<branch>/<fpath>\n * merge:\t<SERVER>/<user>/<repo>/-/merge_requests/<pr#>\n **/\n\n let info = url.replace(`${SERVER}`, \"\").split(\"/\");\n\n // The extension does not work on the main page of repo\n if (info.length < 4) {\n deactivate({\n rule: UNKNOWN_REQUEST\n });\n return UNKNOWN_REQUEST;\n }\n\n // Remove an extra element (i.e. \"-\") from the GitLab url\n if (SERVER == SERVER_GL) info.splice(3,1);\n\n let commitType = info[3];\n let baseBranch = null;\n let oldPath = null;\n let prId = null;\n let request = REQ_MERGE;\n\n if ((commitType == MERGE_GH) || (commitType == MERGE_GL)) {\n commitType = REQ_MERGE;\n prId = info[4];\n } else {\n // RULE: requests on non-commit pages are ignored\n request = checkRequest(commitType, url);\n if (request == UNKNOWN_REQUEST) {\n return request;\n }\n baseBranch = info[4];\n oldPath = getFilePath(url, commitType, baseBranch);\n\n // Unify D/U requests for GiHub and GitLab\n if (commitType == TYPE_BLOB) commitType = REQ_DELETE;\n if (commitType == TYPE_TREE) commitType = REQ_UPLOAD;\n }\n\n return {\n user: info[1],\n repo: info[2],\n baseBranch,\n commitType,\n request,\n oldPath,\n prId,\n url\n }\n}", "function fetch_url(){\n\t\t\tlet request = new XMLHttpRequest();\n\t\t\trequest.onreadystatechange = process_result;\n\t\t\trequest.open('GET', url, true);\n\t\t\trequest.send();\n\t\t\treturn fetch_promise;\n\t\t}", "function getURLParameter(url, name) {\n const urlParsed = coreHttp.URLBuilder.parse(url);\n return urlParsed.getQueryParameterValue(name);\n}", "function getURLParameter(url, name) {\n const urlParsed = coreHttp.URLBuilder.parse(url);\n return urlParsed.getQueryParameterValue(name);\n}", "function ParsedURL(parsedInput){\n parsedInput.forEach(function (item) {\n filePath = \"avatars/\" + item.login + \".png\";\n url = item.avatar_url;\n downloadImageByURL(url, filePath);\n })\n\n// this function extracts the filepath and url of the js objects gained from the get request\n// particularly the filepath needs to have a .jpg appended on the end of it or it won't\n// a picture\n}", "function getURLArgs() {\n var query_string = {};\n let query = window.location.search.substring(1);\n let vars = query.split(\"&\");\n \n for (let i=0;i<vars.length;i++) {\n let pair = vars[i].split(\"=\");\n //if is the first entry with that name\n if (typeof query_string[pair[0]] === \"undefined\") {\n query_string[pair[0]] = decodeURIComponent(pair[1]);\n //if is the second entry with that name\n } else if (typeof query_string[pair[0]] === \"string\") {\n let arr = [ query_string[pair[0]],decodeURIComponent(pair[1]) ];\n query_string[pair[0]] = arr;\n //if is the third or more entry with that name\n } else {\n query_string[pair[0]].push(decodeURIComponent(pair[1]));\n }\n } \n return query_string;\n }", "function convertToFetchUrl(url, legacyJson = false) {\n let fetchUrl;\n const queryParam = url.substring(url.lastIndexOf('=') + 1);\n\n if (!legacyJson) {\n fetchUrl = `https://archive.org/details/${queryParam}`;\n } else {\n fetchUrl = `https://archive.org/download/mapknitter/${queryParam}.json`; \n }\n\n return fetchUrl;\n}", "function computeURL() {\n var url = settings.url;\n if(typeof settings.url == 'function') {\n url = settings.url.call();\n }\n return url;\n }", "getFinalUrl() {\n let url = Request.mergeUrls(this.host, this.url);\n const urlParams = this.getUrlParams();\n if (urlParams.length > 0) {\n url += `?${urlParams}`;\n }\n return url;\n }", "function parseUrl (ast) {\n let [firstAgument] = ast.arguments;\n let rawUrl = firstAgument.raw;\n let url = rawUrl.replace(/^\\//, '').replace(/\\/$/, '').replace(/\\\\/g,'');\n assert(url);\n return url;\n }", "function fetchPokemonData(pokemon){\n let url = pokemon.url // <--- this is saving the pokemon url to a variable to use in the fetch. \n //Example: https://pokeapi.co/api/v2/pokemon/1/\"\n fetch(url)\n .then(response => response.json())\n .then(function(pokeData){\n fetchPokemonLocations(pokeData)\n })\n}", "function parseUrl(url)\n{\n c(url, 'yellow');\n var defaultFormat = 'json';\n var parsedUrl = ur.parse(url);\n var format = parsedUrl.pathname.match(/.*\\.(.*)?(\\?.*)?/);\n var pathname = parsedUrl.pathname.replace(/\\..*/, '').replace(/^\\/|\\/$/, '').replace(/^resources\\//, '').split('/');\n var queries = qs.parse(parsedUrl.query);\n var parsed = {\n path: parsedUrl.path,\n format: (format) ? format[1] : defaultFormat,\n pathname: pathname,\n queries: queries,\n resource_name: (pathname) ? pathname[0] : null,\n account_id: (pathname && pathname[1]) ? pathname[1] : null,\n resource_id: (pathname && pathname[2]) ? pathname[2] : null,\n token: (queries && queries.access_token) ? queries.access_token : null\n }\n c(parsed, 'red');\n return parsed;\n}", "function url() {\n var u = a + b + c + d\n return u\n }", "function getUrlParam(request) {\n const searchParams = new URL(request.url).searchParams\n let url = searchParams.get('url')\n if (url && !url.match(/^[a-zA-Z]+:\\/\\//)) url = 'http://' + url\n\n return url\n}", "function xGetURLArguments()\r\n{\r\n var idx = location.href.indexOf('?');\r\n var params = new Array();\r\n if (idx != -1) {\r\n var pairs = location.href.substring(idx+1, location.href.length).split('&');\r\n for (var i=0; i<pairs.length; i++) {\r\n nameVal = pairs[i].split('=');\r\n params[i] = nameVal[1];\r\n params[nameVal[0]] = nameVal[1];\r\n }\r\n }\r\n return params;\r\n}", "_fetchRequest(url, options) {\n return fetch(url, options);\n }", "function fetchRequest(url, options) {\n return fetch(url, options).then(function (r) {\n return {\n body: r.body,\n headers: r.headers,\n ok: r.ok,\n status: r.status,\n statusText: r.statusText,\n url: r.url\n };\n });\n}", "fetch(url, value, component, cb) {\n cb(null, []);\n }", "function getURL() {\r\n let loc = document.location.href;\r\n\r\n if (loc.indexOf('?') > 0) {\r\n let getString = loc.split('?')[1];\r\n let GET = getString.split('&');\r\n var get = {};\r\n for (var i = 0, l = GET.length; i < l; i++) {\r\n var tmp = GET[i].split('=');\r\n get[tmp[0]] = unescape(decodeURI(tmp[1]));\r\n }\r\n return get;\r\n }\r\n}", "url(...args) {\n return getMethodUrl(this.name, this.host, this.route, args);\n }", "function extractIdFromUrl( url ) {\n if ( !url ) {\n return;\n }\n\n var matches = urlRegex.exec( url );\n\n // Return id, which comes after first equals sign\n return matches ? matches[1] : \"\";\n }", "url(...args) {\n return this.repo.url(`hooks/${this.id}`, ...args);\n }", "function getURL( repository ) {\n var repourl;\n\n if (typeof repository === 'object') {\n repourl = repository.url;\n } else {\n repourl = repository\n };\n\n return repourl;\n}", "getURL(url) {\n let parameters = \"deviceID=\" + DeviceInfo.getUniqueID();\n parameters += \"&version=\" + DeviceInfo.getVersion();\n parameters += \"&platform=\" + Platform.OS;\n parameters += \"&rnversion=\" + Constants.rn_version;\n parameters += \"&os=\" + DeviceInfo.getSystemName() + \" \" + DeviceInfo.getSystemVersion();\n parameters += \"&deviceModel=\" + DeviceInfo.getManufacturer() + \" \" + DeviceInfo.getModel();\n\n if (url.indexOf(\"?\") > 0)\n return url + \"&\" + parameters;\n else\n return url + \"?\" + parameters;\n }", "getUrllist() {\n fetch('https://api.giphy.com/v1/gifs/search?q='+this.gifurl+'&rating=g&limit=25&api_key=rGrMJ7KXMNsi7y1I94GmPa2LzmHTnYEG')\n .then(this._onResponse)\n .then(this._onJsonReady);\n }", "function parseUrlArguments(url) {\r\n var r = {}, x = url.split('?');\r\n if (x.length < 2) return r;\r\n x = x[1].split('&');\r\n for (var i in x) { var j = x[i].indexOf('='); if (j > 0) { r[x[i].substring(0, j).toLowerCase()] = x[i].substring(j + 1); } }\r\n return r;\r\n}", "function parseUrl(url){if(typeof url!=='string')return{};var match=url.match(/^(([^:\\/?#]+):)?(\\/\\/([^\\/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);// coerce to undefined values to empty string so we don't get 'undefined'\nvar query=match[6]||'';var fragment=match[8]||'';return{protocol:match[2],host:match[4],path:match[5],relative:match[5]+query+fragment// everything minus origin\n};}", "function fetchUrl(url, params = {method: 'GET'}) {\n return fetch(url, params)\n .then(status)\n .then(json)\n }", "function getUrlParam(url){\n var obj = {},\n \tarr = url.match(/[?|&][^&=]+=[^&=]+/g);\n\t\tif(getVarType(arr) === \"array\"){\n\t\t for(let i=0; i<arr.length; i++){\n\t\t let param = arr[i].slice(1);\n\t\t obj[param.split(\"=\")[0]] = param.split(\"=\")[1];\n\t\t }\n\t\t}\n\t\treturn obj;\n }", "async function getUrl() {\n var data = await getData();\n var url = data.profile_url;\n return url;\n }", "async function getGifURL(url) {\n const response = await fetch(url);\n const json = await response.json();\n createdGifURL = await json.data.url;\n}", "async function getResourceInfo(url) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Object.assign(Object.assign({}, internal_defaultFetchOptions), {\n ignoreAuthenticationErrors: false\n });\n var _a;\n const config = Object.assign(Object.assign({}, internal_defaultFetchOptions), options);\n const response = await config.fetch(url, {\n method: \"HEAD\"\n });\n return responseToResourceInfo(response, {\n ignoreAuthenticationErrors: (_a = options.ignoreAuthenticationErrors) !== null && _a !== void 0 ? _a : false\n });\n}", "function parseURL(opt_url) {\r\n var elem = document.createElement('a'),\r\n result = {\r\n params: parseQS(elem.href = opt_url = opt_url == undefined ? __global.location.href : opt_url),\r\n toString: function() {\r\n return href;\r\n }\r\n };\r\n walk(elem, function(value, key) {\r\n if (/^(hash|href|port|protocol|(user|path|host)(name)?|search|password)$/.test(key)) {\r\n result[key] = value;\r\n }\r\n }, 1);\r\n return result;\r\n }", "function getParameter(url, name) {\n\t\t// scheme : // [username [: password] @] hostname [: port] [/ [path] [? query] [# fragment]]\n\t\tvar e = new RegExp('^(?:https?|ftp)(?::/*(?:[^?]+)[?])([^#]+)'),\n\t\t\tmatches = e.exec(url),\n\t\t\tf = new RegExp('(?:^|&)' + name + '=([^&]*)'),\n\t\t\tresult = matches ? f.exec(matches[1]) : 0;\n\n\t\treturn result ? SnowPlow.decodeWrapper(result[1]) : '';\n\t}", "function extractUrl(requestOptions) {\n var protocol = requestOptions.protocol || '';\n var hostname = requestOptions.hostname || requestOptions.host || '';\n // Don't log standard :80 (http) and :443 (https) ports to reduce the noise\n var port = !requestOptions.port || requestOptions.port === 80 || requestOptions.port === 443 ? '' : \":\" + requestOptions.port;\n var path = requestOptions.path ? requestOptions.path : '/';\n return protocol + \"//\" + hostname + port + path;\n}", "function constructCollectorUrl(argmap)\n {\n if (typeof argmap === \"undefined\")\n {\n return null; // JavaScript joys, changing an undefined into a null\n } else if ('cf' in argmap)\n {\n return collectorUrlFromCfDist(argmap.cf);\n } else if ('url' in argmap)\n {\n return asCollectorUrl(argmap.url);\n }\n }", "function extractQueryParams(url) {\n var retObj = {};\n if (!url) return retObj; // I got nuthin'\n var queryString = url.split('?')[1];\n if (!queryString) return retObj; // No query parameters to parse out.\n var queryPairs = queryString.split('&');\n for (pair of queryPairs) {\n var param = pair.split('=');\n retObj[param[0]] = param[1];\n }\n return retObj;\n}", "pullRequestUrl(info) {\n let url = this.url(info);\n let targetBranch = info.targetBranch || info.base;\n return `${url}/compare/${targetBranch}...${info.currBranch}`;\n }", "function getUrl (url) {\n return fetch(\n url.replace(/^https?:\\/\\/github.com/, \"https://raw.githubusercontent.com\")\n .replace(/\\/blob\\//, '/')\n )\n .then(response => {\n if (response.status !== 200) throw new Error(\n `Check your URL, server returned status ${response.status}.`\n )\n return response.blob();\n });\n}", "function extractOrigin(url) {\n\t if (!/^https?:\\/\\//.test(url)) url = window.location.href;\n\t var m = /^(https?:\\/\\/[\\-_a-zA-Z\\.0-9:]+)/.exec(url);\n\t if (m) return m[1];\n\t return url;\n\t }", "function extractOrigin(url) {\n\t if (!/^https?:\\/\\//.test(url)) url = window.location.href;\n\t var m = /^(https?:\\/\\/[\\-_a-zA-Z\\.0-9:]+)/.exec(url);\n\t if (m) return m[1];\n\t return url;\n\t }", "function extractOrigin(url) {\n\t if (!/^https?:\\/\\//.test(url)) url = window.location.href;\n\t var m = /^(https?:\\/\\/[\\-_a-zA-Z\\.0-9:]+)/.exec(url);\n\t if (m) return m[1];\n\t return url;\n\t }", "function extractOrigin(url) {\n\t if (!/^https?:\\/\\//.test(url)) url = window.location.href;\n\t var m = /^(https?:\\/\\/[\\-_a-zA-Z\\.0-9:]+)/.exec(url);\n\t if (m) return m[1];\n\t return url;\n\t }", "function extractOrigin(url) {\n\t if (!/^https?:\\/\\//.test(url)) url = window.location.href;\n\t var m = /^(https?:\\/\\/[\\-_a-zA-Z\\.0-9:]+)/.exec(url);\n\t if (m) return m[1];\n\t return url;\n\t }", "function extractOrigin(url) {\n if (!/^https?:\\/\\//.test(url)) url = window.location.href;\n var m = /^(https?:\\/\\/[\\-_a-zA-Z\\.0-9:]+)/.exec(url);\n if (m) return m[1];\n return url;\n }", "function extractOrigin(url) {\n if (!/^https?:\\/\\//.test(url)) url = window.location.href;\n var m = /^(https?:\\/\\/[\\-_a-zA-Z\\.0-9:]+)/.exec(url);\n if (m) return m[1];\n return url;\n }", "function extractOrigin(url) {\n if (!/^https?:\\/\\//.test(url)) url = window.location.href;\n var m = /^(https?:\\/\\/[\\-_a-zA-Z\\.0-9:]+)/.exec(url);\n if (m) return m[1];\n return url;\n }", "function extractOrigin(url) {\n if (!/^https?:\\/\\//.test(url)) url = window.location.href;\n var m = /^(https?:\\/\\/[\\-_a-zA-Z\\.0-9:]+)/.exec(url);\n if (m) return m[1];\n return url;\n }", "function extractOrigin(url) {\n if (!/^https?:\\/\\//.test(url)) url = window.location.href;\n var m = /^(https?:\\/\\/[\\-_a-zA-Z\\.0-9:]+)/.exec(url);\n if (m) return m[1];\n return url;\n }", "function extractOrigin(url) {\n if (!/^https?:\\/\\//.test(url)) url = window.location.href;\n var m = /^(https?:\\/\\/[\\-_a-zA-Z\\.0-9:]+)/.exec(url);\n if (m) return m[1];\n return url;\n }", "function extractOrigin(url) {\n if (!/^https?:\\/\\//.test(url)) url = window.location.href;\n var m = /^(https?:\\/\\/[\\-_a-zA-Z\\.0-9:]+)/.exec(url);\n if (m) return m[1];\n return url;\n }", "function GetUrlIdParameterFromUrl(url) {\n \n // If url is null or empty\n if (url == undefined || url == \"\") { return \"\"; }\n \n // try for youtube\n var youtubeRegex = /(\\?v=|\\/\\d\\/|\\/embed\\/|\\/v\\/|\\.be\\/)([a-zA-Z0-9\\-\\_]+)/;\n var result = url.match(youtubeRegex);\n if (result) { return result[2]; }\n \n // try for ted\n var ted_re = /(?:http:\\/\\/)?(?:www\\.)?ted.com\\/([a-zA-Z0-9\\-\\_]+)\\/([a-zA-Z0-9\\-\\_]+)/;\n result = url.match(ted_re);\n if (result) { return result[2]; }\n \n return \"\";\n }", "getUrl(name) { return \"\"; }", "getUrl(nextUrl) {\n const newUrl = nextUrl || this.props.url;\n const token = this.props.token;\n const parsed =\n newUrl && typeof newUrl === 'string' && url.parse(newUrl, true);\n if (!parsed.protocol || !parsed.host) return '';\n if (!this.state.didInvalidateToken && token) {\n this.invalidateToken();\n const tokenizedUrl = tokenizeUrl(newUrl, token);\n const queriedUrl = this.applyQueryParameters(tokenizedUrl);\n return queriedUrl;\n }\n\n if (parsed) {\n return this.applyQueryParameters(\n parsed.protocol + '//' + parsed.host + parsed.pathname,\n );\n }\n return null;\n }", "function extractOrigin(url) {\n if (!/^https?:\\/\\//.test(url)) url = window.location.href;\n var m = /^(https?:\\/\\/[-_a-zA-Z.0-9:]+)/.exec(url);\n if (m) return m[1];\n return url;\n}", "function extractOrigin(url) {\n if (!/^https?:\\/\\//.test(url)) url = window.location.href;\n var m = /^(https?:\\/\\/[-_a-zA-Z.0-9:]+)/.exec(url);\n if (m) return m[1];\n return url;\n}", "function extractOrigin(url) {\n if (!/^https?:\\/\\//.test(url)) url = window.location.href;\n var m = /^(https?:\\/\\/[-_a-zA-Z.0-9:]+)/.exec(url);\n if (m) return m[1];\n return url;\n}", "function extractOrigin(url) {\n if (!/^https?:\\/\\//.test(url)) url = window.location.href;\n var m = /^(https?:\\/\\/[-_a-zA-Z.0-9:]+)/.exec(url);\n if (m) return m[1];\n return url;\n}", "function extractOrigin(url) {\n if (!/^https?:\\/\\//.test(url)) url = window.location.href;\n var m = /^(https?:\\/\\/[-_a-zA-Z.0-9:]+)/.exec(url);\n if (m) return m[1];\n return url;\n}", "function extractOrigin(url) {\n if (!/^https?:\\/\\//.test(url)) url = window.location.href;\n var m = /^(https?:\\/\\/[-_a-zA-Z.0-9:]+)/.exec(url);\n if (m) return m[1];\n return url;\n}", "function extractOrigin(url) {\n if (!/^https?:\\/\\//.test(url)) url = window.location.href;\n var m = /^(https?:\\/\\/[-_a-zA-Z.0-9:]+)/.exec(url);\n if (m) return m[1];\n return url;\n}", "function geturlvar() {\n\tvar vars = {};\n\tvar parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {\n\tvars[key] = value;\n\t});\n\treturn vars;\n}", "_request( url){\r\n\t\treturn fetch( url)\t//response = what we get from fetch = json with server response \r\n\t\t\t.then( ( response) => {\r\n\t\t\t\tif( response.status !== 200) {\r\n\t\t\t\t\tconsole.log('Request returned with code: ' + response.status);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\treturn response.json().then( ( data) => {\r\n\t\t\t\t\treturn data;\r\n\t\t\t\t});\r\n\t\t\t}).catch(( err) => {\r\n\t\t\t\tconsole.log('Fetch Error :-S', err);\r\n\t\t\t});\r\n\t}", "function getUrl(tweet) {\n console.log(\"---> getUrl <---\");\n // console.log(tweet.entities.urls);\n if (!tweet.entities) {\n return;\n }\n if (!tweet.entities.urls[0]) {\n return;\n }\n const link = tweet.entities.urls[0].url;\n return link;\n}", "function fetchAndLog(request_url, request_params){\n return fetch(request_url, request_params)\n .then(function (response) {\n console.log(`FETCH: ${request_params.method} ${request_url} ${response.status}`);\n return response;\n });\n}", "function getPatchedUrl(url) {\n // add comments for habrahabr posts\n let match = url.match(/habrahabr\\.ru\\/post\\/(\\d+)/);\n if (match) {\n return `http://vvscodetools.ru/instapaper_habr/?id=${match[1]}`;\n }\n\n return url;\n}", "fetchAndParse(url, options) {\n return fetch(url, options)\n .then(response => {\n if (response.ok) {\n return response.json()\n } else {\n throw Error(\"bad request\")\n }\n })\n }", "function getDataUrl(name, url) {\r\n if (!url) url = window.location.href;\r\n name = name.replace(/[\\[\\]]/g, \"\\\\$&\");\r\n var regex = new RegExp(\"[?&]\" + name + \"(=([^&#]*)|&|#|$)\"),\r\n results = regex.exec(url);\r\n if (!results) return null;\r\n if (!results[2]) return '';\r\n return decodeURIComponent(results[2].replace(/\\+/g, \" \"));\r\n}", "function extractOrigin(url) {\n\t if (!/^https?:\\/\\//.test(url)) url = window.location.href;\n\t var m = /^(https?:\\/\\/[-_a-zA-Z.0-9:]+)/.exec(url);\n\t if (m) return m[1];\n\t return url;\n\t}", "async _fetch(opts) {\n opts = _.extend({\n method: 'GET',\n url: null,\n body: null,\n callback: null\n }, opts);\n\n var reqOpts = {\n method: opts.method,\n headers: {\n }\n },\n url;\n\n if (/^(http|https):\\/\\//.test(opts.url)) {\n url = opts.url;\n } else {\n url = this.API_BASE_URL + opts.url;\n }\n if (this._sessionToken) {\n reqOpts.headers['Authorization'] = 'Bearer ' + this._sessionToken;\n }\n\n if (opts.method === 'POST' || opts.method === 'PUT') {\n reqOpts.headers['Accept'] = 'application/json';\n reqOpts.headers['Content-Type'] = 'application/json';\n }\n\n if (opts.body) {\n reqOpts.body = JSON.stringify(opts.body);\n }\n if (opts.query) {\n let query = opts.query,\n queryParams;\n\n queryParams = queryString.stringify(query);\n url = url + '?' + queryParams;\n }\n console.log('cool to debug', url, reqOpts);\n return await fetch(url, reqOpts);\n }", "function stubFetch() {\n passedURL = \"none\";\n json = {\n text: \"TEXT\",\n response: {\n results: [\n {\n webTitle: \"HEADLINE1\",\n webUrl: \"http://test1.com\",\n fields: {\n thumbnail: \"http://img1.com\"\n }\n },\n {\n webTitle: \"HEADLINE2\",\n webUrl: \"http://test2.com\",\n fields: {\n thumbnail: \"http://img2.com\"\n }\n }\n ]\n }\n };\n response = { json: () => { return json; } };\n window.fetch = function(url) {\n passedURL = url;\n return new Promise(function(resolve) {\n resolve(response);\n });\n };\n}", "function parseTopURL() {\n let query = window.location.search.substring(1);\n let args = query.split('&');\n for(let i=0; i<args.length; i++) {\n let pair = args[i].split('=');\n if(pair[0] === 'id') {\n return pair[1]\n }\n }\n return undefined;\n}", "function getUrlFilename(url) {\n if (typeof url === 'string') {\n //remove query strings\n return url.split(/[?#]/)[0].split(\"/\").pop();\n }\n return undefined;\n }", "function getAuthInfoFromUrl(url) {\n var authResponse = url.split(\"?\")[1];\n var toJson = '{\"' + authResponse.replace(/&/g, '\",\"').replace(/=/g, '\":\"') + '\"}';\n var authInfo = JSON.parse(\n toJson,\n function (key, value) { return key === \"\" ? value : decodeURIComponent(value); });\n \n return authInfo;\n }", "function cardManifestUrl(cardManifest, url) {\n if (cardManifest && cardManifest.assets && cardManifest.assets[url]) {\n return cardManifest.assets[url];\n }\n}", "function hrb_parse_url_vars( url ) {\n\n\t\tvar vars = [],\n\t\t\thash;\n\t\tvar hashes = url.slice( url.indexOf( '?' ) + 1 ).split( '&' );\n\t\tfor ( var i = 0; i < hashes.length; i++ ) {\n\t\t\thash = hashes[ i ].split( '=' );\n\t\t\tvars.push( hash[ 0 ] );\n\t\t\tvars[ hash[ 0 ] ] = hash[ 1 ];\n\t\t}\n\t\treturn vars;\n\t}", "getData(url = ``) {\n return fetch(url, {\n method: \"GET\", \n dataType: 'json'\n }) \n }", "async getBlogDetails(url){\n\n let resp = await fetch(url)\n\n let respData = await resp.json()\n\n return respData\n }", "function gitUrl(config) {\n return (config.auth.type === 'ssh' ? sshUrl : httpUrl)(config)\n}", "function extractQuerystring(url) {\r\n const queryStart = url.indexOf('?');\r\n if (!queryStart) {\r\n return '';\r\n }\r\n const fragmentStart = url.indexOf('#', queryStart);\r\n return url.substring(queryStart, fragmentStart > 0 ? fragmentStart : undefined);\r\n}", "function URLUtils() {}", "function getURL(offer){\r\n\t\tif(offer.eURL && offer.eURL !== ''){\r\n\t\t\treturn offer.eURL;\r\n\t\t}else{\r\n\t\t\treturn offer.offerDetailUrl;\r\n\t\t}\r\n\t}", "function getURL(offer){\r\n\t\tif(offer.eURL && offer.eURL !== ''){\r\n\t\t\treturn offer.eURL;\r\n\t\t}else{\r\n\t\t\treturn offer.offerDetailUrl;\r\n\t\t}\r\n\t}", "function urlToOptions(url) {\n const options = {\n serviceName: url.serviceName,\n conn: url.conn,\n protocol: url.protocol,\n hostname: typeof url.hostname === 'string' && url.hostname.startsWith('[') ?\n url.hostname.slice(1, -1) :\n url.hostname,\n hash: url.hash,\n headers: url.headers,\n search: url.search,\n pathname: url.pathname,\n path: `${url.pathname || ''}${url.search || ''}`,\n href: url.href\n };\n if (url.port !== '') {\n options.port = Number(url.port);\n }\n if (url.username || url.password) {\n options.auth = `${url.username}:${url.password}`;\n }\n return options;\n}", "function urlify(url, stub) { // jshint ignore:line\n\t\tif (!isStub()) { return getHost() + url; }\n\t\telse { return stub; }\n\t}", "function get$1() {\n return queryString.parse(splitHref()[1]);\n }", "url(info) {\n let path = this.pathname(info);\n path = path.replace(/\\.git$/, '');\n return `https://github.com/${path}`;\n }", "function getURL() {\n var query_string = {};\n var query = window.location.search.substring(1);\n var vars = query.split(\"&\");\n for (var i=0;i<vars.length;i++) {\n var pair = vars[i].split(\"=\");\n // If first entry with this name\n if (typeof query_string[pair[0]] === \"undefined\") {\n query_string[pair[0]] = decodeURIComponent(pair[1]);\n // If second entry with this name\n } else if (typeof query_string[pair[0]] === \"string\") {\n var arr = [ query_string[pair[0]],decodeURIComponent(pair[1]) ];\n query_string[pair[0]] = arr;\n // If third or later entry with this name\n } else {\n query_string[pair[0]].push(decodeURIComponent(pair[1]));\n }\n }\n return query_string;\n}", "function _call (url) {\n return new Promise((resolve, reject) => {\n fetch('https://cors-anywhere.herokuapp.com/' + url) // Bittrex is not using cors headers\n .then(r => r.json())\n .then(r => resolve(r))\n .catch(e => reject(e))\n })\n}" ]
[ "0.7501921", "0.7440336", "0.74331087", "0.74233717", "0.741205", "0.631503", "0.6011854", "0.57178736", "0.5716529", "0.5646943", "0.56425995", "0.56322116", "0.5570821", "0.5529866", "0.5529866", "0.5523805", "0.5459142", "0.5454905", "0.54027534", "0.53973454", "0.5392161", "0.53874534", "0.5380054", "0.53766745", "0.5364499", "0.5344985", "0.53392357", "0.53346336", "0.53283", "0.53090787", "0.5308638", "0.53043455", "0.5289886", "0.52725536", "0.527113", "0.5269167", "0.5262734", "0.5255189", "0.52519053", "0.5247111", "0.5229495", "0.518027", "0.5164502", "0.51600426", "0.51597774", "0.51575094", "0.51455534", "0.5144039", "0.5133382", "0.5129675", "0.51284003", "0.51284003", "0.51284003", "0.51284003", "0.51284003", "0.5119285", "0.5119285", "0.5119285", "0.5119285", "0.5119285", "0.5119285", "0.5119285", "0.51160616", "0.5110861", "0.50991684", "0.50979996", "0.50979996", "0.50979996", "0.50979996", "0.50979996", "0.50979996", "0.50979996", "0.50911874", "0.5088719", "0.50816184", "0.5080874", "0.5080833", "0.5080329", "0.50756806", "0.50739574", "0.50616384", "0.5059545", "0.5058441", "0.504755", "0.50456554", "0.504368", "0.50417125", "0.5037106", "0.50354755", "0.5034991", "0.50319904", "0.50316936", "0.5026533", "0.5026533", "0.502465", "0.5023199", "0.5020343", "0.5016713", "0.5005466", "0.50053704" ]
0.74539983
1